//利用多摄像头获取视频
#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;
}
转载请注明原文地址: https://ju.6miu.com/read-972015.html