What is the difference between AHE and CLAHE?
16 views (last 30 days)
Show older comments
MOHAMMAD FAIZAL HASSAN
on 6 Dec 2014
Commented: DGM
on 6 Apr 2024
Hi, everyone!
Could you please help me what is the difference between Adaptive Histogram Equalization (AHE) and Contrast-Limited Adaptive Histogram Equalization (CLAHE)? Are they the same contrast enhancement techniques? I am really confused with that. If they are not the same, could you help me with the MATLAB code for each algorithm? Thank you for you concern and help! Grateful for any reply!
0 Comments
Accepted Answer
Image Analyst
on 6 Dec 2014
CLAHE limits the range of the output image so that you don't get big outliers. In essence, it clips values if they get too huge. This is the usual method people use. There is no real harm but good benefits so there's no reason not to do it. I don't ever see straight AHE being used. CLAHE is performed by adapthisteq() in the Image Processing Toolbox.
There is also a histogram equalization function histeq() but it's worthless because it uses the histogram of the whole image. Anyone who's ever used histogram equalization can tell you that global histeq is no good. Histogram equalization is only good if you do it locally like CLAHE does.
2 Comments
DGM
on 6 Apr 2024
If you want to see the difference between AHE and CLAHE, you can use adapthisteq() for both.
inpict = imread('moon.tif');
% contrast-limited
% by default, the normalized clip limit is 0.01
A = adapthisteq(inpict);
% setting the normalized clip limit to 1 disables contrast limiting
B = adapthisteq(inpict,'cliplimit',1);
imshow([inpict,A,B],'border','tight')
The documentation isn't clear on this point, but the 'cliplimit' parameter is a normalized proxy for a fraction of the number of pixels in a tile. The contrast limiting operation deals with reshaping the histogram of a given tile to make sure it's constrained by the denormalized pixel count represented by cliplimit. When unconstrained, the resulting local contrast tends to be so high that it actually obfuscates large features by making them indistinct from noise and other irrelevant features. Note that in the last sample, the ROI contrast is significantly boosted, but so is the noise in the background.
As to why global histogram equalization isn't favorable, it's kind of the opposite. It's blind to local contrast. It's a gamble whether it makes features of interest better or worse. In my experience, it's usually worse.
% use a dumb global histogram eq
C = histeq(inpict);
imshow([inpict,C],'border','tight')
In this case, it did the exact opposite of what we would want. It made the noise contrast higher, while simultaneously reducing the feature contrast in the ROI.
More Answers (0)
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
