Normalized correlation, Template matching