×
☰ Menu

Histogram Matching (Specification)

Histogram Equalization aims to create a uniform histogram in the output image. This approach is good but for some cases, this does not work well. One example of this would be when the image's histogram is skewed, meaning that there is a large concentration of pixels at either end of the grayscale.

Histogram Matching (Specification) is a sensible approach is to manually specify the transformation function that preserves the general shape of the original histogram but has a smoother transition of intensity levels in the skewed areas.

In this tutorial you will learn how to convert an image so that its histogram matches a specified histogram. Also known as histogram matching or histogram Specification.

Histogram Equalization is a special case of histogram matching where the specified histogram is uniformly distributed.


Firstly we understand the main idea behind the histogram matching.

Using the Histogram Equalization method, we will begin by first equalising the original histogram as well as the specified histogram. As we know that the transformation function is invertible, so by inverting we can get the mapping from original to specified histogram. The whole operation is shown in the below image.

Example: 

Perform Histogram specification on the following 8X8 image

and the target image or specified image is

Solution: 

 

 

 

Original Image Histogram Equalization

Specified Image Histogram Equalization

 

After equalizing both the images, we need to perform a mapping from original to equalized to the specified image. For that, we need only the round columns of the original and specified image as shown below.

Pick one by one the values from the round column of the original image, find it in the round column of the specified image and note down the index.

The final Specified Histogram is