IPhone light sensor against camera for measuring light intensity

I need to create an application that measures light intensity, as shown below:

http://itunes.apple.com/us/app/luxmeter-pro/id408369821?mt=8 http://itunes.apple.com/us/app/megaman-luxmeter/id455660266?mt=8

and I wonder which one is the best to solve. As I understand it, it is not possible to use the light sensor APIs that are private to Apple. What classes can I use to capture frames and get properties like pixel color or some kind of output that I can convert to Lux later?

Thanks!

+6
source share
1 answer

What you really want is to take an image using the camera api and run an algorithm to determine the brightness. You can do this on the fly. See below:

Camera Tutorial: http://developer.apple.com/library/ios/#DOCUMENTATION/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/TakingPicturesAndMovies.html

Brightness Algorithm: http://b2cloud.com.au/tutorial/obtaining-luminosity-from-an-ios-camera

+5
source

Source: https://habr.com/ru/post/912475/


All Articles