I need to create an application that measure the light intensity like the ones 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 is the best way to solve the problem. As I understood it is not possible to use light sensor APIs which are private to Apple. What classes can I use for capture frames and get properties like pixel color or some output that I can convert to Lux later?
Thanks!
What you really want is to take an image with the camera api and run an algorithm to determine the luminance. You can do this on the fly as well. See below:
Camera Tutorial: http://developer.apple.com/library/ios/#DOCUMENTATION/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/TakingPicturesAndMovies.html
Luminance Algorithm: http://b2cloud.com.au/tutorial/obtaining-luminosity-from-an-ios-camera
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With