Comprehensive colour normalization

This function effectively normalizes multi colour images (RGB, multispectral, hyperspectral).
Updated 24 Nov 2016

View License

NORMALIZED = comprehensive_colour_normalization(CUBE,THRESHOLD)
This function normalizes images for both illumination intensity and
illumination color effects. It can be applied to images with an
'unlimited' number of color channels. Ranging from RGB to hyperspectral
This script performs very fast due to vectorization and use of bsxfun.

The input of this function is given as follows:

CUBE is a MxNxL matrix in which MxN is the spatial domain and L is the
spectral (color) domain.

The function iterates until the mean square root difference between two
consecutive steps is smaller than THRESHOLD. When threshold is not
given it is set to 10^-12 by default.

The output of this function is given by:

NORMALIZED is a MxNxL matrix in which MxN is the spatial domain and L is
the spectral (color) domain. For each pixel (i,j) mean(Mi,Nj,:) is
approximately 1. For each wavelength/color (k) mean(:,:,Lk) is
approximately 1 as well.

This algorithm is based on the folowing paper:
Finlayson, G., Schiele, B., & Crowley, J. (1998).
Comprehensive Colour Image Normalization.
Computer Vision—ECCV’98, 1406, 475–490.

Script written by (Niels) N.W. Schurink, 23-11-2016, master 3 student
Technical Medicine, University of Twente, the Netherlands, during
master thesis at Netherlands Cancer Institute - Antoni van Leeuwenhoek

Cite As

Niels Schurink (2024). Comprehensive colour normalization (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

- edited description (23-11-2016)

- Updated summary