我在設置自定義曝光時間時遇到問題。 根據Apple documentation設置曝光時間的唯一方法是使用方法setExposureModeCustomWithDuration:ISO:completionHandler:
。但是,當我設置高於0.07的任何值並且圖像被拍攝時,曝光時間具有值0.06666666666666667,儘管AVCaptureDevice
的maxExposureDuration屬性返回最大值可以是0.5秒。iPhone相機無法設置長時間曝光時間
曝光時間是否可以與其他相機屬性相沖突? 或者我做錯了什麼?
代碼:
@try
{
NSError* error;
[self.captureDevice lockForConfiguration:&error];
if (!error)
{
// Setup of other properties
if ([self.captureDevice isExposureModeSupported:selectedExposureMode])
{
if (selectedExposureMode == AVCaptureExposureModeCustom) {
[self.captureDevice setExposureModeCustomWithDuration:exposureTimeValue ISO:isoValue completionHandler:^(CMTime syncTime) {}];
}
}
}
}
@catch (NSException *exception)
{
NSLog(@"%@",exception);
}
@finally
{
[self.captureDevice unlockForConfiguration];
}
什麼是isoValue? –
@BrandonA isoValue是'self.captureDevice.activeFormat.minISO'和'self.captureDevice.activeFormat.maxISO'之間的浮點數。 AVCaptureISOCurrent的值可以用來表示調用者不希望爲ISO指定一個值。 –