Home > analysis > get_gt_rm_score.m

get_gt_rm_score

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 load _param/_report;
0002 load _param/_iFolders;
0003 
0004 P = initParam('wbc');
0005 
0006 for i = 1: 6
0007     frames = unique(SS(i).GT.tracks(:,2));
0008     rmScore = zeros(0,6);
0009     for fr = 1: length(frames)
0010         frame = frames(fr);
0011         clc; disp(['Processing dataset: ',iFolders(i).Name,' frame: ',num2str(frame),'...']);
0012 
0013         % get image
0014         im = im_get(iFolders(i).Name,frame,P.EXTENSION);
0015         
0016         % get GT positions
0017         gtPosition     = SS(i).GT.tracks(SS(i).GT.tracks(:,2)==frame,1:4);
0018         if fr < length(frame)
0019             gtNextPosition = SS(i).GT.tracks(SS(i).GT.tracks(:,2)==frame+1,1:4);
0020         else
0021             gtNextPosition = SS(i).GT.tracks(SS(i).GT.tracks(:,2)==frame,1:4);
0022         end
0023         % get radial mean confidence Image
0024         imConfidence = radial_mean(im,P.KERNEL_SIZE);
0025         
0026         score = zeros(0,6);
0027         for nPos = 1: size(gtPosition,1)
0028            id = gtPosition(nPos,1);
0029            col = round(gtPosition(nPos,3));
0030            row = round(gtPosition(nPos,4));
0031            colNext = gtNextPosition(gtNextPosition(:,1)==id,3);
0032            rowNext = gtNextPosition(gtNextPosition(:,1)==id,4);
0033            speed = sqrt( (rowNext - row)^2 + (colNext-col)^2 );
0034            score = [score; horzcat(gtPosition(nPos,:), imConfidence(row,col), speed)];
0035         end
0036         
0037         rmScore = [rmScore; score];
0038     end
0039     SS(i).GT.rmScore = rmScore;
0040 end
0041 
0042 save _param/_report SS;

Generated on Thu 17-Mar-2011 14:45:51 by m2html © 2005