设置摄像头分辨率

一、videocapture类的介绍

1、Class for video capturing from video files, image sequences or cameras.

2、The class provides C++ API for capturing video from cameras or for reading video files and image sequences.


二、参数设置函数 set() 函数的使用

1、代码

//
#include "cartoon.h"  
  
int main()  
{  
    VideoCapture capture(0);  
    if (!capture.isOpened()) { //判断能够打开摄像头  
        cout<<"can not open the camera"<>frame; //载入图像  
  
        if (frame.empty()) { //判断图像是否载入  
            cout<<"can not load the frame"<


致谢

1、videocapture官方介绍


你可能感兴趣的:(OpenCV)