close

Histogram Comparison (Histogram Matching)

image

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.

image


Some interesting and good articles for reading:

How-To: 3 Ways to Compare Histograms using OpenCV and Python

Figure 2: Comparing histograms using OpenCV, Python, and the cv2.compareHist function.


The Simplest Classifier: Histogram Comparison

image-title-here

image-title-here

image

Recoloring via Histogram Matching with OpenCV

BGR Histogram comparison using EmguCV


Histograms - 2: Histogram Equalization

Histograms Equalization

Histograms Equalization

Histograms 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).

 

Problem of Global HE

 

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.

Result of CLAHE

 

Color balancing imagery with histogram matching

全站熱搜
創作者介紹
創作者 me1237guy 的頭像
me1237guy

天天向上

me1237guy 發表在 痞客邦 留言(0) 人氣()