Computational and Mathematical Methods in Medicine
Volume 2019 (2019), Article ID 3130527, 11 pages
https://doi.org/10.1155/2019/3130527

Research Article

An Improved Sliding Window Area Method for T Wave Detection

Haixia Shang,¹ Shoushui Wei,¹ Feifei Liu,² Dingwen Wei,³ Lei Chen,⁴ and Chengyu Liu²

¹School of Control Science and Engineering, Shandong University, Jinan 250061, China
²School of Instrument Science and Engineering, Southeast University, Nanjing 210096, China
³Department of Electronic & Electrical Engineering, Bath University, Bath BA27AY, UK
⁴School of Science and Technology, Shandong University of Traditional Chinese Medicine, Jinan 250355, China

Correspondence should be addressed to Shoushui Wei; sswei@sdu.edu.cn and Chengyu Liu; chengyu@seu.edu.cn

Received 4 December 2018; Accepted 5 March 2019; Published 1 April 2019

Guest Editor: Tomas Krilavičius

Copyright © 2019 Haixia Shang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

Background. The T wave represents ECG repolarization, whose detection is required during myocardial ischemia, and the first significant change in the ECG signal is being observed in the ST segment followed by changes in other waves like P wave and QRS complex. To offer guidance in clinical diagnosis, decision-making, and daily mobile ECG monitoring, the T wave needs to be detected firstly. Recently, the sliding area-based method has received an increasing amount of attention due to its robustness and low computational burden. However, the parameter setting of the search window’s boundaries in this method is not adaptive. Therefore, in this study, we proposed an improved sliding window area method with more adaptive parameter setting for T wave detection. Methods. Firstly, k-means clustering was used in the annotated MIT QT database to generate three piecewise functions for delineating the relationship between the RR interval and the interval from the R peak to the T wave onset and that between the RR interval and the interval from the R peak to the T wave offset. Then, the grid search technique combined with 5-fold cross validation was used to select the suitable parameters’ combination for the sliding window area method. Results. With respect to onset detection in the QT database, F1 improved from 54.70% to 70.46% and 54.05% to 72.94% for the first and second electrocardiogram (ECG) channels, respectively. For offset detection, F1 also improved in both channels as it did in the European ST-T database. Conclusions. F1 results from the improved algorithm version were higher than those from the traditional method, indicating a potentially useful application for the proposed method in ECG monitoring.

1. Introduction

Nowadays, an increase in the number of people suffering from heart diseases has been seen. Characterized by several waveforms such as the P wave, QRS complex, and T wave, electrocardiogram (ECG) becomes the most intuitive and basic tool to diagnose heart diseases in clinical applications which can provide essential physiological/pathological information for clinical diagnoses and decision-making [1], including important time interval information between the onset and offset of different waves [2]. Besides, many wearable monitoring devices have appeared in recent years, which makes it possible to monitor ECG signals throughout an individual’s daily life. Meanwhile, a large amount of ECG data are generated daily, which is impossible for physicians to view/diagnose each ECG signal manually [3]. Therefore, developing accurate automatic analysis algorithms for ECG signals is critical, especially with respect to mobile ECG monitoring [4]. Furthermore, QRS complex have been widely investigated because of its highest amplitude over the past decades. Up to now, there are many classical methods for detecting QRS complex and most of the methods have been listed in [5], and the classical widely-used methods are parabolic fitting [6], neural-network-based method [7], and convolutional neural network [8]. In addition, those methods for detecting the QRS complex have shown high sensitivity with positive predictivity (>99%) on the MIT-BIH arrhythmia database [9], which can provide powerful support for other waves’ detections.

As one of three main waves of ECG, the T wave represents ECG repolarization, and its absence or unusual shapes may signify disruption in repolarization or another segment of the heartbeat [10]. Additionally, T wave abnormalities are associated with some heart diseases such as inverted T waves found in other leads (other than the V1 to V4 leads), which is related to an increase in cardiac deaths, and a tall or wide QRS complex with an upright T wave is further suggestive of a posterior infarction. Furthermore, during myocardial ischemia, the first significant change in ECG signal is being observed in ST-segment followed by changes in other waves like P wave and QRS complex of ECG signal. Hence, detection of the T wave is significant in clinical applications [11].

