mardi 13 mai 2014

c ++ - configurez les propriétés de la caméra à nouveau OCV 2.4.3 - Stack Overflow


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 and auto gain of the camera.
Is that even possible?




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



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 and auto gain of the camera.
Is that even possible?



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


0 commentaires:

Enregistrer un commentaire