Electrocardiogram (ECG) is one of the most widely practiced biomedical sensing modalities for cardiac assessment to investigate hear related conditions. In many healthcare systems, particularly across South Asia and other regions with finite resources, ECG sensor outputs are typically stored as paper prints, scanned images, or photographic records rather than machine-readable digital signals. This makes large parts of clinically valuable sensor data unavailable to modern AI-based diagnostic systems which rely on structured time-series input.
This study presents a framework for recovering ECG waveforms from paper based ECG records which also allows automated multi-class cardiac classification. The digitization pipeline uses classical image processing: Hough transform-based isoelectric baseline localization for colour-grid ECGs, argmin-trace detection for grayscale inputs, colour-channel grid removal, and median-pixel waveform extraction with calibrated millivolt and millisecond output. Recovered signals from individual lead images are assembled into a unified 12-lead tensor, with missing leads handled by dynamic zero-padding. A 1D ResNet classifier (ECGResNet1D) is trained on 21481 PTB-XL records across five diagnostic superclasses: Normal, Myocardial Infarction, ST/T-wave Changes, Conduction Disturbances, and Hypertrophy, using weighted sampling, label smoothing, and signal augmentation to address class imbalance and digitization-induced noise.
Digitization fidelity assessment with respect to the PTB-XL ground-truth waveforms reveals, according to preliminary results, near-perfect morphological correlation for clean paper inputs (Pearson r = 0.966, SNR=12.09 dB) and acceptable recovery for red-grid paper (r=0.661, SNR=2.21 dB). The classifier reaches 72.0% validation accuracy with a macro-averaged F1 of 0.618. A systematic preliminary lead degradation experiment shows graceful performance degradation from macro F1=0.116 with one rhythm strip to 0.598 with all 12 leads.
The proposed framework demonstrates that a rule-based image processing approach, without any trained digitization model, is sufficient to extract usable cardiac signals from old paper ECG records and support automated diagnosis in clinical settings where digital records do not exist.