How to avoid “Video Source -> Capture source” selection in OpenCV 2.3.0 - Visual C++ 2008

后端 未结 2 1297
一整个雨季
一整个雨季 2020-12-18 16:13

I had a perfectly working OpenCV code (having the function cvCaptureFromCAM(0)). But when I modified it to run in a separate thread, I get this \"Video

2条回答
  •  -上瘾入骨i
    2020-12-18 17:01

    Solved. I couldn't get rid of the above mentioned dialog box, but I avoided the error by simply duplicating the line capture = cvCaptureFromCAM(0);

    capture = cvCaptureFromCAM(0);
    capture = cvCaptureFromCAM(0);
    

    It was just random. I suspect it had something to do with behavior of Thread. What's your idea?

    Thanks all for contributing.

提交回复
热议问题