Up: Correlation Analysis Tasks
Computes correlation of two images or data cubes. The result is an im-
age (data cube) containing
Out(i,j) = < In1(k-i,l-j)*In2(k,l) > averaged over k,l
For mode correlation (MODE$ = YES)
Out(i,j) = < In1(k-i,l-j)**2 + In2(k,l)**2
- 2 * In1(k-i,l-j)*In2(k,l) > averaged over k,l
For mode square (MODE$ = NO)
Actually, linear conversion formulas are used to keep the correlation
image meaningful in user coordinates. The input images must match.
When used for example to recenter images, the position of the max-
imum of the correlation image (or equivalently of the minimum of the
sum of squares image) yields the required recentering. MODE$ YES
(Correlation) is to be used when the input distribution has a finite
extent, while MODE$ NO (Square) can be used in any case, but is somewhat
slower of course.