Reading (cam.read()
) from a VideoCapture
returns a tuple (return value, image)
. With the first item you check wether the reading was successful, and if it was then you proceed to use the returned image
.
This is documented at https://opencv-tutorial.readthedocs.io/en/latest/intro/intro.html#capture-live-video