How to Capture Images and Videos With Computer Webcam Using OpenCV in Python ? | Part 2
In the previous post we saw how to capture images and videos in python with the help of VideoCapture() available in OpenCV. But, we left it incomplete, because we only captured the first frame which the Webcam was able to read within the sleep duration. In this post, we will understand how to capture a video rather than only a single frame. First things first, we will have to import the OpenCV module. import cv2 Next, we have to instantiate the camera and for that we will make use of the VideoCapture() method with its argument being set to 0. If you have any doubts on what is VideoCapture and what are its different arguments do refer to this post also, we will have to release the camera once we have read the video. This will be done with the help of the release() method. import cv2 video=cv2.VideoCapture(0) #the above line will trigger the webcam for recording the video video.rel...