You are on page 1of 4

Proceedings of the 29th Annual International Conference of the IEEE EMBS Cit Internationale, Lyon, France August 23-26,

2007.

FrA07.1

A Semi-Automatic Feature Detection Algorithm for Hemodynamic Signals using Curvature-Based Feature Extraction
Jonathan P. Mynard, Member, IEEE, Daniel J. Penny, and Joseph J. Smolich

AbstractSpecific features of hemodynamic signals are invaluable for elucidating ventricular and vascular function. A semi-automatic algorithm is presented that enables accurate detection of any feature in any hemodynamic signal, using feature extraction from local maxima and minima in signal curvature. A particular feature is selected manually in the first beat and then detected automatically in subsequent beats.

I. INTRODUCTION NALYSIS of features within hemodynamic signals has become an increasingly important tool in cardiovascular research. Recent advances in time-domain analysis have revealed that detailed evaluation of ventricular or aortic pressure and flow signals, for example, provides a great deal of information about heart function and ventricular-vascular coupling [1-3]. Other derived signals, such as wave intensity [2], require measurements on forward-running and reflected waves, with accurate detection of the start, peak and end of these waves. In general, a feature of a hemodynamic signal may refer to a local maximum or minimum, or to a localized bend or corner in the signal. Detection of such features can be performed manually by positioning vertical cursors in a graphical user interface (GUI). This method is time consuming, however, since in any given study there may be many features of interest in several signals, and these must be detected in many beats. Another option is to design fully automatic algorithms to detect specific features. The drawback of this approach is that a given feature may appear under certain physiological conditions but not others. In dose response-type studies, for example, features may gradually appear or disappear and thus vary greatly in relative size [4]. Designing unique and robust automatic algorithms for every type of feature of interest is thus quite impractical. The aim of this study was to develop a versatile semiautomatic algorithm where automatic feature extraction is used in conjunction with manual detection of specific
Manuscript accepted June 6, 2007. This work was supported in part by funds from the Australia and New Zealand Childrens Heart Research Centre. J. P. Mynard is with the Heart Research Group, Murdoch Childrens Research Institute, Melbourne, Australia (phone: 61 3 9345 5922; fax: 61 3 9345 4220; e-mail: jonathan.mynard@mcri.edu.au). D. J. Penny, is with the Heart Research Group, Murdoch Childrens Research Institute, Melbourne, Australia (e-mail: dan.penny@rch.org.au) J. J. Smolich is with the Heart Research Group, Murdoch Childrens Research Institute, Melbourne,Australia(e-mail: joe.smolich@mcri.edu.au).

features in hemodynamic signals. The benefits of this approach are threefold: 1) a single semi-automatic algorithm can be applied to any feature of any signal; 2) although in part manually driven, this algorithm vastly reduces analysis time; 3) the precise location of features that may be difficult to identify visually can be determined objectively. The algorithm presented in this manuscript employed signal curvature to extract features. Curvature is traditionally used in image-processing to locate corners in an image. It has also been used for feature extraction in time signals such as the electrocardiogram (ECG) [5], but has not previously been applied to hemodynamic signals. II. METHODS AND MATERIALS A. Semi-automatic Algorithm The components of the semi-automatic algorithm, which are displayed in the flow diagram of Fig. 1, are as follows. 1) For the signal being analyzed, a set of features is automatically extracted (see section B) and the time and type (i.e. curvature maximum or minimum) of each feature is stored. The types of features extracted and the sensitivity of the detection can be set or adjusted by the user. 2) Using a custom-designed GUI, the user is presented with a vertical cursor which can be positioned manually. Left- and right-arrow buttons are then used to snap the cursor to the nearest feature or to scroll through the features. Once the desired feature has been identified, the user clicks a Next button. 3) The code then estimates the location of the defined feature in the next beat using a two-step process. a) An initial estimate is obtained in one of two ways. If beat onsets have previously been detected, the time of the feature in the next beat is estimated to occur at the same isochrone (relative to beat onset) as the feature in the previous beat. Alternatively, if beat onsets are not known, the next feature is estimated to occur one heart period after the initial feature. Heart period is calculated from the fundamental frequency of the signal, found by performing a Fast Fourier Transform (FFT) of the whole channel and detecting the first significant spectral peak above the respiratory frequency range. However, if several feature detections have already been confirmed, the heart period can also be estimated from the average period between previous detections. b) From this initial estimate, the nearest feature of the correct type is found. If the time between the nearest feature and the initial estimate is greater

1-4244-0788-5/07/$20.00 2007 IEEE

