$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
The 12-lead electrocardiogram (ECG) is a cornerstone of cardiovascular assessment and remains widely used for screening, monitoring, and clinical decision-making1. Despite ongoing digitization efforts, many institutions still store ECGs as printed paper records or rasterized images embedded in PDF reports, which reduces searchability and complicates longitudinal follow-up2. Importantly, image-based storage prevents direct use of standardized ECG toolkits and machine-learning pipelines that require calibrated time-series signals rather than images3. The overall goal of this protocol is to provide a reproducible and standardized method for converting electrocardiogram images into calibrated digital signals suitable for downstream computational analysis.
Automated ECG digitization seeks to reconstruct voltage–time signals from scanned ECG images4. However, real-world clinical ECG scans often present heterogeneous report layouts, variable grid visibility, compression artifacts, non-uniform illumination, and additional markings such as stamps or annotations5. These factors can degrade lead localization and waveform tracing, limiting reproducibility across institutions and device vendors6. Therefore, a practical digitization workflow should provide robust grid calibration, reliable lead separation and labeling, and standardized export to a widely adopted signal format such as WFDB7. Standardized digital formats improve interoperability across institutions and facilitate reproducible analysis using established electrocardiogram signal-processing libraries.
Several ECG digitization tools have been proposed (Table 1), yet clinical deployment remains challenging because performance can be sensitive to scan quality and layout variability8,9,10. Recent studies have also explored automatic lead extraction from ECG paper records using deep learning, further highlighting the need for robust parsing under diverse layouts and artifacts11. Related digitization software has also been introduced to improve robustness under heterogeneous clinical conditions12. In parallel, open toolkits and resources for ECG-image research have been introduced to facilitate method development and benchmarking13. Unlike existing digitization tools that may be sensitive to layout variability or limited to specific scan formats, this protocol integrates grid calibration, automated lead localization, and standardized WFDB export to improve robustness across heterogeneous clinical reports. In this work, we focus on an end-to-end pipeline that targets real-world ECG PDFs and scanned records, emphasizes reproducibility, and outputs WFDB-compliant multi-lead signals for downstream analysis.
We propose a fully automated and reproducible protocol for converting 12-lead ECG report images into WFDB-compliant digital signals. The protocol integrates (i) grid-based pixel-to-physical calibration using standard ECG settings (25 mm·s-1, 10 mm·mV-1), (ii) YOLOv12-based localization of both lead regions and lead icons to support robust lead identification in heterogeneous report layouts, and (iii) two alternative waveform extraction procedures, including an improved centerline method designed to improve trace continuity under variable line thickness and small discontinuities. These components are aligned with prior work on signal extraction, robust digitization software, and practical digitization strategies under heterogeneous clinical conditions14. The resulting WFDB records enable downstream analysis using standard ECG toolchains. This protocol is particularly suitable for retrospective digitization of archived electrocardiogram reports stored as scanned paper records or rasterized PDFs and may require adaptation when grid lines are absent or severely distorted.