A method, system, and storage medium for eliminating electrooculography artifacts in EEG signals.

By using convolutional neural network recognition and dense optical flow to eliminate electrooculogram (EOG) artifacts, the hardware complexity problem of EOG artifact elimination in single-channel EEG signals was solved, and the signal-to-noise ratio and BCI classification performance were improved without increasing hardware complexity.

CN118452819BActive Publication Date: 2026-01-06WUHAN NEURACOM TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410506066.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2026-01-06
Estimated Expiration
2044-04-25

AI Technical Summary

Technical Problem

Existing methods for removing artifacts from single-channel EEG signals present both challenges in increasing hardware complexity and the need to eliminate hardware complexity.

Method used

A convolutional neural network was used to identify electrooculogram (EOG) artifacts and dense optical flow was used to eliminate them. By combining time-frequency conversion and inverse conversion techniques, effective removal of EOG artifacts was achieved without increasing hardware complexity.

Benefits of technology

It effectively removed electrooculography artifacts, improved the signal-to-noise ratio of EEG signals, and enhanced BCI classification performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118452819B_ABST
    Figure CN118452819B_ABST
Patent Text Reader

Abstract

An EEG signal eye blink artifact elimination method, system and storage medium, the method comprising: performing time-frequency conversion on the time domain signal collected by each channel of an electroencephalograph to obtain a corresponding time-frequency image; performing segment interception on the time-frequency image through a sliding window to obtain a time-frequency image segment; identifying an eye blink artifact image contained in the time-frequency image segment through a trained convolutional neural network; taking the non-artifact time-frequency image frames adjacent to the appearance segment of the eye blink artifact image as the starting position and the ending position to obtain an artifact elimination segment; eliminating the eye blink artifact in the artifact elimination segment through a dense optical flow method to obtain a time-frequency image after removing the eye blink artifact; and performing time-frequency inverse conversion on the time-frequency image after removing the eye blink artifact to obtain a corresponding time domain signal. The time sequence signal is converted into a time-frequency image, the eye blink artifact component in the image is effectively extracted through a convolutional neural network, and the artifact optical flow is calculated, so that the effect of eliminating the artifact is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of brain-computer interface technology, specifically to a method, system, and storage medium for eliminating electrooculography artifacts in EEG signals. Background Technology

[0002] Low signal-to-noise ratio (SNR) and diverse noise sources are key factors affecting BCI classification performance. Signal preprocessing aims to remove noise and artifacts. Noise can be categorized into external noise and physiological noise. External noise is primarily generated by external hardware, including power cords, computers, monitors, and other electronic devices. Physiological noise is generally caused by muscle movement or skin contraction. Taking electrooculography (EOG) artifacts as an example, EOG artifacts include:

[0003] 1) Blink artifacts: Characterized by a narrow peak in the waveform with a large amplitude. As the electrodes are positioned further back, the amplitude gradually decreases, and the time range of the peak widens. Blink artifacts are generally detected using vertical electrooculography (VEOG), but can also be replaced by EEG signals at Fp1, Fp2, and FpZ.

[0004] 2) Eye movement artifacts: These are "canopy" or "slanted canopy" waveforms similar to square waves, typically recorded using electrodes placed on either side of the eye (HEOG, horizontal electrophysiology).

[0005] Eye movement artifacts (EOG) are artifacts produced during the recording of electroencephalogram (EEG) signals due to eye movements and blinking. Characteristics of EOG artifacts include high energy in the low-frequency range and signal amplitude greater than that of the EEG signal. Various methods exist for EOG artifact removal, such as regression methods, blind source decomposition (primarily ICA), adaptive filtering (RLS, LMS algorithms), EMD (Empirical Mode Decomposition) algorithms, and wavelet transform (WT).

[0006] In recent years, researchers have proposed various methods to remove electrooculography artifacts from single-channel brain signals.

[0007] The regression method is the most direct method, but it requires an additional electrooculography (EOG) reference channel, which means collecting EOG signals at the same time as collecting EEG signals, increasing hardware complexity and causing bidirectional contamination between EEG and EOG signals.