However, accurate/robust T wave detection still presents challenges due to its low amplitude (usually 0.1 to 0.3 mV) as well as great variations in T waves’ morphologies [12], like positive T wave, negative T wave, and biphasic T wave. Besides, most of the ischemic cases suffering from earlier STEMI (ST-elevation myocardial infarction) have a prominent ST elimination or depression, which significantly affects the detection of the T onsets. Nowadays, various approaches based on different techniques have been proposed for T wave detection, and those typical techniques are wavelet [13, 14], mathematical model [15], support vector machine (SVM) [16], artificial neural network (ANN) [17–19], low-pass differentiation (LPD) [20], hidden Markov model (HMM) [21, 22], partially collapsed Gibbs sample and Bayesian (PCGS) [23], “wings” function [24], derivative curve [25], adaptive technique [26], computing the Trapezium’s area [27], TU complex analyses [28], correlation analysis [29], k-nearest neighbor [30], and sliding window area (SWA) [31]. In these aforementioned methods, the wavelet-based method is robust to waveform morphological variations but is sensitive to noise [13, 14]. The mathematical model method needs to build robust ECG templates, but when the waveform variations are large, building universal templates becomes difficult [15]. The SVM-based method is efficient but constructing efficient features is tough [16], and the ANN-based method faces the drawback of high computational complexity [17]. As a comparison, the SWA method has low computational complexity which is also robust to noise and waveform morphological variations [31].

In 2006, Zhang et al. first proposed the SWA method for detecting T wave offsets and confirmed its efficiency in the QT database [31]. Subsequently, Song et al. improved this method for detecting T wave onsets [32]. Afterwards, our team combined onsets and offsets detection for classifying the morphology of the ST segment [33]. In 2017, our team analyzed its efficiency in the QT database with a different evaluation index (F1 measure), and we found that there is still some space for further improvement since the parameter settings in the transitional SWA method are not adaptive [34], and the parameters given by Zhang et al. [31]and Song et al. [32] are empiric values and there is no optimization step included.

Hence, in this study, an improved SWA method for both onset and offset detections of T wave with more adaptive parameter settings is proposed. The performance of the improved method was compared with the traditional method, and both methods were validated in two common ECG databases: (1) the QT database (training and testing) and (2) another independent European ST-T database (only testing).

2. Methods

2.1. Data

Records from two datasets are used. The first is the QT database, which contains 105 15-minute two-channel ECG recordings with the sample rate of 250 Hz, and we chose it as the training and testing sets because multiple-type records from different databases are contained in this database. Besides, totally 43 recordings have manually annotated T wave onsets and 103 recordings have manually annotated T wave offsets. All records with annotations are selected, and for each record, a 0.05–45 Hz low-pass zero-phase filter was applied for denoising before importing to our algorithm. Furthermore, there are usually 30 to 100 representatively manually annotated discrete beats in each annotated recording. Thus, an RR interval adjustment is also needed before using these records because we used the manually annotated R peak locations. Table 1 shows the summarized annotated information of the QT database. More detailed information about the annotations of this database can be found in the study by Laguna et al. [35].

Table 1: Summary of the annotative information of the QT and the European ST-T databases.

Variable
QT database
European ST-T database

Onset
Offset
Onset
Offset

No. of recordings
43
105
23
23

No. of annotated beats
1371
3542
14337
14337

Min. Dis_qrs (ms)
52
228
60
220

Max. Dis_qrs (ms)
412
784
264
612

Mean of Dis_qrs (ms)
164
360
160
380

SD of Dis_qrs (ms)
60
71
29
47

Dis_qrs: the time interval between the T wave onset/offset and the R wave position within the current beat; SD: standard deviation. The annotations of the QT database are taken from the database website https://www.physionet.org/physiobank/database/qtdb/doc/index.shtml.

The second database is the European ST-T database, which consists 90 2-hour two-channel ECG recordings sampled at 250 Hz, and records of this database are only used to test the robustness of our improved method. The European ST-T database is chosen because of its widely usages in evaluation of algorithms for analysis of ST and T wave changes [36, 37]. In this study, 23 recordings (only the first 5 minutes in each recording) were selected and were manually annotated for T wave onsets and offsets by a trained staff member because of loss of T wave international annotations. Table 1 also shows the detailed annotation information of this database. Besides, when choosing records, if there were serious signal quality problems within the first 5-minute episode, the following 5-minute episode was used and a 0.05–45 Hz bandpass filter was applied for denoising for each record we chose before importing into the algorithm. We do not implement RR interval adjustment because R peaks were detected by jqrs method [21].

