On 10/17/2011 2:29 PM,
ri_w...@yahoo.com wrote:
> On Oct 16, 12:32 pm, Jerry Avins<
j...@ieee.org> wrote:
>> On 10/16/2011 12:27 PM,
ri_we...@yahoo.com wrote:
>>
>>> Cross posting to comp.dsp
>>
>>> On Oct 14, 6:32 pm,
ri_we...@yahoo.com wrote:
>>>> Can someone suggest pointers to good algorithms that can be used for
>>>> comparing the raw data corresponding to two waveforms to see if they
>>>> are similar {e.g. EKG waveforms of two healthy and normal human
>>>> beings}? I am looking for open source code or pseudo code, rather
>>>> than terse mathematical equations, since the latter may not lend
>>>> themselves to easy and efficient implementation.
>>
>> Can you define "similar" algorithmically?
>>
>> Jerry
>> --
>
> Jerry,
>
> Kindly don't clobber me. I will attempt to define "similar" in layman
> terms rather than algorithmically:)
I'm not sneering, and I'm not out to clobber you. Fred Marshal gave you
a lot to think about, much of which you ignored. If I knew a solution to
your problem, I would have told you when I first wrote.
> Two waveforms may be deemed similar if at least some of the following
> are true:
> - A human, who is shown the trace of the two waveforms, will conclude
> that the waveforms are similar
Although it is every programmer's dream, there is not yet a DWIM opcode.
I was led to ask for an algorithmic definition by that unfortunate lack.
(DWIN == Do What I Mean)
> - They have a constant phase difference, although amplitudes may not
> be the same
Phase has meaning only when comparing waveforms of the same frequency.
When the frequency is nearly the same, we borrow from optics and talk
about coherence length -- long is good.
> - To a large extent they have the same harmonics, although not
> necessarily the same amplitude for the various harmonics
Harmonic structure depends on frequency also.
> - The harmonics of one waveform are a multiple of the harmonics of the
> other waveform
That is usually a sign that the fundamentals differ by the same
multiple. Also, two waveforms with identical harmonic amplitudes can
look very different if the phases differ.
> - They have similar structures for peaks and troughs, although
> amplitudes may not be the same
What about spacing? For example, does the relative spacing between the P
wave and the QRS complex, and between the QRS complex and the T wave
remain much the same over a range of heart rates?
> With this understanding, can someone provide pointers to algorithms
> and/or opensource implementations?
I'm sure that if such software exists, it either adjusts the time base
to some standard, or uses analysis methods that are independent of time.
You really ought to get in touch pith pattern-recognition people. I'm
sure they can answer some questions I don't know to ask.
Jerry
--
Engineering is the art of making what you want from things you can get.