The process of equalizing an image is to make its probability distribution be as close to a uniform probability distribution as possible. However, it doesn’t need to be a uniform distribution, it could be a probability distribution from an image or any probability distribution that is specified. In the example below, we choose a probability distribution from the image called “Reference Image” and make our image, named “Original Image,” to approximate this probability distribution. The Figure below presents the result of the histogram matching.