Correlation and Template Matching