iPhone: Real-time video color info, focal length, aperture?

一笑奈何 提交于 2019-12-11 06:58:27

问题


Is there any way using AVFoundation and CoreVideo to get color info, aperture and focal length values in real-time?

Let me explain. Say when I am shooting video I want to sample the color in a small portion of the screen and output that in RGB values to the screen? Also, I would like to show what the current aperture is set at.

Does anyone know if it is possible to gather these values? Currently I have only seen that this is possible with still images.

Ideas?


回答1:


AVCaptureStillImageOutput will get you a real time still from the video stream, including exif data for focal length, aperture, etc. Color info you could calculate yourself from that bitmap.




回答2:


AVFoundation, CoreVideo, and CoreMedia include support for getting a video bitmap in "real-time". From there you can process a portion of the RGB pixels however you want.

I don't know of any current public iOS API to get you the aperture.

The focal length is fixed, but differs between product models. ifixit.com might have that info.



来源:https://stackoverflow.com/questions/3772426/iphone-real-time-video-color-info-focal-length-aperture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!