An Improved Edge Structure Weighted Hausdorff Distance for Template Matching

Template matching based on a Hausdorff distance (HD) approach become popular for object recognition. In this paper, we present a newly improved edge structure weighted HD (ESW-HD) algorithm for object recognition. We use edge points as the feature of the model, and construct the structure tensor by edge intensity and edge gradient. Then, the HD is weighted by the structure tensors. This work illustrates the ESW-HD algorithm by template edge matching which uses edge points and its edge adjacent structure information to perform the image matching. The experimental results show that the improved HD matching method can achieve a good performance level in terms of matching accuracy, even in a noisy environment when compared with the conventional approaches for object recognition.


Introduction
Template matching is a fundamental problem in pattern recognition and object tracking. Locating a model in an image consist in, given a template composed by a set of features that characterize an object, determining its position in a target image. Based on the level of image feature extraction, the matching methods can be divided into three classes: algorithms that use image pixel values directly; algorithms that use low level features and algorithms that use high level features. To all these methods, one of the critical problems is how to match two objects efficiently and accurately with the existence of noise, partial occlusion or spurious parts. The methods making use of image pixel value directly are sensitive to changes between images, and high level matching methods are very insensitive to these disturbances. But, the disadvantage is that the high level features must first be extracted and identified and that is, in most cases a difficult problem. Image edge is the low level features. It reflects some kind of stable structure of image and is easy to be extracted from image, then algorithms use edge points can be expected to achieve good performance for template matching.
Hausdorff distance matching is an effective template matching technique for the dissimilarity measure between two sets of image edge. Many of its variations have been used in template matching. These methods are more tolerant to perturbations in template matching for requiring no explicit correspondence between the two edge sets [1][2][3][4][5][6]. Huttenlocher et al. [1] studied the possibility of comparing images in terms of Hausdorff distance, where the Hausdorff distance is viewed as a function of the translation of model with respect to an image. The test results show that the Hausdorff distance transform is powerful for edge sets comparison, more tolerant of perturbations for the location of template image. To overcome the shortcoming of occlusion and light, Dubuisson and Jain proposed a modified Hausdorff distance measure (MHD) [2], the results indicated that MHD has the good performance when the target has factor of occlusion, Sims et al proposed LTS-HD method [3], and the LTS-HD is more robust for template matching. In recent years, many other of its variations have been employed for template matching with success [4][5][6].
At present, most of the matching algorithms based on modified Hausdorff distance are calculated the distance by the position of edge points, and these algorithms are sensitive to noise in the process of template matching for the reason that these algorithms do not make full use of the useful information of edge points. To improve the robust performance of template matching, in this paper, we present an improved structure weighted HD matching algorithm (ESW-HD) to improve the matching performance. First, we construct the edge structure tensor by edge intensity and edge gradient, and then the HD is weighted by the structure tensors and used for template matching. The matching performance of our proposed algorithm is compared to the classical modified Hausdorff distance, and the results show that the algorithm has good performance for template matching.

Hausdorff Distance and Improved Measures
Hausdorff Distance. The Haussdorff distance is a max-min distance that measures the extent to which two images are similar or different to one another based on the edge maps. Given two finite ,.... , 2 1 = , the class Hausdorff distance is defined as follows [1]: and • is a two-dimensional Hilbert metric applied to points a and b. The function The modified Measures. The conventional Hausdorff distance method is easily affected by occlusions, light and noises for only computing the distance by edge position information. Thus, a number of improved measures have been proposed. Some classical modified Hausdorff distance can overcome the problems of occlusions and noises effectively. Huttenlocher proposed the partial Hausdorff distance (PHD) [1], Dubuisson and Jain proposed the mean Hausdorff distance (MHD) [2]. To some extent, these methods overcome the shortcoming of conventional Hausdorff distance. But in the practical application, these methods can lead to mismatch because of the pseudo-edge points. Recently H is the sum of edge points, and is minimized by remaining distance values after large distance values are eliminated, and then can make the best matching. Improved Edge Structure Weighted Hausdorff Distance. Up to day, most of the modified Hausdorff distance methods are performed only by calculating the distance of edge points, and do not make full use of the adjacent structure information of edge points. In this paper, we combine the Hausdorff distance with the information of image edge structure, and propose an algorithm based on edge structure weighted Hausdorff distance.
Local second-structure tensor of edge point can be defined as [7][8]: Where: G is the Gaussian function that its scale is σ ; * denotes convolution; x I and y I denote partial derivative in x and y direction of image. In recent years, structure tensor has been employed for corner detection and optical flow computation with success [7] [8].

Information Technology for Manufacturing Systems III
Then, we can construct the edge structure tensor by edge point intensity and gradient information:  I  G  I  I  G  I  I  G   I  I  G  I  G  I  I  G   II  G  II  G  I  Structure tensor is a positive definite symmetric matrix, constituting a Riemannian manifold. The measurement between the structure tensor can no longer measured by Euclidean distance. The usual approach of the measurement structure on manifold is to designate an inner product as .,. for every point M p ∈ ， also known as the Riemannian metric. According to the papers [9] [10], the Riemannian metric of structure tensor can be defined as ) ( , Index mapping of metric is defined as We can calculate the logarithmic mapping according index mapping can be calculated by equation (9) and equation (10) as can also be defined as Where k λ is the joint eigenvalue of X and Y. We can use it weighting the Hausdorff distance, because the edge structure tensor implied local structural information of image.

The improved matching algorithm
We propose an improved algorithm using based on edge structure weighted Hausdorff distance. Canny edge detector is the optimal edge detection algorithm, its detection accuracy and noise suppression are better, so we adopt canny edge detector as the edge detector.
The process of matching algorithm using improved HD can be developed as Step 1：Extracting the edge of template and real-time image by canny detector; Step 2：Calculating the Hausdorff distance of template and real-time image by equation (2); Step 3：Calculating the structure tensor of edge points; Step 4：Calculating the distance of structure tensor by equation (9); Step 5：Calculating the weighted Hausdorff distance by (10).

Experimental results
In order to evaluate the performance of the ESW-HD matching algorithm developed above, experiment has been performed with visible images. Experiments compare the performance of our algorithm with LTS-HD algorithm and other algorithms. In the process of template matching, images are added different variance Gaussian noise. Table 1 compares the performance of our algorithm with the other algorithms in reference by the same image data. As can be seen, when matching image is visible and noise variance=0.45, object were lost for LTS-HD algorithm and other algorithms, but our algorithm can match the object correctly. Further, as can be seen, when matching image is visible and noise variance=0.16, Gray correlation algorithm, Edge correlation, MHD algorithm and PHD algorithm are already incorrectly. Figure 2 are test results when noise variance is 0.45.

Conclusions and perspective
In this paper, we have presented a method for computing image similarity using edge structure weighted HD for image matching. It can provide a good performance level in a noisy environment. This new approach is insensitive to noise. The tests about visible image matching show that it is more robust to image matching, and has higher accuracy. Main drawback of this modified Hausdorff distance is the high computational complexity involved in its calculation. In the future, the important task of how to reduce the computational time need to be solved.