Querying an empty camera result differs in OpenCV 2.4.9 vs. 3.0.0

asked 2016-05-21 11:17:36 -0500

Hi there,

I am a non-expert OpenCV user.

I am using OpenCV through ITK due to some constraints of my task. I am using OpenCV 2.4.9 and OpenCV 3.0.0 under a 32-bit Windows environment.

My PC is connected to an external device that has an optical camera manufactured by Euresys. The camera works fine on its own.

However, even if the camera is switched off, it looks like OpenCV 2.4.9 successfully creates the CvCapture instance through (apparently) DirectShow:

CV_IMPL CvCapture * cvCreateCameraCapture (int index)



The same method implementation differs in OpenCV 3.0.0 and 0 is returned for the same code. The DirectShow case has been removed.

Is this the expected behavior in OpenCV 2.4.9? Is it a bug in OpenCV 2.4.9?

Since the capture instance looks valid in OpenCV 2.4.9, one may go on and try to query the frame through

  IplImage* tempImage = cvQueryFrame(localCapture);

where localCapture is a pointer to CvCapture.

OpenCV 2.4.9 returns a null pointer.

Thus, queryng about the channels


will unavoidably throw an exception in OpenCV 2.4.9

The third question is whether querying an image/frame from a switched-off camera is allowed in OpenCV 2.4.9, and whether that behavior is not allowed in 3.0.0.

Thank you,


[1] https://github.com/InsightSoftwareCon...

[2] http://www.euresys.com/support/

edit retag flag offensive close merge delete


Anybody, please?

jhlegarreta gravatar imagejhlegarreta ( 2016-05-27 05:01:08 -0500 )edit