[0008] Blind source separation algorithms based on independent component analysis are effective for removing electrooculogram artifacts from multi-channel EEG signals. However, due to the prior condition that the number of channels must be greater than or equal to the number of sources, they are not applicable to single-channel EEG signals. Summary of the Invention

[0009] In view of the technical defects and drawbacks existing in the prior art, embodiments of the present invention provide a method, system, and storage medium for eliminating electrooculography artifacts in EEG signals to overcome or at least partially solve the above problems. The specific solutions are as follows:

[0010] As a first aspect of the present invention, a method for eliminating electrooculography artifacts in EEG signals is provided, the method comprising:

[0011] Step 1: Perform time-frequency conversion on the time-domain signals acquired by each channel of the EEG machine to obtain the corresponding time-frequency diagram;

[0012] Step 2: Use a sliding window to extract segments from the time-frequency image to obtain time-frequency image segments, where each segment corresponds to a time point;

[0013] Step 3, process the time-frequency image segment obtained in Step 2. The trained convolutional neural network identifies images containing electrooculogram artifacts. , include All segments containing images containing electrooculogram artifacts;

[0014] Step 4: Take the non-artifact time-frequency image frame immediately before the appearance of the EEG artifact image segment as the starting position of EEG artifact removal, and take the non-artifact time-frequency image frame immediately after the appearance of the EEG artifact image segment as the ending position of EEG artifact removal.

[0015] Step 5: Take the time-frequency map from the starting position to the ending position in Step 4 as the artifact removal segment, and remove the electrooculogram artifacts from the artifact removal segment using the dense optical flow method to obtain the time-frequency map after removing the electrooculogram artifacts.

[0016] Step 6: Perform an inverse time-frequency conversion on the time-frequency graph obtained in Step 5 after removing electrooculogram artifacts to obtain the corresponding time-domain signal.

[0017] Furthermore, step 3 also includes acquiring images of electrooculogram artifacts. The locations of the artifact pixels are as follows:

[0018] Step 3.1, for Representative pixel values ​​of electrooculogram artifacts were extracted to obtain the mean value of the color components of the electrooculogram artifacts. ;

[0019] Step 3.2, generate all time-frequency graphs. The pixel values ​​in the r, g, and b channels are equal to The pixel values ​​of the selected pixels are retained, while the pixel values ​​of other pixels are set to 0. The positions where the pixel values ​​are retained correspond to the positions where artifact pixels exist in the time-frequency graph.

[0020] Furthermore, regarding Representative pixel values ​​of electrooculogram artifacts were extracted to obtain the mean value of the color components of the electrooculogram artifacts. Specifically, it includes:

[0021] Step 3.11, Palette Control, ... Converting from RGB color mode to P color mode, adding color dithering, and controlling the number of colors in the palette allow the image to be represented by n color features, resulting in the image. , where n=1;

[0022] Step 3.12, targeting The trained convolutional neural network identifies the color components representing artifacts in electrooculography. ;

[0023] Step 3.13: Obtain the image using the PIL's built-in getcolors() method. Medium color features ;

[0024] Step 3.14: Calculate the mean value of the color components of the electrooculogram artifacts in this EEG.

[0025] Furthermore, step 5 includes:

[0026] Step 5.1, based on r-channel time-frequency graph corresponding to time 1 The location of artifact pixels in the r-channel, for r-channel time-frequency graph corresponding to time 1 In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. ;

[0027] Step 5.2, similarly, based on The location of artifact pixels in the r-channel time-frequency plot at time r is related to... Time-frequency graph corresponding to the r channel at each time point In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. ;

[0028] Step 5.3, Forward optical flow: Calculate the optical flow of each image obtained in Step 5.1. Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance;

[0029] Step 5.4, reverse optical flow, calculate the optical flow of each image obtained in step 5.2. Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance;

[0030] Step 5.5, Optical Flow Residual Vector, ;

[0031] Step 5.6, Disturbance optical flow removal, , The noise threshold is defined as the threshold value when it exceeds a certain value. At that time, surface noise not only contains electrooculography artifacts, but also electromyography noise and equipment noise;

