[多摄像头学习随笔1]visual stidio 2013+OpenCV3.0.0双摄像头视频采集

来源:互联网 发布:印度出口粮食知乎 编辑:程序博客网 时间:2024/05/21 11:27
//利用多摄像头获取视频
#include <opencv2\opencv.hpp>
#include <string>
using namespace cv;
using namespace::std;
int main(){
VideoCapture capture1(1);
VideoCapture capture0(0);
while (1){
//第一部分:成功调用双摄像头;
Mat frame1(1024, 768, CV_8UC3);
Mat frame0(1024, 768, CV_8UC3);
capture0 >> frame0;
capture1 >> frame1;
imshow("camera_1", frame1);
imshow("camera_2", frame0);
waitKey(100);
}
return 0;

}



0 0