opencvsharp icon indicating copy to clipboard operation
opencvsharp copied to clipboard

Autoexposure isn't turning back on without user input

Open zBugi opened this issue 2 years ago • 0 comments

Summary of your issue

Trying to set Autoexposure to Manuel and to Automatic while running without userinteraction.

Environment

  • Windows 10
  • Net6.0
  • DHShow

What did you do when you faced the problem?

I did set the Exposure to any value in the range of the camera => Exposure value is beeing set and Autoexposure is turning off videoCaptureInstance.AutoExposure = 1; videoCaptureInstance.AutoExposure = 0.25; and some other values => Autoexposure is still off. when I use videoCaptureInstance.Set(VideoCaptureProperties.Settings, 1); and set it manually in the second tab its working. Now is the problem that I am required to switch it on and off during our process. Is there any way to get the real value behind that set being done in the settings view ? Or is it not possible to set the autoexposure because when I get the value it doesn't change change and is always set to -1.

Write here

Example code:

// Set Autoexposure to auto 
videoCaptureInstance.Set(VideoCaptureProperties.Settings, 1);
Console.Read();

videoCaptureInstance.Exposure = -7;
// Check the autoexposure setting in the view  => its turned off.
videoCaptureInstance.Set(VideoCaptureProperties.Settings, 1);
Console.Read();

videoCaptureInstance.AutoExposure = 1;
videoCaptureInstance.AutoExposure = 0.25;
videoCaptureInstance.AutoExposure = -1;
// Check the autoexposure setting in the view  => its turned off. Even though I expected it to be set to true.
videoCaptureInstance.Set(VideoCaptureProperties.Settings, 1);
// when I watch the video and set it to true from the Settingsview its working. But only from there and not from code.

Output:

Autoexposure isn't truning on again from code

What did you intend to be?

I intend to switch the Autoexposure Setting back on

zBugi avatar Sep 13 '22 18:09 zBugi