A Novel Method for ECG Paper Records Digitization

Xiaohan Sun1, Qince Li1, Kuanquan Wang1, Henggui Zhang2
1Harbin Institute of Technology, 2University of Manchester


Abstract

Aims: Most of the ECG test results obtained by patients are paper records. Based on ECG paper records, it is difficult for patients to understand their cardiac conditions without expert advice and guidance. Thus, the digitization of ECG papers in associated with automatic diagnosis is of great significance for both research and clinical purposes. However, most of current methods extract signals from single lead ECG images manually. This study aimed to develop an algorithm to extract ECG signals automatically from scanned 12 lead ECG paper records. Methods: The original ECG images were subjected to pre-processing operations including edge detecting, image binarization and skew correction. To detect the edge of binarizing area, the image was iteratively filtered by Sobel operator. Then, an iterative threshold was selected for image binarization. Hough transform was applied for skew correction. After pre-processing, ECG waveforms were extracted from background grids based on Connected Component Analysis (CCA). For waveform segmentation, horizontal projection was applied to obtain segmentation boundaries. As ECG records were scanned by different DPI, number of pixels in one grid was calculated as number of pixels divided by number of grids between adjacent crests in horizontal projection. Therefore, pixel values could be converted into time-voltage values as each grid represents 0.04s in horizontal direction and 0.1mV in vertical direction. The ECG signal trace was then traversed to extract ECG signal time series. The extracted signal was plotted by using MATLAB as final ECG signal graph. Results: The proposed algorithm was tested on 129 actual ECG recordings of patients. The results revealed that the extracted signals retained essential feature of paper ECG records. Conclusion: This study developed a novel method for signal extraction from ECG paper. Based on current algorithm, automatic analysis and diagnosis algorithm of ECG will be further developed for computer aided diagnosis.