Why is 'Clip Limit' reversed in the 'adaptisteq' code?

2 views (last 30 days)
JUNHO LEE
JUNHO LEE on 28 Oct 2020
Edited: DGM on 2 Oct 2024
If 'adaptisteq' is applied in matlab, the contrast increases as 'clip limit' increases. However, in the original 'CLAHE' function, the smaller the 'clip limit', the greater the contrast. I wonder why this happens in matlab.

Answers (1)

DGM
DGM on 2 Oct 2024
Edited: DGM on 2 Oct 2024
In what "original CLAHE function"?
IPT's adapthisteq() follows roughly the same behavior as Karel Zuiderveld's original example from Graphics Gems IV.
While the parameter is called "normalized", it's clearly not in unit-scale. In other words, as ClipLimit is scaled [0 1] when using adapthisteq(), in this original example, it's on an interval of [1 numbins]. Doing it the way adapthisteq() does is convenient, since it decouples the two parameters from the user's perspective.
Part of the confusion may come from the apparent conflicting statements:
"higher values give more contrast" (large numbers give maximum contrast)
"A clip limit smaller than 1 results in standard AHE" (small numbers give maximum contrast)
The minimum sensible value for the clip limit is 1. If it's set to something less than 1, the given value will be discarded and the denormalized clip limit will be set to an arbitrarily large number (16384). That would be equivalent to setting the "normalized" clip limit to numbins (the maximum value), for tile sizes up to 128x128. So both statements are true.
There are other minor differences in parameter denormalization, but the parameter response is at least in the same direction.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!