[0032] Step 5.7, Average Modulus Length

[0033] Step 5.8: R channel artifact removal, image... The pixel values ​​at the corresponding artifact pixels are processed as follows.

[0034] ;

[0035] Step 5.9: Following the methods in steps 5.1-5.8, process the g channel and b channel accordingly to obtain... Artifacts in the g and b channels are removed at time points, and then the three channels are merged to obtain the final result. Time-frequency graphs after removing electrooculogram artifacts at any given moment;

[0036] Step 5.10: Following the methods in steps 5.1-5.9, obtain the time-frequency diagrams after removing electrooculogram artifacts at each time point.

[0037] Further, step 6 specifically includes: performing inverse time-frequency conversion on the processed time-frequency graphs at each time point to obtain the corresponding time-domain signal, and then splicing the segments in chronological order to obtain the time-domain signal after removing electrooculogram artifacts.

[0038] Furthermore, the convolutional neural network is a ResNet or VGG neural network model.

[0039] As a second aspect of the present invention, a system for eliminating electrooculography artifacts in EEG signals is provided, the system comprising: a time-frequency conversion module, a segment extraction module, an electrooculography artifact image recognition module, an artifact elimination segment acquisition module, an electrooculography artifact removal module, and a frequency inversion conversion module;

[0040] The time-frequency conversion module is used to perform time-frequency conversion on the time-domain signals acquired by each channel of the EEG machine to obtain the corresponding time-frequency map;

[0041] The segment extraction module is used to extract segments from the time-frequency image through a sliding window to obtain time-frequency image segments, where each segment corresponds to a time point;

[0042] The electrooculogram artifact image recognition module is used to analyze the obtained time-frequency image segments. The trained convolutional neural network identifies images containing electrooculogram artifacts. , include All segments containing images containing electrooculogram artifacts;

[0043] The artifact removal segment acquisition module is used to take the non-artifact time-frequency image frame immediately before the appearance of the EEG artifact image segment as the starting position of EEG artifact removal, and take the non-artifact time-frequency image frame immediately after the appearance of the EEG artifact image segment as the ending position of EEG artifact removal.

[0044] The electrooculogram artifact removal module is used to use the time-frequency map from the starting position to the ending position in step 4 as an artifact removal segment. The electrooculogram artifacts are removed from the artifact removal segment by dense optical flow method to obtain the time-frequency map after removing the electrooculogram artifacts.

[0045] The inverse time-frequency conversion module is used to perform inverse time-frequency conversion on the time-frequency graph obtained in step 5 after removing electrooculogram artifacts, to obtain the corresponding time-domain signal.

[0046] Furthermore, the system also includes an artifact pixel location acquisition module, which is used to acquire electrooculography artifact images. The locations where artifact pixels exist include:

[0047] Palette control, Converting from RGB color mode to P color mode, adding color dithering, and controlling the number of colors in the palette allow the image to be represented by n color features, resulting in the image. , where n=1;

[0048] against The trained convolutional neural network identifies the color components representing artifacts in electrooculography. ;

[0049] Get the image using the PIL built-in getcolors() method. Medium color features ;

[0050] Calculate the mean value of the color components of the electrooculogram artifacts in this EEG. ;

[0051] All time-frequency graphs The pixel values ​​in the r, g, and b channels are equal to The pixel values ​​of the selected pixels are retained, while the pixel values ​​of other pixels are set to 0. The positions where the pixel values ​​are retained correspond to the positions where artifact pixels exist in the time-frequency graph.

[0052] Furthermore, the electrooculography artifact removal module is specifically used for:

[0053] in accordance with r-channel time-frequency graph corresponding to time 1 The location of artifact pixels in the r-channel, for r-channel time-frequency graph corresponding to time 1 In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. Forward optical flow calculation image for optical flow Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance;

[0054] in accordance with The location of artifact pixels in the r-channel time-frequency plot at time r is related to... Time-frequency graph corresponding to the r channel at each time point In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. Inverse optical flow calculation of image optical flow Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance;

