[OpenCV2.14.13]Can't open the second camera [closed]
- The work environment is : OpenCV 2.4.13, VS2008, Two different kind of usb camera.
I can't open the sencond camera when using the following code
int _tmain(int argc, _TCHAR* argv[]){ VideoCapture capture(0); if( !capture.isOpened() ) std::cout << "Capture0 can't be opened\n" << std::endl; VideoCapture capture1(1); if( !capture1.isOpened() ) std::cout << "Capture1 can't be opened\n" << std::endl; return 0;}
please spare us duplicate questions. (rather update your previous one)
same usb controller?
@Micka Thank you for your answer. Yes, i find that they use the same usb controller.
Thank you, i have found that these camera use the same usb controller.If I want to open these cameras, i have to decrease the resolution. Below is the code that i can open the two camera:
int _tmain(int argc, _TCHAR* argv[]) { VideoCapture camera0(1); camera0.set(CV_CAP_PROP_FRAME_WIDTH,432); camera0.set(CV_CAP_PROP_FRAME_HEIGHT,240); VideoCapture camera1(0); camera1.set(CV_CAP_PROP_FRAME_WIDTH,432); camera1.set(CV_CAP_PROP_FRAME_HEIGHT,240); return 0; }