Take the 2-minute tour ×

I'm searching for a way to analyze the camera's view live. The iPhone should recognize and react to sudden changes in brightness. How should I go about it?

share|improve this question
I had a similar need and I found this question through Google but couldn't figure it out, I posted my own question and got the answer I was looking for, about accessing the EXIF data of the camera, frame by frame on the stream - very quick and works perfectly. stackoverflow.com/questions/13708712/… –  Hugo Scott-Slade Dec 7 '12 at 16:06

1 Answer 1

up vote 1 down vote accepted

With iOS4 you can gain access to the raw video frames via AVCaptureVideoDataOutput.

Once you have the video frame, you can analyze its brightness and react accordingly.

Look for the AVCam sample.

share|improve this answer
can you give me a short hint, how to "analyze the brightness". just some method names or something? i'll take a look at AVCam, thanks! –  choise Jul 9 '10 at 6:40
If you have access to the WWDC 2010 videos and samples, there are several that might be helpful to you. –  Avalanchis Jul 9 '10 at 18:01
thanks i think the wwdc example codes, especially the one with this orange pylon, are the right thing for me –  choise Jul 12 '10 at 6:54

Your Answer


