How to convert an image to a sketch using Python and the OpenCV (cv2) module! Transform any picture!

preview_player
Показать описание
This video covers everything you need to learn how to use the OpenCV (computer visuals) python module, also identified as cv2.

We start by covering using pip to install the module, followed by importing cv2. Then we show how to load in the image, create a window of both varied and fixed window size, and then display our image in the window.

Then we start transforming our photo, first to grayscale, then to a negative/inverted copy, then we blur it and invert it back, and finally use the divide tool to scale the photo giving it the final 'sketched' effect!

There are tons of useful tools inside of OpenCV so if you want to see more projects like this just let me know about it in the comments below! If you found this fun, useful or cool please leave a like on the video and subscribe to the channel!

Thank you so much for the support and good luck with your code!!
Рекомендации по теме
Комментарии
Автор

Do you ever take suggestions/ideas for videos for you python channel? I've written 3 python scripts (an rss feed downloader for podcasts, a normalize (to raise/lower volume) script for mp3s and a normalize script for mp4). I don't have my own channel (the sound of my voice sucks), but I wanted to know if you'd be interested in doing a video for any of these ideas.

If not, no worries, but I wanted to ask just to share what I've worked on. If you are interested, I can send you screenshots and more info. I could show you the code or explain the basics of how it works and maybe you can do your own spin on it (like how you create a gui within the pygame window, for example).

-thanks

MichaelGarcia-cgon
Автор

how to capture image then convert sketch in python can u send a source code

vandanapal