有办法在自动对焦完成后随时获得焦点吗?
在Apple的示例代码中,它们使用:
- (void)subjectAreaDidChange:(NSNotification *)notification
{
CGPoint devicePoint = CGPointMake(.5, .5);
[self focusWithMode:AVCaptureFocusModeContinuousAutoFocus exposeWithMode:AVCaptureExposureModeContinuousAutoExposure atDevicePoint:devicePoint monitorSubjectAreaChange:NO];
}上面的代码简单地工作在“点击焦点”上。同时,它也迫使相机在屏幕的中央进行聚焦。我想在任何时候都能获得焦点,就在自动对焦完成之后。
发布于 2014-09-05 16:58:08
看起来,您只需读取focusPointOfInterest属性即可获得当前焦点:
- (void)subjectAreaDidChange:(NSNotification *)notification
{
CGPoint devicePoint = device.focusPointOfInterest;
}https://stackoverflow.com/questions/25690549
复制相似问题