An Improved Template Matching Method for Object Detection Duc Thanh Nguyen, Wanqing Li, and Philip Ogunbona Advanced Multimedia Research Lab, ICT Research Institute School of Computer Science and Software Engineering University of Wollongong, Australia Abstract. This paper presents an improved template matching method that combines both spatial and orientation information in a simple and effective way. The spatial information is obtained through a generalized distance transform (GDT) that weights the distance transform more on the strong edge pixels and the orientation information is represented as an orientation map (OM) which is calculated from local gradient. We applied the proposed method to detect humans, cars, and maple leaves from images. The experimental results have shown that the proposed method outperforms the existing template matching methods and is ro- bust against cluttered background. 1 Introduction Object detection is an active research topic in Computer Vision. Generally speak- ing, existing object detection methods can be categorized into learning-based approach and template-based approach. In the learning based approach, object signatures (e.g. the features used to describe the objects) are obtained through training using positive/negative samples [1], [2], [3], [4] and object detection is often formulated as a problem of binary classification. In the template based approach, objects are described explicitly by templates and the task of object detection becomes to find the best matching template given an input image. The templates can be represented as intensity/color images [5], [6] when the appearance of the objects has to be considered. Appearance templates are often specific and lack of generalization because the appearance of an object is usually subject to the lighting condition and surface property the object. Therefore, bi- nary templates representing the contours of the objects are often used in object detection since the shape information can be well captured by the templates [7], [8], [9]. Given a set of binary templates representing the object, the task of de- tecting whether an image contains the object eventually becomes the calculation of the matching score between each template and the image. The commonly used matching method is known as ”Chamfer matching” which calculates the ”Cham- fer distance” [10] or ”Hausdorff distance” [11], [12] between the template and the image through the Distance Transform (DT) image [13] in which each pixel value represents its distance to the nearest binary edge pixel. This paper is about an effective method to match a binary template with an image by using both H. Zha, R.-i. Taniguchi, and S. Maybank (Eds.): ACCV 2009, Part III, LNCS 5996, pp. 193–202, 2010. c Springer-Verlag Berlin Heidelberg 2010