您从AVCaptureVideoDataOutput获得的照片是低质量的照片,如果您想获得与使用AVCaptureStillImageOutput拍摄的照片相同的质量,不幸的是,您别无选择,只能等待所需的时间。
当图像质量不是问题时,请尝试使用可用选项更改会话预设,
//----- SET THE IMAGE QUALITY / RESOLUTION -----
//Options:
// AVCaptureSessionPresetHigh - Highest recording quality (varies per device)
// AVCaptureSessionPresetMedium - Suitable for WiFi sharing (actual values may change)
// AVCaptureSessionPresetLow - Suitable for 3G sharing (actual values may change)
// AVCaptureSessionPreset640x480 - 640x480 VGA (check its supported before setting it)
// AVCaptureSessionPreset1280x720 - 1280x720 720p HD (check its supported before setting it)
// AVCaptureSessionPresetPhoto - Full photo resolution (not supported for video output)
NSLog(@"Setting image quality");
[CaptureSession setSessionPreset:AVCaptureSessionPresetMedium];
更改预设将导致不同的处理时间。