|
MatVis format: MatVis('function name', additional parameters...)
Function: 'fixation' and 'fixationTrial'
Define a fixation pattern to be used for all trials or a a different pattern for each trial.
Parameters :
('fixation',origin, image)
('fixationTrial', trial, [repeats row column ... ], image)
origin = location relative to upper left corner of the physical screen, i.e. [10 20].
image = the fixation pattern to be used.
trial = define a fixation pattern for a particular trial/condition.
[repeats row column ... ] = this vector provides a means to move the fixation point during the trial.
Return:
1 = indicates an internal error occurred in MatVis
0 = successful completion of command
Description:
It is often handy to be able to superimpose a fixation point (pattern) on an image without having to actually
write the fixation point into the image. The fixation command allows for an arbitrarily shaped pattern, where pixels
in the fixation image set to 0 are not visible, to be presented during the trial. The rest of the fixation image
values have intensities/color given by the LUT being used for the current video frame. To extend functionality
of the command, fixationTrial' enables a different pattern to be used on each trail plus it provides a means of
moving the fixation pattern during the trial for visual tracking experiments. The vector the defines the motion
is a sequence of triplets which provide the number of video frames (repeats) to present the fixation point at a
particular location [repeats row column ..]. The sequence of triplets can be as long as necessary. If the trial
last longer than the fixation motion vector defines the vector is repeated from the beginning.
Examples:
1) Create a simple cross fixation pattern which will positioned at [100 100] on all trials.
cross = zeros(3,3); cross(2,:)=[200 200 200]; cross(:,2)=[200 200 200]';
MatVis('fixation', [100 100], cross);
2) Define a fixation pattern for trial 3 that moves diagonally across the screen spending 4 video frames at
each position.
motion = [];
for i=1:400, motion = [motion 4 i i]; end;
MatVis('fixationTrial',3,motion,cross);
See Also:
|