Morphological Operations
Introduction
Implemented morphological operations, Opening, Closing, Dilation and Erosion and then using them to remove noise from an image and extract boundaries. We will remove the noise and then extract the boundaries from the following image:
Methodology
The two morphology image algorithms to remove the noise from image are:
- (A 0 B) • B : This is a series of compound operations namely, opening followed by closing the image A with the structural element B. Here, the structural element used is of size 3x3. With center most element as the origin. After applying this algorithm to the original image we get the following image:
- (A • B) 0 B : This is also a series of compound operations namely, closing followed by opening the image A with the structural element B. Here, the structural element used is of size 3x3. With center most element as the origin. After applying this algorithm to the original image we get the following image which is same as above:
Boundary Extraction:
To extract the boundary from an image A the following operation is performed: O = A – (A!B) which is subtract the image eroded with the structural element B from the original image. O is the output image showing boundary.B = [[1,1,1],[1,1,1],[1,1,1]]
Now after applying the boundary extraction algorithm on the two images obtained after removing noise we get the following results: