Histogram equalization is a traditional image enhancement technique which aims to improve visual appearance of the image by assigning equal number of pixels to all available intensity values. Histogram specification is a generalization of histogram equalization and is typically used as a standardization technique to normalize image with respect to a desired PDF or properties such as mean intensity, energy and entropy. Unlike classical histogram specification, exact histogram specification algorithm implemented here is able to modify the histogram of any image almost exactly (see snapshot).
In the attached .zip file you will find three M-files and one image. The M-file called EXACT_HISTOGRAM.M is an implementation of exact histogram specification algorithm as described in the following references:
1. Coltuc D. and Bolon P., 1999, "Strict ordering on discrete images and applications"
2. Coltuc D., Bolon P. and Chassery J-M., 2006, "Exact histogram specification", IEEE Transcations on Image Processing 15(5):1143-1152
Unpack the contents of the .rar file into your current working directory.
For a quick demo type: demoHS
For help type on how to use the function: help exact_histogram