forked from iN1k1/CVPR2012
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNM_reid_wcnwasa12_match_signature.m
42 lines (34 loc) · 1.24 KB
/
NM_reid_wcnwasa12_match_signature.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function [distances] = NM_reid_wcnwasa12_match_signature(signatures, pars)
% MATCH SIGNATURES
%
% Author: Niki Martinel
% Copyright: Niki Martinel, 2012
%
% FEATURES COMPARISION
fprintf('Matching Signatures...');
% People distances...
sz = length(signatures.siftFeatures);
distances.distance = zeros(sz);
distances.phogDistance = zeros(sz);
distances.wgchDistance = zeros(sz);
distances.haralickDistance = zeros(sz);
% Start compare timer
t_reid_compare_all = tic;
% Load distance matrix
distancesFile = fullfile(pars.settings.outputDataFolder, [pars.settings.outputFilePrefix '_distance.mat']);
if exist(distancesFile, 'file')
load(distancesFile);
else
% Compare extracted features
[distances.distance(:,:) distances.phogDistance(:,:) ...
distances.wgchDistance(:,:) distances.haralickDistance(:,:)] ...
= NM_reid_wcnwasa12_compare( signatures.phogFeatures, signatures.siftFeatures, signatures.haralickFeatures, pars );
% Save distances
try
save(distancesFile, 'distances');
catch ME
warning('nm_reid_main:saveDistances', 'Unable to save features data on file %s.', namefile)
end
end
fprintf('done in %.2f(s)\n', toc(t_reid_compare_all));
end