Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top