Dip - 03 - 04 Morphology
Dip - 03 - 04 Morphology
August 2023
Morphological Operations
Image thresholding (binarization)
Example: Foreground extraction
Connected-components
Pixel neighborhoods
Region labeling Python
OpenCV
Region properties
Application: Blob-based motion detection
Morphological operations
Erosion/dilation/opening/closing
Applications
Truncated Thresholding
If pixel intensity value is greater than
threshold, it is truncated to the threshold. All
other values remain the same.
The input image contains numbers written with intensity equal to the number itself.
For ex., the pixel intensity of the number „200‟ is 200, and the intensity of the
number „32‟ is 32. No wonder „32‟ appears much darker than „200‟.
https://www.scribd.com/do
cument/407105529/ME52
86-Lecture9-pdf
https://www.scribd.com/docume
nt/407105529/ME5286-
Lecture9-pdf
https://learnopencv.com/otsu-thresholding-with-opencv/
https://www.youtube.com/watch?v=Ofi1Fn18YLc
Determine The Threshold For Image Binarization Using The Otsu Method.
https://docs.opencv.org/4.x/d7/d4d/tutorial_p
y_thresholding.html
The structuring element is said to fit the Similarly, a structuring element is said
image if, for each of its pixels set to 1, to hit, or intersect, an image if, at least for
the corresponding image pixel is also 1. one of its pixels set to 1 the corresponding
image pixel is also 1.
2000
Structuring
44
element W
34
Structuring
44
element W
34
2000
Structuring
62
element W
18
Structuring
62
element W
18
2000
Structuring Structuring
62
62
element V element W
18 18
Structuring
62
element V
18
Structuring
62
element W
18
——Dilation
——Erosion
——Original
Structuring element:
horizontal line
Amplitude
Sample no.
@2023 Pham Van Huy and Trinh Hung Cuong 87
Image example
Original 20 connected
components
f
dilate f , w1
dilate f , w1, w2 dilate f , w1, w2 , w3
New structuring element (SE) is not the erosion of one SE by the other, but dilation.