To verify the consistency of the annotations between the two databases, we analyzed the time interval information between the T wave onset/offset and the corresponding R peak position for the two databases. Figure 1 shows the probability density distributions of the time interval information from the two databases. As shown in Figure 1, we found that our manual annotations of the onset/offset of T wave in the European ST-T database had similar probability density distributions with the annotations in the QT database, which indicated the effectiveness of our annotations.

(a)

(b)

Figure 1: Probability density distribution of the time interval information between T wave onset/offset and R wave peak by analyzing the annotations from the two databases: (a) QT database and (b) European ST-T database.

2.2. Sliding Window Area (SWA) Method

2.2.1. SWA Method

SWA is an algorithm for detecting T wave onset and offset (Ton and Tend, respectively) by analyzing the waveform area of ECG within a sliding window [31]. Onset/offset is detected when the area of the sliding window reaches its maximum in a prefixed searching range. Then, we show an example for explaining the method in Figures 2 and 3.

(a)

(b)

Figure 2: Demonstration of the SWA method for T wave onset detection.

(a)

(b)

Figure 3: Demonstration of the SWA method for detecting offsets of the T wave.

Figure 2 illustrates the detection for Ton. Firstly, with the location of R peak, the left and right boundaries (t₁ and t₂, respectively) of search window are determined based on the current RR interval as suggested in the study by Song et al. [32]:

where is the RR interval and is the position of R peak.

The waveform area (area of onset denoted as: ) within the fixed sliding window was calculated using the following formula:

where (by default), which is the window width, t stretches from t₁ to t₂, is the waveform amplitude at the jth sample point, and is the local average amplitude (using a smoothing window of by default), which is defined according to the following equation:

As shown in Figure 2, when t = Ton, reaches its maximum value.

Figure 3 illustrates the Tend detection. At first, with the location of the R peak, the left and right boundaries (t₃ and t₄, respectively) of the search window are determined based on the current RR interval as suggested in a study by Zhang et al. [31]:

The waveform area (area of ends denoted as: ) within the fixed sliding window was then calculated according to the following formula:

where (by default), t is from t₃ to t₄, and and have been defined in equation (2). As shown in Figure 3, when t = Tend, reaches its maximum value. As for the difference between Figures 2 and 3 is the direction to calculate the sliding area.

In addition, Algorithm 1 shows the description of the traditional SWA algorithm and more details to which the algorithm proof can refer [31].

Input: ECG signal , R peak locations, R peak numbers N, sliding window width , smoothing factor p, and morphology predefined factor r

Output: T wave onset locations

Calculation:

(1)
    Calculate t₁ and t₂ and construct sliding window

    window = 

(2)
    Smooth signal and calculate sliding area for each point i inside [t₁, t₂]

(3)
    T wave morphology classification

    if

    calculate

    end if

    if

    calculate

    end if

(4)
    Get k

Output: T wave onset = R peak + k.

Algorithm 1: Traditional SWA algorithm (T wave onset detection).

2.2.2. Improved SWA Method

One key issue with respect to the SWA method is to accurately determine the search boundaries, but the search boundaries are closely related to the RR interval. As shown in Figures 2 and 3, if the interval of the searching window’s boundaries was set too small which means that two boundary points are near the current R peak, the maximum of sliding area could not be found or the detected onset/offset of T wave are nearer to the R peak. These issues affect detection accuracy, which results in detection error and vice versa.

In the traditional SWA method, there are two piecewise functions with predefined parameter settings. In order to more accurately model the relationships between RR interval and the searching boundaries in this study, we performed a k-means clustering analysis between RR intervals and ( denotes the time interval between the R peak and T wave onset) as well as the relationship between the RR intervals and ( the time interval between the R peak and T wave offset), which is implemented by means of the k-means function in Matlab. The scatter plots with the optimal k-means clustering (k = 3) are shown in Figure 4 [38], and k is determined by combining the results of clustering and the computational complexity of parameters’ settings as well as the adaptiveness of the algorithm. Then, the two relationships (between RR intervals and , and between RR intervals and ) are obtained using the following equations:

(a)

(b)

Figure 4: Clustering results for T wave feature points: (a) clustering information of T wave onsets; (b) clustering information of T wave offsets.

Thus, the three piecewise functions for determining the search boundaries for T wave onset and offset detections were obtained with the parameters presented in Table 2:

Table 2: Information of parameters when detecting the T wave.

Parameters
T onset
T offset

IV
CS
CR
IV
CS
CR

ald/alu/ard
0.1
0.1
0.1∼0.4
0.1
0.1
0.1∼0.4

