1 | initial version |
Looking back at this, I was attempting to open a png file with VideoCapture()
When opening a png file, you must use cv2.imread("path/to/image")
when opening a video, you must use cv2.VideoCapture("/path/to/video")
when accessing a webcam, you must use cv2.VideoCapture(webcam_device_id)
, where webcam_device_id
is an integer, usually 0, 1, or 2