Ask Your Question
0

Revert to Default Camera Settings

asked 2016-12-22 13:07:15 -0600

bryan_bryan gravatar image

Hi guys. I am relatively new to VideoCapture. I was playing around with the usb camera's settings (especially cv_cap_prop_exposure) and I suppose it overrides the native software. The native software would auto-focus and adjust to light. Now it does not.

Is there a way to reset it using openCV?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2020-01-13 09:04:38 -0600

you can solve this problem by using windows camera app.

plug in the usb cam you have and click Windows icon ->search->Camera

if you see the clean video, the usb cam settings are all reverted to the beginning.

hope this answer would be helpful to everyone.

edit flag offensive delete link more
1

answered 2016-12-23 00:40:01 -0600

pi-null-mezon gravatar image

updated 2016-12-23 00:40:40 -0600

Hi. If you 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;
        }    
   }
}
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-22 13:07:15 -0600

Seen: 3,377 times

Last updated: Dec 23 '16