I'm working on a UWP app that needs to scan QR codes from a laptop webcam. I'm using the Windows.Media.Capture.MediaCapture class for this. Everything works well, except for when using qr code on a smartphone with it's brightness set too high for the limited dynamic range of built-in webcams. The auto-exposure of the webcam is active, but the screen can still be too bright compared to the environment.
I'm looking for a way to control or override the brightness or exposure either manually or by using some kind of exposure compensation mode.
The only properties to do with brightness/exposure that are enabled/working on my regular built-in webcam are Brightness and Contrast, and those change the image accordingly, but look like they are post-processing effects. They don't change the exposure of the camera itself, thus not fixing the issue.
mediaCapture.VideoDeviceController.ExposureCompensationControl.Supported;
mediaCapture.VideoDeviceController.ExposureControl.Supported;
mediaCapture.VideoDeviceController.ExposurePriorityVideoControl.Supported;
mediaCapture.VideoDeviceController.Exposure.Capabilities.Supported;
all return false
mediaCapture.VideoDeviceController.Brightness.TrySetValue(10);
changes the image, but highlights are still washed out and have no detail for the scanner to pickup