Automated Digitization of Paper-Based ECGs: A Methodological Approach Enhanced by Denoising Autoencoders

Chaithanya Kalyan Reddy Bhuma, Subhash khambampati, Sushanth Reddy Dondapati, Tejo Vardhan Kattamuri, Bharadwaj Madiraju, Kunal Achintya Reddy Seerapu, Rahul Krishnan Pathinarupothi
Amrita Vishwa Vidyapeetham


Abstract

As part of George B. Moody PhysioNet Challenge 2024, our team, am_HAI, aims to develop a fully automated open-source algorithm to digitize the paper-based electrocardiogram (ECG) waveforms. Our methodology comprises a structured process involving rotation detection, grid removal, lead segmentation, signal extraction, and scaling. Initially, we utilize a robust rotation detection algorithm, employing Canny edge detection and Hough line transformation to identify and correct any rotational irregularities. Subsequently, grid removal is executed using binary thresholding and erosion techniques to enhance signal clarity. The resulting binary image, with the signal represented by black pixels, is divided into segments corresponding to individual leads (typically 12) using pre-defined index values. Each segment undergoes signal extraction by locating the zero indices for every column and computing their median to represent a single pixel value. The extracted signal is then multiplied by voltage resolution to convert pixel values into millivolts (mV) and scaled along the zero axis to provide a common horizontal basis for all signals. Distorted images were not specifically addressed in our procedure during the unofficial phase. Nonetheless, our approach achieved a Signal-to-Noise Ratio (SNR) of -0.88 and an SNR value of 0.00 when the signal was normalized. To further improve the performance, we plan to integrate a pre-trained deep denoising autoencoder model. This model will be trained to learn noise-free features from standard ECG images, allowing for effective removal of creases, wrinkles, and other distortions present in real-world scenarios. Additionally, Optical Character Recognition (OCR) techniques will be incorporated to automate the segmentation process by detecting the lead names using bounding boxes and calculating their relative distances.