Open In App

Difference between Opening and Closing in Digital Image Processing

Last Updated : 20 Dec, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Opening and Closing are dual operations used in Digital Image Processing for restoring an eroded image. Opening is generally used to restore or recover the original image to the maximum possible extent. Closing is generally used to smoother the contour of the distorted image and fuse back the narrow breaks and long thin gulfs. Closing is also used for getting rid of the small holes of the obtained image. The combination of Opening and Closing is generally used to clean up artifacts in the segmented image before using the image for digital analysis.

  

Some of the differences between Opening and Closing are:

S.No. Opening Closing
1. Opening is a process in which first erosion operation is performed and then dilation operation is performed. Closing is a process in which first dilation operation is performed and then erosion operation is performed.
2. Opening operation performed on X & Y is the union of all translations of Y that fit entirely within X. Closing operation performed on X & Y is the complement of the union of all translations of Y that do not fit entirely within X.
3. It eliminates the thin protrusions of the obtained image. It eliminates the small holes from the obtained image.
4. Opening operation performed on X & Y is represented by (AoB). Closing operation performed on X & Y is represented by (A.B)
5. Opening is used for smoothening of contour and fusing of narrow breaks. Closing is used for removing internal noise of the obtained image

 

Opening is denoted by:

Properties of Opening are:
    1. XoY is a subset (subimage of X)
    2. If X is a subset of Z then XoY  is a subset of ZoY
    3.(XoY)oY = XoY

 

Closing is denoted by:

Properties of Closing are:
    1. X is a subset subimage of X.Y
    2. (X.Y).Y = X.Y

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads