TemplateMatch -- Applying masks to templates

since your ‘mask’ only contains ones, it will ‘let everything through’.

lookup, how masks work, and how to derive a useful one for your object/shape