Home > GVSToolbox > 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 % %     smoothParam = .0003;  %  to increase smoothness, lower the number
0018 % %                       % 1000 empirically works on the up-scaled eye track data
0019 % %                       % in [.0001 , .0005] empirically works on the data in [ 0 1 ]
0020 
0021 
0022 if nargin < 2
0023     smoothParam = [];  % making empty will set to default in the filterEyeTrackInfant function
0024 end
0025 
0026 tracks = dataStruct.trackCell;
0027 for i1 = 1:length( tracks)
0028     tr = filterEyeTrackInfant( tracks{i1}, smoothParam );
0029     dataStruct.trackCell{i1} = tr;
0030 end
0031

Generated on Tue 01-Jul-2014 12:35:04 by m2html © 2005