size.width>0 && size.height>0 in function 'cv::imshow' code example
Example: size.width>0 && size.height>0 in function 'cv::imshow'
cap = cv2.VideoCapture(0)
# try zero first and then 1, 2 etc, it worked with 0 for me
cap = cv2.VideoCapture(0)
# try zero first and then 1, 2 etc, it worked with 0 for me