Group 4
Group 4
Processing
Group-04
Presented By -
1. Sourav Saha (19CSE029)
2. Priyanka Kundu (19CSE012)
3.Md. Moonaz
Rahman(19CSE023)
4.Md Masud Rana(19CSE045)
5.Faysal Mia(19CSE038)
Introduction
Background = 0 (black)
Basic Set Theory
Co-lab Link:
https://colab.research.google.com/drive/1jngt_GsTr2Pd
kC3fnn73yhWLc0xXLtnk#scrollTo=KVpECbPWKSqo
Assignment-1
Dilation
Definition
Co-lab Link:
https://colab.research.google.com/drive/1oOcCZtQlkiQ
O78d1BcxW07OyE8OqqrLu
Assignment-2
Opening and Closing
The combination of Opening and Closing is generally used to clean up artifacts in the
segmented image before using the image for digital analysis.
Opening
Opening is an operation that removes small objects from the foreground of an image (usually
considered as white pixels) while preserving the shape and size of larger objects. It is achieved by
applying erosion followed by dilation using a structuring element.
Closing is an operation that fills small holes and gaps in the foreground of an image while
preserving the shape and size of objects. It is achieved by applying dilation followed by
erosion using a structuring element
Structuring elements (kernels). Left: kernel to 'hit'. Middle: kernel to 'miss'. Right: final
combined kernel
An Example for Better Understanding
Assignment of Hit or Miss Transformation
Moonaz
A
BOUNDARY EXTRACTION
Applications:
Applications:
● Image Preprocessing
● Object Recognition
● Texture Synthesis
● 3D Printing
REGION FILLING | HOLE FILLING
In the context of region filling, what does the term "seed point" refer to?
A. A point used to start the region filling process
B. A point used to end the region filling process
C. A point used to measure image intensity
D. A point used to smooth the image
EXTRACTION OF CONNECTED COMPONENT
Applications:
● Object Counting
● Image Segmentation
● Character Recognition (OCR)
● Medical Image Analysis
● Shape Analysis
EXTRACTION OF CONNECTED COMPONENT
● Convex hull is the smallest convex polygon that can contain all the
points of an object in an image.
● Simplify shape analysis, remove concavities, and provide a tight-fitting
boundary around objects.
CONVEX HULL
Structuring elements
Convex Hull
CONVEX HULL
IMPROVING CONVEX HULL ALGORITHM
A Output
Improved
IMPROVING CONVEX HULL ALGORITHM
Applications:
LINK:
https://colab.research.google.com/drive/1WaeX59inH4426gwl9om2fXPH8Jy
VLimV?authuser=0#scrollTo=k6mUwSndIP5h
Thinning
0 0 0 1 0 0 0 1 0 1 0 1
B 1= 1 1 1 B 2= 0 1 0
B03= 1 0
0 1 0
B= 4
0 1 0 1 0 1 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0 0 0 1
0 1
B5= 1 1 1
B 60= 0 1 1
B07= 1 0
0 0 0 B8= 0 0 1 0 1 0 1 0 1
Thinning Illustration
.
Applications of Thinning
.
Applications of Thickening
1 1 1
1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 0 0
1 1 1 1 1 1 1 1 1 0 0
1 Image
Original 1 1, A 1 = 1 1 1 1 1 0 0
1 1 1 0 0 1 1 1 1 0 0
Code
Implementation Code
Here:https://github.com/Schukuratsu/Python-cv2-fast-
thinning-algorithm
Morphological Reconstruction
● Marker Image: An initial image or subset that serves as the seed for reconstruction.
It can be created based on specific criteria or thresholds applied to the original
image.
● Mask Image: The original image or a processed version of the original image that
guides and constrains the reconstruction process.
● Structuring Element: The neighborhood used for dilation or erosion. Common
structuring elements include simple shapes like squares, disks, or more complex
configurations.
[Extracts the
particles
connected
to a
rectangle
boundary]
[Extracts the
particles
based on
morphologic
al
properties]
Geodesic Dilation
F = Marker image
G = Mask image
B = Structuring element
n = Number of time of
geodesic dilation
Geodesic Dilation graphical illustration
Geodesic Erosion
C) To control the erosion process using a reference image, ensuring that erosion does not go
beyond certain boundaries.
The reconstruction through the geodesic operations are defined as the result of such
operation at the stability:
with k such
with k such
How morphological reconstruction by dilation works
Sample application of morphological reconstruction
Opening by reconstruction:
Opening Through Reconstruction Of Size n:
im = load_spots()
plt.tight_layout()
glue_fig('fig_hysteresis_threshold_spots', fig)
Filling holes
Filling holes
(a)Text image
(b)Compliment
of (a) for use as
a mask image
(c)Marker
image (d)
Result of hole
filling
THANK YOU