在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):esdalmaijer/EyeTribe-Toolbox-for-Matlab开源软件地址(OpenSource Url):https://github.com/esdalmaijer/EyeTribe-Toolbox-for-Matlab开源编程语言(OpenSource Language):Python 77.1%开源软件介绍(OpenSource Introduction):EyeTribe Toolbox for Matlabversion 0.0.3 (03-Jun-2015) ABOUTThe EyeTribe Toolbox for Matlab is a set of functions that can be used to communicate with eye trackers manufactured by the EyeTribe. The communication process is not direct, but goes via a sub-server that receives input from Matlab (when the functions from this toolbox are called), and then sends commands to the actual EyeTribe server. This setup is rather odd, but it is the most elegant solution that I
could come up with to get around the problem of Matlab not having
decent multithreading functionality. This functionality is required
for running a heartbeat Thread (which keeps the connection with the
EyeTribe alive), and another Thread to monitor samples (and write these
to a log file). Similar results might be obtained by using callback
functions within Matlab's TCP/IP framework, but that approach causes
timing errors that extent into other domains: timing issues when
using PsychToolbox's So, out of lazine... Err... Out of a well-planned timing management
effort to avoid time loss by re-inventing the wheel, I simply used
PyTribe in a short Python script (see the The calibration routine is based on the PsychToolbox for Matlab, and requires an active window to be passed to it. This assures that you are free to calibrate the tracker at any given moment in your experiment, without having any external calibration routine battle with your experiment for control of the active display. If you do not want to calibrate using the PsychToolbox, you can still
use the EyeTribe Toolbox for Matlab, by simply NOT calling the
IMPORTANTA very common assumption among people using the EyeTribe for Matlab
Toolbox is that calling the sample function is a requirement. This is
not true! After calling So why are they there? Well, sometimes you want to use participant's
point of regard to change something on-screen or to give feedback. To
this end, you can call In sum, the DOWNLOAD
Alternatively, place the following code at the start of your experiment: % assuming you placed the EyeTribe_for_Matlab directly under C:
addpath('C:\EyeTribe_for_Matlab') USAGE ON WINDOWS
USAGE ON OS X AND LINUXThanks to @shandelman116 for trying this out (see issue #4).
EXAMPLE SCRIPT% don't bother with vsync tests for this demo
Screen('Preference', 'SkipSyncTests', 1);
% initialize connection
[success, connection] = eyetribe_init('test');
% open a new window
window = Screen('OpenWindow', 2);
% calibrate the tracker
success = eyetribe_calibrate(connection, window);
% show blank window
Screen('Flip', window);
% start recording
success = eyetribe_start_recording(connection);
% log something
success = eyetribe_log(connection, 'TEST_START');
% get a few samples
% NOTE: this is NOT necessary for data recording and
% collection, but just a demonstration of the sample
% and pupil_size functions!
for i = 1:60
pause(0.0334)
[success, x, y] = eyetribe_sample(connection);
[success, size] = eyetribe_pupil_size(connection);
disp(['x=' num2str(x) ', y=' num2str(y) ', s=' num2str(size)])
end
% log something
success = eyetribe_log(connection, 'TEST_STOP');
% stop recording
success = eyetribe_stop_recording(connection);
% close connection
success = eyetribe_close(connection);
% close window
Screen('Close', window); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论