Local Contrast

This web page is about https://imagej.nih.gov/ij/plugins/clahe/ not about https://imagej.net/Enhance_Local_Contrast_(CLAHE).

This is the text copied and pasted from the original webpage:

CLAHE (Contrast Limited Adaptive Histogram Equalization)

Author: Stephan Saalfeld (saalfeld at MPI-CBG.DE)
Source: CLAHE_.java
Installation: Drag and drop CLAHE_.class onto the "ImageJ" window.
Description: This plugin implements the Contrast Limited Adaptive Histogram Equalization (CLAHE) method for enhancing the local contrast of an image. More information is available on the CLAHE page on the Fiji website.
History: 2009/11/13: Initial release
2009/11/15: Supports Undo
2009/11/16: Supports Undo of 8-bit color images
2009/11/17: Works with selections

Except that the version of the class file used for the processing shown below is CLAHE_.class

Here's a macro that processes a stack, a little less complex than the version posted at https://imagej.net/Enhance_Local_Contrast_(CLAHE).

//===================================================================
//  Applies CLAHE to a stack of images.
//===================================================================
macro "CLAHE on a stack" {
  original = getImageID;
  Dialog.create("CLAHE on a stack");
  blocksize=127;   
  histogramsize=256;   
  maximum=3;
  Dialog.addNumber("Block size", blocksize);
  Dialog.addNumber("Histogram bins", histogramsize);
  Dialog.addNumber("Contrast max (3 to 12)", maximum);  // from 3 to 12
  Dialog.show();
  blocksize=Dialog.getNumber(); histogramsize=Dialog.getNumber(); maximum=Dialog.getNumber(); 
  for (i=1; i<=nSlices; i++) {
    selectImage(original);
    setSlice(i);
    run("CLAHE ", "blocksize="+blocksize+" histogram="+histogramsize+" maximum="+maximum);
  } // for i
  resetMinAndMax();
}  // CLAHE on a stack

And a few other CLAHE tools in a macros package including showing the results of a few variations of CLAHE settings.

Here is an example of a 8 bit image processed with the settings 33, 256, 3:

 

And it can be fun for all sorts of pictures.

Example here:

sunset CLAHE 255-256-4 on each channel The original straight out of the camera

 

Neo- or Post-impressionist painter Paul Signac knew all about local contrast adjustment and used it in his paintings.

 

< Back