EOG Artifact Removal

Many EEG applications analyse EEG signals for frequencies that are associated with specific activities.

Here, is an OpenViBE pipeline that breaks down raw EEG signals into frequency bands and removes blinking artifacts in real-time.

Set-up

  1. Prepare an 8-channel Mentalab Explore system using the following configuration. You can use wet or dry electrodes for this, and modify as needed.

      Explore Channel   Cap Location   OpenViBE Channel
    Ch1 F3 1
    Ch2 C3 2
    Ch3 Forehead (mid) 3
    Ch4 C4 4
    Ch7 Right eye (beside outer canthus) 5
    Ch8 F4 6

  1. Disable unnecessary channels using explorepy set-channels command:

    explorepy set-channels -n Explore_XXXX -m 207
    

    To convert a binary string to a decimal number, you can use this tool.

  2. Check impedances using the explorepy measure_imp command. Aim for <20 kΩ for wet electrodes, and <150 kΩ for dry electrodes. For more on this function, please watch our video guide.

  3. Visualize your data using the explorepy visualize command, and check your signal quality. Make sure there is no obvious noise.

  4. If you are using the dashboard, click the “Push2lsl” button, or else run the explorepy push2lsl command.

Run the script

  1. Download this ZIP folder and extract the contents.
  2. Install OpenViBE.

Start streaming

  1. Open an OpenViBE acquisition server and select “LabStreamingLayer” as the driver.
  2. Under “Driver Properties”, select your Explore device’s “ExG” and “Marker” streams.
  3. Press “Apply” –> “Connect” –> “Play” to start acquiring a Mentlab Explore stream in OpenViBE via lab streaming layer.

Calibrate EOG data

  1. Open the OpenViBE designer and go to “File” –> “Open”.
  2. Choose the recorder.xml file (extracted from the ZIP file you downloaded earlier) and run the scenario for at least 60 seconds. Blink and turn your eyes to different directions during the recording. A GDF file will be created in the same folder as the contents of your ZIP file.
  3. Run the EOG-calibration scenario in OpenViBE designer. Go to “File” –> “Open”, and then choose the EOG-calibration.xml file extracted earlier. Double click on the GDF file reader and select the file generated in the previous step as source.
  4. Run the EOG-calibration scenario in OpenViBE. Go to “File” –> “Open” –> EOG-calibration.xml. Click on the keyboard simulator window and press a to start the calibration. Run the scenario until b-Matrix-EEG.cfg is generated (check the log). Usually 30-40 seconds are sufficient here. Do blink during the recording and press u to end the data calibration.

Visualize frequency bands with EOG artifacts removed

EOG artifact removal in OpenViBE
Frequency bands after signal processing.

Open the Power_bands.xml scenario and run it. You will see EEG signals before and after EOG denoising. You can test the performance of the EOG artifact removal by blinking and checking both signals. In the other tabs, the power bands (Alpha, Beta and Theta) are plotted.

For more information or support, do not hesitate to get in contact at: support@mentalab.com

Copyright © 2024 Mentalab