Hours of ECG data can be turned into a single colour-coded map, allowing changes in heart rhythm and the shape of individual heartbeats to emerge as visible patterns. Physicists at the Warsaw University of Technology have developed the method and tested it on recordings from healthy people and patients with various heart rhythm disorders.
Long-term ECG monitoring produces a vast amount of data. While a conventional chart clearly shows individual heartbeats, a recording lasting many hours becomes an extremely long line that is difficult to review quickly. Heart rate variability plots show changes in the intervals between beats, but omit most information about the shape of the beats themselves.
A team led by Tomasz Gradowski from the Faculty of Physics at the Warsaw University of Technology has proposed combining these two perspectives in a single image. The researchers call the visualisation a ‘carpet plot’ and described the method in the journal Computer Methods and Programs in Biomedicine (https://www.sciencedirect.com/science/article/abs/pii/S0169260726003603).
The R-wave, a distinct peak visible in every ECG cycle, serves as the reference point. Software extracts fixed-length segments of the recording centred on successive peaks and stacks them vertically, aligning the R-waves along a single vertical axis. Each segment forms a row in the image, with measured voltage values represented by colours.
The result is a map in which the vertical axis represents successive heartbeats and the passage of time, while the horizontal axis shows the signal waveform before and after the selected R-wave. The recordings are neither stretched nor compressed, so the position of the next beat continues to reflect the actual R-R interval and therefore the instantaneous heart rate.
At the same time, the colour scheme preserves information about the morphology of the QRS complex, the ST segment and the T wave.
Regular heart activity creates organised bands on the map. A rhythm disturbance or change in ECG morphology disrupts this pattern, causing it to curve or replacing it with a different structure. A brief event can therefore stand out among thousands of beats, even if it might easily be overlooked in a standard hours-long recording.
The researchers tested the method using recordings from several publicly available databases covering healthy individuals and patients with various cardiac disorders. The maps revealed, among other things, episodes of atrial fibrillation, premature ventricular contractions, prolonged rhythm pauses and atrioventricular block.
In a patient with long QT syndrome, the researchers could observe changes in the QT interval and T-wave morphology in relation to heart rhythm. During exercise testing, distinct patterns emerged for the resting phase, exertion and the body's return to baseline.
The method also allows ECG data to be correlated with other signals recorded simultaneously. The same R-peaks were used to align blood pressure and intracranial pressure measurements. Such visualisations can help investigate relationships between cardiac activity and pressure changes within the circulatory system and the cranium.
Although the colour map is designed to be read by humans, its two-dimensional format also makes it suitable for computer-based analysis. The researchers fed one of the plots into the ResNet18 neural network, which had previously been trained to recognise standard images.
Successive layers of the network responded to different elements of the map: some to the shape of individual beats, others to recurring patterns spanning longer periods. The researchers stressed, however, that this was a technical demonstration rather than an attempt to create an automated system for detecting disease.
The scientists say the carpet plot is not yet a diagnostic tool or an algorithm designed to detect a specific disease. They have demonstrated that information previously viewed separately can be preserved in a single, compact image.
The next stages will involve studies involving larger groups of patients, assessment of the method's diagnostic effectiveness, simultaneous visualisation of multiple ECG leads and the development of specialised machine-learning models. (PAP)
kmp/ agt/
tr. RL