how to compare histograms

조회 수: 11(최근 30일)
sakshi Garg
sakshi Garg 2015년 4월 18일
답변: Youssef Khmou 2015년 4월 19일
i want to compare two histograms of lbp images.
i tried using pdist2 but it is showing erroneous results.
please help
  댓글 수: 2
sakshi Garg
sakshi Garg 2015년 4월 19일
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

댓글을 달려면 로그인하십시오.

답변(1개)

Youssef  Khmou
Youssef Khmou 2015년 4월 19일
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));

Community Treasure Hunt

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

Start Hunting!

Translated by