Windows Phone 8.1应用程序MediaCapture曝光不足

本文关键字:曝光 MediaCapture 应用程序 Phone Windows | 更新日期: 2023-09-27 18:21:33

我正试图直接从我的Windows Phone 8.1应用商店应用程序中的相机中捕获图片。

我已经成功地初始化了该设备的MediaCapture,它可以拍照,但它们总是黑色或曝光不足。

有人能告诉我如何让相机自动曝光,如果可能的话,当我调用photoManager.VideoDeviceController.FocusControl.FocusAsync()时出现灾难性故障时,也可以触发对焦吗?

Windows Phone 8.1应用程序MediaCapture曝光不足

对于自动对焦,我使用以下代码:

mediaCapture = new MediaCapture();
var settings = new MediaCaptureInitializationSettings();
settings.StreamingCaptureMode = StreamingCaptureMode.Video;
settings.PhotoCaptureSource = PhotoCaptureSource.VideoPreview;
await mediaCapture.InitializeAsync(settings);
var focusSettings = new FocusSettings();
focusSettings.AutoFocusRange = AutoFocusRange.FullRange;
focusSettings.Mode = FocusMode.Auto;
focusSettings.WaitForFocus = true;
focusSettings.DisableDriverFallback = false;
mediaCapture.VideoDeviceController.FocusControl.Configure(focusSettings);

对于曝光,请尝试以下操作:

await mediaCapture.VideoDeviceController.ExposureControl.SetAutoAsync(true);