Page 1 of 1
Matlab SDK
Posted:
04 Jun 2014, 09:20
by wasim
Is the SDK available as a Matlab toolbox or are there any plans to provide that at some point? Thanks.
Re: Matlab SDK
Posted:
24 Jun 2014, 16:34
by thomas.kuebler
You can probably call the java API functions directly from Matlab in order to combine e.g. with psychtoolbox.
It's not trivial however, since you have to compile the API and gson (as a dependency) with java 1.6 (Matlab's support for newer versions of Java is not good)[or get a precompiled package from someone].
I am not finished testing yet, but it seems to work. If you need further help I could drop some more hints
Re: Matlab SDK
Posted:
25 Jun 2014, 16:34
by ulf.schnabel
I have this working already. I wrote a small Java class that allows calibration and on-line data retrieval to be loaded in Matlab.
I still have to optimize a few things but I can make this available soon. Let me know if you are still interested in it.
Cheers
Re: Matlab SDK
Posted:
26 Jun 2014, 11:27
by thomas.kuebler
Hi, I am at the point of getting data from the tracker in Matlab now, but would like to have a look at your code for the calibration part. Thanks!
Re: Matlab SDK
Posted:
09 Aug 2014, 02:42
by akcooper
Hi,
I am not much of a programmer but am looking for help in exporting the data from the tracker into matlab where I can work with it. Any advice?
Re: Matlab SDK
Posted:
17 Aug 2014, 20:15
by gumush
@ulf.schnabel we'r still looking for the using eyetribe in matlab , could you test your java script to connect them to eachother.
Re: Matlab SDK
Posted:
17 Sep 2014, 00:03
by esdalmaijer
Hi guys,
My approach is slightly different, but results in a straightforward Matlab SDK nonetheless. The idea is to mostly bypass Matlab, as it has no proper native multithreading functionality. In the current setup, Matlab talks to a server (Python-based, compiled to a standalone executable), which handles further communication to the EyeTribe Server, data storing etc. The source can be found on GitHub:
https://github.com/esdalmaijer/EyeTribe-Toolbox-for-MatlabExample experiment:
- Code: Select all
% initialize connection
[success, connection] = eyetribe_init('test');
% start recording
success = eyetribe_start_recording(connection);
% log something
success = eyetribe_log(connection, 'TEST_START');
% get a few samples
for i = 1:60
pause(0.0334)
[succes, x, y] = eyetribe_sample(connection);
[succes, 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
succes = eyetribe_close(connection);
Re: Matlab SDK
Posted:
19 Sep 2014, 10:36
by thomas.kuebler
Hi,
there is also a way to actively push data into matlab just by adding a bit of Java code.
http://undocumentedmatlab.com/blog/matl ... ava-eventsWorks fine for me wogether with a psychtoolbox calibration and you don't have to pull data in your matlab main-loop.
Re: Matlab SDK
Posted:
25 Sep 2014, 22:39
by danmroberts
For those looking to link with MATLAB in order to use the eyetribe with psychtoolbox, I've also been working on a Psychtoolbox plug-in, written in C and using Psychtoolbox's native threading / timestamping. It's not quite finished but should be relatively soon.
Re: Matlab SDK
Posted:
11 Nov 2014, 07:56
by maparedes
Hi everyone!
I have a problem with the toolbox for matlab.
when I execute the code in matlab using the examples that are includes in the toolbox's folder,
I have an error
>> EXAMPLE_PTB
Error uisng AsserMex (line 187)
Error in Screen (line 162)
Error in EXAMPLE_PTB (line 9)
or if I use:
>> EXAMPLE
Error using fwrite
Error in eyetribe_send_command (line 17)
Error in EXAMPLE (line 12)
....
I installed the Pyschtoolbox, but I don't understand why not compile the examples.
thank for your help !
PS: sorry, I don't have a good english, I hope that you can understand me.