Skip to content
Snippets Groups Projects

Update touchBuffer.m Necessary bug fix from head position tracking from a few...

Merged Dorian Röders requested to merge roededy1-master-patch-90303 into master
1 file
+ 5
11
Compare changes
  • Side-by-side
  • Inline
+ 5
11
@@ -314,9 +314,9 @@ if acqrGaze || holdGaze
%%% trackDim = 1:length(SETUP.tracker.bufFle); - OLD VERSION: INCORRECT? ######################
trackDim = length(SETUP.tracker.bufFle); % change Aylin #####################
% tracker in right area (initial value different for acquire and hold)
gazeIn = [~acqrGaze & holdGaze; ...
~acqrGaze & holdGaze; ...
~acqrGaze & holdGaze];
% gazeIn = [~acqrGaze & holdGaze; ...
% ~acqrGaze & holdGaze; ...
% ~acqrGaze & holdGaze];
% number of frames that have satisfied the current criterion
gazeFrms = 0;
% get the index of the current frame from the first tracker
@@ -365,13 +365,13 @@ while((time < duration) && goodPecked ~= numOfGoodPecks && ...
% SETUP.tracker.bufFle{i}.Data(1): X coordinate, equals column in matrix
% SETUP.tracker.bufFle{i}.Data(2): Y coordinate, equals row in matrix
% indexing in matrix: row,column - matrix(Y,X)
gazeIn = trackLim(round(SETUP.tracker.bufFle{i}.Data(2)),... % Y = row of matrix
gazeIn(i) = trackLim(round(SETUP.tracker.bufFle{i}.Data(2)),... % Y = row of matrix
round(SETUP.tracker.bufFle{i}.Data(1))); % X = column of matrix
end
else % input: corrdinate-limits n*6 (matrix = 'false')
% matrix containing [posXMin posXMax posYMin posYMax angleMin angleMax]
% all values larger min & smaller max
gazeIn = ...
gazeIn(i) = ...
SETUP.tracker.bufFle{i}.Data(1)>trackLim(i,1) && ... % x
SETUP.tracker.bufFle{i}.Data(1)<trackLim(i,2) && ...
SETUP.tracker.bufFle{i}.Data(2)>trackLim(i,3) && ... % y
@@ -408,12 +408,6 @@ while((time < duration) && goodPecked ~= numOfGoodPecks && ...
%% Read from pecking keys
peck = getTouch(numKeys);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FARINA NEEDS TO MODIFY HERE FOR BEACK TRACKING: peck differs
% to do: expand 'getTouch'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Is peck equal to any of the elements in inputKeys?
if(peck.index ~= 0)
%% Update variables
Loading