我正在开发一款 iPhone 应用程序,它使用带有自定义叠加层的 UIImagePickerController 来拍照。
不幸的是,我没有直接访问 iPhone 4S 的权限,但是几个测试人员报告说相机选择器会在脸部周围绘制一个绿色边框,就像这样:http://cdn.iphonehacks.com/wp-content/uploads/2012/03/camera_faces.jpg
由于应用程序的性质,这是不可取的。
仔细查看 UIImagePickerController 文档后,并没有找到相关信息,同样在这里找到的所有与面部识别相关的内容都是提供使用 CIDetector 或类似工具的说明。
我该如何在我的 UIImagePickerController 中禁用面部检测?
以下是我 UIImagePickerController 的初始化代码:
UIImagePickerController *cameraPicker = [[UIImagePickerController alloc] init];
[cameraPicker setSourceType:UIImagePickerControllerSourceTypeCamera];
[cameraPicker setCameraDevice:UIImagePickerControllerCameraDeviceRear];
if ([UIImagePickerController isFlashAvailableForCameraDevice:cameraPicker.cameraDevice]){
[cameraPicker setCameraFlashMode:UIImagePickerControllerCameraFlashModeOn];
}
[cameraPicker setShowsCameraControls:NO];
[cameraPicker setCameraOverlayView:cameraOverlayView];
cameraPicker.delegate = self;
[self presentModalViewController:cameraPicker animated:YES];