Algorithm for extracting heart rate from an unprocessed ECG signal

Algorithm for extracting heart rate from raw ECG signal

I have a raw ECG signal recorded in BDF format (you can also make it EDF or txt). Now I have to analyze it offline and extract the heat.

Is there an implementation of such an algorithm in C # or C ++? Or a pseudo-code algorithm, at least.

The reason for this from scratch in itself is that late I want to incorporate it into the online analysis system.

I found links to: Low Pass Filter: http://en.wikipedia.org/wiki/Low-pass_filter
High Pass Filter: http://en.wikipedia.org/wiki/High-pass_filter

... which is probably needed to filter the source data.

There is also a system created for the hardware module, which can be a nice start: http://www.codeproject.com/Articles/4353/ECG-recording-storing-filtering-and-recognition

+4
source share
1 answer

The Pan, Tompkins algorithm is quite simple to implement and gives reasonable results.

As far as I remember, the general ideas were something like this:

The characteristic form of the ECG is called the QRS complex, where the main burst in the ECG (the so-called "R-spike") has a clear shape, and this is what most people focus on. The R-spike is amplified by a “matched filter” (a filter with an impulse response resembling a spike). I think that after this the signal went through a differentiator. Then there was the simplest three-point search after the highest peak. I also remember that in algoritm there was a "blanking period" where the R-spike search was not performed, as the heart can beat so fast ...

Take a look at this: QRS QRS Detection (PDF)

+6
source

Source: https://habr.com/ru/post/1433751/


All Articles