Home > src > smoothTracks.m

smoothTracks

PURPOSE ^

Syntax: dataStruct = smoothTracks( dataStruct )

SYNOPSIS ^

function dataStruct = smoothTracks( dataStruct, smoothParam )

DESCRIPTION ^

 Syntax:  dataStruct = smoothTracks( dataStruct )
 
 Inputs:
   dataStruct = structure of loaded gaze data returned from
         loadFromTable function. Note that we assume missing
         entries initially denoted by -1, and gaze scaled in [0,1]
 
   smoothParam = parameter for kalman filter. Increase smoothness with
       lower number.  1000 empirically works on the up-scaled eye track data
       in [.0001 , .0005] empirically works on the data in [ 0 1 ] 
 
 Outputs:
   dataStruct: structure containing the smoothed and interpolated gaze

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Syntax:  dataStruct = smoothTracks( dataStruct )
0002 %
0003 % Inputs:
0004 %   dataStruct = structure of loaded gaze data returned from
0005 %         loadFromTable function. Note that we assume missing
0006 %         entries initially denoted by -1, and gaze scaled in [0,1]
0007 %
0008 %   smoothParam = parameter for kalman filter. Increase smoothness with
0009 %       lower number.  1000 empirically works on the up-scaled eye track data
0010 %       in [.0001 , .0005] empirically works on the data in [ 0 1 ]
0011 %
0012 % Outputs:
0013 %   dataStruct: structure containing the smoothed and interpolated gaze
0014 
0015 function dataStruct = smoothTracks( dataStruct, smoothParam )
0016 
0017 if nargin < 2
0018     smoothParam = [];  % making empty will set to default in the filterEyeTrackInfant function
0019 end
0020 
0021 tracks = dataStruct.trackCell;
0022 for i1 = 1:length( tracks)
0023     tr = filterEyeTrackInfant( tracks{i1}, smoothParam );
0024     dataStruct.trackCell{i1} = tr;
0025 end
0026

Generated on Wed 20-Jan-2016 11:50:43 by m2html © 2005