#include "mainwindow.h" #include "ui_mainwindow.h" #include <ctime> #include <QDebug> #include <string.h> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_pushButton_clicked() { capture(); } int MainWindow::capture(){ //initialize and allocate memory to load the video stream from camera cv::VideoCapture camera0; camera0.open(0); camera0.set(CV_CAP_PROP_FRAME_WIDTH,640); camera0.set(CV_CAP_PROP_FRAME_HEIGHT,480); cv::VideoCapture camera1; camera1.open(1); camera1.set(CV_CAP_PROP_FRAME_WIDTH,640); camera1.set(CV_CAP_PROP_FRAME_HEIGHT,480); cv::VideoCapture camera2; camera2.open(2); camera2.set(CV_CAP_PROP_FRAME_WIDTH,640); camera2.set(CV_CAP_PROP_FRAME_HEIGHT,480); cv::VideoC
opencv读取多个摄像头并保存当前视频流图片
最新推荐文章于 2023-03-19 15:37:25 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)