0

我正在尝试在 iOS 5(iPhone 4s 测试设备)中设置相机曝光点:

if ([_videoDevice lockForConfiguration:nil])
{
    if ([_videoDevice isExposurePointOfInterestSupported])
    {
        [_videoDevice setExposurePointOfInterest:CGPointMake(0.2,0.2)];

        if ([_videoDevice isExposureModeSupported:AVCaptureExposureModeAutoExpose])
        {
            [_videoDevice setExposureMode:AVCaptureExposureModeAutoExpose];
            NSLog(@"Adjusting exposure: %d", [_videoDevice isAdjustingExposure]);
        }
    }
    [_videoDevice unlockForConfiguration];
}

根据文档“AVCaptureExposureModeAutoExpose”应该设置曝光然后锁定。我的问题是“isAdjustingExposure”总是返回false。我什至尝试设置一些睡眠,但它仍然处于错误状态。

如何正确设置曝光点?

问候,

4

1 回答 1

1

诀窍是设置“AVCaptureExposureModeContinuousAutoExposure”并使用键/值观察。

于 2012-10-05T12:00:08.227 回答