The video is available: BlueUmbrella.webm. # When everything done, release the capture
Gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) Normally one camera will be connected (index = 0) or the 2nd camera (index = 1).Ĭap = cv2.VideoCapture('BlueUmbrella.webm') Device index is just the number to specify which camera. Its argument can be either the device index or the name of a video file.
To capture a video, we need to create a VideoCapture object.
The following code is to capture video which could be either live stream or file stream.