Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Histogram matching - image processing - c/c++

I have two histograms.

int Hist1[10] = {1,4,3,5,2,5,4,6,3,2};

int Hist1[10] = {1,4,3,15,12,15,4,6,3,2};

Hist1's distribution is of type multi-modal;

Hist2's distribution is of type uni-modal with single prominent peak.

My questions are

  1. Is there any way that i could determine the type of distribution programmatically?
  2. How to quantify whether these two histograms are similar/dissimilar?

Thanks

like image 800
Raj Avatar asked May 27 '10 15:05

Raj


People also ask

What is histogram matching in image processing?

Histogram matching is a quick and easy way to "calibrate" one image to match another. In mathematical terms, it's the process of transforming one image so that the cumulative distribution function (CDF) of values in each band matches the CDF of bands in another image.

How do you match a histogram to two pictures?

In order to match the histogram of images A and B, we need to first equalize the histogram of both images. Then, we need to map each pixel of A to B using the equalized histograms. Then we modify each pixel of A based on B.

What is the histogram matching also called as?

The Histogram Matching (also called Histogram Specification) algorithm generates an output image based upon a specified histogram.

What is the difference between histogram equalization and histogram matching?

While the goal of histogram equalization is to produce an output image that has a flattened histogram, the goal of histogram matching is to take an input image and generate an output image that is based upon the shape of a specific (or reference) histogram.


1 Answers

Raj,

I posted a C function in your other question ( automatically compare two series -Dissimilarity test ) that will compute divergence between two sets of similar data. It's actually intended to tell you how closely real data matches predicted data but I suspect you could use it for your purpose.

Basically, the smaller the error, the more similar the two sets are.

like image 146
oosterwal Avatar answered Sep 27 '22 18:09

oosterwal