For some reason, when I 'cd' to the data folder (Freenove_4WD_Smart_car_Kit_for_Raspberry_pi-master), and then to Code/Server, and run sudo python test.py Camera, it starts up, waits for a couple seconds, then exits with this error: OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /build/opencv-L65chJ/opencv-3.2.0+dfsg/modules/highgui/src/window.cpp, line 304 Traceback (most recent call last): File "test.py", line 167, in <module> test_Camera() File "test.py", line 137, in test_Camera cv2.imshow("Capture", frame) cv2.error: /build/opencv-L65chJ/opencv-3.2.0+dfsg/modules/highgui/src/window.cpp:304: error: (-215) size.width>0 && size.height>0 in function imshow. Any code tweaks that could fix this? Thanks.
For some reason, when I 'cd' to the data folder (Freenove_4WD_Smart_car_Kit_for_Raspberry_pi-master), and then to
Code/Server
, and runsudo python test.py Camera
, it starts up, waits for a couple seconds, then exits with this error:OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /build/opencv-L65chJ/opencv-3.2.0+dfsg/modules/highgui/src/window.cpp, line 304 Traceback (most recent call last): File "test.py", line 167, in <module> test_Camera() File "test.py", line 137, in test_Camera cv2.imshow("Capture", frame) cv2.error: /build/opencv-L65chJ/opencv-3.2.0+dfsg/modules/highgui/src/window.cpp:304: error: (-215) size.width>0 && size.height>0 in function imshow
. Any code tweaks that could fix this? Thanks.