How can I get the brightness level form an UIImage. Actually I am trying to get brightness level and then set it to some other level (using GPUImage framework), So that I can pass that image to tessaract OCR SDK.
Asked
Active
Viewed 1,631 times
0
-
To be clear, what are you referring to as brightness? Luminance? intensity of the pixels? – Khaled Barazi Mar 04 '13 at 11:50
-
If you're looking for the average luminosity, you can use a GPUImageLuminosity filter to extract that, as I describe here: http://stackoverflow.com/questions/14610744/luminosity-from-ios-camera/14612913#14612913 . After that, an exposure or brightness filter can normalize this to a set average luminosity. – Brad Larson Mar 05 '13 at 21:59
1 Answers
-1
To modifify the brightness of an image, the solution that you're searching for is applying a filter over your original image. This can be achieved by using the filter class provided in the CoreImage framework, more specifically CIFilter. Take a quick peek over the documentation, it's pretty straight-forward. If you don't with to use CoreImage, there's several examples on the web with already written filters, however, I think the CIFilter class should be enough.

Vlad
- 3,346
- 2
- 27
- 39
-
I am looking for getting brightness level no setting brightness level. I can set brightness level using GPUImage framework – Saurabh Mar 04 '13 at 12:13