Configuring camera properties in new OCV 2.4.3

后端 未结 3 1984
借酒劲吻你
借酒劲吻你 2021-01-15 06:38

I may just be googling wrong, but I cannot find out a way (read function) to change properties of camera in the new Open CV. I need to disable auto exposure

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-15 06:58

    so, there's your VideoCapture:

    VideoCapture cap(0);
    

    now you could try to set or get properties:

    //may work or not, highly driver/impl specific.
    cap.set(CV_CAP_PROP_AUTO_EXPOSURE, 0 ); 
    double exposure = cap.get(CV_CAP_PROP_AUTO_EXPOSURE); 
    

    sometimes you can even acces the drivers config dialog this way:

    cap.set(CV_CAP_PROP_SETTINGS , 1 );
    

    those constants are in highgui_c.h, around l 333

提交回复
热议问题