Hit-or-Miss Filter
Given : a binary image and a kernel image – the kernel consists of the elements 0, 1 and X
From the given image make a new image : A pixel is replaced by 1 if its neighbourhood matches the kernel and is replaced by 0 if not. X in the kernel stands for an arbitrary pixel value in the image.