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:
detector.start() -> here fails with error like bad descriptor
or with opencv classes:
while (capture.read(Mat m))…
while (capture.read(Mat m))… -> here fails with similar errors like above
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.