Retinex

 


Retinex (java & class files). This plugin is a modified implementation of the Retinex filter from the GIMP pacakge. Retinex filtering is based on Land’s theory of image perception, proposed to explain the perceived colour constancy of objects under varying illumination conditions. Several approaches exist to implement the retinex principles, among these the multiscale retinex with colour restoration algorithm (MSRCR) combines colour constancy with local contrast enhancement so images are rendered similarly to how human vision is believed to operate. Unfortunately, there appeared to be a bug in the GIMP filter, specifically in the implementation of the linear Gaussian filter. The bug was avoided here by replacing the original linear Gaussian filter routine with the built-in Gaussian filter of ImageJ.

The ImageJ plugin was written by Francisco Jiménez Hernández (UAEMex) jimenezf at  fi.uaemex.mx  during a research visit to Birmingham University, School of Dentistry.


Use 

Copy the java and class fles to the /plugins folder or subfolder and run Help>Refresh Menus.
A new Retinex entry should appear in the plugins menu or submenu. In Fiji, you might need to move the *.java file somewhere else.
The plugin expects an RGB image or stack.

Level specifies distribution of the Gaussian blurring kernel sizes for Scale division values > 2:
  Uniform tends to treat all image intensities similarly,
  Low enhances dark regions of the image,
  High enhances the bright regions of the image.

Scale specifies the depth of the retinex effect.
Scale division specifies the number of iterations of the multiscale filter. Values larger than 2 exploit the “multiscale” nature of the algorithm.
Dynamic adjusts the colour of the result. Large values produce less saturated images..

References

  1. The GIMP filter was written by Fabien Pelisson and released under the GPL license. Here is the original page with a link to the source code.
  2. Jobson DJ, Rahman Z, Woodell GA. A multi-scale Retinex for bridging the gap between color images and the human observation of scenes. IEEE Transactions on Image Processing 1997, 6(7): 965-976.
  3. Land EH, The Retinex theory of color vision. Sci Am 1977 (Dec) 237(6): 108-128.

Examples

  
Left: original histological image of human epithelium stained with haematoxylin and eosin. Right: image restored with retinex algorithm “low” setting.


Left: original image. Right: image restored with retinex algorithm “uniform” setting. Note the restoration of the colours despite the overall cyan tone of the original.

 
Left: original image (courtesy of AD Walmsley) with dark shadows and bright areas. Right: image restored with retinex algorithm “low” setting. Note the shadowed regions become more visible.


Back
Last updated on 13/Sep/2019.