OGeek|极客世界-中国程序员成长平台

标题: iphone - 如何设置 iPhone 视频输出图像大小 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 05:55
标题: iphone - 如何设置 iPhone 视频输出图像大小

我正在尝试在 iPhone 上进行一些图像处理。 我正在使用 http://developer.apple.com/library/ios/#qa/qa2010/qa1702.html捕捉相机帧。 我看到我可以使用 setVideoSettings 设置 AVCaptureVideoDataOutput 图像格式,但是是否可以获得较低分辨率的图像? 如果不是,是缩小结果图像的有效方法吗?

谢谢, 阿萨夫。



Best Answer-推荐答案


这就是我们如何获得较低分辨率的输出,从而在处理图像时获得更高的 FPS:

//  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;

阿萨夫·平哈西。

关于iphone - 如何设置 iPhone 视频输出图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4015897/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4