Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Contrast Limited Adaptive Histogram Equalization

There is a page on wikipeda on contrast limited adaptative histogram equalization :

There is an implementation of contrast limited adaptative histogram equalization on Imagej (Plugins =>Filter => Enhance Local Contrast) with settings for blocksize, histogram bins, max slope. 

Imagemagick also can do contrast limited adaptative histogram equalization,  i have also found it on github :

I don't know equivalent action in Gimp, similar but not the same are tone mapping algorithm like Mantiuk, Reinhard, fattal. Maybe this algorithm can be ported to Gimp as plugin, filter or Gegl action.

On some picture it can be useful to have a better contrast with blocksize to match length of picture and smaller or to get drawing effect with very smaller blocksize and histogram bins.

Here for instance a 387x259 photo with Imagej and different settings :
First row Original - settings blocksize 387, histogram bins 256, max slope 3
Second row 60/60/3 30/30/3

Attached Files Thumbnail(s)
You might find something in the g'mic_gimp plugin or even the g'mic standalone. Lots of filters for various effects.

example: and various settings

Still using Gimp 2.8? What linux distro is that? You might have to look for a copy in the distro repo (or use Windows)
Thanks for answer.

I know how to do with Imagej whatever old pc and os I use, that's enough for me.

With "good quality" settings (large blocksize and sufficient histogram bins)) this algorithm rescue very well some picture, especially those which have bad lighting conditions.
With very smaller blocksize and histogram bins number, i can get what i call drawing effect or watercolor painting efect.

I tought it woud be interesting to have this code in Gimp and do not have enough knowledge in programming to know if it is even possible from the c code of 1985 on github. This code is also mentionned on this pdf Graphic Gems 4 at page 474 :

Gmic filter seems interesting but settings do not match with those of Imagej. Also sky is not so blue and there is not what i call drawing effect when lowering blocksize and histograms bins.

I mentionned above Imagemagick can also do, but with same settings, results are little different and need further adjustment on contrast-luminosity-saturation to match results of Imagej.

Another try with bigger picture, i add an artistic effect from Gimp

Attached Files Image(s)

Forum Jump: