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;
}
}
}
2 | No.2 Revision |
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;
}
}
}