comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Cross-correlating images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Cross-correlating images [message #10940] Sun, 01 February 1998 00:00
Brian Handy is currently offline  Brian Handy
Messages: 1
Registered: February 1998
Junior Member
Hello,

I'm trying to cross-correlate a series of images with a little home-brewed
cross-correlation routine I mostly dug out of Numerical Recipes (FORTRAN,
Second Ed., pg. 538). The routine, short as it is, looks like this:

function fft_corr, a, b
sz = (size(a))[1:2]
fft_a = fft(a, 1)
fft_b_conj = conj(fft(b,1))
return, float(fft(fft_a * fft_b_conj, -1)) / (sz[0]*sz[1]/2)^2
end

The problem is this thing doesn't normalize right. If I do an
autocorrelation, meaning result=fft_corr(a,a), I should get a result
back with a maximum value of 1.0 at the origin. I thought the
normalization by #of pixels and the factors of 2 would solve the problem,
but to no avail.

So, if I have a string of images that I want to cross-correlate, if the
first image isn't coming up with a maximum of 1.0, I'm not sure how to
normalize the rest of the cross-correlations either -- would I divide by
the curve for the autocorrelation? I'm confused.

I want this 3D effect this method gives me. I know IDL has some
prepackaged correlation routines, but they're all one-dimensional and I
need the extra information. Any suggestions would sure be appreciated!

Thanks,

Brian
--
Brian Handy --> handy@physics.montana.edu

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Private vs. shared colormaps in IDL
Next Topic: Re: LMFIT -- stay away from it!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:07:29 PDT 2025

Total time taken to generate the page: 1.19887 seconds