View Single Post
Posts: 25 | Thanked: 1 time | Joined on Feb 2010
#3
Originally Posted by pelago View Post
Very hard to say without knowing more about your app, e.g. how you are accessing the camera. If it's open source maybe you could post your source code somewhere.
I use OpenCV library to access the camera. Here is the code:
Code:
int main(int argc,char** argv)
{
    CvCapture* capture = 0;
    if( argc == 1 || (argc == 2 && strlen(argv[1]) == 1 && isdigit(argv[1][0]))){
        capture = cvCaptureFromCAM( argc == 2 ? argv[1][0] - '0' : 0 );
    }
...

    for(;;){	
	g_image = cvQueryFrame( capture );
        ...
        cvWaitKey(100);
    }
...

cvReleaseCapture(&capture);