aru/amd
0.0
0.0∼0.4

amu
0.0
0.0∼0.4

IV: initialized value; CS: change step; CR: change range.

Then, the grid search was used to determine the best combination of parameters in equations (7) and (8), which was implemented by for loop. In a loop, we changed the value of one parameter at a time, kept the other parameters unchanged, and applied the algorithm in the QT database as well as using a 5-fold cross-validation. Then, we stored the F1 measure of one loop and started another loop. Through all loops, we traversed all of the combinations of parameters referred to in Table 2. After comparing the results, the combinations of parameters with the highest F1 measure were chosen. The best parameters’ combinations for T wave onsets are listed: ald = 0.4, alu = 0.2, ard = 0.4, aru = 0.4, amd = 0.3, and amu = 0.0 and for T wave ends are listed: ald = 0.2, alu = 0.1, ard = 0.2, ard = 0.1, aru = 0.0, amd = 0.0, and amu = 0.1. The improved SWA method can be summarized as a block diagram in Figure 5.

Figure 5: The block diagram of the proposed method for delineating the T wave onset/offset.

2.3. Evaluation Method

Detections for true and false positives (TP and FP, respectively) and false negative (FN) were determined with a threshold of 100 ms. In this study, indices like sensitivity (Se), positive precision (P+), and F1 measurement were selected as evaluation indices [39, 40] with the following definitions: , , and . F1 measure is selected other than accuracy since F1 measure is the weighted average of precision and recall which satisfies our asymmetric datasets where values of false positive and false negatives are not the same.

3. Results

Figure 6 shows the detection examples of the proposed method, compared with the traditional methods, Zhang’s method for T wave offset detection [31] and Song’s method for T wave onset detection [32]. Figure 6(a) shows the inverted T wave detections, Figure 6(b) shows the biphasic T wave detections, and Figure 6(c) shows the normal T wave detections. From Figure 6, T wave offset detections get better results than T wave onset detections. And, our method got obviously better results when it is applied in T wave onsets detections.

(a)

(b)

(c)

Figure 6: T wave detection examples. The solid points marked () are R peaks; the solid points marked ( and ) are results of our method; the hollow circles marked ( and ) are results of the traditional method; the shadow areas are accepted as cases. (a) e0107; (b) e0111; (c) e0118.

3.1. Results from the QT Database

We firstly tested the performance of the improved SWA method on the QT database. The traditional SWA methods (Song’s method [32] and Zhang’s method [31]) were used as comparators.

Table 3 shows the results of onset and offset detections in the QT database. Both of the two channels signals (first and second channels) were tested. From Table 3, we found the improved SWA method significantly enhanced detection accuracies for both onset and offset detections. For onset detection, improved from 54.70% to 70.46% and 54.05% to 72.94% for two ECG channels, respectively. For offset detection, improved from 87.83% to 93.73% and 86.73% to 94.75% for two ECG channels, respectively. In addition, detection errors were also analyzed. As expected, the improved SWA method indicated smaller detection errors than the traditional method except for a slight increase in the offset detection from the second channel (traditional 0.027 ± 31.85 ms versus improved 2.45 ± 33.98 ms). However, it is worthwhile to note that all Se, P+, and F1 indices increased from ∼86% to ∼94%.

Table 3: Results of T wave detection in the QT database.

Detection
Channel
Method
Se (%)
P+ (%)
F1 (%)
Error mean ± SD (ms)

Onset
First
Traditional SWA [32]
54.70
54.70
54.70
−30.2 ± 40.75

Improved SWA
70.46
70.46
70.46
7.3 ± 53.12

Second
Traditional SWA [32]
54.05
54.05
54.05
−36.27 ± 43.29

Improved SWA
72.94
72.94
72.94
6.35 ± 53.78

Offset
First
Traditional SWA [31]
87.83
87.83
87.83
−2.57 ± 30.08

Improved SWA
93.93
93.93
93.93
1.19 ± 33.59

Second
Traditional SWA [31]
86.73
86.73
86.73
0.027 ± 31.85

Improved SWA
94.75
94.75
94.75
2.45 ± 33.98

3.2. Results from the European ST-T Database

Table 4 shows the results of onset and offset detections in the European ST-T database. The improvements after using the improved method were more significant when performing T wave onset detection. improved from 41.02% to 84.13% and 44.33% to 87.62% for two ECG channels, respectively. The mean detection errors significantly decreased from 19.52 ms to 7.04 ms and 36.27 ms to 6.35 ms for two ECG channels, respectively. Performance improvements in offset detection were small but convincing improved from 98.83% to 99.57% and 91.76% to 98.29% for two ECG channels, respectively. However, the mean detection errors for T wave offset detection slightly increased (not significant) when performing the improved method.

