Filters as templates

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.

Filters as templates_第1张图片
1D

matlab code

Note:normxcorr2() the comparison start where the third number overlap the first num in the sig.

Filters as templates_第2张图片
Paste_Image.png
Filters as templates_第3张图片
Paste_Image.png

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.

Filters as templates_第4张图片
Paste_Image.png
Filters as templates_第5张图片
Paste_Image.png

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

你可能感兴趣的:(Filters as templates)