No BSD License  

Highlights from
Contrast Limited Adaptive Histogram Equalization (CLAHE)

4.66667

4.7 | 3 ratings Rate this file 51 Downloads (last 30 days) File Size: 3.8 KB File ID: #22182

Contrast Limited Adaptive Histogram Equalization (CLAHE)

by Leslie Smith

 

20 Nov 2008

Best to read the reference in "Graphics Gems IV", Academic Press, 1994 pages 474-485

| Watch this File

File Information
Description

This is an image contrast enhancement algorithm that overcomes limitations in standard histogram equalization (HE). The two primary features is adaptive HE (AHE), which divides the images into regions and performs local HE, and the contrast limited AHE (CLAHE), which reduces noise by partially reducing the local HE. Bilinear interpolation is used to avoid visibility of region boundaries.

  "Contrast Limited Adaptive Histogram Equalization"
  by Karel Zuiderveld, karel@cv.ruu.nl
  in "Graphics Gems IV", Academic Press, 1994

Ported by Leslie Smith

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (11)
20 Nov 2008 Steve Eddins

You might want to take a look at adapthisteq, which is in the Image Processing Toolbox. This function also implements CLAHE. See:

http://www.mathworks.com/access/helpdesk/help/toolbox/images/adapthisteq.html

20 Nov 2008 Leslie Smith

Thanks for the reference. I had looked for and did not find the Matlab CLAHE and was surprised when I thought it did not exist.
Leslie

15 Apr 2009 Idillus  
26 Apr 2010 Alireza Saberi

Thank you much, I really was in need to this codes

11 May 2011 Freyssineta

hey guys.. I got error like this
"Error in ==> runCLAHE at 55
Bin= 1 + LUT(round(Image));"

Do you know the solution?
please help me. I need it

11 May 2011 Leslie Smith

I suggest you use adapthisteq in the Image processing toolbox because Matlab's routine is more robust.
Although you don't say what the error is, my guess is that it is "index out of bounds" for the look up table LUT. If I remember correctly, runCLAHE needs for the dimensions of the image to be even to work properly. Again, you are likely better off to use adapthisteq.

12 May 2011 Freyssineta

When i execute runCLAHE.m the error is "Subscript indices must either be real positive integers or logicals"

yup i know about adapthistheq function in matlab. But i did'nt allowed to use that function with my lecturer so i must make clahe code manually.
What should i do?

12 May 2011 Leslie Smith

The "Subscript indices must either be real positive integers or logicals" is basically that the index is out of bounds.

Obviously you are taking a class where the assignment is to create the CLAHE code. IMO, that is what you should do because the goal of a class is the learning, not the grade.

17 Jun 2011 Rado

Excuse me, this may be a stupid question, but can you tell me how to use this function?

I tried to define the variable "Image" to be the path of the image I want to process. Then I removed the comment symbols in front of:
% [XRes,YRes]=size(Image);
% CEimage = Image;
in "runCLAHE.m".

I typed the command:
J=runCLAHE(Image);

The error I got was:
?? Input argument "Cliplimit" is undefined.

Error in ==> runCLAHE at 34
if Cliplimit == 1

Can you help me with that?

Again, sorry for the stupid question and thanks in advance!

17 Jun 2011 Leslie Smith

The full argument list is
runCLAHE(Image,XRes,YRes,Min,Max,NrX,NrY,NrBins,Cliplimit,modHist)
The comments in the beginning of the function describe the arguments.
Once again I will suggest you use adapthisteq in the Image processing toolbox because Matlab's routine is more robust.

27 Oct 2011 LIAO xj

quite useful! thanks a lot!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
histogram equalization Leslie Smith 20 Nov 2008 13:44:55
adaptive histogram equalization Leslie Smith 20 Nov 2008 13:44:55
image processing Leslie Smith 20 Nov 2008 13:44:55
clahe Leslie Smith 20 Nov 2008 13:44:55
adaptive histogram equalization Fedor 06 Dec 2011 06:08:44

Contact us at files@mathworks.com