Learn Python
Learn Data Structure & Algorithm
Learn Numpy
Learn Pandas
Learn Matplotlib
Learn Seaborn
Learn Statistics
Learn Math
Learn MATLAB
Learn Machine learning
Learn Github
OpenCV Introduction
OpenCV Image Read & Write
OpenCV Image Channels
OpenCV Color Conversion
OpenCV Rotation & Crop
OpenCV Text & Shape
OpenCV Video
OpenCV Arithmetics Operation
OpenCV Thresholding
OpenCV Blur & Blending
OpenCV Edge Detection
OpenCV Contours
OpenCV Hough Transformation Lines
OpenCV Moments & Convexhull
OpenCV Morphological Transformation
OpenCV Template Matching
Learn Deep Learning
Learn MySQL
Learn MongoDB
Learn Web scraping
Learn Excel
Learn Power BI
Learn Tableau
Learn Docker
Learn Hadoop
To detect the shape of any object morphological transformation is performed. Morphological transformation is
performed on binary images and their objects must be in white pixel and background in black pixel.
It needs two inputs 1. original image 2. Kernel.
To basic morphological transformations are:
1. Erosion:
Erosion works on an image object's edges or you can say boundary .Erosion will fix or sharpen the boundary of
any object present in the image. Suppose you have a binary image where the background color is black and the
object color is white. Now the boundary is not properly visible or you can say that some objects don't have
the proper boundary. It means some black pixels are on the border. In this type of case, erosion will try to
remove the black pixel and will try to create a proper white border of that object.
2. Dialation:
Dialation works inside of an object. It means erosion fixes/sharp the damage boundary of the objects and
dialation fix the damage present inside of an object.
Suppose you have a binary image where the background color is black and the object color is white. Now
inside the object, we have some black pixels but there must be white pixels. For this reason, we can say that
object inside the area is not properly visible. In this type of case, dialation will try to remove the black
pixel and will try to create a proper white area inside of that object.