View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

xregister algorithm questions

karl wrote on Dec 31, 2006

Hi everyone,
I'm a student working on a senior undergraduate thesis, which relies pretty heavily on the xregister routine in IRAF. I have a few questions on the exact algorithm used, I want to understand it well so that I can talk intelligently about it.

I'm using the "discrete" correlation function, which has the equations given as:

correlation = discrete

<I> = SUMj SUMi { I[i+xlag,j+ylag] } / (Nx * Ny)
<R> = SUMj SUMi { R[i,j] } / (Nx * Ny)
sumsqI = sqrt (SUMj SUMi { (I[i+xlag,j+ylag] - <I>) ** 2 })
sumsqR = sqrt (SUMj SUMi { (R[i,j] - <R>) ** 2 })

X = SUMj SUMi { (I[i+xlag,j+ylag] - <I>) * (R[i,j] - <R>) }
----------------------------------------------------
sumsqI * sumsqR

(from the IRAF help for xreigster).

My questions are: What are the functions I[i,j] and R[i,j]? What do the iterators i and j represent? I assume that xlag and ylag are the shifts computed for each region.

Also, does "** 2" mean "squared" or "times two"? It seems like it should mean "squared" to me.

Any help you can give me or point me towards is more than appreciated. Thank you, and have a happy new year.

Karl Twelker

Mike Fitzpatrick wrote on Dec 31, 2006

Karl,

If 'I' and 'R' are the input and reference images respectively, then I[i,j] is just the pixel value at (i,j) in the input image. You can see from the equation for <R> (which is just the mean of the reference image) that the equation is looping over the image dimensions. The '**2' does indeed refer to 'value squared'.

If you want to look at the source code for this, see the rg_xconv() procedure at about line 937 of images$immatch/src/xregister/rvxcorr.x Hope this helps.

Cheers,
-Mike

Last post on Dec 31, 2006