Detecting patterns in waves

后端 未结 13 2131
栀梦
栀梦 2021-01-29 17:43

I\'m trying to read a image from a electrocardiography and detect each one of the main waves in it (P wave, QRS complex and T wave). Now I can read the image and get a vector li

13条回答
  •  后悔当初
    2021-01-29 18:24

    You can use cross-correlation. Take a model sample of each pattern and correlate them with the signal. You will get peaks where the correlation is high. I would expect good results with this technique extracting qrs and t waves. After that, you can extract p waves by looking for peaks on the correlation signal that are before qrs.

    Cross-correlation is a pretty easy to implement algorithm. Basically:

    x is array with your signal of length Lx
    y is an array containing a sample of the signal you want to recognize of length Ly
    r is the resulting correlation
    
    for (i=0; i

    And look for peaks in r (values over a threshold, for instance)

提交回复
热议问题