log-scaled histogram intersection
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Image Analyst
2017-10-19
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()?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!