How should I preprocess the data stored by OpenBCI ?

edited June 2022 in OpenBCI_GUI

I am using 16 channels of cyton and have a question.
1. I would like to use python to preprocess data that will be stored offline.
2. I am using STFT, how should I do the wavelet transform?

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Hi Mmmm,

    The OpenBCI_GUI recording file (CSV or BDF) is in raw microvolts, and not filtered. The GUI user interface graphs ARE filtered, according to the filtering buttons pressed in the interface. Typically both a bandpass and notch are applied, for example .5 hz to 45 Hz, and the notch at your mains frequency. All DSP digital signal processing libraries have bandpass and notch filters available. Wavelet filtering is also possible but requires more parameters and thresholds. GUI is not currently using any wavelet technology. Brainflow library DOES have wavelet filtering functions. Brainflow can be used in place of the GUI to read live data directly into Python.

    https://brainflow.readthedocs.io/en/stable/Examples.html#python-denoising

    William

  • I have been pre-processing EEG data stored in cv files by STFT, which is an FFT of a hamming window of 1 second (125HZ) of the time series, but is this suitable for offline EEG analysis?

  • wjcroftwjcroft Mount Shasta, CA

    I would think most any FFT would be acceptable. What do you mean by "pre-processing"? You lose all the time series stream if you replace the original data stream with the FFT (frequency domain) stream.

    Your signal processing is going to depend on your goals. What are you trying to measure with this EEG recording?

  • edited June 2022

    I want to record EEG with openBCI and analyze the offline data for emotion classification. 100 seconds of data was recorded. The first offline data is at 125 hz per second, so I have 125 data, 16 channels. I applied STFT to the frequency band and tried to extract features and classify them with a classifier. The preprocessing represents STFT. My questions here are
    1. Is the offline data converted to frequency bands by STFT?
    2.Is STFT correct as a preprocessing method?

  • wjcroftwjcroft Mount Shasta, CA
    edited June 2022

    Mmmm,

    Another term for EEG classification of emotion is "affective BCI". It's an absolutely HUGE field. Some related threads here on the Forum:

    https://www.google.com/search?as_q=affective&as_sitesearch=openbci.com

    In general, such classification requires pre-training the classifier with known situational images or evocations for each individual subject to be measured. In other words, it does not seem feasible to generalize the signal processing / classification to work for all subjects.

    It's very unlikely that any classification can be done regarding 100 seconds of data for a subject who has not pre-trained the classifier. You might want to look through those threads or do your own reading of papers in the field.

    https://www.google.com/search?q=affective+bci

    FFT does convert time series to frequency domain series. The size / number of the FFT 'bins' depends on the FFT parameters used. But as you can see from the papers written on aBCI, it is a very large area of research and the signal processing / training used, is quite complex. Considerably more involved than just FFT.

    Regards, William

Sign In or Register to comment.