Template Matching Techniques in Computer Vision: Theory and Practice