CLAHE GIMP plugin

Hi! I just made a GIMP 3 plugin for CLAHE contrast at multiple scales :

Small scales bring up details while large scale increase global contrast.

Here is an example: original, CLAHE at scale 1/2 and CLAHE at scale 1/32

I hope this may be of some use, feedback welcome!

4 Likes

@Nicolas Welcome to the forum and thanks for sharing. I know there are some multiscale CLAHE papers out there. Maybe you could consider, experiment with and implement some of their findings.

1 Like

I have been using CLAHE in medical imagery thanks to its ability to “reveal” potential bad stuff. I did not know that it could be also interesting in digital photography… TIL :slight_smile:

For the curious folks, here is my implementation (with plenty of room for improvements and some limitations)

1 Like

This is something I wanted to implement in G’MIC, but couldn’t. Great job.

It’s already implemented in G’MIC, with filter : Details / Equalize Local Histogram.
Maybe not exactly the same, but very similar probably.

It basically does this:

$ gmic sp colorful +apply_tiles \"equalize 256 n 0,255\",32,32,1,50%,50% blend alpha,0.5

Thank you. It is working in GIMP 3.2.Windows. Installing NumPy was a bit tricky. But with instructions from chatGPT, I managed to do it. Thank you.

There might be some room for an additional feature: namely running CLAHE separately for each color channel. This way, you can also perform color correction at the same time.

1 Like

To be perfectly honest, I’m a little put off by the fact that you have to install NumPy and Python (which together easily weigh in at 200 Mb) just to get a local histogram equalization filter in GIMP. We’re really in the era of software bloat…

This thought isn’t directed at @Nicolas at all.

Having gotten my start in computer science by creating like 4KB demos on the Amstrad CPC in Z80 assembly language, I have to admit that it still strikes me as odd to see the monstrosities (in terms of size) resulting from the use of Python nowadays.

I guess that’s what they call “progress”! :cry:

1 Like

It’s not the same. I get some idea though.