Table of Contents
Fetching ...

Digitizing Paper ECGs at Scale: An Open-Source Algorithm for Clinical Research

Elias Stenhede, Agnar Martin Bjørnstad, Arian Ranjbar

TL;DR

A fully automated, modular framework that converts scanned or photographed ECGs into digital signals, suitable for both clinical and research applications is introduced, hoping it will contribute to unlocking retrospective ECG archives and democratize access to AI-driven diagnostics.

Abstract

Millions of clinical ECGs exist only as paper scans, making them unusable for modern automated diagnostics. We introduce a fully automated, modular framework that converts scanned or photographed ECGs into digital signals, suitable for both clinical and research applications. The framework is validated on 37,191 ECG images with 1,596 collected at Akershus University Hospital, where the algorithm obtains a mean signal-to-noise ratio of 19.65 dB on scanned papers with common artifacts. It is further evaluated on the Emory Paper Digitization ECG Dataset, comprising 35,595 images, including images with perspective distortion, wrinkles, and stains. The model improves on the state-of-the-art in all subcategories. The full software is released as open-source, promoting reproducibility and further development. We hope the software will contribute to unlocking retrospective ECG archives and democratize access to AI-driven diagnostics.

Digitizing Paper ECGs at Scale: An Open-Source Algorithm for Clinical Research

TL;DR

A fully automated, modular framework that converts scanned or photographed ECGs into digital signals, suitable for both clinical and research applications is introduced, hoping it will contribute to unlocking retrospective ECG archives and democratize access to AI-driven diagnostics.

Abstract

Millions of clinical ECGs exist only as paper scans, making them unusable for modern automated diagnostics. We introduce a fully automated, modular framework that converts scanned or photographed ECGs into digital signals, suitable for both clinical and research applications. The framework is validated on 37,191 ECG images with 1,596 collected at Akershus University Hospital, where the algorithm obtains a mean signal-to-noise ratio of 19.65 dB on scanned papers with common artifacts. It is further evaluated on the Emory Paper Digitization ECG Dataset, comprising 35,595 images, including images with perspective distortion, wrinkles, and stains. The model improves on the state-of-the-art in all subcategories. The full software is released as open-source, promoting reproducibility and further development. We hope the software will contribute to unlocking retrospective ECG archives and democratize access to AI-driven diagnostics.
Paper Structure (19 sections, 3 equations, 12 figures, 4 tables, 1 algorithm)

This paper contains 19 sections, 3 equations, 12 figures, 4 tables, 1 algorithm.

Figures (12)

  • Figure 1: Shows the digitization pipeline for a paper ECG captured using a mobile phone. Top left: Mobile phone photo of a printed ECG. Top right: Segmented image showing detected ECG waveform and grid structure. Bottom left: Perspective-corrected and cropped ECG aligned. Bottom right: Final extracted waveforms in standardized format for archiving and downstream processing.
  • Figure 2: Digitization metrics across devices.
  • Figure 3: Shows the necessary shift to align each lead with the ground truth. In general, smaller shifts are needed for images captured with a flatbed scanner, and for all three devices, no shift is the most common.
  • Figure 4: Lead II as found in the original recording and after digitization of high-resolution scanner images using our proposed algorithm. Five different ECGs are selected based on their SNR. In the lowest-SNR examples (bottom two), a slight baseline drift appears in the scanned-digitized traces, possibly due to the error margins in detecting the rotation of the paper.
  • Figure 5: Lead II as found in the original recording and after digitization of images taken with an iPhone Pro Max 16 using our proposed algorithm. Five different ECGs are selected based on their SNR. The signals are not always perfectly aligned in time, resulting in lower SNR as compared to scanner images.
  • ...and 7 more figures