opencvsharp
opencvsharp copied to clipboard
Autoexposure cannot be set
Summary of your issue
I tried to set the AutoExposure Propertie through _cam.SetCameraPropertie(OpenCvSharp.VideoCaptureProperties.AutoExposure, 0.25); (I tried multiple values but none worked for me :/) but when I call the _cam.GetCameraPropertie(OpenCvSharp.VideoCaptureProperties.AutoExposure); it allways responds with -1 and it results in still manuell mode. Through _cam.SetCameraPropertie(OpenCvSharp.VideoCaptureProperties.Settings,1); I can set the autoexposure the problem is I need to do it directly through code :/
Environment
Write your environment. Windows 10 using the Directshow API
What did you do when you faced the problem?
Example code:
_cam.SetCameraPropertie(OpenCvSharp.VideoCaptureProperties.Exposure,-12);
_cam.GetCameraPropertie(OpenCvSharp.VideoCaptureProperties.AutoExposure); // => -1
_cam.SetCameraPropertie(OpenCvSharp.VideoCaptureProperties.AutoExposure,0.75);
_cam.GetCameraPropertie(OpenCvSharp.VideoCaptureProperties.AutoExposure); // => -1
_cam.SetCameraPropertie(OpenCvSharp.VideoCaptureProperties.AutoExposure,0.25);
_cam.GetCameraPropertie(OpenCvSharp.VideoCaptureProperties.AutoExposure); // => -1
// no change in images even with sleep in between but when i do
_cam.SetCameraPropertie(OpenCvSharp.VideoCaptureProperties.Settings, 1);
// => Open a dialog from Directshow then tick AutoExposure => Effect in the images
It depends on your hardware and API Backend you're using, check your device driver firstly, If it does support that then try setting some other backend via code below
var dnnCapture = new VideoCapture(camIndex,VideoCaptureAPIs.MSMF);
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.