close
Histogram Comparison (Histogram Matching)
where the first one is the base (to be compared to the others), the other 2 are the test images.
We will also compare the first image with respect to itself and with respect of half the base image.
For the Correlation and Intersection methods, the higher the metric, the more accurate the match.
As we can see, the match base-base is the highest of all as expected.
Also we can observe that the match base-half is the second best match (as we predicted).
For the other two metrics, the less the result, the better the match.
We can observe that the matches between the test 1 and test 2 with respect to the base are worse, which again, was expected.
Some interesting and good articles for reading:
How-To: 3 Ways to Compare Histograms using OpenCV and Python
The Simplest Classifier: Histogram Comparison
Recoloring via Histogram Matching with OpenCV
BGR Histogram comparison using EmguCV
Histograms - 2: Histogram Equalization
CLAHE (Contrast Limited Adaptive Histogram Equalization)
It is true that the background contrast has improved after histogram equalization.
But compare the face of statue in both images. We lost most of the information there due to over-brightness.
It is because its histogram is not confined to a particular region as we saw in previous cases
(Try to plot histogram of input image, you will get more intuition).
So to solve this problem, adaptive histogram equalization is used.
In this, image is divided into small blocks called “tiles” (tileSize is 8x8 by default in OpenCV).
Then each of these blocks are histogram equalized as usual.
Color balancing imagery with histogram matching
全站熱搜