Abstract
In this paper, a fast template matching algorithm of two-stage and dual-check bounded partial correlation (TDBPC) based on normalized cross-correlation (NCC) of single-check bounded partial correlation is proposed. According to the principle of continuous rows, the template and the sub-image under matching are divided into three subregions to obtain two upper boundary terms of NCC and get two checking conditions then. In this way, it is possible to quickly eliminate matching points that cannot provide a better cross-correlation score regarding the current best candidate. Generally, to get the highest cross-correlation score, the sub-image has to traverse through the whole image. In addition, the two-stage search strategy of coarse–fine proposed in this paper can further reduce the calculation and improve matching efficiency. The initialization parameters are selected experimentally or automatically. Experimental results show that the TDBPC algorithm proposed in this paper can solve high computational complexity and long matching time of NCC template matching and make it possible to achieve real-time template matching in industrial vision positioning fields. The feasibility of this algorithm in practical application is proved.
Similar content being viewed by others
References
Chen F, Ye X, Yin S, Ye Q, Huang S, Tang Q (2018) Automated vision positioning system for dicing semiconductor chips using improved template matching method. Int J Adv Manuf Technol 100:2669–2678
Zhong F, He S, Li B (2017) Blob analyzation-based template matching algorithm for LED chip localization. Int J Adv Manuf Technol 93:55–63
An Z, Wang Y (2018) A metal surface defect detection method based on nonlinear diffusion and image difference. Surf Technol (in Chinese) 47:277–283. https://doi.org/10.16490/j.cnki.issn.1001-3660.2018.06.040
Wan Y, Cui P, Xu L, Yu H (2019) Anti-icing performance of micro-nano composite texture based on image processing technology. Surf Technol (in Chinese) 48:54–58. https://doi.org/10.16490/j.cnki.issn.1001-3660.2019.08.008
Connell SD, Jain AK (2001) Template-based online character recognition. Pattern Recognit 34:1–14
Lowe DG (2004) Distinctive image features from scale-invariant keypoints. Int J Comput Vis 60:91–110
Wu X, Zhao Q, Bu W (2014) A SIFT-based contactless palmprint verification approach using iterative RANSAC and local palmprint descriptors. Pattern Recognit 47:3314–3326
Bay H, Ess A, Tuytelaars T (2008) Speeded-up robust features (SURF). Comput Vis Image Underst 110:346–359
Teh CH, Chin RT (1988) On image analysis by the methods of moments. IEEE Trans Pattern Anal 10:496–513
Hwang SK, Kim WY (2006) A novel approach to the fast computation of Zernike moments. Pattern Recognit 39:2065–2076
Wee CY, Paramesran R (2007) On the computational aspects of Zernike moments. Image Vis Comput 25:967–980
Revaud J, Lavoue G, Baskurt A (2009) Improving Zernike moments comparison for optimal similarity and rotation angle retrieval. IEEE Trans Pattern Anal Mach Intell 31:627–636
Barnea DI, Silverman HF (1972) A class of algorithms for fast digital image registration. IEEE Trans Comput C–21:179–186
Bei CD, Gray RM (1985) An improvement of the minimum distortion encoding algorithm for vector quantization. IEEE Trans Commun com-33:1132–1133
Li W, Salari E (1995) Successive elimination algorithm for motion estimation. IEEE T Image Process 4:105–107
Wang HS, Mersereau RM (1999) Fast algorithms for the estimation of motion vectors. IEEE T Image Process 8:435–439
Atallah MJ (2001) Faster image template matching in the sum of absolute value of differences measure. IEEE Trans Image Process 10:659–663
Essannouni F, Thami ROH, Aboutajdine D, Salam A (2007) Adjustable SAD matching algorithm using frequency domain. J Real Time Image Process 1:257–265
Briechle K, Hanebeck UD (2001) Template matching using fast normalized cross correlation. Opt Pattern Recogn XII 4387:95–102
Cooley J, Lewis P, Welch P (1967) Application of the fast fourier transform to computation of Fourier integrals, Fourier series, and convolution integrals. IEEE Trans Audio Electroacoust 15:79–84
Rao KR, Kim DN, Hwang JJ (2010) Fast Fourier transform algorithms and applications. In: Signals and communication technology
Park CS (2015) 2D discrete Fourier transform on sliding windows. IEEE Trans Image Process 24:901–907
Kaso A (2018) Computation of the normalized cross-correlation by fast Fourier transform. PLoS One 13:e0203434
Lewis JP (1995) Fast template matching. In: Vision interface 95, Canadian image processing and pattern recognition society Quebec City, Canada, May 15, vol 19, pp 120–123
Stefano LD, Mattoccia S (2003) Fast template matching using bounded partial correlation. Mach Vis Appl 13:213–221
Stefano LD, Mattoccia S (2003) A sufficient condition based on the Cauchy-Schwarz inequality for efficient template matching. In: International conference on image processing, pp 269–272
Mattoccia S, Tombari F, Di Stefano L (2008) Fast full-search equivalent template matching by enhanced bounded correlation. IEEE Trans Image Process 17:528–538
Wen-Chia L, Chin-Hsing C (2012) A fast template matching method with rotation invariance by combining the circular projection transform process and bounded partial correlation. IEEE Signal Proc Lett 19:737–740
Wong RY, Hall EL (1978) Sequential hierarchical scene matching. IEEE Trans Comput 27:359–366
Vanderburg G, Rosenfeld A (1977) Two-stage template matching. IEEE Trans Comput 1:104–107
Choi MS, Kim WY (2002) A novel two stage template matching method for rotation and illumination invariance. Pattern Recognit 35:119–129
Krattenthaler W, Mayer K, M.Zeiler (1994) point correlation: a reduced-cost template matching technique. In: International conference on image processing, pp 208–212
Ouyang W, Tombari F, Mattoccia S, Di Stefano L, Cham WK (2012) Performance evaluation of full search equivalent pattern matching algorithms. IEEE Trans Pattern Anal Mach Intell 34:127–143
Itamar I, Mechres R, Zelnik-Manor L (2017) Template matching with deformable diversity similarity. In: The IEEE conference on computer vision and pattern recognition, pp 175–183
Korman S, Milam M, Soatto S (2018) OATM: occlusion aware template matching by consensus set maximization. In: The IEEE conference on computer vision and pattern recognition, pp 2675–2683
Oron S, Dekel T, Xue T, Freeman WT (2018) Best-buddies similarity—Robust template matching using mutual nearest neighbors. IEEE Trans Pattern Anal Mach Intell 40:1799–1813
Lai J, Lei L, Deng K, Yan R, Ruan Y, Jinyun Z (2020) Fast and robust template matching with majority neighbour similarity and annulus projection transformation. Pattern Recognit 98:107029
McDonnell MJ (1981) Box-filtering technique. Comput Graph Image Process 17:65–70
MacLean J, Tsotsos J (2000) Fast pattern recognition using gradient-descent search in an image pyramid. In: International conference on pattern recognition, pp 873–877
Takei R (2003) A new grey-scale template image matching algorithm using the cross-sectional histogram correlation method. Dynax Corporation Fuchu-City, Fuchu-cho
Acknowledgements
The funding was provided by the National Natural Science Foundation of China (Grant Nos. 51975204).
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Chen, F., Liao, J., Lu, Z. et al. A real-time two-stage and dual-check template matching algorithm based on normalized cross-correlation for industrial vision positioning. Pattern Anal Applic 24, 1427–1439 (2021). https://doi.org/10.1007/s10044-021-00997-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10044-021-00997-7