Characteristic wave detection in ECG signal using morphological transform
- Yan Sun^{1}Email author,
- Kap Luk Chan^{2} and
- Shankar Muthu Krishnan^{}
DOI: 10.1186/1471-2261-5-28
© Sun et al; licensee BioMed Central Ltd. 2005
Received: 24 January 2005
Accepted: 20 September 2005
Published: 20 September 2005
Abstract
Background
Detection of characteristic waves, such as QRS complex, P wave and T wave, is one of the essential tasks in the cardiovascular arrhythmia recognition from Electrocardiogram (ECG).
Methods
A multiscale morphological derivative (MMD) transform-based singularity detector, is developed for the detection of fiducial points in ECG signal, where these points are related to the characteristic waves such as the QRS complex, P wave and T wave. The MMD detector is constructed by substituting the conventional derivative with a multiscale morphological derivative.
Results
We demonstrated through experiments that the Q wave, R peak, S wave, the onsets and offsets of the P wave and T wave could be reliably detected in the multiscale space by the MMD detector. Compared with the results obtained via with wavelet transform-based and adaptive thresholding-based techniques, an overall better performance by the MMD method was observed.
Conclusion
The developed MMD method exhibits good potentials for automated ECG signal analysis and cardiovascular arrhythmia recognition.
Background
The detection of the major characteristic waves in ECG, namely the QRS complexes, P and T waves, is one of the essential tasks in ECG analysis. The performance of an automated ECG analysis system depends heavily on the reliable detection of these fiducial waves. The difficulties of characteristic waves detection lie in oscillations in the baseline, irregular morphology of the waveforms, and frequency overlapping among the wide-band distribution of the characteristic waves [1], etc.
A significant amount of research effort has been devoted to the automated detection of the fiducial (reference) points of the ECG characteristic waves [2–12]. Most of these methods are filtering or adaptive thresholding based, which exhibit limitation in real application. Very few algorithms work well for the detection of all fiducial points such as the onsets and offsets of the P wave, T wave and the QRS complex (also known as the ECG wave boundaries). The main drawback of filtering-based approach is that frequency variations in the characteristic waves often adversely affect its performance. The frequency distribution of QRS complexes generally overlaps with that of the noise, resulting in both false positive and false negative detections. The main problems of the thresholding techniques are their high noise sensitivity and their low efficiency when dealing with odd morphologies. Therefore, more sophisticated signal processing techniques are needed to facilitate the development of new detection schemes with higher detection accuracy.
As a nonlinear filtering technique, it has been proven that morphological dilation and erosion satisfy the causality and the additive semigroup property required by multiscale analysis [13–15] for signals of any dimension with local maxima and local minima as singular points. The fiducial points in ECG signal, such as the Q wave, R peak, S wave, the onsets and offsets of the P wave and T wave, can be regarded as such singular points [16, 17]. In this paper, a new multiscale morphological derivative (MMD) transform-based technique, was developed for the detection of the fiducial points of the ECG characteristic waves. By applying a morphological derivative transform defined at different scales, noise sensitivity inherent in single scale operation can be reduced in MMD method. In addition, the problem of position deviation existed in wavelet transform-based techniques [10] can be avoided due to the nonlinearity of morphological transform. As a result, tracing across scales to locate the singular points is not needed.
The proposed multiscale morphological derivative (MMD) detector
In the present study, the signal to be processed is limited to continuous function f : ^{2} → with only finite oscillations on a closed interval which is differentiable everywhere except at some singular points. A singular point in the one-dimensional signal is defined as a point with derivative on the right and the derivative on the left exist with different signs.
Here, the notation of [18] is used to introduce morphological operators on functions. Denoting the functions, f : D ⊂ ^{ n }→ and g _{ s }: G _{ s }⊂ ^{ n }→ (s > 0), the two fundamental operations of multiscale morphology are:
where D _{ x }is the translation of D, D _{ x }= x + t:t ∈ D, sup(f) and inf (f) refer to the supremum (least upper bound) and infimum (greatest lower bound) of f, s is scale, and g _{ s }is the scaled structuring function [19]. In the discrete case where the function is a finite set of points, max() and min() are used instead of sup() and inf().
By choosing a flat structuring function, where g _{ s }(x) = 0, x ∈ G, where G = {x: ||x|| ≤ s} [14], the above multiscale morphological derivative transform described by Equation (6) is simplified to the following process: Choose a moving window with a length of (2s + 1) samples and find the maximum and minimum values in the window, as well as the value of the signal at the cental point f(x). Then, the MMD transform at the central point can be specified as
Characteristic wave detection in ECG using the MMD detector
The MMD detector is a single lead detection method. In this paper, we only use the ECG lead II for algorithm development and testing. A similar analysis can be done to extend method to other leads. The detailed procedure for ECG characteristic wave detection using the proposed MMD detector, is described as follows:
1. ECG signal is preprocessed by morphological filtering for noise reduction and baseline correction.
2. Multiscale morphological transform is performed on the preprocessed input signal.
3. The local maxima and minima with absolute amplitude larger than a threshold, Th _{ f }, at a selected scale s _{ m }are detected (s _{ m }= 20 for MIT-BIH database and s _{ m }= 15 for QT database in this study). The local minima with absolute amplitude larger than a threshold, Th _{ R }, are detected as R peaks, where, the selection of Th _{ R }and Th _{ f }is based on an adaptive thresholding from the histogram of the MMD transformed data.
4. For each detected R peak, the first local maximum point on its left is detected as the beginning of the R wave; the first maximum point on its right side is detected as the end of the R wave.
5. The first local minimum from the left of the positive R wave is detected as the Q wave. If the minimum cannot be detected, the Q wave is judged to be missing. (There is a time interval for Q wave detection, which is set as the prior clinical value of QRS complex, here, 0.12s).
6. The first local minimum from the right of the positive R wave is detected as the S wave. Otherwise, the S wave is judged to be missing. Same time interval as for Q wave detection is set for S wave detection.
7. The subsequent two consecutive local maxima from the left of the Q wave are detected as the offset and onset of the P wave; the first and second local maxima from the right of the Q wave are detected as the onset and offset of the T wave, respectively.
The preprocessing in step 1 is performed as follows:
where f _{ o } is the original input signal; f _{ b }is the baseline drift signal; f is the signal after preprocessing; o is morphological opening operator; • is morphological closing operator; structuring elements, B _{ o }, B _{ c }and B, are selected based on the properties of ECG characteristic waves. Further details can be found in [20]. For each preprocessed signal, its morphological derivative at scale s _{ m }was calculated according to Equation (7) and its local maxima and minima were detected. It is known that the number of maxima or minima at a larger scale is much less than that at a lower scale. In addition, high frequency noise decays greatly at large scales so that less extrema due to noise are found at larger scale. Therefore, morphological derivative transformed signal at a larger scale was used for detecting the locations of the objective feature points. However, in order not to smooth the characteristic waves in ECG, s _{ m }should be as large as possible but less than W _{ w } f _{ s }, where W _{ w }is the width of the characteristic wave, and f _{ s }is the sampling frequency of ECG signal. The width of QRS is generally from 0.06s to 0.12s. The P wave and the T wave are generally longer than the QRS complex. Hence, in the proposed study, s _{ m }= 20 for MIT-BIH database and s _{ m }= 15 for QT database, were chosen. No calculation was performed at other scales since MMD operation does not cause drift of singular points across different scales.
For the detection of local maxima and minima, two thresholds Th _{ R }and Th _{ f }were used, which were adaptively computed from the histogram of the MMD transformed data. The two between-peak valleys in the histogram gave rise to the values of Th _{ R }and Th _{ f } . Th _{ R }was used for the detection of the local minima, which correspond to R peaks; Th _{ f }was used for the detection of the local minima, which correspond to other characteristic waves.
In any single ECG beat, the R peak, Q wave and S wave correspond to adjacent local minima in the morphological derivative-transformed signal. The onset and offset of the P wave correspond to local maxima adjacent to the Q wave. In the normal cases, the onset and offset of the T wave are local maxima adjacent to S wave. Otherwise, the T wave is judged as inverted. However, for other abnormal T waves, such as the biphasic T wave, the MMD detector may falsely detect the onset and offset of the T wave.
Results and discussion
The proposed morphological approach for the characteristic wave detection in ECG signal was tested using the first ECG leads from the MIT-BIH arrhythmia database [21] and the QT database [22]http://www.physionet.org, which were developed with the aim to be benchmarking references for automated analysis of ECG. The MIT-BIH arrhythmia database contains 48 records (each 30 minutes long) with a sampling frequency of 360 Hz. The QT database is a mixed database with a sampling frequency of 250 Hz, which consists of 105 excerpts (each 15 minutes long) taken from other ECG databases, where, 15 from MIT-BIH Arrhythmia Database, 6 from the MIT-BIH ST Change Database, 13 from the MIT-BIH Supraventricular Arrhythmia Database, 10 from the MIT-BIH Normal Sinus Rhythm Database, 33 from the European ST-T Database, 24 from "sudden death" patients from BIH, and 4 records from the MIT-BIH Long-Term ECG Database.
As shown in Figure 1, the characteristic waves in normal beat are observed to be well detected. For LBBB, in spite of the appearance of a sub-R peak, the boundaries of all waves are still well detected. In APC or PVC no preceding premature P wave appears. In addition, the position of the left 'Δ ' overlaps with the '*' because the onset of the preceding T wave is submerged in the QRS complex. The position of the right 'Δ' also overlaps with the '*' and the Q wave is judged to be missing.
More than 20000 annotated ECG beats randomly selected from MIT-BIH arrhythmia database were used to test the performance of the proposed MMD detector. An overall false detection rate of 0.35% was obtained for the QRS complex detection. In addition, more than 2500 annotated ECG beats randomly selected from the QT database were tested for evaluating the performance of the proposed MMD detector for ECG wave boundaries detection. In the QT database, a minimum of 30 beats from each of its 105 records had been manually annotated by one or more cardiologists. The annotation files were taken as reference for evaluating the performance of automated algorithms for detecting the onsets and offsets of the P wave, T wave, and the QRS complex during ECG analysis.
In order to quantify the performance of ECG characteristic wave detection by the proposed MMD technique, three parameters were used, which included the mean error (m) and standard deviation (σ) of the differences between the annotation results and the automated detection results, as well as Sensitivity (Se). m is used to determine how close the automated detection results are to the annotation results. σ gives an idea of the stability of detection. Se is defined as , for measuring the detection sensitivity, where TP is the number of true detections; FN is the number of manual annotations that are not registered in the automatic detections.
Comparative Results of ECG characteristic wave detection
Technique | Parameter | P _{ on } | P _{ off } | QRS _{ on } | QRS _{ off } | T _{ on } | T _{ off } |
---|---|---|---|---|---|---|---|
MMD | Se(%) | 97.2 | 94.8 | 100 | 100 | 99.8 | 99.6 |
m(ms) | 9.0 | 12.8 | 3.5 | 2.4 | 7.9 | 8.3 | |
σ(ms) | 9.4 | 13.2 | 6.1 | 10.3 | 15.8 | 12.4 | |
TD | Se(%) | 96.2 | 97.0 | 99.9 | 99.9 | 98.8 | 98.9 |
m(ms) | 10.3 | -5.7 | -7.3 | -3.6 | 23.3 | 18.7 | |
σ(ms) | 14.1 | 13.6 | 10.9 | 10.7 | 28.3 | 29.8 | |
WD | Se(%) | 89.9 | 89.9 | 100 | 100 | 99.1 | 99.2 |
m(ms) | 13.0 | 5.4 | 4.5 | 0.8 | -4.8 | -8.9 | |
σ(ms) | 12.7 | 11.9 | 7.7 | 8.7 | 13.5 | 18.8 | |
CSE | σ(ms) | 10.2 | 12.7 | 6.5 | 11.6 | - | 30.6 |
The proposed MMD method works best for the QRS complex detection. Lower values of mean bias and standard deviation as well as higher value of detection sensitivity are observed. The average detection bias for the QRS's onset and offset are 3.5 ms and 2.4 ms respectively. The corresponding standard deviations are 6.1 ms and 10.3 ms, both of which are within the acceptable limits required by the CSE committee.
However the requirements can not be fully satisfied by the TD and WD methods although the mean bias obtained by the WD method is a little better than the results obtained by the MMD method. As for the P wave onset detection, only the MMD method can fulfill the CSE requirement while it fails for the P wave offset detection. The WD method performs better for P wave offset detection while worse for P wave onset detection compared with the MMD method. TD method fails to meet CSE requirements for both P wave onset and offset. As for the T wave offset detection, all three methods can satisfy the limit required by the CSE committee. Among them, the MMD and the WD methods perform much better than the TD method. The clinically important intervals for arrhythmia recognition, such as the PR interval (from the onset of the P wave to the onset of the R wave), the QT interval (from the Q wave to the offset of the T wave), are not related to the positions of the offset of the P wave and the onset of the T wave. Therefore, the weakness of the proposed MMD technique does not cause significant problem for arrhythmia recognition. The correlation coefficients between the results obtained by MMD method and those computed from annotation data are 0.9264 for PR interval, 0.9542 for QRS complex, and 0.9316 for QT interval.
The proposed MMD method for ECG wave boundary detection is well performed with reasonable mean bias and standard deviation values within the limits required by CSE, on over 79% of the records. In the QT database, best detection performance is observed for records from the MIT normal sinus rhythms database. Records with poor detection performance are mostly from the European ST-T database and the Supraventricular database, in which, low signal-to-noise ratio or non-homogeneous repolarization exists. In summary, it is concluded that the proposed MMD detector has acceptable performance comparable to those given by experts.
Conclusion
In this paper, a new algorithm based on multiscale morphological derivative transform, called MMD detector, has been developed for fiducial point detection and applied for ECG wave boundary detection. The MMD detector could not only work for the QRS complex, but also the onsets and offsets of the characteristic waves. The standard deviations for important ECG characteristic wave detection obtained by the proposed MMD detector were within the limits required by the CSE committee. Furthermore, the statistical results obtained by the MMD detector were compared with those obtained by wavelet transform-based and adaptive thresholding-based techniques. In overall, better performance by the MMD technique was observed, considering that less empirical parameters were needed. Therefore we conclude that the proposed MMD method exhibits good potentials in the clinical applications for automated analysis of ECG signal.
Declarations
Acknowledgements
The authors wish to extend their sincere appreciation to Nanyang Technological University, Singapore for supporting this work. The authors also acknowledge the clinical collaboration from Singapore General Hospital.
Authors’ Affiliations
References
- Emilio ES, Sober MM: Application of adaptive signal processing for determining the limits of P and T waves in an ECG. IEEE Transactions on Biomedical Engineering. 1998, 45 (8): 1077-1080. 10.1109/10.704877.View ArticleGoogle Scholar
- Goldberger AL, Bhargava V: QRS duration measurement using high-frequency electrocardiography: applications and limitations of a new technique. Comput Biomed Res. 1982, 15 (5): 474-484. 10.1016/0010-4809(82)90028-3.View ArticlePubMedGoogle Scholar
- Willems D, Hildreth E: Influence of noise on wave boundary recognition by ECG measurement programs. Comput Biomed Res. 1987, 20 (6): 543-562. 10.1016/0010-4809(87)90025-5.View ArticlePubMedGoogle Scholar
- Hamilton PS, Tompkins WJ: Quantitative investigation of QRS detection rules using the MIT-BIH arrhythmia database. IEEE Transactions on Biomedical Engineering. 1996, BME-33: 1157-1187.View ArticleGoogle Scholar
- Gritzali F, Frangakis G, Papakonstantinous G: Detection of the P and T waves in ECG. Computers in Biomedical Research. 1989, 22: 83-91. 10.1016/0010-4809(89)90017-7.View ArticleGoogle Scholar
- Coast DA, Stern RM, Cano GG: An approach to cardiac arrhythmia analysis using hidden Markov models. IEEE Transactions on Biomedical Engineering. 1990, BME-37 (9): 826-836. 10.1109/10.58593.View ArticleGoogle Scholar
- Laguna P, Thakor NV, Caminal P, Jane R, Yoon HR, Bayes de Luna A, Marti V, Guindo J: New algorithm for QT interval analysis in 24-hour Holter ECG: performance and application. Med Biol Eng Comput. 1990, 28 (1): 67-73.View ArticlePubMedGoogle Scholar
- Laguna P, Jane R, Caminal P: Automatic detection of wave boundaries in multilead ECG signals: validation with the CSE database. Comput Biomed Res. 1994, 27 (1): 45-60. 10.1006/cbmr.1994.1006.View ArticlePubMedGoogle Scholar
- Kemmelings JG, Linnenbank AC, Muilwijk SL, SippensGroenewegen A, Peper A, Grimbergen CA: Automatic QRS onset and offset detection for body surface QRS integral mapping of ventricular tachycardia. IEEE Trans Biomed Eng. 1994, 41 (9): 830-836. 10.1109/10.312090.View ArticlePubMedGoogle Scholar
- Li C, Zheng C, Tai CF: Detection of ECG characteristic points using wavelet transforms. IEEE Transactions on Biomedical Engineering. 1995, 42: 21-29. 10.1109/10.362922.View ArticlePubMedGoogle Scholar
- Daskalov IK, Christov II: Automatic detection of the electrocardiogram T-wave end. Med Biol Eng Comput. 1999, 37 (3): 348-353.View ArticlePubMedGoogle Scholar
- Daskalov IK, Christov II: Electrocardiogram signal preprocessing for automatic detection of QRS boundaries. Med Eng Phys. 1999, 21 (1): 37-44. 10.1016/S1350-4533(99)00016-8.View ArticlePubMedGoogle Scholar
- Park KR, Lee CN: Scale-space using mathematical morphology. IEEE Transactions on Pattern Analysis and Machine Intelligence. 1996, 18 (11): 1121-1126. 10.1109/34.544083.View ArticleGoogle Scholar
- Jackway PT, Deriche M: Scale space properties of the multiscale morphological dilation-erosion. IEEE Transactions on Pattern Analysis and Machine Intelligence. 1996, 18 (1): 38-51. 10.1109/34.476009.View ArticleGoogle Scholar
- Boomgaard RV, Smeulders A: Morphological multiscale image analysis,. chapter Proc. First Int'l Workshop on Math. Morphology and Its Applications to Signal Processing. 1993, Univ. Politecnica de Catalunya, Barcelona, SpainGoogle Scholar
- Mallat S, Zhong S: Characterization of signals from multiscale edges. IEEE Transactions Pattern Analysis and Machine Intelligence. 1992, 14 (7): 710-732. 10.1109/34.142909.View ArticleGoogle Scholar
- Witkin AP: Image Understanding. 1984, Norwood, NJ:Ablex, 79-95.Google Scholar
- Haralick RM, Sternberg SR, Zhuang X: Image analysis using mathematical morphology: Part I. IEEE Transactions on Pattern Analysis and Machine Intelligence. 1987, PAMI-9: 532-550.View ArticleGoogle Scholar
- DePree JD, Swartz CW: Introduction to Real Analysis. 1988, John Wiley, New YorkGoogle Scholar
- Sun Y, Chan KL, Krishnan SM: ECG signal conditioning by morphological filtering. Computers in Biology and Medicine. 2002, 32 (6): 465-479. 10.1016/S0010-4825(02)00034-3.View ArticlePubMedGoogle Scholar
- MIT-BIH arrhythmia Database. Beth Israel Hospital, Biomedical Engineering Division Room
- Laguna P, Mark RG, Goldberger AL, Moody GB: A database for evaluation of algorithms for measurement of QT and other waveform intervals in the ECG. Computers in Cardiology. 1997, 673-676.Google Scholar
- Martinez JP, Olmos S, Laguna P: Evaluation of a wavelet-based ECG waveform detector on the QT database. Computers in Cardiology. 2000, 81-84.Google Scholar
- The pre-publication history for this paper can be accessed here:http://www.biomedcentral.com/1471-2261/5/28/prepub
Pre-publication history
Copyright
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.