Is there any way to check the light intensity using iPhone? Does API allows to do this?
Obtaining Luminosity from an iOS Camera
I suppose you can easily do this yourself:
UIImage
.UIImage
to a CGImageRef
(UIImage.CGImage
).x += (red + green + blue) / 3.f;
avg = x / numberOfPixels;
.avg
will now give you a float indicating the average brightness of the still. Most of the time (if not always), this will be identical to the light intensity.
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