[0055] Optical flow residual vectors are obtained based on image pair optical flow calculated from forward optical flow and image pair optical flow calculated from reverse optical flow. ;

[0056] Disturbed optical flow removal , The noise threshold is defined as the threshold value when it exceeds a certain value. At that time, surface noise not only contains electrooculography artifacts, but also electromyography noise and equipment noise;

[0057] Average modulus,

[0058] r-channel artifact removal, image The pixel values ​​at the corresponding artifact pixels are processed as follows.

[0059] ;

[0060] Following the method for r-channel artifact removal, the g-channel and b-channel are processed accordingly to obtain... Artifacts in the g and b channels are removed at time points, and then the three channels are merged to obtain the final result. Time-frequency graphs after removing electrooculogram artifacts at any given moment;

[0061] according to The method for eliminating temporal artifacts yields time-frequency maps at each time point after removing electrooculography artifacts.

[0062] As a third aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a computer, the computer program causes the computer to perform the method for eliminating electrooculography artifacts in EEG signals as described above.

[0063] The present invention has the following beneficial effects:

[0064] This invention provides a method, system, and storage medium for eliminating electrooculogram (EOG) artifacts in EEG signals. By converting time-series signals into time-frequency images, effectively extracting EOG artifact components from the images using a convolutional neural network, and calculating artifact optical flow, the invention achieves artifact elimination. Without increasing hardware complexity, it overcomes the problems of bidirectional contamination of EEG and EOG signals in existing technologies, as well as the inapplicability of single-channel EEG signals. Attached Figure Description

[0065] Figure 1 This is a flowchart of the method for eliminating electrooculography artifacts in EEG signals provided in an embodiment of the present invention;

[0066] Figure 2 This is a schematic diagram of a time-domain signal to time-frequency conversion provided in an embodiment of the present invention;

[0067] Figure 3 This is a schematic diagram illustrating the segmentation of a time-frequency image using a sliding window, as provided in an embodiment of the present invention.

[0068] Figure 4 This is an example of a color principal component extraction effect provided in an embodiment of the present invention;

[0069] Figure 5 This is a schematic diagram of the artifact removal location provided in an embodiment of the present invention;

[0070] Figure 6 Pixel-corrected image pairs provided in embodiments of the present invention;

[0071] Figure 7 This is a schematic diagram of the forward optical flow provided in an embodiment of the present invention;

[0072] Figure 8 A schematic diagram of reverse optical flow provided in an embodiment of the present invention;

[0073] Figure 9 This is a schematic diagram of optical flow residuals provided in an embodiment of the present invention;

[0074] Figure 10 This is a framework diagram of the electrooculography artifact removal system in EEG signals provided in an embodiment of the present invention. Detailed Implementation

[0075] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0076] like Figure 1 As shown, as a first embodiment of the present invention, a method for eliminating electrooculography artifacts in EEG signals is provided, the method comprising:

[0077] Step 1: Perform time-frequency conversion on the time-domain signals acquired by each channel of the EEG machine to obtain the corresponding time-frequency diagram;

[0078] The time-frequency conversion method can be Fourier transform, wavelet / wavelet packet transform, etc., such as Figure 2 The figure shown is a schematic diagram of a time-domain signal to time-frequency diagram provided in an embodiment of the present invention.

[0079] Step 2: Use a sliding window to extract segments from the time-frequency image to obtain time-frequency image segments, where each segment corresponds to a time point;

[0080] like Figure 2 The diagram shown is a schematic diagram of segment extraction via a sliding window provided in an embodiment of the present invention.

[0081] Step 3, process the time-frequency image segment obtained in Step 2. The trained convolutional neural network identifies images containing electrooculogram artifacts. , include All segments containing images containing electrooculogram artifacts;

[0082] The convolutional neural network includes neural network models such as ResNet / VGG.

[0083] Step 3 further includes: acquiring images of electrooculogram artifacts. The locations of the artifact pixels are as follows:

[0084] Step 3.1, for Representative pixel values ​​of electrooculogram artifacts were extracted to obtain the mean value of the color components of the electrooculogram artifacts. Specifically, it includes:

[0085] Step 3.11, using the color palette control, to... Converting from RGB color mode to P color mode, adding color dithering, and controlling the number of colors in the palette allow the image to be represented by n color features, resulting in the image. In this embodiment, n=1;

[0086] The P color mode can be understood as a color palette mode. In this mode, the color palette is a pre-set table that can store up to 256 different color schemes, which can be defined based on RGB values. Color dithering refers to the process of filling in transition pixels in areas where the boundary between rich and less rich colors is sharp and abrupt.

[0087] like Figure 4 The image shown is an illustration of the extraction effect of a color principal component provided in an embodiment of the present invention.

[0088] Step 3.12, targeting The trained convolutional neural network identifies the color components representing artifacts in electrooculography. ;

[0089] Step 3.13: Obtain the image using the PIL's built-in getcolors() method. Medium color features ;

[0090] Step 3.14: Calculate the mean value of the color components of the electrooculogram artifacts in this EEG.

[0091] Step 3.2, obtain the mean value of the color components of the electrooculogram artifact. Then, all time-frequency graphs The pixel values ​​in the r, g, and b channels are equal to The pixel values ​​of the selected pixels are retained, while the pixel values ​​of other pixels are set to 0. The positions where the pixel values ​​are retained correspond to the positions where artifact pixels exist in the time-frequency graph.

[0092] Step 4.1: Palette control, obtained from Step 3 Converting from RGB color mode to P color mode, adding color dithering, and controlling the number of colors in the palette allow the image to be represented by n color features, resulting in the image. In this invention, n=1

[0093] Step 4: Artifact Removal Segment Confirmation. The immediately preceding non-artifact time-frequency image frame before the appearance of the EOL artifact segment is taken as the starting point for EOL artifact removal, and the immediately following non-artifact time-frequency image frame after the appearance of the EOL artifact segment is taken as the ending point for EOL artifact removal. For example... Figure 5 As shown, the electrooculography artifact image consists of one or more image segments;

[0094] Step 5: Take the time-frequency map from the starting position to the ending position in Step 4 as the artifact removal segment, and remove the electrooculogram artifacts from the artifact removal segment using the dense optical flow method to obtain the time-frequency map after removing the electrooculogram artifacts.

[0095] Step 5 specifically includes:

[0096] Step 5.1, based on r-channel time-frequency graph corresponding to time 1 The location of artifact pixels in the r-channel, for r-channel time-frequency graph corresponding to time 1 In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. ,like Figure 6 The image shown is a schematic diagram of a pixel-corrected image pair provided in an embodiment of the present invention.

[0097] Step 5.2, similarly, based on The location of artifact pixels in the r-channel time-frequency plot at time r is related to... Time-frequency graph corresponding to the r channel at each time point In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. ;

[0098] Step 5.3, Forward optical flow: Calculate the optical flow of each image obtained in Step 5.1. Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance, such as Figure 7 The image shown is a schematic diagram of a forward-flowing light pattern provided in an embodiment of the present invention.

[0099] Step 5.4, reverse optical flow, calculate the optical flow of each image obtained in step 5.2. Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance, such as Figure 7The diagram shown is a schematic representation of a reverse light flow provided in an embodiment of the present invention.

[0100] Step 5.5: Calculate the optical flow residual vector based on the forward and reverse optical flows. ,like Figure 9 The diagram shown is a schematic representation of an optical flow residual provided in an embodiment of the present invention.

[0101] Step 5.6: Perform perturbation optical flow removal. , The noise threshold is defined as the threshold value when it exceeds a certain value. At that time, surface noise not only contains electrooculography artifacts, but also electromyography noise and equipment noise;

[0102] Step 5.7, calculate the average modulus.

[0103] Step 5.8: R channel artifact removal, image... The pixel values ​​at the corresponding artifact pixels are processed as follows.

[0104] ;

[0105] Step 5.9: Following the methods in steps 5.1-5.8, process the g channel and b channel accordingly to obtain... The artifact removal images of the g and b channels at time step are then merged to obtain the final image. Time-frequency graphs after removing electrooculogram artifacts at any given moment;

[0106] Step 5.10: Following the methods in steps 5.1-5.9, obtain the time-frequency diagrams at each time point after removing electrooculogram artifacts.

[0107] Step 6: Perform inverse time-frequency conversion on the time-frequency graphs after processing the electrooculogram artifacts at each time point in Step 5 to obtain the corresponding time-domain signals. Then, splice the segments in chronological order to obtain the time-domain signals after removing the electrooculogram artifacts.

[0108] This invention effectively extracts the electrooculogram (EOG) artifact components in images through a convolutional neural network and calculates the artifact optical flow, thereby achieving the effect of artifact elimination. Without increasing hardware complexity, it overcomes the problems of bidirectional contamination of EEG and EOG signals in existing technologies, as well as the inapplicability of single-channel EEG signals.

[0109] like Figure 10 As shown, as a second embodiment of the present invention, a system for eliminating electrooculogram artifacts in EEG signals is also provided. The system includes a time-frequency conversion module, a segment extraction module, an electrooculogram artifact image recognition module, an artifact pixel position acquisition module, an artifact elimination segment acquisition module, an electrooculogram artifact removal module, and a frequency inversion conversion module.

[0110] The time-frequency conversion module is used to perform time-frequency conversion on the time-domain signals acquired by each channel of the EEG machine to obtain the corresponding time-frequency map;

[0111] The segment extraction module is used to extract segments from the time-frequency image through a sliding window to obtain time-frequency image segments, where each segment corresponds to a time point;

[0112] The electrooculogram artifact image recognition module is used to analyze the obtained time-frequency image segments. The trained convolutional neural network identifies images containing electrooculogram artifacts. , include All segments containing images containing electrooculogram artifacts;

[0113] The artifact pixel location acquisition module is used to acquire images of electrooculography artifacts. Location of artifact pixels

[0114] The artifact removal segment acquisition module is used to take the non-artifact time-frequency image frame immediately before the appearance of the EEG artifact image segment as the starting position of EEG artifact removal, and take the non-artifact time-frequency image frame immediately after the appearance of the EEG artifact image segment as the ending position of EEG artifact removal.

[0115] The electrooculogram artifact removal module is used to use the time-frequency map from the starting position to the ending position in step 4 as an artifact removal segment. The electrooculogram artifacts are removed from the artifact removal segment by dense optical flow method to obtain the time-frequency map after removing the electrooculogram artifacts.

[0116] The inverse time-frequency conversion module is used to perform inverse time-frequency conversion on the time-frequency graph obtained in step 5 after removing electrooculogram artifacts, to obtain the corresponding time-domain signal.

[0117] As a third embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and when the computer program is executed by a computer, the computer performs the method for eliminating electrooculography artifacts in EEG signals as described above.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for ocular artifact removal in an EEG signal, characterized in that, The method comprises: Step 1, time-frequency conversion is performed on the time-domain signals collected by each channel of an electroencephalograph to obtain corresponding time-frequency images; Step 2, time-frequency image segments are obtained by segmenting the time-frequency images through a sliding window, wherein each segment corresponds to a time point; Step 3, identifying the segments containing eye movement artifacts from the time-frequency image segments obtained in Step 2 by the trained convolutional neural network , comprises all segments containing eye movement artifacts from the time-frequency image segments obtained in Step 2 Step 4, the time-frequency image frame immediately preceding the appearance segment of the eye artifact image is taken as the starting position of eye artifact elimination, and the time-frequency image frame immediately following the appearance segment of the eye artifact image is taken as the ending position of eye artifact elimination; Step 5, the time-frequency image from the starting position to the ending position in step 4 is taken as an artifact elimination segment, and the eye artifact is eliminated from the artifact elimination segment through a dense optical flow method to obtain a time-frequency image after the eye artifact is removed; Step 6, time-frequency inverse conversion is performed on the time-frequency image after the eye artifact is removed in step 5 to obtain a corresponding time-domain signal.

