MATLAB Answers


how to compare histograms

sakshi Garg 님이 질문을 제출함. 18 Apr 2015
최근 활동 Youssef Khmou 님이 답변함. 19 Apr 2015
i want to compare two histograms of lbp images.
i tried using pdist2 but it is showing erroneous results.
please help

  댓글 수: 2

Image Analyst
on 18 Apr 2015
So you have two vectors of 256 elements each, which are most likely going to be different for each index. So, what does "compare" mean to you? And do you know that two images can have the same histogram and look totally different?
sakshi Garg on 19 Apr 2015
basically, i want to implement face recognition by histogram matching. so i need a code to compare 1 histogram with many others and find the best match. this match might be in terms of the minimum distance between the two histograms.
if anyone could provide a code for the same, it would be of great help.
thanks in advance

로그인 to comment.

답변 수: 1

Answer by Youssef Khmou
on 19 Apr 2015

Many approaches exist for this purpose, the easiest way is the root mean square error metric, the minimum value means best match from all samples, f1 and f2 are two normalized histograms that we want to compare :
rmse= sqrt(mean((f1-f2).^2));

  댓글 수: 0

로그인 to comment.

Translated by