Azzera filtri
Azzera filtri

log-scaled histogram intersection

1 visualizzazione (ultimi 30 giorni)
jiji hr
jiji hr il 19 Ott 2017
Commentato: jiji hr il 22 Ott 2017
Hello, I am trying to compute the similarity between two images A and B. A contains an object and B contains the same object and other different objects. I use histogram intersection, but due to the fact that my images give long-tailed distributions, I log scale my histograms first. The problem is that I don't know how to compute the intersection between this two log-scaled histograms. I did this :
if true
[ca,ba] = imhist(A) ; set(gca, 'YScale', 'log');
[cb,bb] = imhist(B) ; set(gca, 'YScale', 'log');
end
to logscale my image then to compute the intersection, I refer to this function but the problem here is the input of this function should be ca and cb after being log-scaled, thing I don't know how to return it. I am a quiet beginner with that, so I am asking you for help.

Risposte (1)

Image Analyst
Image Analyst il 19 Ott 2017
That code will only tell you if the histograms are similar, not if the images are similar. You could take your image and rearrange the pixels into either a ramp, or totally scrambled to look almost like white noise, and the histogram would be exactly the same, because the same pixels are there, just in different locations. So, is histogram comparison going to be good in your case? Or would you be better off with things like image subtraction, immse(), or psnr(), or ssim()?
  1 Commento
jiji hr
jiji hr il 22 Ott 2017
First thank you for your answer. Good remarque because actually I first did a preprocessing so that the location is the same for both images, so when they are similar I obtain 0 in the intersection value. actually what I want to know now is that when I change the scale of the object in one image would the histogram be the same (so robust to scale or not), and also what if I have in one image the object isolated but in the other one I have the the same object but with other objects in addition ? I did some research about the intersection of histograms and I learn that it should be working in both situation, but when I test it doesn't work for me. I need your help to understand more, please.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by