Using multiple external cameras
Hi, i am using 2 external webcams. The problem is that openCV does not recognize the second one, and it is the same exact model of the first one..here is my code
int main(int, char**)
{
VideoCapture cap(0); // open the default camera
VideoCapture web(1);
VideoCapture web2(2);
Mat laptop;
cap >> laptop;
imshow("laptop ", laptop);
Mat webcam;
web >> webcam;
imshow("webcam", webcam);
Mat webcam2;
web2 >> webcam2;
imshow("webcam2", webcam2);
waitKey();
return 0;
}
It is an easy program to understand the index of my cameras. The problem is that i got the built-in camera to the index 0, one external webcam to index 1 ..and does not link the third camera to any index. Here is the output
HIGHGUI ERROR: V4L: index 2 is not correct!
libv4l2: error turning on stream: No space left on device
VIDIOC_STREAMON: No space left on device
OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in cvGetMat, file /build/buildd/opencv-2.3.1/modules/core/src/array.cpp, line 2482
terminate called after throwing an instance of 'cv::Exception'
what(): /build/buildd/opencv-2.3.1/modules/core/src/array.cpp:2482: error: (-206) Unrecognized or unsupported array type in function cvGetMat
thank you