This software is based on a model-matching idea known as chamfer matching. The model is a binary image such as that
shown in Fig. 1a. In chamfer matching it is required to find the model in an image, such as  Fig. 1b or 1c. The method first
finds weak and noisy edges and removes them from the image. Examples showing edges of Figs. 1b and 1c are shown in
Figs. 2a and 2b, respectively. Then, the distance transform of remaining edges in an image is determined. The pixel value in
a distance transform image is proportional to the distance of that pixel to the edge pixel closest to it. Distance transforms of
Figs. 2a and 2b are shown in Figs. 3a and 3b, respectively. The model is then shifted over the distance transform image and
at each shift position, the sum of distances at the model pixels is determined, and the shift position producing the smallest
sum is chosen as the best-match position of the model in the image. The best-match position of the model of Fig. 1a in Fig.
1b is shown in Fig. 4a. Fig. 4b shows the best-match position of the model in Fig. 1c.

Using chamfer matching, regions may be selected in one image and searched for in another image, thereby establishing
correspondence between regions in the images. If closed regions are used, the centroids of corresponding regions may be
used as corresponding points to find the transformation parameters and register the images.

Chamfer matching works well when the model and the image do not have rotation and scaling differences.
(a)
(b)                                                                                              (c)
Fig. 1. (a) A binary image showing a model to be searched for in image (b) or image (c).
(a)                                                                                               (b)
Fig. 2. (a) Color edges of the images in Figs. 1b. (b) Edges of the image in Fig. 1c.
(a)                                                                                                         (b)
Fig. 3. (a), (b) Euclidean distance transforms of images in Figs. 2a and 2b, respectively.
                                      (a)                                                                                              (b)
Fig. 4. (a), (b) Chamfer matching results when using the model in Fig. 1a and the images in Figs. 1b, and 1c. The
best-match position of the model in each image is shown by overlaying the model with the image
.
To obtain a license for this software, please follow the link =>
2-D chamfer matching
Image Registration and Fusion Systems