I'm trying to use the OSVR IR camera in OpenCV 3.1.
Initialization works OK.
Green LED is lit on camera.
When I call VideoCapture.read(mat)
it returns false and mat
is empty.
Other cameras work fine with the same code and VLC can grab the stream from the OSVR camera.
Some further testing reveals: grab()
return true, whereas retrieve(mat)
again returns false.
Getting width and height from the camera yields expected results but MODE and FORMAT gets me 0.
Is this a config issue? Can it be solved by a combination of VideoCapture.set
calls?
AlternativeOfficial answer received from the developers (after my own solution below): The reason my camera didn't work out of the box with OpenCV might be that it has old firmware (pre-v7).Work around (or just update firmware):
I found the answer here while browsing anything remotely linked to the issue: Fastest way to get frames from webcam
You need to specify that it should use DirectShow.