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. (Optional) Install Explorepy using Explorepy installation guide (Only necessary if you want to push to LSL from the command line / without a GUI)
  2. Install Explore Desktop from Explore Desktop Github page.
  3. 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. Check impedances using Explore Desktop. Aim for <20 kΩ for wet electrodes, and <150 kΩ for dry electrodes. For more on this function, please watch our video guide.
  2. To visualize your data, consider using Explore Desktop. By visualizing your data, you can ensure there is no obvious noise (video guide).
  3. Finally, push your data stream to LSL using the LSL menu in Explore Desktop (refer to the [LSL guide](https://wiki.mentalab.com/explore-desktop-guide/lsl/ for more info). Alternatively, if you have previously installed Explorepy, you can use use the explorepy push2lsl command to push to LSL without keeping Explore Desktop open.

Run the script

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

Start streaming

  1. Launch an OpenViBE Acquisition Server and select LabStreamingLayer as the driver.
  2. Under Driver Properties select the Explore device’s ExG stream (i.e. Explore_XXXX_ExG) as the Signal stream.
  3. Press Apply, then Connect, then Play to start acquiring the 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 Designer. Go to File –> Open and select 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

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 © 2025 Mentalab