Steve A
Steve A

Reputation: 13

How to compare two histograms and prove that there is a match between the two histograms?

i want to compare two histogram and show that the two histograms matches together. I have in mind of reading the two images Show theirs histograms and then using a function or any code to show that hist1=hist2.

Upvotes: 0

Views: 1306

Answers (1)

Martin Ebner
Martin Ebner

Reputation: 26

you could use normalized euklid distance as a similarity measure:

x0 = randn(1000,1);
x1 = randn(1000,1);
nbins = 100;
y0=hist(x0,nbins);
y1=hist(x1,nbins);
similarity = 1-norm(y1-y0)/norm(y0)

Upvotes: 1

Related Questions