RUVIDEO
Поделитесь видео 🙏

Live Sketch Using Webcam with Python OpenCV [Easy Guide]

#Pyresearch #opencv #python

#LiveSketchUsingWebcamwithPythonOpenCV[Easy Guide]

Today in this tutorial, you will learn an application of OpenCV which will make you realize how powerful OpenCV can get.

In the project, we will take a live webcam feed and convert it into a live sketch with the help of NumPy and the OpenCV library.

Let’s begin with the amazing project!


Step 1: Importing Modules

To get started, we need to import OpenCV and Numpy (assuming that you have the libraries installed). We define OpenCV and Numpy in our code as follows:


Step 2: Define a function to convert the frame to Sketch

In order to covert a frame into a sketch we will follow a number of steps which are listed below:

1 -Convert the Image into a gray image
2- Apply Gaussian Blur to the gray image obtained
3 - Apply Canny Edge Detection to the Gaussian Image
4 - In the end, Invert the Image and get the Binary Inverted Image

Step 3: Open Live Webcam and apply function
We need to use the webcam and extract image frames from the video. In order to achieve the same, we will use the VideoCapture and read function to extract frames one after another.

Now use the show function to display the live webcam and apply the sketch function created in the previous step.

The final step is to create an exit condition for the window. Here we have kept the key the Enter Key as the exit key for the window. In the end, destroy all the windows that were opened and yet to be closed during the program.

The Final Output

The small video below displays the final output obtained after running the whole code mentioned in the previous section.




Please let me know your valuable feedback on the video by means of comments. Please like and share the video. Do not forget to subscribe to my channel for more educational videos.


Any type of problem you can comment down.

Want more education? Connect with me here:
Twitter:https://twitter.com/Noorkhokhar10
Github:https://github.com/noorkhokhar99
Subscribe:https://www.youtube.com/channel/UCyB_7yHs7y8u9rONDSXgkCg?view_as=subscriber
Organizations :https://www.facebook.com/Pyresearch
Youtube: https://www.youtube.com/c/Pyresearch

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Live Sketch Using Webcam with Python OpenCV [Easy Guide]», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.