next up previous contents index
Next: CV_SMOOTH Up: The Current Tasks Previous: CONVERT

   
CORRELATE

        CORRELATE

    Computes correlation of two images or data  cubes.   The  result  is  an
    image (data cube) containing

          Out(i,j) = < In1(k-i,l-j)*In2(k,l) >         averaged over k,l
          For mode correlation (MODE$ = YES)
    or
          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
    maximum  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.


Gildas manager
1999-03-15