Duration and dynamic changes of QT and PR intervals as well as QRS complexes of ECG measurements are well established parameters in monitoring and diagnosis of cardiac diseases. Since automated annotations show numerous advantages over manual methods, the aim was to develop an algorithm suitable for online (real time) and offline ECG analysis. In this work we present this algorithm, its verification and the development process.
The algorithm detects R peaks based on the amplitude, the first derivative and local statistic characteristics of the signal. Classification is performed to distinguish premature ventricular contractions from normal heartbeats. To improve the accuracy of the subsequent detection of QRS complexes, P and T waves, templates are built for each class of heartbeats.
Using a continuous integration system, the algorithm was automatically verified against PhysioNet databases and achieved a sensitivity of 98.2% and a positive predictive value of 98.7%, respectively.