Hi... I try to access webcam from my system. But it throws an error "R6010 abort () called" But the same code working perfectly in my laptop I am using logitech webcam in my system. The sample code also provided here. Please Help me in this regard.
int main(int argc, char** argv) {
cvNamedWindow("Example2", CV_WINDOW_AUTOSIZE);
CvCapture* capture;
if (argc == 1) {
capture = cvCreateCameraCapture(0);
}
else {
capture = cvCreateFileCapture(argv[1]);
}
assert(capture != NULL);
IplImage* frame;
while (1) {
frame = cvQueryFrame(capture);
if (!frame) break;
cvShowImage("Example2", frame);
char c = cvWaitKey(33);
if (c == 27) break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("Example2");
}