4

I've had this issue all day since installing my USB (well technically an AV to USB) camera and testing out just a basic video script.

I have confirmed it is nothing on my code's end but something to do with the format the camera displays at (YUYV).

So far I have tried:

  • cv2.imshow(img,cv2.imdecode(img,-1))
    • Note: this gave me a new error of: OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/pi/opencv-3.3.0/modules/
  • running cap.set(cv2.CAP_PROP_CONVERT_RGB, True)
  • using the qv4l2 tool (worked 100% fine)

None of which fixed the problem of getting the camera to work with OpenCV. Does anyone have any possible solutions?

Mega thank yous to anyone who has any idea!

  • I'm having the same problem; have you found a solution? – saulspatz Jul 15 '18 at 20:04
  • Yeah it actually was a problem on my side. What I did to solve is was have the function with a parameter mirror=True, and when I called the function, also give it the parameter Mirror=True – Isaac Addis Jul 28 '18 at 23:38

0 Answers0