An Electrocardiogram (ECG) Digital System for the Extraction and Classification of Paper-based ECG

雨晴 王1, Yulin Sun2, Leshui David3, 张 之涵4, Runnan He5, Xiuyun Liu6
113018336626, 2Tianjin University, 3University of Tianjin, 4天津大学, 5Harbin Institute of Technology, 6University of Cambridge


Abstract

This paper initiates by preprocessing the paper electrocardiogram (ECG) and compares the performance of Sobel, Canny and LOG operators for edge detection in ECG images. Subsequently, skew correction is implemented using Hough line detection. Morphological operations form the basis for ECG waveform extraction. This paper further explores waveform extraction from both color and monochromatic ECG images, introducing a K-means++ algorithm with Laplace-Erode enhancement for color ECG and a connected region analysis-based method for monochromatic ECG. Following this, waveform segmentation is achieved through horizontal projection, segmenting the 12-lead ECG into individual leads to facilitate data extraction. To ensure pixel-to-pixel correspondence, an enhanced curve skeleton thinning algorithm is devised to refine the waveform, and the temporal-voltage pixel relationship is reconstructed based on the background grid. The waveform data is then transformed into ECG signal data, completing the extraction process. The algorithm's accuracy is experimentally validated. Furthermore, for ECG signal denoising, an 8-layer wavelet transform algorithm is proposed, effectively mitigating noise sources such as baseline drift and power frequency interference. Based on the aforementioned research content, this study designed and implemented an ECG digital system, that effectively achieved the core functionalities of digital processing and waveform detection for paper-based ECGs. Furthermore, the system served to validate the principal research objectives outlined in this paper.