Posted in Face Detection

How To capture a video using open cv

Hi there, This is Goutham From DIYblogger. Once again we are back with a interesting post.

In this blog we will going to discussing about How to capture a video using open cv python module

Let’s get start

Step 1: You should be clear whether you have installed python open cv module in your computer or laptop.

Step 2: Open Your Favorite code editor.

Step 3: Source code

import cv2

video = cv2.capture(0)

It means that we are using our laptop camera to capture the video or you can “1” also. In case if you are using your Webcam then you can mention your ID in that brackets.

while(True):

res,cap = cv2.imshow(video)

cv2.WaitKey(5)

If you have any doubts regarding this post you can approach me by simply post a comment.

For more information you can follow me on instagram (goutham_0306).

Unknown's avatar

Author:

WebDevloper , blogger, Android App developer

Leave a comment