380 likes | 535 Views
Detection, segmentation and classification of heart sounds. Daniel Gill Advanced Research Seminar May 2004. Automatic Cardiac Signals Analysis. Problems : Pre-processing and noise treatment. Detectionsegmentation problem. Classification problem:
E N D
Detection, segmentation and classification of heart sounds Daniel Gill Advanced Research Seminar May 2004
Automatic Cardiac SignalsAnalysis Problems : • Pre-processing and noise treatment. • Detection\segmentation problem. • Classification problem: • Feature extraction – waveshape & temporal information. • The classifier.
Outline • Methods based on waveshape : - Envelogram - Wavelet decomposition and reconstruction - AR modeling - Envelogram estimation using Hilbert transform • Suggested method : Homomorphic analysis • Suggested temporal modeling : Hidden Markov Models
Heart beat, why do you miss when my baby kisses me ? B. Holly (1957)
PCG Analysis • We will concentrate mainly on S1 and S2. • We will discuss only methods which do not use external references (ECG, CP or other channels). • Most of the methods are non-parametric or semi-parametric (parametric models for the waveshape but non-parametric in the temporal behavior). • Suggestion for parametric modeling.
Features of PCG • The envelope of PCG signals might convey useful information. • In order to detect\segment\classify cardiac events we might need temporal information.
Segmentation Using Envelogram (S. Liang et al. 1997) • Use Shannon energy to emphasize the medium intensity signal. • Shannon Energy: E=-x2log(x2)
Segmentation Using Envelogram • The Shannon energy eliminates the effect of noise. • Use threshold to pick up the peaks.
Segmentation Using Envelogram • Reject extra peaks and recover weak peaks according to the intervals statistics. • Recover lost peaks by lowering the threshold
Segmentation Using Envelogram • Identify S1 and S2 according the intervals between adjacent peaks.
Segmentation Using Wavelet Decomposition and Reconstruction (Liang et al. 1997) • Use the frequency bands that contain the majority power of S1 and S2. • Daubechies filters at frequency bands : a4 : 0-69Hz d4 : 69-138Hz d5 : 34-69Hz
Segmentation Using Wavelet Decomposition and Reconstruction • Use Shannon energy to pick up the peaks above certain threshold. • Identify S1 and S2 according to set of rules similar to those used in segmentation with envelograms. • Compare the segmentation results of d4, d5 and a4. • The choosing criterion : more identified S1s and S2s and less discarded peaks.
AR modeling of PCG (Iwata et al. 1977, 1980) AR model : • Used narrow sliding windows (25ms) to compute 8th order AR model. • Features used : dominant poles (below 80Hz) and bandwidth. • Detected S1, S2 and murmurs.
Segmentation and Event Detection - Cons • Most of the methods are based on rules of thumb – no physical basis. • In most cases there is no parametric model of the waveshape and\or timing mechanism. • Not suitable for abnormal\irregular cardiac activity. • In case of AR model, there is still question of optimality : window size, order etc. In addition, there is no model for the timing mechanism of the events. • Heart sounds are highly non-stationary – AR model is very much inaccurate.
Suggested Methods • Waveshape analysis – Homomorphic Filtering. • Temporal Model – (Semi) Hidden Markov Models.
Waveshape analysis - Homomorphic filtering • Express the PCG signal x(t) by where a(t) is the amplitude modulation (AM) component (envelope) and f(t) is the Frequency modulation (FM) component. • Define
… • Thus • If the FM component is characterized by rapidly variations in time - apply an appropriate linear low-pass filter L. • we have • L is linear so : • By exponentiation :
AM envelopes (a) Normal beat, (b) Atrial septal defect, (c) Mitral stenosis (d) Aortic insufficiency.
Identifying Peaks • A simple threshold was used to mark all the peak locations of the AM envelogram. • Suppose that two consecutive peaks are found at and . • We might have to reject extra peaks or recover lost peaks.
Extra peaks were rejected by the following rules: if (splitted peak) if choose else choose else choose (not splitted)
… • When an interval exceeds the high-level limit, it is assumed that a peak has been lost and the threshold is decreased by a certain amount. It is repeated until the lost peaks are found or a certain limit is reached.
Labeling • The longest interval between two adjacent peaks is the diastolic period (from the end of S2 to the beginning of S1). • The duration of the systolic period (from the end of S1 to the beginning of S2) is relatively constant
Labeling Thus • Find the longest time interval. • Set S2 as the start point and S1 as the end point. • Label the intervals forward and backward.
Homomorphic Filtering Pros • Provides smooth envelope with physical meaning. • The envelope resolution (smoothness) can be controlled. • Enables parametric modeling of the amplitude modulation for event classification (polynomial fitting ?). • Enables parametric modeling of the FM component (pitch estimation, chirp estimation ?)
Temporal Model – (Semi) Hidden Markov Model • HMM is a generative model – each waveshape feature is generated by the cardiological state of the heart. • HMM models have been already used for ECG signals. • The ECG state sequence obeys Markov property – each state is solely dependent on previous state.
An HMM can be specified by 3 matrices {P, A, B}: P = {pi} are the initial state probabilities A = {aij} are the state transition probabilities = Pr(xj|xi) B = {bik} are the observation probabilities = Pr(ok|xi) x1 xt-1 xt xt+1 xT o1 ot-1 ot ot+1 oT HMM Formalism
1 1 1 1 … 2 2 2 2 … … … … … N N K N … Generating a sequence by the model Given a HMM, we can generate a sequence of length n as follows: • Start at state xi according to prob i • Emit letter o1 according to prob bi(o1) • Go to state xj according to prob aij • … until emitting oT 1 2 2 2 0 N b2o1 o1 o2 o3 oT
The three main questions on HMMs • Evaluation GIVEN a HMM , and a sequence O, FIND Prob[ O | ] • Decoding GIVEN a HMM , and a sequence O, FIND the sequence X of states that maximizes P[X | O, ] 3. Learning GIVEN a sequence O, FIND a model with parameters , A and B that maximize P[ O | ]
Segmentation of ECG Using a Hidden Markov Model (L. Claveier et al.) • Purpose: • Segment ECG (12 parts); • Detect accurately P-wave, recognize cardiac arrhythmias. • Parameters: • Amplitude; • Slope.
Segmentation of ECG Using a Hidden Markov Model (Con.) • Possible state jumps of the HMM • Other jumps and states could be added to recognize various shapes of the P and T waves.
Segmentation of ECG Using a Hidden Markov Model (Con.) • Automatic segmentation of an ECG beat. • Automatic segmentation of a P-Wave
ECG segmentation using HSMM • N. Hughes et al. (2003) used HMM in a supervised manner. • Training signals were segmented and labeled by group of expert ECG analysts. • Used raw data and wavelet encoding.
Conclusions • Homomorphic (or cepstral) analysis may provide parametric modeling of S1 & S2 and reduce significantly the dimension of the problem. • Parametric\probabilistic modeling like HMM (or HSMM) may provide robust segmentation of irregular cardiac activity. • It can make automatic classification easier.