filter can find sth in the sig.
1 1-D cross-correlation
you pull out a section of the original as the filter and do the correlation,you can get the peak at the location where you pull out the signal.
Reason:the position of the pos and neg signals are totally the same.
matlab code
Note:normxcorr2() the comparison start where the third number overlap the first num in the sig.
I bet you are itching to do this on yourself!Taks an template and image as input,and return an x and y coordinates where the template was found in the image.
So can you use the template matching to do the stuff like finding the cracks and fissures in the metal components,?
No!Because that the templates matching can only be a satisfactory in the case when the appearance doesn't change a lot.
cite:
https://classroom.udacity.com/courses/ud810/lessons/3490398568/concepts/34996085510923