[magick-developers] Using A Histogram To Auto-Determine A Gamma
Adjustment
Ed Halley
ed at halley.cc
Fri Sep 1 19:26:10 CDT 2006
On Sep 1, 2006, at 4:36 PM, Jason Lamey wrote:
> I've used the Histogram() function and am able to pull out a hash
> of all unique colors and a count for each, but I'm kind of lost on
> how to use that data, or if there's a better way of going about it.
Well, numerically, you now want to fit a gaussian peak to the bins.
This will give you a peak position, and a width for the peak (two
half-widths, actually). Then choose a gamma value that will realign
the distribution to be more centered and appropriately wide.
--
[ e d @ h a l l e y . c c ]
More information about the Magick-developers
mailing list