Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #936

Re: Algorithms for comparing waveforms

From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.dsp, comp.theory, comp.programming
Subject Re: Algorithms for comparing waveforms
Date 2011-10-17 23:10 +0000
Organization Aioe.org NNTP Server
Message-ID <j7icll$nee$1@speranza.aioe.org> (permalink)
References <59059389-b9da-4113-80a0-488216d8e329@w5g2000yqd.googlegroups.com> <bb4d61c6-6cdb-4f25-b5df-457c0bce9786@m1g2000vbm.googlegroups.com> <_yEmq.3106$Q61.136@newsfe09.iad> <84b6fb4a-1432-41e4-8658-f7dcd872535d@h5g2000vbf.googlegroups.com>

Cross-posted to 3 groups.

Show all headers | View raw


In comp.dsp ri_wells@yahoo.com wrote:

(snip)
> Kindly don't clobber me.  I will attempt to define "similar" in layman
> terms rather than algorithmically:)

> 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

> - They have a constant phase difference, although amplitudes may not
> be the same

When I was reading this, and forgot the context, I was thinking
of audio signals.  One could ask about audio waveforms that sound
similar, even if they are very different.  One is that in many 
cases the ear doesn't notice phase.  If you phase shift one (or more)
components of a sound, the waveform will look very different, but
the sound will be similar.  One way is to look at the magnitude
of the Fourier transform, which removes phase from consideration.

Anyway, you might at least look into what speech recognition
people are doing.

> - To a large extent they have the same harmonics, although not
> necessarily the same amplitude for the various harmonics

This one comes up often in music.  Though it tends to change
the sound, people can give a musical note to a sound with large
changes in harmonics.

> - The harmonics of one waveform are a multiple of the harmonics 
>     of the other waveform

Well, that naturally happens for harmonics, so you have to
be careful what you ask for.

One is that I think you can resample to a standard frequency.
First do the autocorrelation to find the fundamental, then resample
based on that.  Then you can fft, compute the magnitude to remove
phase, and look for harmonics.  Past that, it gets hard.

> - They have similar structures for peaks and troughs, although
> amplitudes may not be the same

The problem is that there are many things that a trained person
will see, and ignore others, but it isn't easy to teach a computer
to do those.  


> With this understanding, can someone provide pointers to algorithms
> and/or opensource implementations?

You might look at what image processing people are doing.  

One that I was looking at some time ago is medical imaging.
Say you have two pictures of some cells, one diseased, and one normal.
How can a computer, given another image, tell which one it is 
more like?  Many of the points you make above are also applicable.
You want to ignore overall intensity, color, scale, etc.   Then
narrow in on just what it is that identifies the disease.

EKG should be simpler, but the exact features that indicate
disease need to be separated from normal variations.

-- glen

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Algorithms for comparing waveforms ri_wells@yahoo.com - 2011-10-14 16:32 -0700
  Re: Algorithms for comparing waveforms Thad Smith <ThadSmith@acm.org> - 2011-10-15 18:40 -0700
  Re: Algorithms for comparing waveforms ri_wells@yahoo.com - 2011-10-17 11:29 -0700
    Re: Algorithms for comparing waveforms Jerry Avins <jya@ieee.org> - 2011-10-17 17:12 -0400
    Re: Algorithms for comparing waveforms glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-10-17 23:10 +0000
      Re: Algorithms for comparing waveforms robert bristow-johnson <rbj@audioimagination.com> - 2011-10-17 17:06 -0700
    Re: Algorithms for comparing waveforms Geoff <geoff@invalid.invalid> - 2011-10-17 18:41 -0700
      Re: Algorithms for comparing waveforms Jerry Avins <jya@ieee.org> - 2011-10-17 23:12 -0400
      Re: Algorithms for comparing waveforms kym@kymhorsell.com - 2011-10-18 03:20 +0000
    Re: Algorithms for comparing waveforms fatalist <simfidude@gmail.com> - 2011-10-18 06:20 -0700

csiph-web