Explain template matching and its limitations.

Technical