Table 4: Results of T wave detection in the European ST-T database.

Detection
Channel
Method
Se (%)
P+ (%)
F1 (%)
Error mean ± SD (ms)

Onset
First
Traditional SWA [32]
41.02
41.02
41.02
19.52 ± 31.89

Improved SWA
84.13
84.13
84.13
−7.87 ± 44.22

Second
Traditional SWA [32]
44.33
44.32
44.33
−36.27 ± 43.29

Improved SWA
87.62
87.61
87.62
−15.20 ± 33.54

Offset
First
Traditional SWA [31]
98.80
98.86
98.83
22.2 ± 22.70

Improved SWA
99.50
99.65
99.57
26.94 ± 20.98

Second
Traditional SWA [31]
91.80
91.71
91.76
21.07 ± 26.31

Improved SWA
98.29
98.28
98.29
24.54 ± 25.52

4. Discussion

As seen from Tables 3 and 4, both T wave onset and offset detection of the new proposed method reported better performances (F1 measure) than the traditional method, suggesting that applying the clustering technique in the SWA method for deciding searching boundaries is helpful to enhance detection accuracy. In addition, clustering is a statistical-based technique, which can be used to determine whether the independent part of a population belongs to different groups by comparing quantitative multiple features [38]. Besides, we noted that, for the T wave offset detections, neither the traditional SWA nor the improved version reported the better performance than the detection of T wave onsets. One possible explanation is that Zhang proposed this method originally to detect T wave offsets not T wave onsets and proved its mathematical rationality for T wave offsets. Another possible explanation is that the clustering method for determining the search boundaries is a statistical-based technique. Therefore, the accuracy of the clustering results is related to the data amount. However, the annotated T wave onsets in the QT database are far less than the annotated T wave offsets (1371 versus 3452). Thus, the relationship found by clustering analysis between the RR interval and is not that strong (Figure 4(a)) compared to the relationship between the RR interval and (Figure 4(b)). Moreover, the significant difference between the improved and traditional SWAs indicates that the improved version can more extensively and adaptively determine the search window’s boundaries by using the k-means clustering based on the QT database and grid search strategy. However, the traditional SWA only used predefined parameters and did not give out any detailed explanations.

Another difference between Zhang’s [31] and our results was observed when using the QT database for validation, Zhang’s study chose the better result from the outputs of the two ECG channels [31]. In order to compare our results with those from Zhang, we also calculated smaller errors from the results of two ECG channels. The comparable results are summarized in Table 5. The mean detection errors are similar between Zhang’s and our results. We also noted that the standard deviation of detection errors was 25.82 ms for our method and 21.19 ms for the traditional SWA. Both of them were smaller than the acceptable threshold (30.6 ms) proposed by the common standards in Electrocardiography Working Party [41].

Table 5: Comparable detection results of T wave offset in the QT database.

Methods
Annotations
Se (%)
P+ (%)
(ms)

Improved SWA
3542
98.5
98.5
1.21 ± 25.82

Traditional SWA [31]
3542
95.5
95.5
−1.12 ± 21.19

Wavelet-based [13, 14]
3542
99.77
97.79
−1.6 ± 18.1

Low-pass differentiation-based [20]
3542
99.00
97.74
13.5 ± 27.0

Hidden Markov model-based [21, 22]
3542
NA
NA
−5 ± 14

Partially collapsed Gibbs sample [23]
3403
99.81
98.97
4.3 ± 20.8

k-nearest neighbor-based [30]
30 records
NA
NA
2.8 ± 18.6

TU complex analysis [28]
3528
92.60
NA
0.8 ± 30.3

Neural network and fixed-size least-squares SVM [19]
3542
NA
NA
−3.0 ± 16.9

L.EKF25 [42]
10 records
NA
NA
11 ± 39

N.L.EKF25 [42]
4 ± 23

L.EKF25 [42]
15 records
NA
NA
−17 ± 30

N.L.EKF25 [42]
−21 ± 19

NA: not available; L.EKF25: linear Kalman filter; N.L.EKF25: nonlinear Kalman filter.

