Gradient orientation pattern matching with the Hamming distance Toshiaki Kondo n School of Information, Computer and CommunicationTechnology, Sirindhorn International Institute of Technology, Thammasat University, Bangkadi Campus, 131 Moo 5, Tiwanont Road, Bangkadi, Pathumthani 12000, Thailand article info Article history: Received 22 November 2012 Received in revised form 27 September 2013 Accepted 28 March 2014 Keywords: Pattern matching Block matching Template matching Normalized gradient Gradient orientation Hamming distance abstract This paper presents a novel pattern matching technique that is robust to illumination changes and the occlusion problem. The technique is based on the matching of gradient orientations in place of traditional image features such as intensities or gradients. Gradient orientations depend on the texture in an image. They are known to be insensitive to changes of image intensities that are often caused by time-varying illuminations or the auto-gain control (AGC) function of the camera. Moreover,the proposed method employs a voting strategy in the process of matching gradient orientations. The method works remarkably well even when a large part of the pattern is occluded with a foreign object. Consequently, the proposed method is robust to both irregular lighting conditions and the occlusion problem. & 2014 Elsevier Ltd. All rights reserved. 1. Introduction Pattern matching is an important process in a variety of image processing and computer vision applications that include motion estimation for video coding (e.g. MPEG-2, MPEG-4) [1,2,11,12], pattern recognition [3,4], image stabilization for digital cameras and camcorders [5,11], object tracking [6,9,11], image registration [7,8], video surveillance [9], stereopsis (stereo vision) [10], and content-based image/video retrieval (CBIR) [11]. There are a number of common problems that make pattern matching difcult. They are, for example, (1) changing lighting conditions, (2) the occlusion problem, (3) the aperture problem, (4) the rotation of a pattern, (5) the scale change of a pattern, (6) the perspective change of a pattern, and (7) the variation in focusing. This paper is concerned with the rst two problems, namely, changing lighting conditions and the occlusion problem. Most conventional pattern matching techniques may be classi ed into two categories: one is based on image intensities, including colors, and the other is based on gradients or edges. Since image intensities and gradients are dependent on lighting conditions, these traditional approaches often fail to perform matching correctly under irregular lighting conditions [24]. To overcome this problem, the use of gradient orientation has drawn attention in recent years, as it is known to be a robust image feature to varying illuminations [3,7,22]. The use of relative image gradients is proposed in which the gradient is divided by the local maxima [4,8,13]. This approach is not perfectly illumination-invariant because the gradients are not normalized pixelwise but normalized by the local maxima. As a result, orientation information will be suppressed in the vicinity of a bright spot. The use of normalized gradient vectors is described in [6,14]. The computation cost of these approaches is rather intensive because the computation of the Hessian matrix is involved in [6] and the FFT is required in [14]. Meanwhile, the authors also have developed a robust block matching technique using normalized gradient vectors (unit gradient vectors or UGVs) [1517]. We call it gradient orientation pattern matching method or GOPM. The GOPM performs matching in the spatial domain where the similarity between two corresponding UGVs may be evaluated using any of conventional similarity metrics such as the sum-of-absolute differences (SAD), the sum-of-squared differences (SSD), and zero-mean normalized cross-correlation (ZNCC). We have successfully implemented the method that works at a video rate [18]. Like other techniques based on gradient orientation or normalized image gradients, the GOPM works very well under irregular lighting. One noticeable difference between the GOPM and other normalized gradient vector based techniques is that the GOPM can be readily executed with a traditional similarity metric, such as SAD, that is widely employed in practical video coders today. In this paper, we introduce a voting strategy to the GOPM to make it robust to the occlusion problem as well. The voting is realized by employing the Hamming distance metric [11,23]. The proposed method is compared with the standard intensity-based template matching technique with the SAD similarity metric, ZNCC, and the GOPM with the SAD metric. For the occlusion problem, the proposed method is also compared with the histogram-based matching described in [29]. Contents lists available at ScienceDirect journal homepage: www.elsevier.com/locate/pr Pattern Recognition http://dx.doi.org/10.1016/j.patcog.2014.03.032 0031-3203/& 2014 Elsevier Ltd. All rights reserved. n Tel.: þ66 2501 3505, fax: þ66 2501 3524. E-mail address: tkondo@siit.tu.ac.th Please cite this article as: T. Kondo, Gradient orientation pattern matching with the Hamming distance, Pattern Recognition (2014), http://dx.doi.org/10.1016/j.patcog.2014.03.032i Pattern Recognition (∎∎∎∎) ∎∎∎∎∎∎