Matlab – Opening and Closing

Before this, i have share some knowledge on erosion and dilation. This knowledge is necessary to continue with this topic which is Opening and Closing. The purpose of opening is to smoothens contours, nelarges narrow gaps and eliminates thin protrusions and ridges. On the other hand, closing will help to fills narrow gaps, holes and small breaks. In this post, i will explain some general idea of opening and closing and show to you some example Matlab source code for opening and closing. Continue reading “Matlab – Opening and Closing”

Matlab – Dilation and Erosion

In digital image processing, you must understand on dilation and erosion. Dilation adds pixels to the boundaries of objects in an image. On the other hand erosion removes pixels on object boundaries. The number of pixels added or removed from the objects in an
image depends on the size and shape of the structuring element used to process the image. In the morphological dilation and erosion operations, the state of any given pixel in the output image is determined by applying a rule to the corresponding pixel and its neighbors in the input image. The rule used to process the pixels defines the operation
as a dilation or an erosion. Continue reading “Matlab – Dilation and Erosion”