Table 5 also summarizes comparable results from other studies. The wavelet-based method reported a mean error of 1.6 ms [13, 14]; the low-pass differentiation-based method gave a relative large mean error of 13.5 ms [20], while the hidden Markov model-based method reported a mean error of 5 ms [21, 22]. Furthermore, the partially collapsed Gibbs sample reported 4.3 ms [23], and the k-nearest neighbor-based method reported 2.8 ms [20]. The TU complex analysis gave a minimum detection mean error of 0.8 ms but did not include the corresponding Se and P+ results [28]. In addition, methods proposed by Mahsa with linear and nonlinear phase observation to detect fiducial points are also listed as comparative method [42], and two parts of QT database including normal sinus rhythm and arrhythmia database are used when evaluating extraction of fiducial points and the nonlinear observation has more smaller deviations 23 ms for the first database and 19 ms for the second database.

The potential issues existing in the above studies consist of two main points: (1) the time tolerance for determining true positive detection was not clear and (2) training and testing were both performed in the QT database, but we used the European ST-T database as the independent testing dataset.

Besides, as deep-learning technology improves, more and more methods based on this technique have been proposed to detect ECG feature points; for instance, a recently proposed method using neural network and fixed-size least-squares SVM to detect T wave end reported it is a minimum detection mean error of −3 ms in the QT database; a QRS complex detection by using two-level convolutional neural network [8] reported its sensitivity of 99.77% in the MIT-BIH AR database. When using deep-learning technique, a great amount of data is needed, and in T wave detection, the annotated T wave ends are limited but a meaningful strategy was proposed in [19], which is to use different strategies for selecting different training sets such as random selection and k-means. But, we just proposed an idea that is to use one independent database (QT dataset) as the training set and testing set and another independent database (records from the European ST-T database annotated by a trained staff) as the testing set.

In order to illustrate difference between error and F1 measure, we did statistical analysis of error. And, Figure 7 gives the cumulative line chart of error (denoted as CLCE) of T wave offsets in the QT database which explains our method got more true positive beats than the traditional method inside our time tolerance. The CLCE of T wave onsets in the QT database and CLCE of T wave in the European ST-T database also have the same regularities of distribution as it did in the T wave offsets in the QT database.

Figure 7: The cumulative line chart of error (T offsets in the QT database). TR result represents the traditional SWA method result, and IM result represents the improved SWA method result.

Moreover, the limitation of our study is that the annotations of the European ST-T database are only done by a trained staff member which may result in nonauthoritative annotations. Besides, we only combine the data statistic and data mining technique to changing the parameters of traditional SWA method. In our following work, more records with authoritative annotations will be used to test the robustness of the combination of parameters we obtained in this study.

5. Conclusion

In this paper, an improved sliding window area method for detecting T wave onset and offset was proposed. The main contribution/novelty was for application of the data statistic and data mining technique: (1) k-means clustering for the setting of search boundaries and (2) grid search strategy to optimize the parameters. Experiments performed in the QT database and the European ST-T database demonstrated the improved method’s better performance.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this work.

Acknowledgments

This work was supported by the National Natural Science Foundation of China under Grant no. 81871444, Shandong Province Key Research and Development Plan under Grant no. 2018GSF118133, and Jiangsu Province Primary Research and Development Plan under Grant no. BE2017735. The authors thank the support from the Southeast-Lenovo Wearable Heart-Sleep-Emotion Intelligent Monitoring Lab.

References

J. H. O’Keefe, S. C. Hammill, and M. Freed, The Complete Guide to ECGs, Physicians’ Press, Boston, MA, USA, 1997.

J. P. V. Madeiro, P. C. Cortez, J. A. L. Marques, C. R. V. Seisdedos, and C. R. M. R. Sobrinho, “An innovative approach of QRS segmentation based on first-derivative, Hilbert and Wavelet Transforms,” Medical Engineering & Physics, vol. 34, no. 9, pp. 1236–1246, 2012.

E. J. Topol, “The big medical data miss: challenges in establishing an open medical resource,” Nature Reviews Genetics, vol. 16, no. 5, pp. 253-254, 2015.

A. Page, O. Kocabas, T. Soyata, M. Aktas, and J.-P. Couderc, “Cloud-based privacy-preserving remote ECG monitoring and surveillance,” Annals of Noninvasive Electrocardiology, vol. 20, no. 4, pp. 328–337, 2015.

B.-U. Kohler, C. Hennig, and R. Orglmeister, “The principles of software QRS detection,” IEEE Engineering in Medicine and Biology Magazine, vol. 21, no. 1, pp. 42–57, 2002.

