You find in this subsection example designs on opening and closing and morphology edge detection. One example demonstrates how to find four simple patterns using the operator HitOrMiss.
Search Highlighter (On/Off)