Professional Documents
Culture Documents
Abstract: An electroencephalogram (EEG) is often corrupted by different types of artifacts. Many efforts
have been made to enhance its quality by reducing the artifact. The EEG contains the technical artifacts
(noise from the electricity, amplitude artifact, etc.) and biological artifacts (eye artifacts, EKG and EMG
artifacts). This paper is aimed to eye-blinking artifact detection from the video which is recorded with
EEG data simultaneously. Detection of eye artifacts is not a simple way and therefore there are many
efforts to find out optimal method for eye artifact detection or in better case its elimination. For example
the method of Independent Component Analysis (ICA) or artificial neural network was used for this
purpose. In this article is described a detection method based on image processing and a artifact
elimination by using ICA.
Keywords: EEG, artifact, image processing, ICA
The video record is obtained from two cameras. The first one This computation is performed for each new frame (in this
is scanning whole person in the bed and the second one is case 15 times per second). After this computation, the
focused to the face (fig. 3). The parameters of the video synchronizing line has to be displayed in the EEG record
record are in the Table 1. with video simultaneously. The video record is displayed in a
new modal window which is always on top window-type.
These operations are consuming too much of processor
performance. Therefore it is appropriate to use hardware
acceleration of graphic card in order to reduce processor
exploitation. Visual appearance of application for data
synchronizing is shown in the figure 4.
255
if f(n)≥b(n) → 1 (closed eyes)
if f(n)<b(n) → 0 (opened eyes)
where f(n) is actual value of mean intensity, b(n) is actual
value of computed or selected boundary (threshold). Logical
0 stands for opened eyes and logical 1 stands for closed eyes.
Threshold can be done in two different ways.
In the first way, threshold (horizontal line) is set intuitively
by user according to whole progress of curve in the time (Fig.
6 left). This way is not very reliable in case of changes of
brightness conditions in the room during examination. Then
the particular part of curve is moved up or down and state of
opened/closed eyes can be interpreted wrong.
1 k l
I avg ( N ) = ∑∑ f (i + T , j + L) N
k .l i =1 j =1
(3)
where f(i,j)N is luminance (intensity) level of pixel at Fig. 6. Curve of mean intensity is on the left side. Boolean
coordinates i, j in the frame N. curve is on the right. Horizontal boundary is set by user
interactively.
The algorithm computes the mean intensity for each frame
over the whole video sequence and then the mean intensity
curve is being created. This curve displays mean intensity The second way is based on local extremes of the curve
variance of the selected area over the time (Fig. 6 left). (function). The second derivative test is a criterion useful for
determining whether a given stationary point of a function is
In the application a user can set optimal ROI interactively in a local maximum or a local minimum.
order to reach adequate signal to noise ratio. The ROI has to
be selected in appropriate way, whole eye (in opened and The test states: If the function f is twice differentiable in a
closed state) must be in the selected area. In this area should neighborhood of a stationary point x, meaning that f’(x)=0,
be also adjacent areas in order to eliminate possible little then:
head movements during examination because there is not If f’’(x)<0 then f has a local maximum at x.
compensation done yet.
If f’’(x)>0 then f has a local minimum at x.
Higher precision and softness of the curve is acquired by
using higher frame rate of the video sequence. Output format
of the video sequence has a considerable influence to image
quality. In order to make analysis better, non-compressed When vector of all local extremes is found then user (usually
records without information loss are most appropriate. The a doctor) sets amplitude of one eye blink (circles in Fig. 6
compressed formats like MPEG or DivX have undesirable left) interactively. New point of boundary is selected if
effect with blocks which can reduce soft details. Frequency following condition is satisfied:
of eye blinking can be obtained, if it is needed, by using
( L max - L min ) > A blink /2 (4)
Fourier transformation.
256
s ( k ) = [ s1 ( k ) , s 2 ( k ) , ..., s N ( k )]
T
which are statistically
independent to each other. In addition mixed signals are
wasted with noise and interference. Symbol [ ]T stands for
operation of transposition and k is index of discrete time
sequence. The mixed signals:
x ( k ) = A.s ( k ) + v ( k ) (5)
x(k) - column vector of mixed signals at each discrete time k
Fig. 7. Curve of mean intensity is on the left. Boolean curve s(k) - column vector of source signals
is on the right. Boundary setting is based on finding local v(k) - column vector of additive noise
extremes of function. A - unknown mixture matrix with dimension MxN and with
aij elements
y ( k ) = S.x ( k ) (6)
Fig. 8. Detection of blinking in the EEG record
Process of sources reconstruction by using ICA method is
shown in the figure 9.
3. REMOVING ARTEFACTS
Blind source separation can be used for purpose to remove
eye artifacts. Blind Source/Signal Separation (BSS) is a
group of methods of digital signal processing. Target of these
methods is to restore initial source signals from mixture of
signals by the help of separation process (Fig. 8). One way
how to solve this problem is using Independent Component
Analysis (ICA).
3.1 Independent Component Analysis Fig. 9. Block diagram of blind source separation represented
by vectors and matrices. A is mixture matrix, S is separating
The method of the ICA is technique which can separate linear matrix, N is number of sources s(k) and output signals y(k), M
mixed signals. In the simplest case, mixed signals is number of mixed signals x(k) and additive noises v(k)
x (k ) = [ x ( k ) , x ( k ) , ..., x ( k )] are linear combination of N
T
1 1 M
257
3.2 Properties and assumptions of ICA correlation functions. The cross-correlation function is
computed not for whole signal but just for blink detected area
Here are some significant properties of ICA: and a couple of neighboring samples. This fact undoubtedly
reduce computational time.
• only linearly mixed signals can be separated
• index permutation of separated sources. Separated sources
are usually not in the same order like initial (mixed) sources
• separated signals are not restored with amplitude of source
signals
• if mean value of input signals equals to zero and dispersion
equals to one, ICA will not have to identify sign of value
correctly
Important assumptions for using ICA:
258
REFERENCES
Černošek, A., Krajča, V., Petránek, S., Mohylová, J. (2000):
Praktické zkušenosti s aplikací metody analýzy
nezávislých komponent a analýzy hlavních komponent
pro eliminaci EEG artefaktů. Časopis Lékař a technika,
volume 2, pages 31-38
Hyvärinen, A., Karhunen, J., Oja, E. (2001): Independent
component analysis. John Wiley & Sons, Toronto,
Canada
Lopes da Silva, F. (1982): Electroencephalography: Basic
Principles, Clinical , Applications and Related Fields.
Urban and Schwanzenberg, Baltimore, USA
Umbaugh, Scott E. (1999): Computer vision and image
Fig. 13. Segment of EEG with removed eye-blinking artifacts processing. Prenticle-Hall, New Jersey, USA
in marked areas
4. CONCLUSION
In this article was presented algorithm for the eye artifacts
(blinking) detection. The algorithm was nested to the
application with user friendly interface. Disadvantages of this
progress can be revealed in the case of rapid head
movements. In this case more regions of interest and
thresholds settings for the specific segments are needed. This
disadvantage will be removed in “second generation”
algorithm which is able to detect position of the eyes
automatically also in the case of head movements.
Designed algorithm is able to detect movements of eyeball
but needs better video quality – higher frame rate, higher
resolution and video sequence without compression. Future
work is aimed to setting region of interest automatically (e.g.
by using pattern matching).
For removing eye-blinking artifacts was used ICA method.
Thanks to result from previous detecting method it can
remove artifacts quickly and automatically. EEG data without
eye-blinking artifacts are then ready for further processing in
frequency domain.
259