尝试创建网络摄像头图像的输出

时间:2012-11-09 17:52:32

标签: c opencv iplimage

即使指向webcamInterface的指针显示值,帧指针也始终设置为0。我的相机也点亮了,所以我不知道该怎么做

 #include "cv.h" 
 #include "highgui.h" 
 #include <stdio.h>  

 int main() 
 {
    IplImage* frame;
    CvCapture* webcamInterface = cvCreateCameraCapture(0);
    if(webcamInterface == NULL)
    {
        fprintf(stderr, "webcamInterface is NULL");
    }

    while(1)
    {
        frame = cvQueryFrame(webcamInterface);
    }

    return 0;
 }

0 个答案:

没有答案