Summary of the invention
At the prior art above shortcomings, the purpose of this invention is to provide a kind of electrocardiosignal R peak detection method computer implemented, that capacity of resisting disturbance is stronger that adopts, this method is by extracting the relative position relation of other point on some point and its place waveform, and by its distribution characteristics in the log-polar distributed model of tolerance, and then get rid of and disturb, realize accurate identification R crest on the electrocardiosignal.
The object of the present invention is achieved like this: based on the electrocardiosignal R peak detection method of waveform characteristic matching, the electrocardiosignal that electrocardioscanner is gathered is imported computer, carry out low-pass filtering and sampling pretreatment by computer, and the R crest in the identification electrocardiosignal, in turn include the following steps:
A) set up the log-polar distributed model: the value radius ξ that in log-polar, preestablishes logarithm utmost point footpath
MaxAnd the span Δ ψ of polar angle, with the value radius ξ in logarithm utmost point footpath
MaxIt is uniformly-spaced interval to be divided into M, with the span Δ ψ of polar angle be divided into N uniformly-spaced interval, the value radius ξ in logarithm utmost point footpath then
Max, polar angle span Δ ψ to be divided into the equally spaced two dimension of M * N with interior log-polar territory interval, constitute the log-polar distributed model;
B) at the different modes of leading, choose the different and all known electrocardiosignal of cycle, amplitude and R crest of a plurality of waveform profiles respectively respectively as template signal, respectively with before and after the R crest in each template signal each
Sampled point in cycle is mapped in the log-polar distributed model, obtains the distribution characteristics of R crest in each template signal;
C) treat the thought-read signal of telecommunication and carry out autocorrelation analysis, calculate the interval between every adjacent two local maximums in its autocorrelation coefficient, get the approximate cycle of the meansigma methods of described interval as electrocardiosignal to be measured;
D) local maximum point in the extraction electrocardiosignal to be measured;
E) respectively respectively with each local maximum point front and back in the electrocardiosignal to be measured
Sampled point in the approximate cycle is mapped in the log-polar distributed model, obtains the distribution characteristics of each local maximum point in the electrocardiosignal to be measured;
F) utilize the distribution characteristics of R crest in each template signal that step b) obtains, treat the distribution characteristics of each local maximum point in the thought-read signal of telecommunication respectively and carry out χ
2Statistical test obtains the distinctiveness ratio of each local maximum point in the electrocardiosignal to be measured;
Described χ
2The computing formula of statistical test is:
Wherein, χ
2(D
i, D
k) be in the electrocardiosignal to be measured i local maximum point with respect to the test value of R crest in k the template signal; d
I, jFor i local maximum point in the electrocardiosignal to be measured at log-polar distributed model j two-dimentional sectional distribution value, d
K, jBe in k the template signal R crest in log-polar distributed model j two-dimentional sectional distribution value; N is a two-dimentional sectional number in the log-polar distributed model, and n=M * N;
G) calculate the local maximum point of the initial β of electrocardiosignal to be measured distinctiveness ratio minimum in the doubly approximate cycle as first point to be located; Then, be starting point with last point to be located, calculating thereafter, β doubly is similar to the local maximum point of distinctiveness ratio minimum in the cycle as another point to be located; Recursion is determined all point to be located in the electrocardiosignal to be measured thus, determines that whenever a point to be located is then with its distinctiveness ratio and pre-set threshold C
0Compare, distinctiveness ratio is less than threshold value C
0Point to be located promptly be judged to be R crest in the electrocardiosignal to be measured; Wherein, the span of β is 1.2~1.8, described threshold value C
0Span be 0.2~0.7;
H) storage and output show R wave crest of electrocardiosignal testing result to be measured.
Wherein, described in the step b) " respectively with before and after the R crest in each template signal each
Sampled point in cycle is mapped in the log-polar distributed model, obtains the distribution characteristics of R crest in each template signal ", specifically comprise:
B1) extract in arbitrary template signal before the R crest
Cycle and after
Sampled point in cycle is as the distribution characteristics point of this R crest, and sets up Descartes's relative coordinate of itself and this R crest;
B2) according to step b1) Descartes's relative coordinate of gained, the distribution characteristics point of described R crest is mapped to the log-polar distributed model from cartesian coordinate system, obtain the log-polar of the distribution characteristics point of this R crest;
B3) according to step b2) log-polar of gained, calculate the distributed quantity of distribution characteristics point in each two-dimentional subregion of log-polar model of described R crest, as the distribution characteristics of this R crest;
B4) repeating step b1)~b3), obtain the distribution characteristics of R crest in each template signal.
Wherein, described step e) specifically comprises:
E1) extract in the electrocardiosignal to be measured before arbitrary local maximum point
The approximate cycle and after
Sampled point in the approximate cycle is as the distribution characteristics point of this local maximum point, and sets up Descartes's relative coordinate of itself and this local maximum point;
E2) according to step e1) Descartes's relative coordinate of gained, the distribution characteristics point of described local maximum point is mapped to the log-polar distributed model from cartesian coordinate system, obtain the log-polar of the distribution characteristics point of this local maximum point;
E3) according to step e2) log-polar of gained, calculate the distributed quantity of distribution characteristics point in each two-dimentional subregion of log-polar model of described local maximum point, as the distribution characteristics of this local maximum point;
E4) repeating step e1)~e3), obtain the distribution characteristics of each local maximum point in the electrocardiosignal to be measured.
Wherein, described step f) specifically comprises:
F1) utilize the distribution characteristics of R crest in each template signal that step b) obtains, treat the distribution characteristics of arbitrary local maximum point in the thought-read signal of telecommunication and carry out χ
2Statistical test obtains the statistical test value of this local maximum point with respect to R crest in each template signal;
F2) with step f1) minima in the gained statistical test value is as the distinctiveness ratio of described local maximum point;
F3) repeating step f1)~f2), obtain the distinctiveness ratio of each local maximum point in the electrocardiosignal to be measured.
As preferred version, the cut-off frequency of described low-pass filtering is 100~120Hz, and the frequency of sampling is 250~1000Hz.
Compared to existing technology, the present invention has following beneficial effect:
1, the inventive method as foundation characteristic, makes feature have translation and rotational invariance with between points difference vector, and this characteristic can overcome the influence of the baseline drift of electrocardiosignal; And, to difference vector carry out log-polar conversion and in addition subregion measure the similarity of waveform, this tolerance is to contiguous morphological characteristic sensitivity, can catch simultaneously the overall profile information of waveform again, and waveform shake had robustness, can effectively discern and get rid of and disturb crest and jammr band.
2, only with the local maximum point in the electrocardiosignal as identification point, ignore calculating and identification to non local maximum of points, simplified the data computation amount in the testing process greatly, further improved the robustness of identification.
3, be applicable to clinically the electrocardiosignal that the various modes of leading of employing used obtain.
The specific embodiment
Below in conjunction with drawings and Examples technical scheme of the present invention is described further:
The present invention proposes a kind of electrocardiosignal R peak detection method that carries out analysis-by-synthesis in conjunction with the waveform profiles of electrocardiosignal.Corresponding by shooting the heartbeat of electrocardiosignal, and the inherent driving mechanism of each beat is identical, all is the result who is driven by the excited in succession combined effect of pacemaker, atrium, ventricle, and the waveform of adjacent beat has similarity; If can be measured and mated to similarity, just can find the point similar to the R crest, realize the anti-interference detection of R crest.The present invention extracts the relative position relation of other point on electrocardiosignal mid point and its place waveform, and by its distribution characteristics in the log-polar distributed model of tolerance, measures the similarity between these points and the R crest; Simultaneously, the similarity measurement of point with point is converted into the similarity matching degree of waveform behind log-polar transform at a place measured, the tolerance after the conversion can be caught the overall profile information of waveform simultaneously again to contiguous waveform morphology feature-sensitive.The inventive method is applied to have the identification treatment facility (as possessing ECG data analyzer, ecg analysis system of computer function etc.) of calculation processing units such as microprocessor, in conjunction with electrocardiosignal local form structure and overall profile information are discerned, just can judge the position of R crest accurately.
Electrocardiosignal R peak detection method based on waveform characteristic matching of the present invention, adopt electrocardioscanner to gather electrocardiosignal, the electrocardiosignal that electrocardioscanner is gathered is imported computer, carry out low-pass filtering and sampling pretreatment by computer, and the R crest in the identification electrocardiosignal, its FB(flow block) carries out as shown in Figure 1 successively as follows:
A) set up the log-polar distributed model:
In electrocardiosignal, because the interference of multiple factor, the waveform profiles of each beat can not fit like a glove, and therefore can only discern the R crest by the similarity matching degree that compares waveform morphology.Difference is very large between the waveform morphology of waveform morphology that the R crest is contiguous and non-R crest vicinity, if can set up a kind of metric relation, make tolerance responsive more to contiguous waveform morphology feature, with regard to easier R crest and non-R crest are significantly distinguished, reached jamproof detection target.The present invention is by setting up the log-polar distributed model, the electrocardiosignal of gathering is mapped in the log-polar distributed model, allow the identification point in the electrocardiosignal and the relative position relation of other point on its place waveform present the logarithm Changing Pattern, by other distribution characteristics in the log-polar distributed model of the identification point in the tolerance electrocardiosignal with respect to its place waveform, logarithm Changing Pattern with its distribution characteristics embodies the sensitivity characteristic of identification point to its contiguous waveform morphology, and then realizes the coupling identification to the R-Wave of ECG Signal peak.The log-polar distributed model is to be provided with the sectional log-polar of a plurality of equally spaced two dimensions territory (ξ ψ), preestablishes the value radius ξ in logarithm utmost point footpath in log-polar
MaxAnd the span of polar angle
, with the value radius ξ in logarithm utmost point footpath
MaxBe divided into M uniformly-spaced interval, with the span of polar angle
Be divided into N uniformly-spaced interval, then the value radius ξ in logarithm utmost point footpath
Max, polar angle span
Be divided into M * N equally spaced two dimension interval with interior log-polar territory, thereby constitute the log-polar distributed model.The interval division of two dimension in the log-polar distributed model, shape is as shown in table 1:
Table 1
Wherein, v
jBe j two dimension interval in the log-polar distributed model, j ∈ 1,2 ..., n}, n=M * N.In the log-polar distributed model, can origination point and the phenomenon that overlaps of point in order to allow after the electrocardiosignal mapping not, influence is discerned, the span of polar angle
Preferably be set at (π, π]; The value radius ξ in logarithm utmost point footpath
MaxPreestablish according to calculating needed identification range; M and N then determine that according to calculating needed precision the span of M is 4~20 usually, and the span of N is 8~36, the log-polar model can with cartesian coordinate system (its transformational relation is as follows for x, y) conversion mutually:
Wherein (ρ θ) is cartesian coordinate system (x, y) pairing polar coordinate.
B) set up the distribution characteristics of R crest in the template signal:
Under Different Individual, different condition, difference were led mode, the cycle of the electrocardiosignal that is collected, amplitude and waveform profiles all were not quite similar, and therefore should take into full account these factors when setting up template.At the different modes of leading, choose the mutually different electrocardiosignal of a plurality of waveform profiles respectively as template signal, and its parameter such as cycle, amplitude and R crest separately all is retrieved as known conditions in advance, be convenient to calculate.Selected template signal should corresponding I leads, II leads, III leads, the unipolar limb leads that pressurizes, click multiple electrocardiosignaies commonly used such as the chest lead mode of leading; At every kind of a plurality of template signals that the mode of leading is selected, should contain the practice waveform profiles of common several electrocardiosignaies clinically as far as possible, its cycle is between 0.43~1.5 second, to make these template signals can be used in the electrocardiosignal of identification heart rate range under 40~140 times/minute conditions as far as possible.
Gather above-mentioned all kinds of electrocardiosignal by electrocardioscanner, these signals are by the digital signal after the A/D conversion (sample frequency of A/D conversion is 500Hz), with these signal input computers, carry out low-pass filtering and sampling pretreatment, the cut-off frequency of its filtering is 100~120Hz, and sample frequency is between 250~1000Hz.Therefrom choose the K segment signal as template signal, wherein k template signal
Cycle be T
k, k ∈ 1,2 ..., K}, waveform profiles as shown in Figure 4, template signal
A R crest be O
kObtain template signal
Middle R crest O
kDistribution characteristics D
kMethod as follows:
Calculating R crest O
kThe distribution characteristics process in because template signal
Be quasi-periodic signal, therefore consider, do not need the delivery partitioned signal from the angle that improves robustness
On all sampled points as calculating object, only need to extract R crest O
kBefore
Cycle and after
Sampled point in cycle calculates as the distribution characteristics point of this R crest.In order to measure and calculate R crest O
kWith the relative position relation of its distribution characteristics point, these distribution characteristics points are projected with R crest O
kIn the cartesian coordinate system for initial point, set up Descartes's relative coordinate of each distribution characteristics point and this R crest, measure each distribution characteristics point and R crest O with Descartes's relative coordinate
kDifference vector.The size of difference vector only with R crest O
kRelevant with the relative position relation between its distribution characteristics point, and with R crest O
kBefore
Cycle and after
The baseline of periodic signal waves is irrelevant, therefore with between points difference vector as foundation characteristic, make foundation characteristic have translation and rotational invariance, this characteristic can overcome the influence of the baseline drift of electrocardiosignal.Then, again according to above-mentioned Descartes's relative coordinate, with R crest O
kThe distribution characteristics point be mapped in the log-polar distributed model, obtain the log-polar of distribution characteristics point; The log-polar of these distribution characteristics points in the log-polar distributed model directly reflected itself and R crest O
kBetween position relation, and its distribution is logarithmic parabola and changes, by tolerance R crest O
kThe distribution characteristics of distribution characteristics point, this tolerance is to R crest O
kContiguous waveform morphology feature-sensitive, the while can be caught the overall profile information of waveform again.For example, template signal
On sampled point a, it is as R crest O
kThe distribution characteristics point, with R crest O
kFor the Descartes's relative coordinate in the cartesian coordinate system of initial point is (x
a, y
a), corresponding polar coordinate are (ρ
a, θ
a), as shown in Figure 5; Be mapped to after the log-polar distributed model, obtain the log-polar (ξ of distribution characteristics point a
a, ψ
a), as shown in Figure 6, (ξ
a, ψ
a) and (x
a, y
a) satisfy the transformational relation of log-polar model and cartesian coordinate system, can see that from Fig. 6 distribution characteristics point a is distributed in the two-dimentional interval of log-polar distributed model.For the ease of follow-up calculating, it is interval to put the two dimension at place according to distribution characteristics, and the log-polar of distribution characteristics point is carried out normalized.
By this method, can obtain R crest O
kThe scattergram of each distribution characteristics point in the log-polar distributed model, determine that by its log-polar separately the two dimension at its place is interval again, know R crest O thereby calculate
kThe distributed quantity of distribution characteristics point in each two-dimentional subregion of log-polar model, with this as R crest O
kDistribution characteristics D
kR crest O
kDistribution characteristics be a distributed collection D
k={ d
K, 1, d
K, 2..., d
K, j..., d
K, n, its element d
K, jDistribution shape as shown in table 2;
Table 2
Wherein, d
K, jBe template signal
Middle R crest O
kAt log-polar distributed model j two-dimentional subregion v
jThe distribution value, represent R crest O
kDistribution characteristics point in d is arranged
K, jIndividual distribution characteristics point drops on two-dimentional subregion v
jIn, j ∈ 1,2 ..., n}, n=M * N.
R crest distribution characteristics by resulting each template signal of this step is stored in it in memorizer of ecg analysis equipment, as the standard form at identification R-Wave of ECG Signal to be measured peak.So far, test preparation is finished, next can carry out the testing procedure of electrocardiosignal to be measured.
C) the approximate cycle of calculating electrocardiosignal to be measured:
Gather electrocardiosignal by electrocardioscanner, these signals are that sample frequency is the digital signal of 500Hz, with these signal input computers, carry out low-pass filtering and sampling pretreatment, its filtering cut-off frequency is all identical with template signal with sample frequency, obtains electrocardiosignal to be measured thus.
Obtaining the approximate cycle of electrocardiosignal to be measured, is an important step of carrying out follow-up test.On the one hand, can choose scope with the distribution characteristics point that the approximate cycle is divided identification point, to improve the robust performance of computational process; On the other hand, all right this approximate cycle is as the judgment standard of R crest in-scope.The approximate cycle of electrocardiosignal to be measured, can adopt this area autocorrelation analysis commonly used to calculate, treat the thought-read signal of telecommunication and carry out autocorrelation analysis, calculate the interval between every adjacent two local maximums in its autocorrelation coefficient, get the approximate cycle of the meansigma methods of described interval as electrocardiosignal to be measured.For electrocardiosignal to be measured
Its signal value is the function S (t) of time, electrocardiosignal then to be measured
Autocorrelation coefficient R
S(τ) be:
During Practical Calculation, only need choose the electrocardiosignal to be measured of one section duration
(selected duration at least should greater than one-period length) calculates its autocorrelation coefficient R
SA pairing m τZhi is designated as τ when (τ) getting local maximum
l, l ∈ 1,2 ..., m}, electrocardiosignal then to be measured
The approximate cycle
For:
D) the R crest of electrocardiosignal to be measured should be a local maximum point, if only calculate as identification point with each local maximum point in the electrocardiosignal to be measured, can avoid the point of obvious non-R crests a large amount of in the signal is discerned, simplify the data computation amount in the testing process greatly, can further improve the robustness of identification.Therefore, before discerning, earlier extract local maximum point in the electrocardiosignal to be measured by this area certain methods commonly used.For example, can calculate the difference in magnitude between each neighbouring sample point,, judge that then this sampled point is a local maximum point if the difference in magnitude between a certain sampled point and its forward and backward neighbouring sample point all is not less than zero.Also can utilize method of derivation, treat the thought-read signal of telecommunication and carry out derivative operation, obtain the extreme point of electrocardiosignal upper derivate to be measured for " 0 ", judge further that again these extreme points are maximum point or minimum point, maximum point wherein is the local maximum point of electrocardiosignal.
E) obtain the distribution characteristics of each local maximum point in the electrocardiosignal to be measured:
After obtaining the approximate cycle and local maximum point of electrocardiosignal to be measured, can calculate the distribution characteristics of each local maximum point in the electrocardiosignal to be measured.
For example, electrocardiosignal to be measured
The approximate cycle is
By calculating electrocardiosignal to be measured
In I local maximum point, wherein i local maximum point is s
i, i ∈ 1,2 ..., I}; Obtain electrocardiosignal to be measured
Middle local maximum point s
iDistribution characteristics D
iMethod as follows: extract local maximum point s in the electrocardiosignal to be measured
iBefore
The approximate cycle and after
Sampled point in the approximate cycle is as local maximum point s
iThe distribution characteristics point, and project with local maximum point s
iIn the cartesian coordinate system for initial point, set up local maximum point s
iEach distribution characteristics point and local maximum point s
iDescartes's relative coordinate, according to Descartes's relative coordinate it is mapped in the log-polar distributed model again, obtain the log-polar of distribution characteristics point, the log-polar of these distribution characteristics points in the log-polar distributed model directly reflected itself and local maximum point s
iBetween position relation; Local maximum point s is obtained in calculating
iThe distributed quantity of distribution characteristics point in each two-dimentional subregion of log-polar model, with this as local maximum point s
iDistribution characteristics D
iCalculating the R crest in the concrete computational process of this step and the step b) is O
kDistribution characteristics D
kConcrete calculation procedure similar, calculate the local maximum point s of gained
iDistributed collection D of distribution characteristics
i={ d
I, 1, d
I, 2..., d
I, j..., d
I, n, its element d
I, jBe electrocardiosignal to be measured
Middle local maximum point s
iAt log-polar distributed model j two-dimentional subregion v
jThe distribution value, represent local maximum point s
iDistribution characteristics point in d is arranged
I, jIndividual distribution characteristics point drops on two-dimentional subregion v
jIn, j ∈ 1,2 ..., n}, n=M * N.
Obtain the distribution characteristics of each local maximum point in the electrocardiosignal to be measured by this step, as each local maximum point of identification recognition feature of R crest whether.
F) distinctiveness ratio of each local maximum point in the calculating electrocardiosignal to be measured:
In each cycle of electrocardiosignal to be measured, having only a local maximum point is real R crest, and this local maximum point should be the highest with the similarity matching degree of R crest in the template signal.So, be incorporated herein " distinctiveness ratio " this notion, by calculating the distinctiveness ratio of local maximum point, the similarity matching degree of R crest in local maximum point and the template signal is described; The distinctiveness ratio of local maximum point is more little, represents that then the similarity matching degree of R crest in this local maximum point and the template signal is high more, and this local maximum point might be the actual R crest of electrocardiosignal to be measured more just.In order to measure the distinctiveness ratio of each local maximum point in the electrocardiosignal to be measured, the present invention utilizes the distribution characteristics of R crest in each template signal that step b) obtains, and treats the distribution characteristics of each local maximum point in the thought-read signal of telecommunication respectively and carries out χ
2Statistical test obtains the distinctiveness ratio of each local maximum point.
For example, electrocardiosignal to be measured
In local maximum point s
i, i ∈ 1,2 ..., and I}, its distribution characteristics is D
i, D
iElement d
I, jBe local maximum point s
iAt log-polar distributed model j two-dimentional subregion v
jThe distribution value; Template signal
K ∈ 1,2 ..., K}, its R crest O
kDistribution characteristics be D
k, D
kElement d
K, jBe template signal
Middle R crest O
kAt log-polar distributed model j two-dimentional subregion v
jThe distribution value; Wherein, j ∈ 1,2 ..., n}, n are two-dimentional sectional number in the log-polar distributed model, and n=M * N.Utilize template signal
Middle R crest O
kDistribution characteristics be D
k, treat the thought-read signal of telecommunication
Middle local maximum point s
iDistribution characteristics D
iCarry out χ
2Statistical test obtains local maximum point s
iWith respect to template signal
Middle R crest O
kStatistical test value χ
2(D
i, D
k); χ
2The computing formula of statistical test is:
Wherein
Thus, utilize the distribution characteristics of R crest in K the template signal that step b) obtains, treat the thought-read signal of telecommunication
Middle local maximum point s
iDistribution characteristics D
iCarry out χ
2Statistical test can obtain local maximum point s
iStatistical test value χ with respect to R crest in each template signal
2(D
i, D
1), χ
2(D
i, D
2) ..., χ
2(D
i, D
K).With χ
2(D
i, D
1), χ
2(D
i, D
2) ..., χ
2(D
i, D
K) in minima as local maximum point s
iDistinctiveness ratio C
i
Treat in the thought-read signal of telecommunication each local maximum point one by one by this step and carry out χ
2Statistical test obtains the distinctiveness ratio of each local maximum point.
G) judge the R crest:
In each beat of electrocardiosignal to be measured, the local maximum point except that actual R crest is noise spot, should be got rid of in identifying.Noise spot is to produce owing to electrocardiosignal is subjected to the bigger interference of amplitude, these noise spots can be divided into two classes from the identification angle.First kind noise spot, the local maximum point in the P ripple in the electrocardiosignal, T ripple and the U ripple, the distinctiveness ratio of R crest is bigger in these noise spots and the template signal, therefore by comparing the distinctiveness ratio size between each local maximum point, just can be got rid of.The second class noise spot is that the local maximum point in the disturbing wave is as the second class noise spot because actions such as cough, sneeze cause electrocardiosignal acutely to be shaken, and the persistent period of this shake is longer relatively, and amplitude is bigger, forms one section disturbing wave.For R crest and this two classes noise spot are distinguished, need preestablish a threshold value C
0, by with threshold value C
0Relatively come to determine the position of R crest.
Concrete processing mode is, the local maximum point of distinctiveness ratio minimum in each beat of electrocardiosignal to be measured as point to be located, is further discerned in the back and judged, and the local maximum point except that point to be located promptly is regarded as first kind noise spot and got rid of; Whenever determine that a point to be located is then with its distinctiveness ratio and pre-set threshold C
0Compare, distinctiveness ratio greater than threshold value C
0Point to be located be judged to be the second class noise spot and got rid of, distinctiveness ratio is less than threshold value C
0Point to be located promptly be judged to be R crest in the electrocardiosignal to be measured.But before definite R crest, the beat duration of electrocardiosignal to be measured can't be judged accurately, therefore needs one to judge duration, can determine to comprise at least a R crest in this judgement duration, can not surpass 2 beat durations again, with the accuracy that guarantees as far as possible to judge.Consider the approximate cycle of calculating gained in the step c) and the error between the actual beat duration, getting the doubly approximate cycle of β judges as the judgement duration, the span of β is 1.2~1.8, guaranteeing necessarily to have comprised a R crest at least in the β signal in doubly approximate cycle, and can not surpass the duration of 2 signal beat.Therefore adopt the doubly approximate cycle of β as calculating benchmark, judge that the concrete steps of R crest are: the local maximum point of calculating the initial β of electrocardiosignal to be measured distinctiveness ratio minimum in the doubly approximate cycle is as first point to be located; Then, be starting point with last point to be located, calculating thereafter, β doubly is similar to the local maximum point of distinctiveness ratio minimum in the cycle as another point to be located; Recursion is determined all point to be located in the electrocardiosignal to be measured thus, determines that whenever a point to be located is then with its distinctiveness ratio and pre-set threshold C
0Compare, distinctiveness ratio is less than threshold value C
0Point to be located promptly be judged to be R crest in the electrocardiosignal to be measured.The optimum value of β is 1.5.
For example, calculate the local maximum point of certain β distinctiveness ratio minimum in the doubly approximate cycle, determine that point to be located is s
i, its distinctiveness ratio is C
iWith C
iWith pre-set threshold C
0Compare, if C
i〉=C
0, then judge point to be located s
iIt is the second class noise spot; If C
i<C
0, then judge point to be located s
iBe the R crest.And then with point to be located s
iBe starting point, calculate point to be located s
iThe local maximum point of β distinctiveness ratio minimum in the doubly approximate cycle is judged as next point to be located afterwards.Treat in the thought-read signal of telecommunication each local maximum point one by one by this step and judge, get rid of the local maximum point that wherein belongs to the first kind and the second class noise spot, judge the R crest in the electrocardiosignal to be measured.
In this step, threshold value C
0Value be to get rid of the signals of the second class noise spot, if threshold value C
0Value is excessive, then can cause the omission of the second class noise spot; If threshold value C
0Value is too small, then the local maximum point with identification meaning may be got rid of in the lump, causes identification to be omitted.Usually, as the actual R crest of electrocardiosignal to be measured, its distinctiveness ratio can be greater than 0.2; But in the reality, as long as the distinctiveness ratio of local maximum point is identified as R crest with it as significant identification point less than 0.7, clinically still can be received.Therefore, threshold value C
0Span get 0.2~0.7 and be advisable.
H) last, R wave crest of electrocardiosignal testing result to be measured is stored in the memory device of computer, and shows R crest testing result, so that observe and carry out subsequent treatment by display device output.
Further specify the detailed process at this employing inventive method identification R-Wave of ECG Signal peak below by embodiment.
Embodiment 1:
In the present embodiment, by electrocardioscanner (ECG-9130P, Feitian company, Japan) gather electrocardiosignal, these signals are that sample frequency is the digital signal of 500Hz, with these signal input computers, carry out low-pass filtering and sampling pretreatment, its wave filter adopts second order Butterworth low pass filter, and cut-off frequency is 100Hz, sample frequency is 250Hz, with the signal that obtains as measured signal.The II electrocardiosignal to be measured of leading wherein
Its waveform profiles as shown in Figure 9; Utilize the inventive method, discern electrocardiosignal to be measured
In the R crest.In computer, specifically carry out as follows:
At first, set up the log-polar distributed model, as shown in Figure 7, the value radius ξ in logarithm utmost point footpath
MaxBe redefined for 10, and M gets 10, promptly every " 1 " logarithm utmost point directly divide one uniformly-spaced interval; The span of polar angle
Be set at (π, π], N gets 16, and is promptly every
Polar angle is divided a uniformly-spaced interval; Then be 10 with the value radius in logarithm utmost point footpath, the span of polar angle for (π, π] with interior log-polar territory (ξ, it is interval, as described in Table 3 ψ) to be divided into 160 equally spaced two dimensions:
Table 3
Then, adopt the multiple different mode of leading, gather a plurality of cycle differences by electrocardioscanner, represent the known electrocardiosignal of common waveform profiles (parameters such as cycle and amplitude are all known) clinically respectively, these signals are that sample frequency is the digital signal of 500Hz, with these signals and relevant parameter input computer thereof, carry out low-pass filtering and sampling pretreatment, its wave filter adopts second order Butterworth low pass filter, cut-off frequency is 100Hz, sample frequency is 250Hz, from the signal that obtains, choose 50 as template signal, by clinical expert manual markings R crest.Respectively respectively with R crest front and back in each template signal
Sampled point in cycle is mapped in the log-polar distributed model, obtains the distribution characteristics of R crest in each template signal.The 11st template signal wherein
Be the electrocardiosignal that II leads, its oscillogram as shown in Figure 4; With template signal
Middle R crest front and back respectively
Sampled point in cycle is mapped in the log-polar distributed model according to the described method of step b), for ease of subsequent calculations, further sampled point carries out normalized in the log-polar distributed model to being mapped to again, they are fallen within respectively on the interval edge of affiliated separately two dimension, obtain template signal thus
The log-polar distributed model figure of middle R crest as shown in Figure 8.
After preparation is finished, by analyzing electrocardiosignal to be measured
Autocorrelation coefficient, calculate approximate cycle of electrocardiosignal to be measured according to the described method of step c)
Calculate electrocardiosignal to be measured according to the described method of step d)
In local maximum point, but because electrocardiosignal respectively
Last approximate cycle in waveform profiles imperfect, local maximum point wherein can't utilize the inventive method to test, therefore the local maximum point in last approximate cycle is cast out, and obtains and can be respectively s as 61 local maximum point of identification point
1, s
2, s
3..., s
61, as shown in figure 10.
Be brief description electrocardiosignal to be measured
In the decision process of R crest, at this with electrocardiosignal to be measured
Preceding 5 local maximum point s
1, s
2, s
3, s
4And s
5For example describes.Respectively with local maximum point s
1, s
2, s
3, s
4And s
5Front and back respectively
Sampled point in the approximate cycle is mapped in the log-polar distributed model according to the described method of step e), and through normalized, obtains s
1, s
2, s
3, s
4And s
5Log-polar distributed model figure, s wherein
1, s
2, s
3And s
4Log-polar distributed model figure respectively as Figure 11, Figure 12, Figure 13 and shown in Figure 14.Obtain electrocardiosignal to be measured by log-polar distributed model figure calculating
Middle local maximum point s
1, s
2, s
3, s
4And s
5Distribution characteristics and utilize the distribution characteristics of R crest in each template signal, respectively to s
1, s
2, s
3, s
4And s
5Distribution characteristics carry out χ
2Statistical test; By calculating s
1, s
2, s
3, s
4And s
5s
4Equal template signals that leads with respect to II
Statistical test value minimum, obtain s
1, s
2, s
3, s
4And s
5Distinctiveness ratio be respectively:
C
1=χ
2(D
1,D
11)=0.10;C
2=χ
2(D
2,D
11)=0.63;
C
3=χ
2(D
3, D
11)=0.81; C
4=χ
2(D
4, D
11)=0.12; With
C
5=χ
2(D
5,D
11)=0.65。
Then, calculate electrocardiosignal to be measured
The local maximum point of distinctiveness ratio minimum in initial 1.5 times of approximate cycles, s
1, s
2, s
3And s
4All in initial 1.5 times of approximate cycles, C more as can be known
3>C
2>C
4>C
1, local maximum point s then
2, s
3And s
4Be regarded as first kind noise spot and got rid of, with s
1As first point to be located, with its distinctiveness ratio and pre-set threshold C
0Compare C
0Value is 0.4; Because C
1=0.10<C
0, therefore judge local maximum point s
1Be electrocardiosignal to be measured
A R crest.Next, with local maximum point s
1Be starting point, relatively s
1Local maximum point s in 1.5 times of approximate cycles afterwards
2, s
3, s
4And s
5The distinctiveness ratio size, C is arranged
3>C
5>C
2>C
4, so local maximum point s
2, s
3And s
5Be regarded as first kind noise spot and got rid of, with s
4As another point to be located, with threshold value C
0Compare, get C
4=0.12<C
0, promptly judge local maximum point s
4Be electrocardiosignal to be measured
Another R crest.Then with local maximum point s
4Be starting point, the local maximum point of calculating thereafter distinctiveness ratio minimums in 1.5 times of approximate cycles judges further as another point to be located whether it is the R crest ... recursion is determined electrocardiosignal to be measured thus
In all R crests.By aforementioned calculation, determine electrocardiosignal to be measured
In actual R crest be s
1, s
4... directly perceived, Figure 11, Figure 12, Figure 13 and Figure 14 are contrasted with Fig. 8 respectively, can see the local maximum point s shown in Figure 11 and Figure 14
1And s
4Log-polar distributed model figure and the template signal shown in Fig. 8
The log-polar distributed model figure of middle R crest is closely similar, i.e. s
1And s
4Should be regarded as electrocardiosignal to be measured
In the R crest.
According to above-mentioned method, calculate electrocardiosignal to be measured
In as the distinctiveness ratio of each local maximum point of identifying object, its corresponding distinctiveness ratio scattergram is as shown in figure 15; At last the distinctiveness ratio of each local maximum point is judged, got rid of noise spot wherein, determine electrocardiosignal to be measured
In 18 R crests, be respectively s
1, s
4, s
8, s
12, s
15, s
18, s
22, s
26, s
29, s
32, s
35, s
38, s
41, s
44, s
48, s
51, s
55And s
59, 18 R crests are in electrocardiosignal to be measured
In particular location as shown in figure 16.
Embodiment 2:
In the present embodiment, by electrocardioscanner (ECG-9130P, Feitian company, Japan) gather electrocardiosignal, these signals are that sample frequency is the digital signal of 500Hz, with these signal input computers, carry out low-pass filtering and sampling pretreatment, its wave filter adopts second order Butterworth low pass filter, and cut-off frequency is 100Hz, sample frequency is 250Hz, with the signal that obtains as measured signal.The I electrocardiosignal to be measured of leading wherein
This electrocardiosignal to be measured is subjected to stronger interference, and its oscillogram as shown in figure 17.Such electrocardiosignal if adopt prior art identification R crest wherein, has suitable difficulty.Utilize 50 selected among the
embodiment 1 template signals, adopt the inventive method to discern electrocardiosignal to be measured
In the R crest; Wherein, the foundation of log-polar distributed model is identical with
embodiment 1, threshold value C
0Value is 0.5, by calculating, obtains electrocardiosignal to be measured
In as the distinctiveness ratio scattergram of each local maximum point of identifying object as shown in figure 18, recursion recognizes electrocardiosignal to be measured
In 5 R crests be respectively ss
1, ss
2, ss
3, ss
4And ss
5, 5 R crests in electrocardiosignal to be measured
In particular location as shown in figure 19.
In order to assess the detection performance of the inventive method, we have made up a data base, and the R crest quantity of electrocardiosignal to be measured is 82612 among the data base, and the R crest of these electrocardiosignaies to be measured has passed through the clinical expert manual markings.Utilize the inventive method that electrocardiosignal to be measured among the data base to be measured is carried out the identification of R crest, then testing result and expert's gauge point are compared, and then assess detection performance of the present invention.We are made as fault-tolerant interval with 8ms before and after the R crest of manual markings, think that this detection is correct when being not more than 8ms by the point tolerance of starting auction of starting auction a little of detecting of the present invention and expert's manual markings that is:.The inventive method is 96.80% to the identification accuracy of these 82612 R crests, and specificity is 94.91%, satisfies the requirement of Clinical recognition.
The inventive method not only local messages such as the amplitude in the electrocardiosignal, local maximum point as the reference factor, the waveform profiles that more combines electrocardiosignal carries out analysis-by-synthesis, with between points difference vector as foundation characteristic, make feature have translation and rotational invariance, this characteristic can overcome the influence of the baseline drift of electrocardiosignal; And, to difference vector carry out log-polar conversion and in addition subregion measure the similarity of waveform, this tolerance is to contiguous morphological characteristic sensitivity, can catch simultaneously the overall profile information of waveform again, and waveform shake had robustness, can effectively discern and get rid of and disturb crest and jammr band, and then realize identification accurately R wave crest of electrocardiosignal.
Explanation is at last, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not breaking away from the aim and the scope of technical solution of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.