DirectShow camera gives black image

asked 2017-02-26 08:47:24 -0500

benT gravatar image

Hi, I built OpenCV from source (with WITH_DSHOW enabled) a couple of days ago and am unable to get it to open my DirectShow camera (IDS uEye). I open the device with VideoCapture(0) and then start a loop reading frames. If the read was successful I write the Mat to a bmp file (for debugging) and load it into an OpenGL texture. This works great with my creative webcam, but not with my IDS uEye. Is there anything special I need to do to grab frames from a DirectShow camera such as the uEye? I am using the C++ interface. Thanks!

edit retag flag offensive close merge delete


VideoCapture is based VFW,not DirectShow.May be OpenCV wiki will help you .

jsxyhelu gravatar imagejsxyhelu ( 2017-02-26 17:22:24 -0500 )edit

Have you research if any other 3rddparty software can capture frames from the IDS uEye? For the instance VLC video player?

pi-null-mezon gravatar imagepi-null-mezon ( 2017-02-27 01:33:27 -0500 )edit

Hi. sorry for my late reply. Other DirectShow tools are working. And VideoCapture should support DirectShow as far as I know. Otherwise it should throw an error instead of black mat's, shouldn't it? I can't find it anymore, but I think there even was a way to force VideoCapture to use DirectShow by using some offset + camera index instead of the camera index.

benT gravatar imagebenT ( 2017-03-01 00:52:10 -0500 )edit