Reputation: 2698
in my project i want to implement a modul which add or remove contrast to a given picture automatically. My problem is, to find out how much contrast i can add or remove. I know about photoshops auto-contrast/auto-color function. Can someone explain me how it works or a theory/paper/idea how to implement this?
I know, there is a histogram-equalization feature. But that's not the feature i'm seeking for.
For example i want to choose one of this three gradiant-curves,which match with the image.
greetings
Upvotes: 10
Views: 18101
Reputation: 1786
Just as an alternative to the Adi Shavit's answer there is also a nonlinear algorithm for the image contrast enhancement described in a paper http://www.asp.eurasipjournals.com/content/pdf/1687-6180-2014-70.pdf. Someone may be interested in it.
Upvotes: 4
Reputation: 17295
A simple linear way of performing "auto-contrast" is to linearly stretch and offset the image intensities. The idea is to find the stretch (contrast) and offset (intensity) correction parameters such that in the corrected image the 5th percentile will be mapped to 0, and the 95th percentile will be mapped to 255.
Check out my answer here for more details.
Upvotes: 12