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, email@example.com in "Graphics Gems IV", Academic Press, 1994
The full argument list is
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.
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.