File size: 331 Bytes
d4035c1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
function [j, dist] = LMgistquery(gistQuery, gist)
if 1
% normalize correlation
gistQuery = normalizeGist(gistQuery);
gist = normalizeGist(gist);
dist = 2-2*gist*gistQuery';
[dist,j] = sort(dist);
else
% L2
dist = sum((gist - repmat(gistQuery, [size(gist,1) 1])).^2,2);
[dist,j] = sort(dist);
end
|