Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I cant access my webcam Opencv 2.4.3

Here is my code

include <highgui.h>

include <cv.h>

int main(int argc,char* argv) { IplImage frame; CvCapture* capture = cvCreateCameraCapture(-1); cvNamedWindow("Example 2",CV_WINDOW_AUTOSIZE); while(1) { frame = cvQueryFrame(capture); if(!frame) { printf("Error"); break; } cvShowImage("Example 2",frame); char c = cvWaitKey(33); if(c==27) break; } cvReleaseCapture(&capture); cvDestroyWindow("Example 2"); }

It shows the message "error" I am using opencv2.4.3 in Ubuntu 12.10 and my ide is Eclipse.

I cant access my webcam Opencv 2.4.3

Here is my code

include <highgui.h>

include <cv.h>

int main(int argc,char* argv) { IplImage frame; CvCapture* capture = cvCreateCameraCapture(-1); cvNamedWindow("Example 2",CV_WINDOW_AUTOSIZE); while(1) { frame = cvQueryFrame(capture); if(!frame) { printf("Error"); break; } cvShowImage("Example 2",frame); char c = cvWaitKey(33); if(c==27) break; } cvReleaseCapture(&capture); cvDestroyWindow("Example 2"); }

It shows the message "error" I am using opencv2.4.3 in Ubuntu 12.10 and my ide is Eclipse.

sorry for my bad formatting. I dont know how to format.

I cant access my webcam Opencv 2.4.3

Here is my code

include <highgui.h>

include <cv.h>

#include <highgui.h>
#include <cv.h>
int main(int argc,char* argc,char** argv)
{
    IplImage IplImage* frame;
    CvCapture* capture = cvCreateCameraCapture(-1);
    cvNamedWindow("Example 2",CV_WINDOW_AUTOSIZE);
    while(1)
    {
        frame = cvQueryFrame(capture);
        if(!frame)
        {
            printf("Error");
            break;
        }
        cvShowImage("Example 2",frame);
        char c = cvWaitKey(33);
        if(c==27)
            break;
    }
    cvReleaseCapture(&capture);
    cvDestroyWindow("Example 2");
}

}

It shows the message "error" "error". I am using opencv2.4.3 in Ubuntu 12.10 and my ide is Eclipse.

sorry for my bad formatting. I dont know how to format.