1691

Extract Features (store timing and types)

User selects a feature (snap-to GUI)


Automatic detection of next feature succeeded

Automatically find feature in next beat

Automatic detection of next feature failed or <2 beats confirmed

End of data reached

User views/edits/confirms detected features


Fig. 1. Flow diagram of the semi-automatic algorithm for feature detection. Fig. 2. Calculation of curvature for a) left-ventricular pressure using b) x = t = 0.002, c) x from the method described and d) a x 50 times greater.

than a set limit, the detection is deemed to have failed. If a detection failure occurs (e.g. due to an ectopic beat or the absence of that feature), the user is prompted to manually position the cursor for this beat and the next. Otherwise, step 3 is repeated automatically as long as the defined feature is successfully located in subsequent beats. 4) After detection in all beats is complete, the features are displayed with one vertical cursor for each beat. The user can then confirm the detections visually and make adjustments manually if needed. B. Feature Extraction A feature is defined as the time of a local maximum or minimum in signal curvature (). For a function y = f(t), curvature is defined [6] as
d2y
2

the median of all ys that are greater than 0.1% of the maximum y (this avoids including data segments that are effectively flat-line in the calculation). In the resulting curvature signal, the peaks accurately identify the timing of features and the magnitudes of these peaks are greater for more significant features (see Fig. 2c). Fig. 2d shows that larger values of x emphasize significant features further, but result in an unacceptable loss of accuracy. The derivatives were calculated using the standard Savitzky-Golay filter method [7] by using fitting coefficients of 4th order polynomials on 5 points, where for the i-th data point, the k-th time derivative is given by

d yi
dt

(t ) =

