DIPlib Documentation - ©1995-2015 Quantitative Imaging Group, Delft University of Technology.

# CrossCorrelationFT

Normalized cross-correlation using the Fourier Transform

## SYNOPSIS

`#include "dip_findshift.h"`

dip_Error dip_CrossCorrelationFT ( in1, in2, out, in1rep, in2rep, outrep )

## DATA TYPES

binary, integer, float, complex

## FUNCTION

This function calculates the cross-correlation between two images of equal size. The returned image is the cross-correlation normalized in such a way that only the phase information is of importance. This results as a very sharp peak in the spatial domain. This function performs `out = (Conj(in1)*in2)/((Abs(in1))^2)` in the Fourier domain. It is used by `FindShift`. The `inrep`, `psfrep` and `outrep` specify whether the images are spatial images (`DIP_IMAGE_REPRESENTATION_SPATIAL`) or their Fourier transform. (`DIP_IMAGE_REPRESENTATION_SPECTRAL`).

## ARGUMENTS

Data type | Name | Description
`dip_Image` | `in1` | Input image
`dip_Image` | `in2` | Input image
`dip_Image` | `out` | Output image
`dipf_ImageRepresentation` | `in1rep` | Input 1 spatial or spectral
`dipf_ImageRepresentation` | `in2rep` | Input 2 spatial or spectral
`dipf_ImageRepresentation` | `outrep` | Output spatial or spectral

## SEE ALSO

`FindShift`