A. I. Manriquez and Q. Zhang, “An algorithm for QRS onset and offset detection in single lead electrocardiogram records,” in Proceedings of the 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Lyon, France, August 2007.

Q. Xue, Y. H. Hu, and W. J. Tompkins, “Neural-network-based adaptive matched filtering for QRS detection,” IEEE Transactions on Biomedical Engineering, vol. 39, no. 4, pp. 317–329, 1992.

Y. Xiang, Z. Lin, and J. Meng, “Automatic QRS complex detection using two-level convolutional neural network,” BioMedical Engineering OnLine, vol. 17, no. 1, p. 13, 2018.

F. Liu, C. Liu, X. Jiang et al., “Performance analysis of ten common QRS detectors on different ECG application cases,” Journal of Healthcare Engineering, vol. 2018, Article ID 9050812, 8 pages, 2018.

E. B. Hanna and D. L. Glancy, “ST-segment depression and T-wave inversion: classification, differential diagnosis, and caveats,” Cleveland Clinic Journal of Medicine, vol. 78, no. 6, pp. 404–414, 2011.

J. Tikkanen, T. Kenttä, K. Porthan, H. V. Huikuri, and M. J. Junttila, “Electrocardiographic T wave abnormalities and the risk of sudden cardiac death: the Finnish perspective,” Annals of Noninvasive Electrocardiology, vol. 20, no. 6, pp. 526–533, 2015.

S. A. Immanuel, A. Sadrieh, M. Baumert et al., “T-wave morphology can distinguish healthy controls from LQTS patients,” Physiological Measurement, vol. 37, no. 9, pp. 1456–1473, 2016.

A. Ghaffari, M. R. Homaeinezhad, M. Akraminia, M. Atarod, and M. Daevaeiha, “A robust wavelet-based multi-lead Electrocardiogram delineation algorithm,” Medical Engineering & Physics, vol. 31, no. 10, pp. 1219–1227, 2009.

J. P. Martinez, R. Almeida, S. Olmos, A. P. Rocha, and P. Laguna, “A wavelet-based ECG delineator: evaluation on standard databases,” IEEE Transactions on Biomedical Engineering, vol. 51, no. 4, pp. 570–581, 2004.

J. P. V. Madeiro, W. B. Nicolson, P. C. Cortez et al., “New approach for T-wave peak detection and T-wave end location in 12-lead paced ECG signals based on a mathematical model,” Medical Engineering & Physics, vol. 35, no. 8, pp. 1105–1115, 2013.

S. Mehta, N. Lingayat, and S. Sanghvi, “Detection and delineation of P and T waves in 12-lead electrocardiograms,” Expert Systems, vol. 26, no. 1, pp. 125–143, 2009.

G. Vijaya, V. Kumar, and H. K. Verma, “Artificial neural network based wave complex detection in electrocardiograms,” International Journal of Systems Science, vol. 28, no. 2, pp. 125–132, 1997.

A. A. S. León et al., “Neural network approach for T-wave end detection: a comparison of architectures,” in Proceedings of the Computing in Cardiology Conference, Vancouver, BC, Canada, September 2016.

A. A. Suárez-León, C. Varon, R. Willems, S. Van Huffel, and C. R. Vázquez-Seisdedos, “T-wave end detection using neural networks and Support Vector Machines,” Computers in Biology and Medicine, vol. 96, pp. 116–127, 2018.

P. Laguna, R. Jané, and P. Caminal, “Automatic detection of wave boundaries in multilead ECG signals: validation with the CSE database,” Computers and Biomedical Research, vol. 27, no. 1, pp. 45–60, 1994.

M. Akhbari, M. B. Shamsollahi, O. Sayadi, A. A. Armoundas, and C. Jutten, “ECG segmentation and fiducial point extraction using multi hidden Markov model,” Computers in Biology and Medicine, vol. 79, pp. 21–29, 2016.

D. A. Coast, R. M. Stern, G. G. Cano, and S. A. Briller, “An approach to cardiac arrhythmia analysis using hidden Markov models,” IEEE Transactions on Biomedical Engineering, vol. 37, no. 9, pp. 826–836, 1990.

C. Lin, C. Mailhes, and J. Y. Tourneret, “P- and T-wave delineation in ECG signals using a Bayesian approach and a partially collapsed Gibbs sampler,” IEEE Transactions on Biomedical Engineering, vol. 57, no. 12, pp. 2840–2849, 2010.

