Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- cap = cv2.VideoCapture(0)
- while True:
- ret, frame = cap.read()
- cv2.imshow('Live Video', frame)
- if cv2.waitKey(1) & 0xFF == ord('q'):
- break
- cap.release()
- cv2.destroyAllWindows()
- Traceback (most recent call last):
- File "C:/Users/Admin/PycharmProjects/industrialcamera/ICvideocapture.py", line 11, in <module>
- cv2.imshow('Live Video', frame)
- cv2.error: OpenCV(4.1.0) C:projectsopencv-pythonopencvmoduleshighguisrcwindow.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement