Contribution to Single-Channel Fetal Electrocardiogram Identification

Page:

2055-2060

DOI:

https://doi.org/10.18280/ts.390617

OPEN ACCESS

Abstract:

This paper presents the recognition of fetal ECG signals from a single-channel recording. The Continuous Wavelet Transform generates a two-dimensional representation of a single-dimension input containing fetal electrocardiogram waves, which are accurately located and isolated. By segmenting this 2D representation using Otsu's method, the continuous wavelet transform of each wave may be estimated. The temporal expression of the wave is then rebuilt by calculating the Inverse Continuous Wavelet Transform. The continuity between each sample allows us to follow the waves from one image to the next. Consequently, the complete profile can be automatically processed.

Keywords:

*fetal, electrocardiogram, continuous wavelet, transform, segmentation*

1. Introduction

The electrocardiogram (ECG) is a non-stationary signal with multiple time-varying wave components (P, QRS, and T) as shown in Figure 1. This signal is a helpful diagnostic tool in cardiology for adults and children. The cardiologist will strategically insert electrodes on the patient's skin to record this signal. To extract the fetus' cardiac activity, the signals generated by the mother and fetus must be distinguished, which is the principal cause of death rates worldwide in Morocco. According to the World Health Organization, cardiovascular disease is now the leading cause of death worldwide, killing more than 17 million people yearly (WHO). Heart disease is the number one killer in Morocco. Because congenital cardiac defects can develop as early as the first trimester, pregnant women and their newborns must be constantly monitored. There is a wide range of congenital cardiac defects, both hereditary and acquired, and early detection is key to full recovery. An estimated 6,000 Moroccan infants are born each year with some form of congenital heart disease or a cardiac abnormality. The emergence of symptoms in babies is commonly used as a diagnostic marker for the prenatal disease. According to experts, professionals in Morocco tend to make late prenatal or early pregnancy diagnoses. Our research contribution is a method for establishing the fetal ECG as a reliable, early-detection tool for congenital heart disease (FECG). By attaching electrodes to the mother's belly, the fetal electrocardiogram (ECG) may be monitored. However, its amplitude is relatively high, making it difficult to interpret. It is weak and jumbled due to several noise sources, the most prominent of which is the mother's ECG (MECG). Extensive research has attempted to address this separating challenge since 1980; they may be roughly divided into two categories those who employ multi-channel techniques, such as ICA and PCA [1-4], and those who employ a single channel, such as ICA-NMF, ICA-EMD, and ICA-SVD [5-9]. In this paper, we aim to identify the electrocardiogram (ECG) of the fetus using a single channel by applying the segmentation technique.

In the second section of this paper, we will provide the methodology of image segmentation using thresholding. The third section will give the proposed algorithm. In the subsequent sections, the proposed approach’s founding and effectiveness, which uses a single sensor and is validated using synthetic data and real recordings, will be discussed and evaluated.

**Figure 1. **ECG signal

2. Theoretical Background

**2.1 Scalogram**

The concept of signal energy [4] is as follows:

$E(a, b)=\left|\int_{-\infty}^{+\infty} x(t) \psi^*\left(\frac{t-b}{a}\right) d t\right|^2$ (1)

A scalogram represents the expression E(a, b). An ICWT is described by the following:

$\mathrm{f}(\mathrm{t})=\frac{1}{\mathrm{Cg}} \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} \int_0^{+\infty} \mathrm{T}(\mathrm{a}, \mathrm{b}) \Psi_{\mathrm{a}, \mathrm{b}}(\mathrm{t}) \frac{\mathrm{dadb}}{\mathrm{a}^2}$ (2)

It thus allows for the reconstruction of the original signal. Note that the original wavelet function is used for the inverse transform, as opposed to the conjugation employed for the forward transformation. By restricting the integration across a scaled range [10], we may perform rudimentary filtering on the original signal.

**2.2 Image segmentation using thresholding**

**Figure 2. **Single abdominal signal

**Figure 3. **Thoracic and abdominal signal

Image segmentation is essential for many images, video, and computer vision applications. It divides a picture into sections that correspond to real-world items. It's key to content analysis and visual comprehension. In many images processing software, the gray levels differ from the background. Thresholding separates foreground items from the scene. These gray levels may "identify" the image's background and foreground. Choose a gray level between the two primary gray-level groupings to separate them (objects and environment). Boundary detection or region-based approaches segment images. Thresholding procedures are perfect, easy, and famous. Different sorts of data have been diarized. Locally adaptive binarization is used for grayscale pictures with poor contrast, variable background intensity, and noise. Nib lack’s approach has been updated for better grayscale thresholding [11]. Segmentation is the initial stage in image processing to extract items of interest for study. Edge-based and region-based Segmentation is typical. Pattern recognition, document binarization, and computer vision employ Otsu's approach to segment. Otsu’s method often segments a picture before feature analysis and quantification. Otsu's system reduces intra-class variations of the segmented concept. It achieves excellent results when the original image's histogram includes two distinct peaks, one for the background and one for the foreground or signal. Otsu's threshold is obtained by scanning the image's pixel values until intra-class variations are minimal. According to Otsu's technique, the class with the most disagreement, background or foreground, determines the point. Otsu's approach may provide unsatisfactory results if an image's histogram contains more than two peaks or if one class has a considerable variation. MATLAB may implement OTSU in numerous ways. In this essay, we will utilize "gray thresh." This approach takes minimal command lines and no computation.

3. Methods

**3.1 ECG recording**

We aim to extract the FECG signal from a single channel using time-scale imaging segmentation. The data is acquired from an international database [12]. Figure 2 illustrates the temporal representation of the recording signal denoted s(t).

Figure 3 depicts the several signals that can be acquired from multiple chest and abdomen sensors.

**3.2 Algorithm**

**Figure 4. **Global algorithm

The definition of image segmentation is "the division of a picture into a group of sections that encompass it." The purpose of segmentation is to reduce and modify an image's representation such that it is more comprehensible and simpler to analyze. In medical imaging, these segments frequently correlate to distinct classes of tissues, organs, diseases, and other biologically significant features. Atlas segmentation is a technique for subdividing pictures used in medical imaging. A clinical expert manually labels training photos to segregate fresh images from these training images. Image registration is a procedure designed to rectify the alignment of photographs "to standardize the image or images of the atlas toward a new, unpublished image."

Figure 4 shows the different steps for extracting fetal electrocardiogram FECG.

The Otsu method [13] performs automatic thresholding from the shape of the image's histogram. This method, therefore, requires the prior calculation of the image's histogram. The algorithm assumes that the image contains only two classes (objects and background). The iterative algorithm calculates the optimal threshold T, which separates these two classes so that the intra-class variance is minimal and the inter-class variance is maximal.

**Figure 5.** Otsu method

In computer vision and image processing, Otsu's method performs automatic thresholding based on the histogram shape of the image or the reduction of a grayscale image to an image binary. The algorithm then assumes that only two types of pixels in the picture have been binarized: foreground and background. It then figures out the optimal threshold that divides these two types of pixels so that there is as little difference between them as possible within each class. The extension of the original method to thresholding at several levels is called the Multi-Otsu method.

The implementation of segmentation is based on the following inputs and outputs. Hists is a 256-by-256 2D grayscale value and neighborhood average grayscale value pair histogram. Total is the number of pairs in the given image. The number of bins determines it in the 2D histogram in each direction. The threshold is the threshold obtained. Figure 5 shows the different steps for the Otsu method.

4. Results of Simulations

Binarization is often the first step in image processing and analysis systems. Its purpose is to reduce the amount of information in the image and keep only the relevant information. The results of the binarization step have a significant effect on how well the next steps in image processing and analysis systems work. This is why the binarization method used must be as suitable as possible. On the one hand, it must keep all the valuable information present in the original image and, on the other hand, eliminate the maximum amount of noise in the picture.

First, we visualize the energy of the signal observed by adopting the scalogram representation, which consists of drawing the isocontour lines of the modulus of the wavelet field calculated on the dyadic network. Embracing the notion of a wavelet frame, Letscan has developed the innovative concept of super-resolution wavelet analysis, which makes it possible to analyze the instantaneous frequencies of a signal decomposed on dense dyadic grids of the time-frequency plane with adaptive zoom possibilities.

Temporal representation is then reconstructed by Inverse Continuous Wavelet Transform (ICWT) estimation. Since the traces are consistent, it is possible to follow the waves from one picture to the next. Therefore, it is possible to process the entire profile automatically.

**Figure 6.** CWT analysis of the abdominal signal by db wavelet: 1 to 32 scales

The difference in amplitude between the FECG and MECG signals is used to identify the fetal contribution from the observed signal. Images demonstrating how colors change over time are required for segmentation by binarization. This prompts us to run several time-scale simulations using various wavelets, including dB and Haar, as seen in Figures 6 and 7, and mexh, as shown in Figure 8.

**Figure 7.** Time-scale image by Haar wavelet: 1 to 32 scales

**Figure 8. **Time-scale image by mexh wavelet: 1 to 32 scales

Figure 7 represents an image with roughly two contrast- and energy-differentiated classes: FECG with a backdrop and MECG. Our method is driven by the fact that the fetal ECG amplitude is significantly smaller than the maternal ECG. Therefore, we anticipate this outcome. As seen in Figure 9, the Otsu approach segments the original image into two classes: one for the fetal electrical activity and another for the maternal activity alone.

**Figure 9****. **Recovered time scales images

Several strategies exist for putting the OTSU approach into practice. In this instance, the "gray thresh" function will be described. Since it involves no calculations and only a few command lines, this technique is the fastest and most straightforward, as shown in Figure 10.

**Figure 10. **Binarization code

Several intriguing outcomes emerged from the simulations run, particularly concerning the discovered image quality and the use of the databases about the inverse wavelet transform. ICWT performed a series of temporal measures whose ECG signal findings revealed the medical characteristics essential for the diagnosis. Figure 11 shows the FECG and MECG signals detected.

**Figure 11.** Recovered signals

5. Discussion

Throughout this investigation, we established a new mechanism for FECG detection. The proposed continuous wavelet transform and time-scale image segmentation. We may avoid performing the inverse continuous wavelet transform by employing databases that can separate ECG signals from Time-Scale pictures. This method has been tested on several datasets (ICWT). Furthermore, this method is distinctive in that it provides resource recovery from a single channel without relying on statistical or decomposition methods such as svd, emd, and nmf [14-16]. Our method's isolation is outstanding to all other approaches; the cardiologist can easily interpret the ECG to detect arrhythmias and heart defects. Another time-related element of this article is the ability to separate with a minimum run time. It might also be constructed using various segmentation techniques, such as the watershed algorithm, which may be a research topic focus. Furthermore, we mention that similar segmentation methods may be used to time-frequency pictures if the settings of the short-term Fourier transform tool are properly selected to identify the fetal and maternal contributions, as shown in Figure 12.

Accordingly, numerous perspectives can be envisaged, such as automating the inverse wavelet decomposition by employing databases recognizing received signals from the featuring. This paper emphasizes the indisputable benefits of wavelets in biomedical engineering. This mathematical tool is also referenced in contexts related to energy [17] and motor control [18, 19] for battery-powered cars. Finally, yet importantly, the suggested technique may be implemented and optimized with the help of AI, in particular the Convolutional Neural Network algorithm, for describing the time scales picture of FECG and MECG [20].

**Figure 12.** Spectrogram Vs Scalogram

6. Conclusion

In this investigation, we applied the continuous wavelet transform and time-scale picture segmentation to solve the issue of non-invasively extracting the fetal ECG. Without requiring the ECG signal to be quasi-periodic, we have created a novel approach that employs a single channel and can even receive cardiac signals from twins. Several simulations were run to gauge how well the process worked in this context. So, it may be looked at from several angles, such as by leveraging databases to locate the ECG signals in the time-scale picture, allowing the inverse wavelet transform to be computed automatically. The current technology could also be used to find irregular heartbeats that could be signs of heart disease at different stages of pregnancy and to find out exactly when the fetal peaks happen. Without resorting to statistics or decomposition, this technique can identify the origin of a sound from a single input channel. Our algorithm's split is superior to competing approaches, making it simple for the cardiologist to interpret the FECG and identify abnormalities and cardiac problems. Another benefit of this article is that it makes separation easier and takes almost no extra time to process. As a critical area of study for the near future, it can be improved by using other segmentation methods, such as the watershed algorithm.

Nomenclature

ECG |
Electrocardiogram |

FECG |
Fetal electrocardiogram |

MECG |
Maternal electrocardiogram |

CWT |
continuous wavelet transform |

ICWT |
inverse continuous wavelet transform |

ICA |
Independent component analysis |

SVD |
Singular Value Decomposition |

EMD |
Empirical mode decomposition |

NMF |
Non-Negative Matrix Factorization |

References

[1] Saiouani, Y. (2020). A new approach for extracting and characterizing fetal electrocardiogram. Traitement du Signal, 37(3): 379-386. https://doi.org/10.18280/ts.370304

[2] Chan, A.D., Hamdy, M.M., Badre, A., Badee, V. (2008). Wavelet distance measure for person identification using electrocardiograms. IEEE transactions on Instrumentation and Measurement, 57(2): 248-253. https://doi.org/10.1109/TIM.2007.909996

[3] Yin, P., Yuan, R., Cheng, Y., Wu, Q. (2020). Deep guidance network for biomedical image segmentation. IEEE Access, 8: 116106-116116. https://doi.org/10.1109/ACCESS.2020.3002835

[4] Hyvarinen, A. (2001). Blind source separation by nonstationarity of variance: A cumulant-based approach. IEEE Transactions on Neural Networks, 12(6): 1471-1474. https://doi.org/10.1109/72.963782

[5] Ziani, S., Jbari, A., Belarbi, L. (2017). Fetal electrocardiogram characterization by using only the continuous wavelet transform CWT. In 2017 International Conference on Electrical and Information Technologies (ICEIT), pp. 1-6. https://doi.org/10.1109/EITech.2017.8255310

[6] Ziani, S., Jbari, A., Bellarbi, L. (2018). QRS complex characterization based on non-negative matrix factorization NMF. In 2018 4th International Conference on Optimization and Applications (ICOA), pp. 1-5. https://doi.org/10.1109/ICOA.2018.8370548

[7] Ziani, S., El Hassouani, Y. (2019). Fetal-maternal electrocardiograms mixtures characterization based on time analysis. In 2019 5th International Conference on Optimization and Applications (ICOA), pp. 1-5. https://doi.org/10.1109/ICOA.2019.8727619

[8] Mallat, S. (1998). Wavelet Tour of Signal Processing. 2nd ed. San Diego: Academic Press.

[9] Liu, W., Lin, G., Zhang, T., Liu, Z. (2020). Guided co-segmentation network for fast video object segmentation. IEEE Transactions on Circuits and Systems for Video Technology, 31(4): 1607-1617. https://doi.org/10.1109/TCSVT.2020.3010293

[10] Wang, Y., Wu, L., Qi, Q., Wang, J. (2022). Local Scale-Guided Hierarchical Region Merging and Further Over-and Under-Segmentation Processing for Hybrid Remote Sensing Image Segmentation. IEEE Access, 10: 81492-81505. https://doi.org/10.1109/ACCESS.2022.3194047

[11] De Moor, B., De Gersem, P., De Schutter, B., Favoreel, W. (1997). Daisy: A database for identification of systems. Journal A, 38(4): 4-5.

[12] Yang, X., Obukhova, N.A., Ivanov, I.I. (2022). Automatic Segmentation of Fluorescence Endoscopic Images Based on the Weighted Otsu Method. In 2022 Conference of Russian Young Researchers in Electrical and Electronic Engineering (ElConRus), pp. 1439-1442. https://doi.org/10.1109/ElConRus54750.2022.9755710

[13] Ziani, S., El Hassouani, Y. (2019). Fetal electrocardiogram analysis based on LMS adaptive filtering and complex continuous wavelet 1-D. In International Conference on Big Data and Networks Technologies, pp. 360-366. https://doi.org/10.1007/978-3-030-23672-4_26

[14] Ziani, S., Hassouani, Y.E., Farhaoui, Y. (2018). An NMF based method for detecting RR interval. In International Conference on Big Data and Smart Digital Environment, pp. 342-346. https://doi.org/10.1007/978-3-030-12048-1_35

[15] Ziani, S., Jbari, A., Bellarbi, L., Farhaoui, Y. (2018). Blind maternal-fetal ECG separation based on the time-scale image TSI and SVD–ICA methods. Procedia Computer Science, 134: 322-327. https://doi.org/10.1016/j.procs.2018.07.179

[16] Ouhadou, M., El Amrani, A., Ziani, S., Messaoudi, C. (2018). Experimental modeling of the thermal resistance of the heat sink dedicated to SMD LEDs passive cooling. In Proceedings of the 3rd International Conference on Smart City Applications, pp. 1-9. https://doi.org/10.1145/3286606.3286810

[17] Laabab, I., Ziani, S., Benami, A. (2023). Solar panels overheating protection -- a review. Indonesian Journal of Electrical Engineering and Computer Science, 49-55. https://doi.org/10.11591/ijeecs.v29.i1

[18] Ben Achour, H., Ziani, S., Chaou, Y., El Hassouani, Y., Daoudia, A. (2022). Permanent magnet synchronous motor PMSM control by combining vector and PI controller. WSEAS Transactions on Systems and Control, 17: 244-249. https://doi.org/10.37394/23203.2022.17.28

[19] Chaou, Y., Ziani, S., Achour, H.B., Daoudia, A. (2022). Nonlinear control of the permanent magnet synchronous motor PMSM using backstepping method. WSEAS Transactions on Systems and Control, 17: 56-61. https://doi.org/10.37394/23203.2022.17.7

[20] Ziani, S., Farhaoui, Y., Moutaib, M. (2022). Extraction of fetal electrocardiogram by combining deep learning and SVD-ICA-NMF methods. Big Data Mining and Analytics, 2022. https://doi.org/10.26599/BDMA.2022.9020035