Professional Documents
Culture Documents
Dr. Le Dung
Dung.le@hust.edu.vn
0904982398
Chng III:
PHN ON NH
(Image Segmentation)
Ni dung
TCH BIN NH (EDGE DETECTION)
TCH KHUNG XNG NH (SKELETON EXTRACTION)
TCH VNG NH (REGION SEGMENTATION)
Edges
Types of Edge
s u r f a c e
d e p t h
s u r f a c e
il l u m in a t io n
S t e p
R o o f
HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY
L in e
SCHOOL OF ELECTRONICS AND TELECOMMUNICATION
K thut tm bin nh
Luminance profile I(x,y)
First derivative
Second derivative
Gradient direction:
The edge strength is given by the gradient magnitude
10
11
12
Heat waves
Dust
Smoke
Acquisition Noise
13
Noise reduction
Gaussian Mask Gaussian Filter
14
Noise reduction
Gaussian Filter Smoothing (Gaussian blur)
Original
HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY
Smoothed
SCHOOL OF ELECTRONICS AND TELECOMMUNICATION
15
16
17
18
19
Grad x
Grad y
20
21
22
23
24
25
26
27
28
29
30
31
Non-maximum suppression
Non-maximum suppression is an edge thinning technique :
Select the single maximum point (peak) along the gradient direction.
32
Peaks
The matrix is represented with values
of the pictures Magnitude[][]
Since current pixels Magnitude[i][j] > relevant
pixels Magnitude[i][j]
12 34 23 Gradient
direction
peak[i][j] = true
85 90 30
23
78
90
78
90
33
Non-maximum suppression
Tin trnh thc hin loi b cc im khng cc i :
34
Non-maximum suppression
V d:
35
Non-maximum suppression
Kt qu v d ng bin c lm mnh
36
Strong
High threshold
Weak
Connectivity
Weak
Low threshold
37
38
39
Magnitude Table
7
Final Table
77 43 32 21 21
45 81 1
91 1
34 43 65 67 34 2
1
91 1
1
91 1
92 1
83 82 82 3
1
2
Table
True Peak
True Final
False Peak
False Final
40
41
Final Table:
Table
Low Peak
High Peak
True Final
False Peak
False Final
42
Output
For i = 0 to Row length
For j = 0 to column length
if(Final[i][j] == true)
print white pixel
else
print black pixel
43
l nh s
44
SKELETON OF IMAGE
l nh s
45
Skeleton
l nh s
46
DISTANCE TRANSFORM
l nh s
47
l nh s
48
l nh s
49
l nh s
50
l nh s
51
l nh s
52
l nh s
53
l nh s
54
l nh s
55
l nh s
56
l nh s
57
TCH VNG NH
Dng Histogram
Dng Connected Component Labeling Algorithm
l nh s
58
l nh s
59
2
1
Horizontal
Cutting line
Code Area
Border
9 8 7 6
5 4 3 2 1
Histogram
12 pixels
(pixels)
Vertical
direction
Selected area
Threshold 10 pixels
pixels
20
Position of numbers
V1
V2
V3
V4
V5
Border
l nh s
60
3
3
7
7
7
7
B T i PD NM GA T L AL
B tp r
n ht h u TOt N
l nh s
61
Cc im cha
dn nhn c gi
tr bng 1
(im nn gi tr
bng 0)
1
1
1
1
nh cn phn
vng bng
thut ton
CCL
10
Kmax
.....
l nh s
62
im cha c
dn nhn s
c nh nhn
mi k.
2 im ln cn
phi v di
cha c dn
nhn cng c
nh nhn k lun
1
1
nh cn phn
vng bng
thut ton
CCL
1
1
1
1
1
1
(dng 4-connectivity)
1
10
Kmax
.....
l nh s
63
3
1
1
1
nh cn phn
vng bng
thut ton
CCL
1
1
10
Kmax
.....
l nh s
64
3
4
nh cn phn
vng bng
thut ton
CCL
Vy khi im ln
cn phi cng
dn nhn ri th
sao?.
1
1
1
10
Kmax
.....
l nh s
65
So snh
dng nh nh
hn
nh cho im
ln cn di.
1
1
nh cn phn
vng bng
thut ton
CCL
ng thi ghi
nhn 1 s kt
hp nhn trong
mng theo di
10
Kmax
.....
l nh s
66
nh cn phn
vng bng
thut ton
CCL
10
Kmax
.....
l nh s
67
nh cn phn
vng bng
thut ton
CCL
10
Kmax
.....
l nh s
68
3
4
4
5
Ghi li trn
mng theo di
nhn.
3
6
3
8
Nhn
.....
m s im
.....
10
Kmax
l nh s
69
1
1
1
1
Trn mng
theo di nhn s
cng gp s im
nh cc nhn b
kt hp
ng dng ?
1
1
Nhn
.....
m s im
6+5+
2
6+2
.....
10
Kmax
l nh s
70
l nh s
71
l nh s
72
l nh s
73
Morphological Operators
(Cc ton t hnh thi)
Cc ton t Morphological thng nhn mt nh nh
phn (binary image) hay nh a mc xm (greyscale
image) v mt phn t cu trc SE (structuring element)
(mt ma trn, kernel) nh l d liu u vo, sau kt
hp chng bng cch s dng tp php ton nh giao,
hp, bao gm, b (intersection, union, inclusion,
complement) cho ra mt nh kt qu c cng kch thc.
Morphological operations the shape of the object
l nh s
74
X
Morphological Operator: Structuring Elements
SE = kernel
o r ig in
l nh s
75
Structure
Element
SE fits the image
SE hits (intersects)
the image
l nh s
76
https://www.cs.auckland.ac.nz/courses/compsci773s1c/lectures/ImageProcessing-html/topic4.htm
l nh s
77
A is a set in Z2 ,
a=(a1,a2) an element of A, aA If not, then aA
: null (empty) set
A subset of B: AB
Union of A and B: C=AB
Intersection of A and B: D=AB
Disjoint sets: AB=
Complement of A: Ac = {x|xA}
Difference of A and B:
A-B = {x|xA, x B} = ABc
l nh s
78
l nh s
79
l nh s
80
l nh s
81
l nh s
82
?
SE
l nh s
83
SE
Original image
l nh s
84
( A) A A B
l nh s
85
l nh s
86
l nh s
87
SE = B =BR
HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY
l nh s
88
?
SE
=B
= BR
l nh s
89
SE
SER
l nh s
90
k=1,2,3,
l nh s
91
l nh s
92
l nh s
93
Morphological Operator:
Duality (Erosion & Dilation)
Erosion and dilation are duals of each other with respect to set
complementation and reflection
A B
A B
A B
A B
and
l nh s
94
Morphological Operator:
Duality (Erosion & Dilation)
Erosion and dilation are duals of each other with respect to set
complementation and reflection
A B
z | B Z A
z | B Z A
c
z | B Z Ac
Ac B
l nh s
95
l nh s
96
l nh s
97
l nh s
98
l nh s
99