(1 + (

dy dt

(1)
2

dt
m

k! t
k

m = n

a k yi + m

(3)

where n = 2 and ak refers to the m-th coefficient for the k-th derivative. Incorporating (3) and (2) into (1) gives the final equation which was used to generate the curvature signals:

Implementation of this equation directly on sampled data results in large spurious curvature peaks associated with small high-frequency fluctuations in the signal (see Fig. 2b). To generate a curvature signal that is less sensitive to small fluctuations, an axis transformation was performed from t to a variable x, where

2 ( ti ) = x
2

m = n

a2 y i + m
3

(4)
2

dy dx

dy t dt x

and

d y dx
2

d y t dt
2

2 2

2 1 n m 1+ a1 yi + m x m = n

(2) A final step in the feature extraction was included to further emphasize significant features and attenuate insignificant features without losing accuracy. This was achieved by adjusting the amplitudes of curvature peaks based on the premise that the significance of a given curvature peak is high if the time between it and the next or

Here t is the sample time and x is a value that results in an x-axis that is approximately orthogonal to the y-axis, i.e. on average y x or y/x tan(45), where y is the change in the signal over one sample. x is thus calculated as

1692

Fig. 4. Feature detection in an aortic flow signal.

Fig. 3. Feature extraction in an aortic pressure signal (a). Continuous curvature (b) is calculated with extraction of peaks (c) followed by adjustment according to the significance of each peak (d).

previous peak is great or the difference in the value of the hemodynamic signal between adjacent feature peaks is great. Thus, the curvature peaks were first extracted as in Fig. 3c. Each peak p (with initial curvature amplitude p ) was then scaled according to:
Fig. 5. Feature detection in a time-corrected aortic wave intensity signal.

p = p

( t

max t

2 + ymax

(5)

where p is the adjusted peak amplitude and tmax is either tp tp-1 or tp+1 tp, whichever is greater. Similarly ymax is either |yp-1| |yp| or |yp+1| |yp| (but limited to 10% of the whole signal magnitude), where these refer to the values of the hemodynamic signal at the times of the feature peaks. The adjusted peaks (shown in Fig. 3d) are then used to detect features of the hemodynamic signal (see Fig. 3a). A significance threshold is set by the user to control which features will be included in the semi-automatic algorithm. C. Materials The experimental preparation was similar to that previously described [8, 9]. All studies were approved by the institutional Animal Experimentation Ethics Committee and conformed to guidelines of the National Health and Medical Council of Australia.

The data was sampled at 500 or 1000 Hz and low-pass filtered at 45Hz to remove high frequency noise. The semiautomatic algorithm was implemented in Spike2 software (v5.16, Cambridge Electronic Design, Cambridge, UK), which contains a script language for performing customized analysis and design of GUIs. III. RESULTS AND DISCUSSION Examples of feature detection are shown in Figs. 4 and 5. As in Fig. 3, the most significant features are indicated on the signal itself (Figs. 4a and 5a). In the lower plots (Figs. 4b and 5b), the feature peaks have been magnified. Both figures show that the feature extraction has accurately identified the times of local maxima, minima and other corners. While local maxima and minima in a hemodynamic signal can be easily detected without using curvature, corners that are not local maxima or minima are more difficult. Such corners are often encountered at the start or end of a wave (e.g. in the

1693

Fig. 6. The semi-automatic algorithm applied to changing signal morphology. In the first beat, the feature was chosen by the user via the snap-to GUI. After user confirmation in the following beat, the feature was then detected automatically in all subsequent beats.

Fig. 7. Sequential application of the semi-automatic algorithm to four different features in the first beat, with accurate detection of the same feature in subsequent beats.

first wave and immediately following smaller negative wave of Fig. 5) or as inflection points (e.g. on the downward limb of the aortic flow signal in Fig. 4). The use of curvature thus enables accurate detection of local maxima and minima, and also more gentle corners that are particularly difficult to detect precisely with manual techniques. This accords with the advantage of using a curvature approach to detect the start and end of the Q- and T-waves respectively in the ECG [5]. Fig. 6 shows detection of a feature with changing morphology using the semi-automatic algorithm. In the first beat the user-selected feature was a small local minimum. This feature was then detected automatically in the next beat, and confirmed by the user without needing adjustment. The feature was then detected automatically in remaining beats without user input. The algorithm reliably detected this feature in all beats even though it started as a local minimum and changed into a localized bend in later beats. In Fig. 7 the semi-automatic algorithm was applied 4 times to the same signal. The user selected a different feature each time in the first beat, and these were all detected successfully and automatically in the following beats. It is important to stress that the method described is not intended for noisy data or signals with highly variable heart rates, as additional adjustments to the algorithm would be required for such signals. While we have demonstrated that the algorithm is robust and useful for a wide range of applications, further research would be required to compare it with other algorithms and to investigate specific clinical applications. IV. CONCLUSION A versatile, semi-automatic algorithm enabling extraction of features in hemodynamic signals via local maxima and

minima in signal curvature has been presented. This algorithm, which allows manual detection of any feature in the first beat of a hemodynamic signal, followed by automatic detection of this feature in subsequent beats, has the potential for wide applicability in time-domain analysis of hemodynamics. REFERENCES
[1] J. J. Wang, A. B. O'Brien, N. G. Shrive, K. H. Parker, and J. V. Tyberg, "Time-domain representation of ventricular-arterial coupling as a windkessel and wave system," American Journal of Physiology Heart & Circulatory Physiology, vol. 284, pp. H1358-H1368, 2003. A. W. Khir and K. H. Parker, "Wave intensity in the ascending aorta: effects of arterial occlusion," Journal of Biomechanics, vol. 38, pp. 647-55, 2005. R. Kelly, C. Hayward, A. Avolio, and M. O'Rourke, "Noninvasive determination of age-related changes in the human arterial pulse," Circulation, vol. 80, pp. 1652-1659, 1989. I. B. Wilkinson, H. MacCallum, P. C. Hupperetz, C. J. van Thoor, J. R. Cockcroft, and D. J. Webb, "Changes in the derived central pressure waveform and pulse pressure in response to angiotensin II and noradrenaline in man," J Physiol (Lond), vol. 530, pp. 541-550, 2001. M. S. Fuller, G. Sandor, B. Punske, B. Taccardi, R. S. MacLeod, P. R. Ershler, L. S. Green, and R. L. Lux, "Estimates of repolarization dispersion from electrocardiographic measurements," Circulation, vol. 102, pp. 685-91, 2000. A. Rosenfeld and E. Johnston, "Angle detection on digital curves," IEEE Transactions on Computers, vol. C22, pp. 875-878, 1973. W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes in C++: The Art of Scientific Computing, 2nd ed. Cambridge, UK: Cambridge University Press, 2002. D. J. Penny, H. Chen, and J. J. Smolich, "Increased aortic blood pressure contributes to potentiated dobutamine inotropic responses after systemic NO synthase inhibition in sheep," Cardiovascular Research., vol. 40, pp. 282-9, 1998. D. J. Penny and J. J. Smolich, "Divergent effects of NO synthase inhibition on systemic and myocardial O2 delivery and consumption during dobutamine infusion in sheep," Pflgers Archiv European Journal of Physiology, vol. 443, pp. 601-608, 2002.

[2]

[3]

[4]

[5]

[6] [7]

[8]

[9]

1694

You might also like