同时读取两个USB摄像头采集

您所在的位置:网站首页 如何查看usb使用记录 同时读取两个USB摄像头采集

同时读取两个USB摄像头采集

2023-06-11 13:58| 来源: 网络整理| 查看: 265

1.  OpenCV:VideoCapture同时打开两个摄像头 #include #include using namespace cv; using namespace std; int main() { //initialize and allocate memory to load the video stream from camera VideoCapture camera0(1); camera0.set(CAP_PROP_FRAME_WIDTH,320); camera0.set(CAP_PROP_FRAME_HEIGHT,240); VideoCapture camera1(0); camera1.set(CAP_PROP_FRAME_WIDTH,320); camera1.set(CAP_PROP_FRAME_HEIGHT,240); if( !camera0.isOpened() ) return 1; if( !camera1.isOpened() ) return 1; while(true) { //grab and retrieve each frames of the video sequentially Mat3b frame0; camera0 >> frame0; Mat3b frame1; camera1 >> frame1; imshow("Video0", frame0); imshow("Video1", frame1); //std::cout


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3