Reputation: 13
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
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