HOME GUIDE OPERATIONS DOCS ERRORS FORMATS INSTALL NEW TIPS WEB SITES

CC N - Cross Correlation - Normalized

(09/10/96)

PURPOSE

Computes the normalized cross-correlation function of two pictures by using the Fourier transform relationship. Operation 'CC' works for 2D as well as 3D input data. The dimensions of the pictures must correspond to each other. The dimensions need not be powers of two (see 'FT' for restrictions).

SEE ALSO

CC [Cross Correlation]
CN [CoNvolution]
CN N [CoNvolution - Normalized]
AC [Auto Correlation]
AC N [Auto Correlation - Normalized]
CC C [Cross Correlation Coefficient]

USAGE

.OPERATION: CC N

.INPUT FILE: PIC001
[Enter the name of the first picture.]

.REFER FILE: REF001
[Enter the name of the second picture file, which is used as the reference.]

.OUTPUT FILE: CCF001
[Enter name of the file which will contain the cross-correlation coefficients. It can be the same as the input file. In this case the input file will be replaced by the cross-correlation.]

NOTES

  1. The input data must be real.

  2. The cross-correlation data are normalized.

  3. The origin of the CCF is at (NSAM/2 + 1, NROW/2 + 1).

  4. The CCF contains artifacts from wraparound overlaps implicit in the Fourier computation. However, the CCF is artifact-free within
    -L <= K <= +L
    -M <= I <= +M
    if the pictures are surrounded by frames containing the average, where the frame width is M/2 and the frame height is L/2. This can be achieved by use of the PD operation. The complete artifact-free CCF is obtained for the widths M=NROW/2, L=NSAM/2. In this case, the padded pictures are just twice as large in each dimension as the original pictures.

  5. The use of CC with identical input and reference files is equivalent to the 'AC' (Auto-Correlation) operation. The input sequence
     
                  CC 
                  PIC001 
                  PIC001 
    
    has the same effect as
     
                  AC 
                  PIC001 
    

  6. If the data cannot fit into the memory, use the 'FT' and 'MU' commands to calculate the CCF:
     
                  FT 
                  INPUT1 
                  FOUR1 
                  FT 
                  INPUT2 
                  FOUR2 
                  MU M 
                  FOUR1 
                  FOUR2 
                  FT 
                  FOUR2 
                  CCF12 
    
    WARNING: The origin of CCF12 calculated in this way is in (1,1).

SUBROUTINES

CCRS_2, CCRS_2R, CCRS_3, CCRS_3R, CCRD_3, CCRD_2, CCRD_3R, CCRD_2R

CALLER

CORR1

© Copyright Notice /       Enquiries: spider@wadsworth.org