Home > polypedal > kalman > newMarkerSpecFromTrack.m

newMarkerSpecFromTrack

PURPOSE ^

SYNOPSIS ^

function spec = newMarkerSpecFromTrack( spec, trk )

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function spec = newMarkerSpecFromTrack( spec, trk )
0002 
0003   trk = reshape(trk,1,length(trk));
0004   R = max(ceil(abs(diff(trk))))*2;
0005   spec.bbox = [-R,R,-R,R];
0006   spec.findMarker = @trk2marker;
0007   spec.p0 = [real(trk(1)); imag(trk(1))];
0008   spec.plan = [real(trk);imag(trk)];
0009   
0010 function [obj,ctr] = trk2marker( obj, ctx, bx )
0011   mrk = obj.plan( :, ctx.frameNum );
0012   ctr = mrk - ctx.boxOrigin;
0013

Generated on Mon 02-Aug-2010 16:44:38 by m2html © 2003