M. Zarrini and A. Sadr, “A real-time algorithm to detect inverted and symmetrical T-wave,” in Proceedings of the International Conference on Computer and Electrical Engineering (ICCEE 2009), Dubai, UAE, December 2009.

Y. N. Singh and P. Gupta, “An efficient and robust technique of T wave delineation in electrocardiogram,” in Proceedings of the International Conference on Bio-Inspired Systems and Signal Processing (Biosignals 2009), Porto, Portugal, January 2009.

N. Bayasi et al., “Adaptive technique for P and T wave delineation in electrocardiogram signals,” in Proceedings of the 2014 36th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Chicago, IL, USA, August 2014.

C. R. Vázquez-Seisdedos, J. Neto, E. J. Marañón Reyes, A. Klautau, and R. C. Limão de Oliveira, “New approach for T-wave end detection on electrocardiogram: performance in noisy conditions,” BioMedical Engineering OnLine, vol. 10, no. 1, p. 77, 2011.

J. A. Vila, Y. Gang, J. M. R. Presedo, M. Fernandez-Delgado, S. Barro, and M. Malik, “A new approach for TU complex characterization,” IEEE Transactions on Biomedical Engineering, vol. 47, no. 6, pp. 764–772, 2000.

M. R. Homaeinezhad, M. Erfanianmoshiri-Nejad, and H. Naseri, “A correlation analysis-based detection and delineation of ECG characteristic events using template waveforms extracted by ensemble averaging of clustered heart cycles,” Computers in Biology and Medicine, vol. 44, no. 1, pp. 66–75, 2014.

I. Saini, D. Singh, and A. Khosla, “K-nearest neighbour-based algorithm for P- and T-waves detection and delineation,” Journal of Medical Engineering & Technology, vol. 38, no. 3, pp. 115–124, 2014.

Q. Zhang, A. I Manriquez, C Médigue, Y Papelier, and M Sorine, “An algorithm for robust and efficient location of T-wave ends in electrocardiograms,” IEEE Transactions on Biomedical Engineering, vol. 53, no. 1, pp. 2544–52, 2006.

J. Song, H. Yan, Z. Xiao, X. Yang, and X. Zhang, “A robust and efficient algorithm for st-t complex detection in electrocardiograms,” Journal of Mechanics in Medicine and Biology, vol. 11, no. 5, pp. 1103–1111, 2011.

M. Xu, S. Wei, X. Qin, Y. Zhang, and C. Liu, “Rule-based method for morphological classification of ST segment in ECG signals,” Journal of Medical and Biological Engineering, vol. 35, no. 6, pp. 816–823, 2015.

H. Shang et al., “Performance evaluation for the sliding area-based T wave detection method on the QT database,” in Proceedings of the Chinese Automation Congress, Jinan, China, October 2017.

P. Laguna et al., “A database for evaluation of algorithms for measurement of QT and other waveform intervals in the ECG,” in Proceedings of the Computers in Cardiology, 1997, Lund, Sweden, September 1997.

G. B. Moody and PhysioNet, “Research resource for complex physiologic signals,” Electrocardiology, vol. 29, pp. 1–88, 2009.

A. Taddei, G. Distante, M. Emdin et al., “The European ST-T database: standard for evaluating systems for the analysis of ST-T changes in ambulatory electrocardiography,” European Heart Journal, vol. 13, no. 9, pp. 1164–1172, 1992.

A. K. Jain, “Data clustering: 50 years beyond K-means ☆,” Pattern Recognition Letters, vol. 31, no. 8, pp. 651–666, 2008.

S. Daskalaki, I. Kopanas, and N. Avouris, “Evaluation of classifiers for an uneven class distribution problem,” Applied Artificial Intelligence, vol. 20, no. 5, pp. 381–417, 2006.

C. Liu, P. Li, C. Di Maria, L. Zhao, H. Zhang, and Z. Chen, “A multi-step method with signal quality assessment and fine-tuning procedure to locate maternal and fetal QRS complexes from abdominal ECG recordings,” Physiological Measurement, vol. 35, no. 8, pp. 1665–1683, 2014.

J. Willems, “Recommendations for measurement standards in quantitative electrocardiography,” European Heart Journal, vol. 6, no. 10, pp. 815–825, 1985.

M. Akhbari, M. B. Shamsollahi, C. Jutten, A. A. Armoundas, and O. Sayadi, “ECG denoising and fiducial point extraction using an extended Kalman filtering framework with linear and nonlinear phase observations,” Physiological Measurement, vol. 37, no. 2, pp. 203–226, 2016.