Skip to content

Kesavan-Raman/Cartoonizing-the-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cartoonizing the Image

This is a Python script that converts an image into a cartoon-style image using OpenCV and NumPy. The script applies a bilateral filter to reduce the color palette, detects and emphasizes the edges using Canny edge detection, and then merges the edges with the filtered image to produce a cartoon-style image. The script also includes an optional argument to adjust the intensity of the edge lines.

Requirements

  • Python 3.x
  • OpenCV
  • NumPy
  • Matplotlib (for displaying the image)

Usage

  1. Clone this repository or download the cartoonize.py file.
  2. Install the required packages using pip: pip install opencv-python numpy matplotlib
  3. Run the script with the following command: python cartoonize.py path/to/input_image path/to/output_image [optional: edge_intensity]

Example: python Cartoon_Master.py

The edge_intensity argument is optional and controls the intensity of the edge lines. The default value is 100.

License

This code is released under the MIT License. See the LICENSE file for more information.

Acknowledgments

This script was inspired by the following resources:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages