1

I've tried do an example for test my Camera Raspberry and the video window don't shows up. I've done an example from opencv site. I compile the code and nothing happens. The video window don't shows up. The code How can I see the video?

cap = cv2.VideoCapture(1)

while(cap.isOpened()):  # check !
    ret, frame = cap.read()
    if ret:
        gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
        cv2.imshow('frame', gray)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()
eshirima
  • 3,837
  • 5
  • 37
  • 61

0 Answers0