Artifact Removal

Forum for discussion on different brain signals
Locked
sajay_surya
Posts: 4
Joined: 15 May 2012, 06:43

Artifact Removal

Post by sajay_surya » 15 May 2012, 09:22

Hi.. I'm new to this EEG stuff.
Is it possible to remove artifacts in bci2000? The raw data is obtained using emotiv headsets. Can anyone help me with this?

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Artifact Removal

Post by boulay » 20 May 2012, 23:01

BCI2000 always stores the raw data. The most common/reliable way to do artifact removal is by a human expert during offline analysis. It is possible to do artifact removal online either during the signal processing step or you can use artifact detection to modify the feedback / cancel a trial. However, I don't know anyone that does this. Online artifact removal is technically very difficult and it will almost always result in some false positives (removing data that should not be removed) and false negatives (including data that should not be included). You also need to train your artifact removal software at the beginning of each data collection session.

What types of artifacts are you experiencing and how are they affecting your online feedback?

sajay_surya
Posts: 4
Joined: 15 May 2012, 06:43

Re: Artifact Removal

Post by sajay_surya » 21 May 2012, 03:44

Thanks for your reply boulay. That was helpful. :D

I am experiencing simple artifacts like eyeblinks. I am trying to get simple EEG data free from common artifacts. I came to know that Independent component analysis (ICA) can be used to detect and remove components related to artifacts. Can ICA be done in BCI2000? can I interface BCI2000 with my C++ code that taps raw data?

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Artifact Removal

Post by boulay » 21 May 2012, 05:23

I just looked (briefly) through the list of signal processing modules that come with BCI2000 and I don't see anything that can remove eye blinks out-of-the-box. If you wanted to remove eye blinks online, you could write your own signal processing module. The BCI2000 WIKI has some instructions on how to write signal processing modules. BCI2000 also provides the ability to process the signal in MATLAB, Python, or using a custom external program.

I found this article for an example of online eye blink removal. (Eye movements and blinks are sometimes called EOG artifacts).
http://www.ncbi.nlm.nih.gov/pubmed/18288259

But just to be clear, do you need to remove eye blink artifacts online? If you aren't giving online feedback, or if you are but the eye blinks don't affect the signal(s) used for feedback, then there is no need to remove them online.

If you are only interested in removing them in later analysis then the solution is to store the data with the eye blinks then remove the eye blinks during your offline analysis. BCI2000 is not intended to be used for offline analysis. Offline analysis is most commonly done in MATLAB but there are other cheaper (and better, depending on your experience and needs) ways to analyze BCI2000 data. There are tools to open BCI2000 dat files in MATLAB, Python, and there is a plugin for loading BCI2000 dat files into EEGLab. http://www.bci2000.org/wiki/index.php/U ... GLabImport EEGLab is commonly used for ICA.

sajay_surya
Posts: 4
Joined: 15 May 2012, 06:43

Re: Artifact Removal

Post by sajay_surya » 22 May 2012, 00:59

Thanks a lot boulay. I am trying to get online feedback related to the subjects vision. Apart from the frontal sensors, I feel that sensors O1 and O2 are affected by eye blinks. I will try writing a signal processing module. Thanks a lot for your advice boulay.

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Artifact Removal

Post by boulay » 22 May 2012, 04:47

Just to make sure you get started at the right place:
http://www.bci2000.org/wiki/index.php/P ... ing_Filter

In my experience, there shouldn't be any eye-movement/blink artifact in O1 or O2 unless your reference electrode is too close to the eye muscles. If you aren't (re-)referencing to very frontal areas and you see a significant change in the signal from O1 and O2 when the subject blinks their eyes then that might not be an artifact but an actual brain signal. I am interested in where your reference and ground electrodes are placed and whether or not you are using any spatial filter (like a common-average reference).

If you do have an artifact in O1/O2 and that artifact is not due to a referencing problem, then I suppose you could use online artifact rejection. It might be easier to build a classifier/feature translation algorithm that incorporates information from the frontal electrodes so that data segments with O1/O2 signal that are accompanied by frontal artifacts are not classified the same as data segments with O1/O2 signal without frontal artifacts.

I just found one BCI2000 signal processing module that has the word "artifact" in its description.
http://www.bci2000.org/wiki/index.php/C ... Correction
It has two modes. In linearSubtraction mode it simply subtracts a specific "artifact channel" from the signal. In subtractionWithAbort mode it subtracts the artifact channel from the signal if both the artifact and the signal have the same sign, unless the artifact is bigger than the signal in which case it sets the signal equal to 0.

And please, call me Chad :)

sajay_surya
Posts: 4
Joined: 15 May 2012, 06:43

Re: Artifact Removal

Post by sajay_surya » 23 May 2012, 08:14

Thank You Chad. You take pains in writing me very descriptive replies.

My reference electrodes are at the back of the ears. I have incorporated a baseline filter to remove the DC Shift in the output of the raw EEG data. I accept your fact that the disturbances in O1 and O2 when the subject blinks his/her eyes is actually a brain signal. The alpha band power shoots up when the subject closes his/her eyes.

Thanks for your links related to artifact removal in BCI2000. They would help me at a later point of time when I process signals from frontal sensors. As I am from Production Engineering background, I am just getting used to both EEG and Signal processing. Thanks a lot for guiding me Chad :D

Locked

Who is online

Users browsing this forum: No registered users and 1 guest