Skip to content

Welcome to Cartoonify, a fun and interactive project that converts real photos into cartoonified masterpieces! This project guides you through the entire process, from loading the image to displaying the final cartoon version.😛

Notifications You must be signed in to change notification settings

Vidhi1290/AI-ML-Cartoonifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

AI-ML-CARTOONIFIER😎❤️

🎨 Cartoonify: Turning Photos into Fun Art! 🎉

In this guide, we'll walk you through the entire process of transforming real photos into cartoonified images. Along the way, we'll explain each step and the technology stack involved in the process. Let's dive in!

Tech Stack

  • OpenCV: We use OpenCV for image processing tasks such as loading the image, converting color formats, and applying filters.
  • Matplotlib: Matplotlib helps visualize the images and results of each step in the transformation process.
  • NumPy: NumPy is used for efficient numerical computations throughout the process.
  • TensorFlow/Keras: This stack could be useful for potential advanced image processing applications.
  • Skimage: Provides image manipulation functions that may be used in more advanced versions of the process.

Steps Overview

Here's what we'll do in this process:

  1. 🖼️ Load the Image

    • Tech: OpenCV
    • What happens: Load the input image using OpenCV and convert it from BGR to RGB format. Display the real image to see where the journey begins!
  2. ✨ Apply Edge Detection

    • Tech: OpenCV
    • What happens: Convert the image to grayscale and apply a median blur to reduce noise. Use the Canny edge detection algorithm to find and visualize the edges in the image.
  3. 🎨 Apply Bilateral Filter

    • Tech: OpenCV
    • What happens: Apply a bilateral filter to smooth the image while preserving the edges. This filter helps to create a soft, artistic look.
  4. 🖌️ Cartoonify the Image

    • Tech: OpenCV
    • What happens: Invert the edges to create a mask, convert it to 3 channels, and combine it with the filtered image using bitwise operations. This creates the cartoonified version.
  5. 🆚 Display and Compare

    • Tech: Matplotlib
    • What happens: Display the real and cartoonified images side by side for comparison. Observe the magical transformation from reality to cartoon!

Backend and Process Details

  • Image Loading: The load_image function uses OpenCV to load the image and convert it to RGB format for consistency in further processing.

  • Edge Detection: The apply_edge_detection function converts the image to grayscale, applies a median blur, and uses Canny edge detection to find edges.

  • Bilateral Filter: The apply_bilateral_filter function uses a bilateral filter to smooth the image while preserving the edges for a soft, cartoonish appearance.

  • Cartoonify Image: The cartoonify_image function combines the filtered image with the inverted edges mask using bitwise operations. This creates the final cartoonified image.

  • Displaying Images: The show_comparison function uses Matplotlib to display the real and cartoonified images side by side for comparison.

Now you have a complete understanding of the tech stack and the process involved in converting real photos into cartoonified art. Enjoy your artistic journey! 🎉

About

Welcome to Cartoonify, a fun and interactive project that converts real photos into cartoonified masterpieces! This project guides you through the entire process, from loading the image to displaying the final cartoon version.😛

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published