Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

sounds like you're trying to open both capture on the same device id, instead try :

VideoCapture cap0(0);
VideoCapture cap1(1);

// later: 
if ( cap0.isOpened() && cap1.isOpened() ) {
    Mat frame0;    cap0.read( frame0 );
    Mat frame1;    cap1.read( frame1 );
    // stereo processing here
}

sounds like you're trying to open both capture captures on the same device id, id(-1, the default), instead try :

VideoCapture cap0(0);
VideoCapture cap1(1);

// later: 
if ( while( cap0.isOpened() && cap1.isOpened() ) {
    Mat frame0;    cap0.read( frame0 );
    Mat frame1;    cap1.read( frame1 );
    // stereo processing here
}

sounds like you're trying to open both captures on the same device id(-1, the default), instead try :

VideoCapture cap0(0);
VideoCapture cap1(1);

// later: 
while( cap0.isOpened() && cap1.isOpened() ) {
    Mat frame0;    cap0.read( frame0 );
    Mat frame1;    cap1.read( frame1 );
    // stereo processing here
}

again, all i'm saying is: 2 cams need 2 seperate id's