Cost Function and Distance Transform

Mathematically, the cost functions for chamfer matching and gray value registration are related. Let us consider the classical image correlation function, C, between two images, which is defined as a volume integral or sum,

where r is a three-dimensional integration variable, F and G are the images to be correlated, and T is a geometrical transformation. For practical image registration applications, the correlation function must be suitably normalized and the maximum of C is searched by varying T. For each optimization step, the volume integral must be calculated, which makes application of this technique slow for large (3D) images. The analogy with chamfer matching becomes clear if we segment image G and make a list of the coordinates of its nonzero elements: ri (a drawing), which contains N elements. In that case, Eq. (1) is equivalent to