normxcorr2 development

View: New views
7 Messages — Rating Filter:   Alert me  

normxcorr2 development

by Travis Collier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Digging through the list archive, I see mention of norxcorr2 in devel.
Vikram never seemed to get a replay as to the status... and I am in
want of it too.

I'm assuming that there is some clever application of FFTs which does
the computation relatively efficiently.  If not, someone please tell
me.
I've already got the "compute the corrcoeff at each lag" method
implemented as a C mex file.

--
Travis

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: normxcorr2 development

by Søren Hauberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ons, 17 06 2009 kl. 04:37 -0700, skrev Travis Collier:
> Digging through the list archive, I see mention of norxcorr2 in devel.
> Vikram never seemed to get a replay as to the status... and I am in
> want of it too.
>
> I'm assuming that there is some clever application of FFTs which does
> the computation relatively efficiently.  If not, someone please tell
> me.
> I've already got the "compute the corrcoeff at each lag" method
> implemented as a C mex file.

Looking at the archive it seems George Stelle said he had some code that
he would like to share, but he never posted it to this list. I think
this is where things stopped -- we never saw any code :-(

Søren


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: normxcorr2 development

by Peter Lanspeary :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jun 17, 2009 at 04:37:12AM -0700, Travis Collier wrote:

> Digging through the list archive, I see mention of norxcorr2 in devel.
> Vikram never seemed to get a replay as to the status... and I am in
> want of it too.
>
> I'm assuming that there is some clever application of FFTs which does
> the computation relatively efficiently.  If not, someone please tell
> me.
> I've already got the "compute the corrcoeff at each lag" method
> implemented as a C mex file.
> --
> Travis

Would "xcorr2" (in the signal package) do the same job for you ?
As a first step, you might need to subtract the mean from the arguments.
Also, you might find that the "coeff" does not normalise the result
correctly -- so you might need to divide the "biassed" result by
the rms of each of the argument images.

And yes, multiplying FFTs (and then inverse FFT) is much much faster
than the brute force method.

--
Peter

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: normxcorr2 development

by Travis Collier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm computing the "sliding" (lags only in one dimension) cross
correlation of spectrograms.  For many cases, the spectrograms are
quite large and the needed lag ranges are small.
These are used as a sound similarity metric and as a method to
estimate time delays (though I favor xcorrs of the actual signals for
TDE, others have used spectrogram cross correlation so I need to do
the same for comparison).

Now that you mention it, normalizing xcorr2 results myself probably
wouldn't be very difficult.  I'll take a look at what it is actually
doing and see if that makes sense.

If that is all there is to it, then shouldn't implementing normxcorr2
should be very simple?

--
Travis

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: normxcorr2 development

by Søren Hauberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ons, 17 06 2009 kl. 14:35 -0700, skrev Travis Collier:

> I'm computing the "sliding" (lags only in one dimension) cross
> correlation of spectrograms.  For many cases, the spectrograms are
> quite large and the needed lag ranges are small.
> These are used as a sound similarity metric and as a method to
> estimate time delays (though I favor xcorrs of the actual signals for
> TDE, others have used spectrogram cross correlation so I need to do
> the same for comparison).
>
> Now that you mention it, normalizing xcorr2 results myself probably
> wouldn't be very difficult.  I'll take a look at what it is actually
> doing and see if that makes sense.
>
> If that is all there is to it, then shouldn't implementing normxcorr2
> should be very simple?

If that's all normxcorr2 does, then yes it sounds fairly simple. If you
would like to submit such a function (assuming this what the matlab
counterpart does), then it would be appreciated; I just don't have the
time at the moment.

Søren


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: normxcorr2 development

by Travis Collier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is a mex normxcorr2 implementation done by  Daniel Eaton based on
the OpenCV code (stand alone, does not require the library).
http://www.cs.ubc.ca/~deaton/remarks_ncc.html

I can't vouch for it, but it seems Mr Eaton (whoever he is) knows the
math pretty well and likes being helpful.  There is a lot of code
since he basically includes all the parts of OpenCV he needed, so not
that elegant.  However, assuming there are no copyright problems, it
might be an easy way to include a fast compiled implementation.

Anyways, thanks for all the pointers.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: normxcorr2 development

by Søren Hauberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

tor, 18 06 2009 kl. 05:52 -0700, skrev Travis Collier:
> Here is a mex normxcorr2 implementation done by  Daniel Eaton based on
> the OpenCV code (stand alone, does not require the library).
> http://www.cs.ubc.ca/~deaton/remarks_ncc.html
>
> I can't vouch for it, but it seems Mr Eaton (whoever he is) knows the
> math pretty well and likes being helpful.  There is a lot of code
> since he basically includes all the parts of OpenCV he needed, so not
> that elegant.  However, assuming there are no copyright problems, it
> might be an easy way to include a fast compiled implementation.

This looks like a good solution for people looking for an implementation
of 'normxcorr2'. I'm not going to include it into the 'image' package,
though. It looks like the maintenance could potentially be quite a
burden.

Søren


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev