Site hosted by Angelfire.com: Build your free website today!

KERNEL (Structuring element)

The kernel or structuring element in morphology plays a similar role to the kernel used when performing convolutions. Therefore we will use in the future kernel

To perform a convolution, a kernel is defined first. The kernel is a small matrix of numerical values. This kernel is then used as a mask and is positioned at every pixel position in the input image. The pixel values falling under this mask are then combined numerically to produce an output value. This value is stored in the output image at the position under the key element or origin of the kernel.

The kernel in morpholgy works similarly - it is moved to every position of the input image and combined with the input pixels that it covers to produce an output value. However, it is the shape of the kernel which is important rather than the value of the entries. When the kernel is moved to a new position, it is examined to see whether or not object pixels fall under the mask. Existing input pixels are kept or discarded based on this fit - no new values are computed (as they are with a convolution). The assessment of whether or not the kernel "fits" the image and what to do with the pixels if it does fit is dependent on the operation being performed.

The kerel just described is a flat kernel- it is the shape of the element which is important, not the values of the points it contains. For some operations, it makes sense for a flat kernel to be combined with greyscale images and for some it does not.