2. The method for ocular artifact elimination in EEG signal according to claim 1, characterized in that, The step 3 further comprises obtaining an electrooculogram artifact image The position where the intermediate artifact pixel exists is specifically: Step 3.1, to perform representative ocular artifact pixel value extraction to obtain ocular artifact color component mean ; Step 3.2, all time-frequency maps The pixel value in the r, g, b three channels is equal to The pixel value is reserved, and the pixel value at other positions is set to 0. The position of the reserved pixel value corresponds to the position where the artifact pixel exists in the time-frequency map.

3. The method of ocular artifact elimination in EEG signals as claimed in claim 2, wherein, To Carrying out representative eye artifact pixel value extraction to obtain eye artifact color component mean value Specifically comprising: Step 3.11, by palette control, to Convert from RGB color mode to P color mode, increase color dithering, then control the number of palette colors to make the picture expressed by n colors, get the image Where n = 1; Step 3.12, for , identifying color components representing electrooculogram artifacts by the trained convolutional neural network ; Step 3.13: Get the colors of the image by PIL's getcolors() method Mid color feature ; Step 3.14, calculate the mean of the color component of the eye movement artifact in this electroencephalogram, 4. The method for eliminating ocular artifacts from EEG signals as claimed in claim 1 wherein, Step 5 comprises: Step 5.1, according to r channel time-frequency diagram corresponding to the moment r channel artifact pixel exists in the position, and the pixel value of the same position is reserved, and the pixel value of other positions is set to 0, and an image pair is formed r channel time-frequency diagram corresponding to the moment r channel artifact pixel exists in the position, and the pixel value of the same position is reserved, and the pixel value of other positions is set to 0, and an image pair is formed ; Step 5.2, by the same reason, according to The position of the r channel artifact pixel in the r channel time-frequency map at time r, the pixel value of the same position in the r channel time-frequency map at time r is retained, and the pixel values of other positions are set to 0, and an image pair is constructed The time-frequency map corresponding to the r channel at time r The position of the r channel artifact pixel in the r channel time-frequency map at time r, the pixel value of the same position in the r channel time-frequency map at time r is retained, and the pixel values of other positions are set to 0, and an image pair is constructed ; Step 5.3, forward optical flow, compute optical flow for each image pair resulting from step 5.1 where W is the width of the time-frequency map and H is the height of the time-frequency map, is the lateral movement distance of the image at is the longitudinal movement distance of the image at is the longitudinal movement distance of the image at is the longitudinal movement distance of the image at Step 5.

4. Reverse optical flow, compute optical flow for each image pair resulting from step 5.2 where W is the width of the time-frequency map and H is the height of the time-frequency map, is the lateral movement distance of the image at is the longitudinal movement distance of the image at is the longitudinal movement distance of the image at is the longitudinal movement distance of the image at Step 5.5, optical flow residual vector, ; Step 5.6, perturbative optical flow rejection, , is a noise threshold, when higher than , the surface noise not only contains ocular artifact, but also contains myoelectric noise and equipment noise; Step 5.7, average mode length, Step 5.8: r-channel artifact removal, the image corresponding to the pixel value at the artifact pixel in the green channel is set to the average of the pixel values of the two neighboring pixels in the green channel. ; Step 5.9: According to the method of step 5.1-step 5.8, the g channel and b channel are processed in turn to obtain The time g channel and b channel artifact-removed image, and then the three channels are merged to obtain The time-frequency diagram after removing the electro-oculogram artifact; Step 5.10, time-frequency images after the eye artifact is removed at each time point are obtained according to the method in steps 5.1-5.

9.

5. The method for ocular artifact removal from EEG signals as claimed in claim 1 wherein, Step 6 specifically comprises: time-frequency inverse conversion is performed on the time-frequency images after processing at each time point to obtain corresponding time-domain signals, and then the segments are spliced in time sequence to obtain a time-domain signal after the eye artifact is removed.

6. The method as claimed in claim 1 or 3, wherein the EEG signal is a 2D EEG signal. The convolutional neural network is a Resnet or VGG neural network model.

