I am trying to access the raspberry pi camera with OpenCV. I found some code that I want to use but I think something is wrong with this code:
video_capture = cv2.VideoCapture(-1)
because later when I use this code:crop_img = frame[60:120, 0:160]
I get this error:
TypeError: 'NoneType' object is not subscriptable
How do I fix this?