#確保兩個相機通過USB/microUSB接入board
#include <highgui.h>
#include <cxcore.h>using namespace cv;
int main()
{
VideoCapture cap_l(1);
if(!cap_l.isOpened())
{
return -1;
}
VideoCapture cap_r(2);
if(!cap_r.isOpened())
{
return -1;
}
Mat frame_l, frame_r;
bool stop = false;
while(!stop)
{cap_l>>frame_l;
imshow("camer_l",frame_l);
cap_r>>frame_r;
imshow("camer_r",frame_r);
if(waitKey(30) >= 0)
stop = true;
}
return 0;
}