The last year, the ViBS (Vision and Brain Signal Processing) team from Gipsa-lab started an ANR project called Gaze / EEG. The dead line of the project's technical step was September 2010.
The goal of this project was to the acquire data across the OpenViBE platform from two independent acquisition systems : one controlling an eye tracker from Eyelink family (in our experiment we use two kind of eyetrakers : Eyelink II sampled at 500 Hz rate and Eyelink 1000 sampled at 1000 Hz rate) and the other, controlling an EEG device (in our experiment we use mainly two kind of EEG amplifiers : BrainAmp sampled at programmable rate and Mitsar 202A sampled at 250 or 500 Hz rate).
Quickly, we noted that to synchronize the data from both devices was a challenging task. Mainly we had to manage three aspects:
- 1. The drift correction (this aspect is already done in OpenViBE)
- 2. The differences between sampling rates of the acquisition devices (possible solution : using a standard resampling box from OpenViBE tool box)
- 3. And, especially managing the unknown delays introduced by both devices that doesn't guarantee the synchronization between homologue packets received by OpenViBE
Briefly, we use one line of the parallel port to carry out a periodic square signal of programmable period (200 ms seems to be an appropriate value) and we developed a synchronization box in OpenViBE. Without detailing the technical aspects of this solution, I mention only that it has an impact on the processing way of the three points addresses before.
This particular situation required also adapted acquisition drivers for the three already mentioned acquisition devices. Now, they are ready to be tested but they are not included yet in the official trunk of OpenViBE. Before detailing the testing procedure I want to underline one point : those drivers can work in a synchronization environment or in independent mode (classical mode) as well and, for the moment, we did not detect any dysfunction.
How to test it :
- 1. Modify the win32-init_env_command.cmd as follows
- SET OpenViBE_application_acquisition_server_branch=branches\wip-gionescu # for the acquisition servers
- SET OpenViBE_plugin_signal_processing_branch=branches\wip-glio # for the syncronization box
- 2. Recompile your code
- 3. Run twice the openvibe\trunk\dist\test-acquisition-server.cmd command
- 4. In the graphical interface chose two servers between : GipsaLab :: BrainAmp, GipsaLab :: Eyelink and GipsaLab :: Mitsar
- be careful to choose two different connection ports (e.g. 1024 and 1025)
- in the Properties box of each driver you can modify some obvious fields and especially :
- synchro mask (default 128) representing the synchronization line; if 0, the driver works in a classical manner
- Drift correction : you can choose dynamically the OpenViBE's drift correction
- connect and start read
- 5. In OpenViBE designer create a scenario containing :
- two acquisition clients boxes selected from Acquisition -> Acquisition client
- be careful to choose two different connection ports (e.g. 1024 and 1025)
- a synchronization box selected from : Signal processing -> Basic -> Stream Synchronization
- connect the data channels of the acquisition boxes to the inputs of the synchronization box
- add a visualization box from Visualization -> Basic -> Signal Display
- connect it to the synchronization box
- run the scenario
- two acquisition clients boxes selected from Acquisition -> Acquisition client
- 6. To run the all system in debugging more, I can give you a test program that simulates two acquisition devices : Brainamp & Eyelink.
- 7. Have fun
Best regards,
Gelu
Edited: December 10 2010 to use correct formating with list/bullet items - Yann