The cross-correlation of two images I1 and I2 is defined as the product:
![]() |
(2) |
where p1 is the pixel index running over the domain of interest w1in the image I1, and similarly p2 a running 2-dimensional index
over the domain of interest w2 in the image I2. The
cross-correlation product denoted by
can be defined by several
possible functions. Common product definitions are:
Sum of squared differences:
![]() |
(3) |
Sum of products:
![]() |
(4) |
The first criterion describes a measure of difference between the two interest regions of the images. For a pattern-matching application, this criterion is the quantity to be minimized to find the best matching point. On the opposite, the second criterion describes a measure of resemblance between the two interest regions, it is a quantity which has to be maximized in order to find the best correlating point.
Other cross-correlation criteria differ from these two by the fact that they can include scale and offset normalisation in luminance. This is the case when we have:
| (5) |
However in the jitter case, the previous processings have normally taken
care of rescaling the data to set
and
(all planes
share the same photometry).
In this implementation for the jitter command, it has been chosen to look for a minimum of the measure of difference.
Also, no rotation or scale difference is assumed, although this could easily be included in the linear fit. The reason behind is that trying to match a rotation or scale would probably give non-null results, whereas we know that none of these can occur. This would bias the quality of the offset estimation.
The reference image is the first image in the frame list, it is considered to be the best centered image on the object. This puts a requirement on the acquisition procedure definition: when acquiring data in jitter mode, the first frame shall be the best centered position on the field of interest. This is the case for SOFI/ISAAC.
The domains of interest to use for cross-correlation shall be parts of the image containing enough signal to produce clear local minima. The choice of the best points of interest to be used for cross-correlation is described in a further section. We select as many points as possible in the first image (or first difference image, as explained below in the section about points of interest) and in all consecutive planes use all possible points for matches. This way, any point visible both in the first frame and the current frame will be used to estimate the shift, points that disappear due to the jitter are simply not taken into account. For each plane is established a list of offsets, each of them having been estimated from one correlation point. A median offset is computed for each direction, and the selected offset is the closest to this median offset, the distance criterion being a sum of absolute values of the differences between offsets.
If
(mx, my) = (median(xi), median(yi)),
and
di=|xi-mx|+|yi-my|, the selected offset has the minimal
di distance to the median offset.