Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi. If you are asked about MS Windows then all camera controls are managed through DirectShow and you can enable/disable all automatic adjustments through the device settings dialog. To open this dialog use:

#include <opencv/opencv2.hpp>
...
cv::VideoCapture _videocap;
if( _videocap.open( _camid ) ) {
   while(true) {    
        // Paste processing code here    
        int c = cv::waitKey(1); //enroll user's input
        // escape key code, if the user has pressed escape then break loop
        if( (char)c == 27 ) 
            break;
        else switch(c) {
            case 's':
                // if the user has pressed key 's' open device settings dialog
                capture.set(CV_CAP_PROP_SETTINGS,0.0); 
                break;
        }    
   }
}

Hi. If you are asked ask about MS Windows then all camera controls are managed through DirectShow and you can enable/disable all automatic adjustments through the device settings dialog. To open this dialog use:

#include <opencv/opencv2.hpp>
...
cv::VideoCapture _videocap;
if( _videocap.open( _camid ) ) {
   while(true) {    
        // Paste processing code here    
        int c = cv::waitKey(1); //enroll user's input
        // escape key code, if the user has pressed escape then break loop
        if( (char)c == 27 ) 
            break;
        else switch(c) {
            case 's':
                // if the user has pressed key 's' open device settings dialog
                capture.set(CV_CAP_PROP_SETTINGS,0.0); 
                break;
        }    
   }
}