{'fraction_non_alphanumeric': 0.042566709021601014, 'fraction_numerical': 0.026683608640406607, 'mean_word_length': 4.790441176470588, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
High Precision Digitization of Paper-Based ECG Records: A Step Toward Machine Learning

Introduction: The electrocardiogram (ECG) plays an important role in the diagnosis of heart diseases. However, most patterns of diseases are based on old datasets and stepwise algorithms that provide limited accuracy. Improving diagnostic accuracy of the ECG can be done by applying machine learning algorithms. This requires taking existing scanned or printed ECGs of old cohorts and transforming the ECG signal to the raw digital (time (milliseconds), voltage (millivolts)) form. Objectives: We present a MATLAB-based tool and algorithm that converts a printed or scanned format of the ECG into a digitized ECG signal. Methods: 30 ECG scanned curves are utilized in our study. An image processing method is first implemented for detecting the ECG regions of interest and extracting the ECG signals. It is followed by serial steps that digitize and validate the results. Results: The validation demonstrates very high correlation values of several standard ECG parameters: PR interval 0.984 +/−0.021 (p-value < 0.001), QRS interval 1+/− SD (p-value < 0.001), QT interval 0.981 +/− 0.023 p-value < 0.001, and RR interval 1 +/− 0.001 p-value < 0.001. Conclusion: Digitized ECG signals from existing paper or scanned ECGs can be obtained with more than 95% of precision. This makes it possible to utilize historic ECG signals in machine learning algorithms to identify patterns of heart diseases and aid in the diagnostic and prognostic evaluation of patients with cardiovascular disease.