Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Jun:221:106890.
doi: 10.1016/j.cmpb.2022.106890. Epub 2022 May 14.

Digitizing ECG image: A new method and open-source software code

Affiliations

Digitizing ECG image: A new method and open-source software code

Julian D Fortune et al. Comput Methods Programs Biomed. 2022 Jun.

Abstract

Background and objective: We aimed to develop and validate an open-source code ECG-digitizing tool and assess agreements of ECG measurements across three types of median beats, comprised of digitally recorded simultaneous and asynchronous ECG leads and digitized asynchronous ECG leads.

Methods: We used the data of clinical studies participants (n = 230; mean age 30±15 y; 25% female; 52% had the cardiovascular disease) with available both digitally recorded and printed on paper and then scanned ECGs, split into development (n = 150) and validation (n = 80) datasets. The agreement between ECG and VCG measurements on the digitally recorded time-coherent median beat, representative asynchronous digitized, and digitally recorded beats was assessed by Bland-Altman analysis.

Results: The sample-per-sample comparison of digitally recorded and digitized signals showed a very high correlation (0.977), a small mean difference (9.3 µV), and root mean squared error (25.9 µV). Agreement between digitally recorded and digitized representative beat was high [area spatial ventricular gradient (SVG) elevation bias 2.5(95% limits of agreement [LOA] -7.9-13.0)°; precision 96.8%; inter-class correlation [ICC] 0.988; Lin's concordance coefficient ρc 0.97(95% confidence interval [CI] 0.95-0.98)]. Agreement between digitally recorded asynchronous and time-coherent median beats was moderate for area-based VCG metrics (spatial QRS-T angle bias 1.4(95%LOA -33.2-30.3)°; precision 94.8%; ICC 0.95; Lin's concordance coefficient ρc 0.90(95%CI 0.82-0.95)].

Conclusions: We developed and validated an open-source software tool for paper-ECG digitization. Asynchronous ECG leads are the primary source of disagreement in measurements on digitally recorded and digitized ECGs.

Keywords: Digitization; ECG; ECG paper digital conversion; Paper ECG digitizing; Paper-to-digital conversion.

PubMed Disclaimer

Conflict of interest statement

Declaration of Competing Interest None declared.

Figures

Figure 1.
Figure 1.
Flowchart of the developed algorithm.
Figure 2.
Figure 2.
The overview and the representative example of the digitization process.
Figure 3.
Figure 3.
Preparation of the ECG mage for digitizing. The input image is rotated by 5.5 degrees (specified by user or autorotation) to produce the normalized image. Then, the normalized image is cropped to x=73, y=237, width=488, and height=165 to produce the cropped lead image. The application may produce up to 12 cropped lead images, but only one is shown for brevity.
Figure 4.
Figure 4.
The typical user workflow when using the application.
Figure 5.
Figure 5.
Grid extraction. The column count (a) and the row count (c) for the binary image input (b) are shown. The count signals have a comb-like shape where teeth occur at grid line locations. In this example, the grid involves some dotted lines, which results in lower counts for those rows or columns, but the results of frequency analysis are not different from a grid with all solid lines.
Figure 6.
Figure 6.
An example of the Viterbi dynamic programming table. The input image (a) is processed by the Viterbi dynamic programming algorithm. The total cost for the path to each point is based on the dynamic programming table (b). The minimal total cost is selected as the best path (c).
Figure 7.
Figure 7.
Bland-Altman plots demonstrating agreement of QRS duration across 3 types of median or representative beats comprised of digitally recorded, simultaneous ECG leads (10s), digitally recorded, asynchronous ECG leads (1b), and digitized, asynchronous ECG leads (scan). The scatterplot presents paired differences (Y-axis), plotted against pair-wise means (X-axis). The reference line indicates the perfect average agreement, Y = 0. The central green line indicates the mean difference between the two measurements, or mean bias. Upper and lower lines represent the mean ± 2 standard deviations, or 95% limits of agreement. A. Agreement of (10s) digitally recorded, simultaneous ECG leads and (1b) digitally recorded, asynchronous ECG leads. B. Agreement of (10s) digitally recorded, simultaneous ECG leads and (scan) digitized, asynchronous ECG leads. C. Agreement of (1b) digitally recorded, asynchronous ECG leads and (scan) digitized, asynchronous ECG leads.
Figure 8.
Figure 8.
Bland-Altman plots demonstrating agreement of QT interval. See Figure 7 legend for the details.
Figure 9.
Figure 9.
Bland-Altman plots demonstrating agreement of heart rate. See Figure 7 legend for the details.
Figure 10.
Figure 10.
Bland-Altman plots demonstrating agreement of PR interval. See Figure 7 legend for the details.
Figure 11.
Figure 11.
Bland-Altman plots demonstrating agreement of Spatial Ventricular Gradient (SVG). See Figure 7 legend for the details.
Figure 12.
Figure 12.
Bland-Altman plots demonstrating agreement of Vector Magnitude QT integral (VMQTi). See Figure 7 legend for the details.

Similar articles

Cited by

References

    1. Kligfield P, Badilini F, Brown B, Helfenbein E, Kohls M, The ISCE ECG genome pilot challenge: A 2004 progress report, Journal of Electrocardiology, 37 (2004) 144–148. - PubMed
    1. Stockbridge N, Points to consider in electrocardiogram waveform extraction, Journal of Electrocardiology, 38 (2005) 319–320. - PubMed
    1. Badilini F, Erdem T, Zareba W, Moss AJ, ECGScan: a method for conversion of paper electrocardiographic printouts to digital electrocardiographic files, J Electrocardiol, 38 (2005) 310–318. - PubMed
    1. Tereshchenko LG, Sotoodehnia N, Sitlani CM, Ashar FN, Kabir M, Biggs ML, Morley MP, Waks JW, Soliman EZ, Buxton AE, Biering-Sorensen T, Solomon SD, Post WS, Cappola TP, Siscovick DS, Arking DE, Genome-Wide Associations of Global Electrical Heterogeneity ECG Phenotype: The ARIC (Atherosclerosis Risk in Communities) Study and CHS (Cardiovascular Health Study), J Am Heart Assoc, 7 (2018) e008160. - PMC - PubMed
    1. Pollard JD, Haq KT, Lutz KJ, Rogovoy NM, Paternostro KA, Soliman EZ, Maher J, Lima JAC, Musani SK, Tereshchenko LG, Electrocardiogram machine learning for detection of cardiovascular disease in African Americans: the Jackson Heart Study, Eur Heart J Digit Health, 2 (2021) 137–151. - PMC - PubMed