如果点正好是 (0.5, 0.5),为什么 AVCaptureDevice 的行为会有所不同?

Why `AVCaptureDevice` behaviour differently if the point is extactly (0.5, 0.5)?

我们使用下面的代码来设置AVCaptureDevice的曝光点。它大部分时间都很好用。

但是如果点xy都是0.5,这个值接缝会重置配置,曝光行为不同。目前我们通过检测参数来解决这个问题,如果它是 0.5,我们在这种情况下传递 0.501 而不是 0.5

我们不知道为什么会这样?那么有关于那个的文件吗?

314         if([device lockForConfiguration:&err]) {
315             [device setExposurePointOfInterest:CGPointMake(x, y)];
316             device.exposureMode = device.exposureMode;
317             [device unlockForConfiguration];
318         }

我猜你看到的是默认行为检查 AVFoundation Programming Guide --> 寻找 曝光模式

If you change the exposure settings, you can return them to the default configuration as follows:

if ([currentDevice isExposureModeSupported:AVCaptureExposureModeContinuousAutoExposure]){`
    `CGPoint exposurePoint = CGPointMake(0.5f, 0.5f);`
    `[currentDevice setExposurePointOfInterest:exposurePoint];`
    `[currentDevice setExposureMode:AVCaptureExposureModeContinuousAutoExposure];`
}