Загрузка...

How to convert Image into Sketch using Python | Converting Image to Sketch ( 5 Lines of Code )

Title: Convert A Photo To Pencil Sketch Using Python Introduction: ?In this video, I will show you how to convert an image to a pencil sketch using the Python programming language in just 5 lines of code! Python is a general-purpose programming language that was created in the late 1980s and has seen significant growth in popularity from big tech companies and communities over the years. ?One of the reasons for its popularity growth is its ease of use and simplicity. Just think that we are about to transform an image in just 5 lines of code !! Actually, it could be less. Concepts: Before writing any code let’s walk through some of the steps that will be used and try to understand them a bit. ?Step 1: Find an image that we want to convert into a pencil sketch. I am going to use the image of a Jerry. ?Step 2: Read in the Red, Blue, Green (RBG) image and then convert it to a grayscale image. This effectively makes the image a classic “black and white” photo. This will be our “greyscale image”. ?Step 3: We are going to invert the “grey scaled image” also known as getting the image negative, this will be our “inverted greyscale image”. Inversion can be used to enhance details. ?Step 4: Use a Gaussian function to blur the image. In image processing, a Gaussian blur (also known as Gaussian smoothing) is the result of blurring an image by a Gaussian function. ?Step 5: Invert the newly created “blurred image”, this will be called the “inverted blurred image”. ?Step 6: Now we are going to create the pencil sketch image by blending the “greyscale image” with the “inverted blurred image”. This can be done by dividing the “grayscale image” by the “inverted blurred image”. Since images are just arrays we can easily do this in programming by using the divide function from the cv2 library. Quick Steps: 1. Convert the RGB colour image to grayscale. 2. Invert the grayscale image to get a negative. 3. Apply a Gaussian blur to the negative from step 2. 4. Blend the grayscale image from step 1 with the blurred negative from step 3 Source Code & Link: Link - https://drive.google.com/drive/folders/1fntrAIqJ2k6PzxuoAj8CjdZeMWCPnLLD?usp=sharing #Python, #Imagetosketch, #Imagetosketchinpython, #Imagetopencilsketch ====*==== ✅ Now donation is open, you can donate to help us grow ✅ ✅ Paypal - https://www.paypal.me/soosai01 ✅ Google Pay - 7418713984 ====*==== For More Videos: ? Contact Management System in Python https://youtu.be/MPxEARUHopw ? How To Get Latest News In Python https://youtu.be/Aiu3JT77pdY ?Health Management System using SQLite and Python https://youtu.be/ibfU1K0BMqU ?How to Extract Images from Pdf File using Python https://youtu.be/kELY4eHalBE ?Gender and Age Detection using OpenCV and Python https://youtu.be/Jy9p7vhobeA ? Find and Draw Contours with OpenCV in Python https://youtu.be/XrRonZbl5fU ? Colour detection using Python and OpenCV https://youtu.be/6Otgyyv--UU ? Sentiment Analysis using Python https://youtu.be/F8rSI-kUAOA ? Make Your Own Haar Cascade Object Detector Using GUI In Windows https://youtu.be/4BVDR7ggseI ? Python Tutorial In Detail https://www.youtube.com/playlist?list=PLUDEJJkD7C6Q3-iEX2Np3vBzLoRF1kpln ? Data Visualisation Running Graph https://www.youtube.com/playlist?list=PLUDEJJkD7C6QPtw_ANm6CnxwJ786HrAAG ? Computer Hacks and Tricks https://www.youtube.com/playlist?list=PLUDEJJkD7C6RtWDmY59-y_wwU-dZlHNUR ====*==== Follow Me Here For More Help or Queries ?Facebook - https://www.facebook.com/Falcon-Infomatic-108235664061988/ ?Instagram - https://www.instagram.com/falconinfomatic/ ====*==== SUBSCRIBE NOW for weekly videos on Python Tutorial, Computer Hacks and Tricks, Data Visualisation, Technology, and Many More.

Видео How to convert Image into Sketch using Python | Converting Image to Sketch ( 5 Lines of Code ) автора Кодовый революционер
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки