Direct Vectorization of Scanned Paper ECGs via Chromaticity Priors and a Rigid Band Comb
Emanuel Cojocariu, Gabriel Mihail Danciu, Elena Bobescu
Key points
From the paper's conclusion- The results support research use on standard-layout prints, not clinical use.
Abstract
Paper-printed 12-lead electrocardiograms remain the dominant archival format in large cardiology cohorts; yet, retrospective studies and machine learning pipelines need millivolt–time signals rather than pixel images. Existing digitizers treat grid removal as a dedicated preprocessing stage that must be re-tuned across paper types and scanners. We present a preprocessing-free pipeline built on three structural facts: printed grids and annotations are chromatic while the trace is near-achromatic; the page holds N parallel lead strips at uniform vertical pitch; and each lead’s baseline is well-approximated by a straight line once the page is oriented. A LAB-chromaticity mask removes grid and annotation ink at the pixel level; a rigid comb of N impulses anchors all lead baselines simultaneously; and a continuity-weighted column search tracks each trace, with a second pass recovering QRS spikes clipped by the half-pitch hard cap. On 109 PTB-XL records rendered through ecg-image-kit, the pipeline reaches median Pearson r=0.987 (RMSE 0.029 mV, SNR 14.6 dB) on standard 4×3 renders. On dense single-column renders, it reaches only r=0.667 with a ±50 ms alignment window (0.703 with an unrestricted lag search, which partly matches the wrong beat), mainly because tall waves cross into neighboring rows. With added wrinkles, yellowing, noise, rotation and cropping, median r is 0.966 (mean 0.889, SNR 11.2 dB) and stable across three independent distortion draws; a pathology-enriched set of 125 records (infarction, ST/T change, conduction disturbance, hypertrophy, arrhythmia) gives a median r of 0.989 pristine and 0.970 distorted. Scored without any generator metadata, from the printed calibration pulse and the standard lead order, the results are unchanged (median r=0.987 pristine, 0.962 distorted). An ablation shows that the chromaticity mask carries most of the accuracy. On 430 real archival scans, the pipeline runs without retuning (≈3 s/page, one CPU core), and the rigid comb returns a regularly spaced twelve-band set on 76.7% of pages, but a signal-content test (Einthoven/Goldberger identities) shows it localizes the limb leads no better than peak detection. Use of real scans has two open limitations: waveform accuracy on real scans has not been measured against ground-truth, and the orientation stage leaves 98% of auditable archival pages upside-down, which reverses lead identity. The results support research use on standard-layout prints, not clinical use. A page-level polarity heuristic used in an earlier version of the pipeline, now disabled, is shown to cause nearly all whole-record failures previously attributed to paper warp. Code and all evaluation scripts are released.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Evolution of Automatic Paper Electrocardiogram Digitization: Methods, Applications, and Future PerspectivesElectronics · 2026
- Bit-Exact Reconstruction and Certification of Electrocardiogram Waveforms from Vector-Encoded PDF FilesmedRxiv · 2026
- Compact and Decodable Electrocardiogram Text for Large Language ModelsarXiv · 2026
- Image-based deep learning for emergency electrocardiogram classificationmedRxiv · 2026
- GDPR-data aligned end-to-end software for clinical artificial intelligence ECG prediction for atrial fibrillationEuropean Heart Journal · 2026
- Robust Transfer Learning for Paper ECG RecognitionarXiv · 2026