0001 function fVal = get_feature_score_by_position(positionMatrix,featureType)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 P = initParam('wbc');
0020 fVal = zeros(size(positionMatrix,1),1);
0021 fid = 1;
0022
0023 if size(positionMatrix,2) ~= 5
0024 error('Position Matrix should be N X 5');
0025 end
0026
0027
0028 for seq = 1: length(P.IFOLDERS)
0029 fprintf('\nAnalyzing at sequence %s', P.IFOLDERS(seq).Name);
0030 positionPerSeq = positionMatrix(positionMatrix(:,1)==seq,:);
0031 frs = unique(positionPerSeq(:,2));
0032
0033 for frId = 1: length(frs)
0034 fr = frs(frId);
0035
0036
0037 imName = strcat(P.IFOLDERS(seq).Name,'/',featureType, '/',...
0038 featureType, '_', P.IFOLDERS(seq).Name,num2str(fr),'.png');
0039 im = imread(imName);
0040
0041 positionPerFrame = positionPerSeq(positionPerSeq(:,2)==fr,:);
0042 for id = 1 : size(positionPerFrame,1)
0043 position = positionPerFrame(id,:);
0044 fVal(fid) = im(position(5), position(4) );
0045 fid = fid + 1;
0046 end
0047
0048
0049 end
0050 end
0051
0052
0053
0054
0055
0056
0057 end