AVFoundation을 사용하여 카메라 응용 프로그램을 구현하려고합니다.iPhone 5 : iOS 7에서 AVCaptureExposureModeAutoFocus가 지원되지 않습니다.
이AVCaptureExposureModeAutoExpose이 : 나는 시점에서 exposurePointOfInterest을 설정 한 다음 애플의 문서에 의해 설명 된대로 노출을 고정하기 위해 AVCaptureExposureModeAutoFocus를 사용하려면이 장치가 자동으로 노출을 한 번 조정하고 다음에 대한 노출 모드를 변경 AVCaptureExposureModeLocked.
그러나, 원하는 지점에서 자동 노출 그냥 이런 일이 없었는데 :-(void)autoExposeAtPoint:(CGPoint)point { AVCaptureDevice *device = [videoInput device]; if([device isExposurePointOfInterestSupported] && [device isExposureModeSupported:AVCaptureExposureModeAutoExpose]){ if([device lockForConfiguration:NULL]){ [device setExposurePointOfInterest:point]; [device setExposureMode:AVCaptureExposureModeAutoExpose]; [device unlockForConfiguration]; NSLog(@"Exposure point of intereset has been set to (%f,%f)",point.x, point.y); } } }
이
은 내가 사용하는 기능입니다. 아래 NSLog를 사용하여 디버깅 할 때AVCaputreExposureModeAutoExpose
은 지원되지 않습니다. 반면,
AVCaptureExposureModeContinuousAutoExpose
을 사용하면 완벽하게 실행됩니다.
나는 이것을 이해하지 못한다. 이 AVCaputreExposureModeAutoExpose
은 iOS7을 실행하는 iPhone 5의 후면 카메라에서 지원되지 않습니다. 누구나 단서가 있습니까? 감사!
디버그 코드 :
NSLog(@"issupported: %hhd", [device isExposurePointOfInterestSupported]);
NSLog(@"ismodesupported: %hhd" ,[device isExposureModeSupported:AVCaptureExposureModeAutoExpose]);
**Result:**
issupported: 1
ismodesupported: 0
관련 키는 실제로 "adjustmentExposure"입니다. – nrj