visual-search/distance/compareMahalanobis.m

10 lines
122 B
Mathematica
Raw Normal View History

2019-11-30 17:56:27 +00:00
function d=compareMahalanobis(E, query, candidate)
2019-11-29 19:33:07 +00:00
2019-11-30 17:56:27 +00:00
x=query-candidate;
x=(x.^2)./(E.val');
x=sum(x);
2019-11-29 19:33:07 +00:00
2019-11-30 17:56:27 +00:00
d=sqrt(x);
2019-11-29 19:33:07 +00:00
return;