我正在尝试在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。我甚至试图设置一些睡眠,但它仍处于假状态。
如何正确设置曝光点?
此致
答案 0 :(得分:1)
诀窍是设置“AVCaptureExposureModeContinuousAutoExposure”并使用键/值观察。