Matlab SDK

All development related discussions that does not concern a specific programming language. For example, JSON data format, server communication etc.

Matlab SDK

Postby wasim » 04 Jun 2014, 09:20

Is the SDK available as a Matlab toolbox or are there any plans to provide that at some point? Thanks.
wasim
 
Posts: 2
Joined: 18 Dec 2013, 12:57

Re: Matlab SDK

Postby thomas.kuebler » 24 Jun 2014, 16:34

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 ;-)
thomas.kuebler
 
Posts: 3
Joined: 11 Apr 2014, 17:47

Re: Matlab SDK

Postby ulf.schnabel » 25 Jun 2014, 16:34

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
ulf.schnabel
 
Posts: 1
Joined: 21 Mar 2014, 23:20

Re: Matlab SDK

Postby thomas.kuebler » 26 Jun 2014, 11:27

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!
thomas.kuebler
 
Posts: 3
Joined: 11 Apr 2014, 17:47

Re: Matlab SDK

Postby akcooper » 09 Aug 2014, 02:42

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?
akcooper
 
Posts: 1
Joined: 07 Aug 2014, 09:15

Re: Matlab SDK

Postby gumush » 17 Aug 2014, 20:15

@ulf.schnabel we'r still looking for the using eyetribe in matlab , could you test your java script to connect them to eachother.
gumush
 
Posts: 3
Joined: 07 Jul 2014, 14:49

Re: Matlab SDK

Postby esdalmaijer » 17 Sep 2014, 00:03

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-Matlab

Example 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);
esdalmaijer
 
Posts: 5
Joined: 24 Mar 2014, 22:05

Re: Matlab SDK

Postby thomas.kuebler » 19 Sep 2014, 10:36

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-events
Works fine for me wogether with a psychtoolbox calibration and you don't have to pull data in your matlab main-loop.
thomas.kuebler
 
Posts: 3
Joined: 11 Apr 2014, 17:47

Re: Matlab SDK

Postby danmroberts » 25 Sep 2014, 22:39

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.
danmroberts
 
Posts: 4
Joined: 18 Dec 2013, 11:58

Re: Matlab SDK

Postby maparedes » 11 Nov 2014, 07:56

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.
maparedes
 
Posts: 1
Joined: 05 Aug 2014, 23:34


Return to General



cron