The following are some references about visual template matching, including theory and demo.
Corke, Peter. Robotics, Vision and Control: Fundamental Algorithms In MATLAB® Second, Completely Revised. Vol. 118. Springer, 2017, pp. 376-392.
Milford, M. and Wyeth, G., 2010. Persistent navigation and mapping using a biologically inspired SLAM system. The International Journal of Robotics Research, 29(9), pp.1131-1153.
Lewis, J.P., 1995, May. Fast normalized cross-correlation. In Vision interface (Vol. 10, No. 1, pp. 120-123).
Briechle, K. and Hanebeck, U.D., 2001, March. Template matching using fast normalized cross correlation. In Optical Pattern Recognition XII (Vol. 4387, pp. 95-103). International Society for Optics and Photonics.
Brunelli, R., 2009. Template matching techniques in computer vision: theory and practice. John Wiley & Sons.
Template Matching in MATLAB
http://au.mathworks.com/help/vision/ref/templatematching.html
Normalized 2-D cross-correlation in MATLAB
https://au.mathworks.com/help/images/ref/normxcorr2.html
Template Matching using Correlation Coefficients by Yue Wu https://au.mathworks.com/matlabcentral/fileexchange/28590-template-matching-using-correlation-coefficients
Fast/Robust Template Matching By Dirk-Jan Kroon
Template Matching with SSD Block Matching and Normalized CC, (color) 2D and 3D.
https://au.mathworks.com/matlabcentral/fileexchange/24925-fast-robust-template-matching
Introduction, Template Matching by Cross-Correlation, Transform Domain Computation and Normalizing.
http://www.cs.ubc.ca/research/deaton/remarks_ncc.html
Template Matching Lecture
http://www.vis.uky.edu/~ryang/Teaching/cs635-2016spring/Lectures/17-recognition.pdf
Template Matching Demo
https://angeljohnsy.blogspot.com/2011/06/template-matching-in-matlab.html
Brain Inspired Navigation Blog
New discovery worth spreading on brain-inspired navigation in neurorobotics and neuroscience