https://github.com/vyjayanthipolapragada/image_cartoonification_opencv
Cartoonify images using opencv and tkinter
https://github.com/vyjayanthipolapragada/image_cartoonification_opencv
cartoonify computer-vision easygui image-processing imageio matlplotlib numpy opencv pillow python tkinter
Last synced: 2 months ago
JSON representation
Cartoonify images using opencv and tkinter
- Host: GitHub
- URL: https://github.com/vyjayanthipolapragada/image_cartoonification_opencv
- Owner: VyjayanthiPolapragada
- Created: 2024-02-01T18:26:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-03T18:00:48.000Z (over 1 year ago)
- Last Synced: 2024-02-04T20:02:00.553Z (over 1 year ago)
- Topics: cartoonify, computer-vision, easygui, image-processing, imageio, matlplotlib, numpy, opencv, pillow, python, tkinter
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Cartoonification
Apply cartoon effect to images using opencv with pythonDifferent functions are used to apply cartoon effects and save the image
1. upload_save.py : contains functions to upload the image file from a folder and save the cartoonified image to the same folder
2. image_cartoonification.py : used to apply cartoon effect on the selected imagesCartoon effect is applied using the following steps for an image (each image transition is plotted after final output) :
1. Read the image using opencv
2. Convert to gray scale and apply median blur to smoothen the image
3. Retreive edges using adaptive threshold technique (efficient when detailed edges are required)
4. Apply bilateral filter to RGB image (this ensures smoothness but edges remain sharp)
5. Mask both filtered and edged images to obtain cartoon effectmain.py consists of the main code to initiate a tkinter event (dialog box) to uplaod the image (using easygui) and save the image to the original path
Libraries used: opencv,numpy,tkinter,PIL,easygui,imageio,matplotlib,os,sys (except easygui other libraries are in-built jupyter notebook)
*Sample images and their output is attached above