我的 iPhone V 上运行了以下代码:
// Create the capture device
camera = [CameraManager cameraWithPosition:AVCaptureDevicePositionBack];
if (camera.lowLightBoostSupported) {
if ([camera lockForConfiguration:nil]) {
camera.automaticallyEnablesLowLightBoostWhenAvailable = YES;
[camera unlockForConfiguration];
}
}
但是即使我将设备背面放在桌子上,lowLightBoost 也不会激活,因此预览图像是漆黑的。
- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
fromConnection:(AVCaptureConnection *)connection
{
NSLog(@"LowLight active: %@ Camera lowlightWhenAvailable: %@",camera.isLowLightBoostEnabled ? @"true": @"false",camera.automaticallyEnablesLowLightBoostWhenAvailable ? @"true": @"false");
给我
2013-10-25 10:21:53.179 aCoDriver [1019:668f] LowLight active: false 相机 lowlightWhenAvailable: true 2013-10-25 10:21:53.429 aCoDriver [1019:668f] LowLight active: false Camera lowlightWhenAvailable: true 2013- 10-25 10:21:53.679 aCoDriver [1019:668f] LowLight active: false 相机 lowlightWhenAvailable: true 2013-10-25 10:21:53.929 aCoDriver [1019:668f] LowLight active: false 相机 lowlightWhenAvailable: true