开发者

cvCapturefromCAM() returns NULL

开发者 https://www.devze.com 2023-03-08 05:48 出处:网络
Iam using cvCapturefromCAM() to display the camera video. But if some VT(video) call is made, cvCapturefromCAM() is returning N开发者_JAVA百科ULL. according to my analysis it is like, if the camera ha

Iam using cvCapturefromCAM() to display the camera video. But if some VT(video) call is made, cvCapturefromCAM() is returning N开发者_JAVA百科ULL. according to my analysis it is like, if the camera has already been started , capture will return NULL. so while doing video call, camera has bee started by the videoengine lib. And i donot hav the cvCapture pointer also to release the camera. Please help me how to go about this deadlock..

thanks gayathri devi


I think you have to make a pointer to cvCapturefromCAM() and then after use, release it. That's it.

Like this:

capture = cvCaptureFromCAM(0);

cvReleaseCapture(&capture);

Good Luck!


Make this modification and it should work. I also had this issue before.

CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY );
0

精彩评论

暂无评论...
验证码 换一张
取 消