开发者

How to set iPhone video output image size

开发者 https://www.devze.com 2023-01-21 02:41 出处:网络
I\'m trying to do some image pr开发者_JAVA百科ocessing on iPhone. I\'m using http://developer.apple.com/library/ios/#qa/qa2010/qa1702.html to capture the camera frames.

I'm trying to do some image pr开发者_JAVA百科ocessing on iPhone. I'm using http://developer.apple.com/library/ios/#qa/qa2010/qa1702.html to capture the camera frames. I saw that I can set AVCaptureVideoDataOutput image format using setVideoSettings, but is it possible to get the images in lower resolution? If not, is the an efficient way to downscale the resulted image?

Thanks, Asaf.


This is how we can get a lower resolution output so we get a higher FPS when manipulating the image:

//  sessionPreset governs the quality of the capture. we don't need high-resolution images,
//  so we'll set the session preset to low quality. 
self.captureSession.sessionPreset = AVCaptureSessionPresetLow;

Asaf Pinhassi.

0

精彩评论

暂无评论...
验证码 换一张
取 消