Template Matching in object recognition