Skip to main content Skip to navigation

Stain Normalisation Toolbox

The Stain Normalisation Toolbox contains MATLAB implementations of several existing techniques for stain normalisation of histological images. Moreover, the toolbox also contains an implementation of the recently proposed stain normalisation algorithm developed in collaboration with Derek Magee at the University of Leeds [3] (PDF).

Currently the toolbox contains the implementation of following techniques:

  • RGB Histogram Specification
  • Reinhard et al. [1]
  • Macenko et al. [2]
  • Khan et al. [3]

The toolbox provides a demonstration of all these techniques in the demo file, demo.m. The file is commented with further details. When the demo is executed on MATLAB, comparative results like the figure below are generated for a sample image using the above stain normalisation techniques:



May 28th 2015: Stain Normalisation Toolbox v2.2 released.

April 28th 2015: Stain Normalisation Toolbox v2.1 released.

February 26th 2015: Stain Normalisation Toolbox v2.0 released.

September 4th 2014: Stain Normalisation Toolbox v1.0 released.


(ZIP or other archive) Stain Normalisation Toolbox v2.2 (zip)


[1] Reinhard, E., Ashikhmin, M., Gooch, B., & Shirley, P. (2001). Color transfer between images. IEEE Computer graphics and applications, 21(5):34-41.

[2] Macenko, M., Niethammer, M., Marron, J. S., Borland, D., Woosley, J. T., Guan, X., Schmitt, XC., & Thomas, N. E. (2009, June). A Method for Normalizing Histology Slides for Quantitative Analysis. In ISBI (Vol. 9, pp. 1107-1110).

[3] Khan, A. M., Rajpoot, N., Treanor, D., & Magee, D. (2014). A nonlinear mapping approach to stain normalisation in digital histopathology images using image-specific colour deconvolution. IEEE Transactions on Biomedical Engineering, 61(6):1729-1738. [PDF]