[FieldTrip] Using Fieldtrip with LabStreamingLayer for online BCI Processing

Eli Kinney- Lang eli.kinneylang at ucalgary.ca
Tue Jun 4 16:47:03 CEST 2019


Hi all,


  I have been using Fieldtrip for the past few years for my offline EEG analysis, with good success. Recently, I have switched to helping build and design some online brain-computer interface systems and was looking toward Fieldtrip to handle the signal processing aspect in real-time. However, I am having some trouble with getting the online EEG processing to work as I'd like. I was wondering if any of you could provide some guidance on getting started (and potentially optimization areas) for the online EEG analysis from Fieldtrip, based on our setup below.


Details:

We are using the LabStreamingLayer (LSL) synchronization system to read in raw EEG data from a g.tec USB amplifier. I know that Fieldtrip has its own online buffer, but for various reasons we'd prefer to use the LSL system to link together our EEG recording, Matlab processing, stimulus input/output.

Data from the amplifier is brought in to Matlab through LSL, providing raw Chan X Sample data. We are establishing the header for Fieldtrip ourselves, inputting the required points to use the ft_datatype_raw format. We have to use the raw datatype as the header information output is not in Fieldtrip's standard format.  This allows us to run ft_preprocessing after defining a cfg of our choice.


However, just doing this processes takes around 1.5-1.8 seconds for Matlab to processes each EEG data chunk. We haven't even yet included any of the ft_analysis schemes for feature extraction, and are concerned the processing time might be too delayed through this route for real-time BCI. Does anyone have any experience with online BCI processing through Fieldtrip, or recommendations on expediting this process?


Thank you in advance for your help!


-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190604/6dccaf2c/attachment-0001.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list