7. A system for ocular artifact removal in an EEG signal, characterized in that The system comprises: a time-frequency conversion module, a segmenting module, an eye artifact image recognition module, an artifact elimination segment acquisition module, an eye artifact removal module, and a frequency inverse conversion module; The time-frequency conversion module is configured to perform time-frequency conversion on time-domain signals collected by each channel of an electroencephalograph to obtain corresponding time-frequency images; The segmenting module is configured to segment time-frequency images through a sliding window to obtain time-frequency image segments, wherein each segment corresponds to a time point; An electrooculogram artifact image recognition module is configured to recognize the electrooculogram artifact image-containing segments from the obtained time-frequency image segments by the trained convolutional neural network , includes all the segments containing electrooculogram artifact images in the The artifact elimination segment acquisition module is configured to take the time-frequency image frame immediately preceding the appearance segment of the eye artifact image as the starting position of eye artifact elimination, and take the time-frequency image frame immediately following the appearance segment of the eye artifact image as the ending position of eye artifact elimination; The eye artifact removal module is configured to take the time-frequency image from the starting position to the ending position in step 4 as an artifact elimination segment, and eliminate the eye artifact from the artifact elimination segment through a dense optical flow method to obtain a time-frequency image after the eye artifact is removed; The frequency inverse conversion module is configured to perform time-frequency inverse conversion on the time-frequency image after the eye artifact is removed in step 5 to obtain a corresponding time-domain signal.

8. The EEG signal ocular artifact canceling system of claim 7, wherein, The system further comprises an artifact pixel position acquisition module, which is configured to acquire an electrooculogram artifact image where the artifact pixels exist, and specifically comprises: Palette control, will Convert from RGB color mode to P color mode, increase color dithering, control the number of palette colors to express the picture with n color characteristics, get the image Where, n=1; against The trained convolutional neural network identifies the color components representing artifacts in electrooculography. ; Get the image by the getcolors() method of PIL Color features ; calculating the mean of the color component of the electrooculogram artifact in the present electroencephalogram, ; All the time-frequency maps The pixel values in the three channels of r, g, b are equal to The pixel values in the three channels of r, g, b are equal to The pixel values in the three channels of r, g, b are equal to 9. The EEG signal ocular artifact canceling system of claim 7, wherein, The eye artifact removal module is specifically configured to: in accordance with r-channel time-frequency graph corresponding to time 1 The location of artifact pixels in the r-channel, for r-channel time-frequency graph corresponding to time 1 In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. Forward optical flow calculation image for optical flow Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance; in accordance with The location of artifact pixels in the r-channel time-frequency plot at time r is related to... Time-frequency graph corresponding to the r channel at each time point In the r-channel, pixel values ​​at the same location are retained, while pixel values ​​at other locations are set to 0, thus forming an image pair. Inverse optical flow calculation of image optical flow Where W is the width of the time-frequency plot and H is the height of the time-frequency plot. For the image in Lateral movement distance, For the image in The longitudinal movement distance; The optical flow residual vector is obtained based on the forward optical flow calculation of the image pair optical flow and the inverse optical flow calculation of the image pair optical flow ; Disturbed optical flow rejection , is a noise threshold, when higher than , the surface noise not only contains ocular artifact, but also contains myoelectric noise and equipment noise. average mode length, r channel artifact removal, the image corresponding to the artifact pixel is processed as follows, ; According to the method of r channel artifact elimination, the g channel and the b channel are processed in sequence to obtain The g channel and the b channel are eliminated at the moment, and then the three channels are combined to obtain The time-frequency diagram after removing the electro-oculogram artifact at the moment According to The method of removing the artifacts at each time instant, and the time-frequency diagram after removing the ocular artifacts at each time instant is obtained.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by a computer to make the computer execute the method for eliminating eye artifacts in an EEG signal according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Active training method and device of upper limb rehabilitation robot and upper limb rehabilitation robot

    CN116492644A

  • Depression disease auxiliary identification method based on electroencephalogram data and facial expression image

    CN117137488A