DEV Community

Cover image for Cartoonify Image with Machine Learning
Rakeshh31
Rakeshh31

Posted on

Cartoonify Image with Machine Learning

This article is all about building a photo cartoonifyer using Python and OpenCV.

WHAT IS OpenCV?

Python is the pool of libraries and OpenCV is a cross-platform library used for Computer Vision. It includes applications like video and image capturing and processing. It is majorly used in image transformation, object detection, face recognition, and many other stunning applications.

Steps to create this application:-

Step 1: We need to import all the required libraries/modules

Alt Text

Step 2: In this step we need to build a File Box to choose a particular file.

Alt Text

Step 3:Storing the image.

Alt Text

Step 4: Transforming the image into grayscale.

Alt Text

Step 5: Smoothening the grayscale image.

Alt Text

Step 6: Retrieving the edges of the image.

Alt Text

Step 7: Preparing a Mask Image.

Alt Text

Step 8: Giving a Cartoon Effect.

Alt Text

Step 9: Plotting all the transitions together.

Alt Text

Step 10: Functionally of save button.

Alt Text

Step 11: Making the main window.

Alt Text

Step 12: Making the Cartoonify button in the main window.

Alt Text

Step 13: Making a Save button in the main window

Alt Text

Step 14: Main function to build the tkinter window.

"top.mainloop()"

And that's how we create our image cartoonifer, hope this article was helpful.

Top comments (0)