Probably a bug in statically linked OpenCV


#1

During my testing of my application, it looks like reading images from camera, then relasing it and then doing it again just don’t work.
It doesn’t matter, whether I do it with SDK detector:

CameraDetector detector();
detector.start();
detector.stop();
detector.start() -> here fails with error like bad descriptor

or with opencv classes:

VIdeoCapture capture();
capture.open();
while (capture.read(Mat m))…
capture.release()
capture.open();
while (capture.read(Mat m))… -> here fails with similar errors like above

Error:
VIDIOC_STREAMON: Bad file descriptor
but I think it happened, that I got invalid pixel format in second pass.

When I keep camera open through the whole live of the application, everything works. But this is pointless, because most of the time camera is not used.

Can you please check? Maybe upgrade OpenCV to a newer version.


#2

I ran into some other problems with OpenCV as well. Look like they are running a very old version of OpenCV. Something from at least 2 years ago.


#3

@archy_wilhes Apologize for the delayed response. Yes we are statically linking to OpenCV v2.4.8. We have some custom changes that we are in process of merging and get back onto OpenCV v3.3.


Build error with OpenCV's libpng when using Affdex for Unity with another third-party video-streaming library in Swift
#4