Morphological Operations

Basic Morphological Operations

In all morphological operations, there are two components: the image and the structuring element. The image is the image to be modified, and the structuring element determines how the image is modified.

There are two basic morphological operations – erosion and dilation. In layman’s terms, erosion is where the image is contracted according to the shape of the structuring element. On the other hand, dilation is where the image is expanded in the shape of the structuring element. Here are some examples of erosion and dilation by various structuring elements. The structuring elements, in order, are as follow:

  1. 1 by 2 rectangle
  2. 2 by 1 rectangle
  3. 2 by 2 square
  4. cross (3 pixels per arm)
  5. diagonal ([0 1; 1 0])

Each complicated-looking group of images is made up of 5 sets of 4 images.

Upper-left image = test image

Upper-right image = structuring element

Lower-left image = test image DILATED by structuring element

Lower-right image = test image ERODED by structuring element

Also, below these image sets are the predictions I made before I used MATLAB to dilate and erode the images.

Image: Hollow Square (10 x 10, 2-pixel wide borders)

hollow square.jpg
My predictions for erosion and dilation of the hollow square by the structuring elements located along the border.                                         Black ink  – dilation; Green ink – erosion

One thought on “Morphological Operations

Leave a comment