Ask Your Question
1

VideoCapture .read() on OSX always gives False, None

asked 2013-10-10 09:34:42 -0600

ddollar gravatar image

updated 2013-10-10 11:06:37 -0600

berak gravatar image

I am able to successfully open the webcam and retrieve the resolution which looks correct.

Every attempt to either .read() a frame or .grab() / .retrieve() ends up with False, None.

How can I begin to debug this?

edit retag flag offensive close merge delete

Comments

I have the same problem. When I process the frames in a while loop I'm able to work around it by checking if the frame is None and only proceeding with that loop round if that's not the case. I guess the read only fails in the beginning and later iterations are ok. Not really an optimal solution though. I suspect the webcam isn't really ready after cv2.VideoCapture() for some strange reason.

ohra gravatar imageohra ( 2013-10-13 12:17:36 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-14 12:01:20 -0600

ohra gravatar image

After a bit of googling I found this issue: 2.4.6.1 camera pipeline fix. It seems the OSX webcam functionality is busted in the latest release. So, as a quick fix I reverted this one change in the OpenCV sources: modules/highgui/src/cap_qtkit.mm.

After rebuilding OpenCV the camera seems to work normally in all the OpenCV samples which didn't work at all before.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-10-10 09:34:42 -0600

Seen: 1,422 times

Last updated: Oct 14 '13