SlideShare a Scribd company logo
1 of 42
0
6.1. Thresholding
6.1.1 Threshold Detection Methods
6.1.2 Optimal Thresholding
6.1.3 Multi-Spectral Thresholding
6.2. Edge-based Segmentation
6.2.2 Edge Relaxation
6.2.3. Border Tracing
6.2.6 Hough Transforms
6.3. Region-based Segmentation
6.3.4. Watershed segmentation
6.4. Matching
6.5. Evaluation Issues in Segmentation
Chapter 6 – Segmentation I
6
1
Objective: Divide an image into separate regions that
are homogeneous wrt some properties, e.g., brightness,
color, reflectivity, texture, proximity.
(
i
) , ;
(
i
i
) , ;
(
i
i
i
)
i
i j
i
R i
R R i j
R R


 
  

Categories of segmentation techniques:
Thresholding, Edge-based, Region-based
Mathematically, image segmentation = set partition
Color
Proximity
6
2
6.1 Thresholding
1
i
f (
,)
(
,)
0 o
t
h
e
r
w
i
s
e
fij T
g
ij





(A) Global Thresholding – threshold T is determined
from the whole image f, i.e., T = T(f)
Input image High threshold Low threshold
How to determine a threshold?
6
3
3
1
i
f (
,)
(
,)
0 o
t
h
e
r
w
i
s
e
fij D
g
ij





D: a set of gray values
(B) Band Thresholding
(C) Multiple Thresholding
1
2
1 if ( , )
2 if ( , )
( , )
if ( , )
0 otherw
ise
n
f i j D
f i j D
g i j
n f i j D


 


  

 



(D) Semi-thresholding
(
,)i
f(
,)
(
,)
0 o
t
h
e
r
w
i
s
e
f
i
j f
i
j T
g
i
j





6
4
4
(E) Adaptive Thresholding
-- Threshold values vary over the image as a
function of local image characteristics
(i) Divide image into strips (ii) Apply global threshold
method to each strip
6
5
。 P-tile Thresholding – The percentage of foreground
and background after segmentation is known a priori
e.g., In a printed text sheet,
we know that characters
of text cover 1/p of the
sheet area
。 Mode Method – Find local maxima; then detect
minima between them as thresholds
6.1.1 Threshold Detection Methods
6
6
6
。 Histogram Transformation – build a histogram with
a better peak-to-valley ratio
e.g., (a) Weight histogram in favor of pixels with
high image gradients
(b) Uses only high-gradient pixels to build the
histogram (unimodal)
。 Histogram concavity analysis method
。 Entropic method
。 Relaxation method
。 Multi-threshold
6
7
7
• Otsu’s threshold method
Describe the histogram as a probability
distribution by i i
p n
/
N

6.1.2 Optimal Thresholding
6
8
8
Let t be the determined threshold value
Define
Find t such that
2
( (
) (
)
)
m
a
x
{ }
,
(
)
(
)
a
t
N
m
t m
a
t
a
t
b
t

1
0 1
(
) , (
) ,
t L
i i
i it
a
t pb
t p

 

 
 
1
0
(
) (
) 1
L
i
i
a
t b
t p


  

0
(
) , :
i
m
a
g
e
s
i
z
e
t
a i
i
m
t ip
N



1
0
w
h
e
r
e ,
L
i
i
m i p


 

6
9
9
Histogram h
of an image
Fitting Gaussian
distributions
Fitted Gaussian
distributions
• MOG fitting method – approximate the histogram
of an image with a mixture of Gaussian
6
10
2 2
( )/
2
(
) , 1
,
2
k k
i
k
k
e
G
i k
 



 
1
12
2
(
) ,
f
i P
G
P
G


• Mixture of Gaussians
let v be the gray level corresponding to the
deepest valley of a histogram h
1
2
1
2
1
2
T
o
d
e
t
e
r
m
i
n
e
,
,
,
,
,
,
P
P




6
11
1
2
2 2
2
1
(
)
( )
L
iv
h
i i
N
 



  

2 2
2 2
2 2
2 1
( ) /2
L
i
i v
N
P
e
 


 



1
1 2
0
(
)
, (
)
v L
i iv
N h
i N h
i

 
 
 
 
1
1 2
0
1 2
1 1
(
)
, (
)
v L
i i
v
h
ii h
ii
N N
 

 
 
   
 
2
1 1
0
1
1
(
)
( )
,
v
i
h
i i
N
 


  

2 2
1 1
1 1
1
( ) /2
0
,
v
i
i
N
P
e
 

 



Compute
Compute the optimal threshold T by
2 21 12 2
1
22 22 22
1
2
12 2
1 12
1
1
( )2
( ) 2
l
n0
P
T T
P















 
6
12
12
6.1.3 Multi-Spectral Thresholding
e.g. Color
images
6
13
13
6.2 Edge-Based Segmentation
Problems: over-threshold, under-threshold
• Edge detection by edge magnitude thresholding
6
14
Let
Step 1: Smoothing and Edge detection
(a) Horizontal direction
(b) Vertical direction
(c) Edge magnitude
v v
E
I G



2
2
2
3
()
2
x
x
G
x e




 
,
h h
E
I G



2
2
2
1
() ,
2
x
G
x e 




:
I
n
p
u
t
i
m
a
g
e
,
I
2 2
h v
E E E
 
• Canny edge detector (See sec. 5.3.3)
6
15
Step 2: Non-maximum suppression
(a) For each pixel p,
(b) Quantize to
0, 45, 90 or 135 degs.
(c) Along
p is marked if its edge magnitude
is larger than both its two neighbors
p is deleted otherwise
1
t
a
n ( )
v
p
h
E
E
 

p

p
 
p
 
p
E
6
16
16
Problems: cluttered by noise
6
17
Step 3: Hysteresis thresholding
For each marked pixel p,
(a) If > or
(b) If and p is adjacent to
an edge pixel
p is considered as an edge pixel
H
t
p
E
L p H
t Et
 
6
18
18
6
19
9-19
6.2.6 Hough Transforms (HT)
Edge magnitude image Thresholding Thinning
6
20
9-20
○ Line equation: y = ax + b
A point on the line
Rewrite as
Another point on the line
Parameter space Accumulator array
0 0
( , )
x y 0 0
y a
x b
 
0 0
bx
ay
 
1 1
( , )
x y 1 1
bx
ay
 
6
21
9-21
○ Line equation: c
o
s s
i
n
s
x y

 
0 0 1 1
0 1 01 10
0 1 0 1
,
,
y a
x b y a
x b
y y xy x
y
a b
x x x x
   
 
 
 
○ Randomized HT
6
22
22
6
23
9-23
○ Circle equation: 2 22
( )
( )
x
ay
b
r




6
24
24
6
25
25
○ Generalized Hough Transform:
1. Select a reference point inside the sample
region
2. Construct a line starting at aiming region
border
3. Find the edge direction at the intersection
4. Construct a reference table (caller R-table)
Assume the shape, size and orientation of the
desired region are known
R
x
R
x
6
26
9-26
5. For each , compute potential
reference points by
()(, )
i i
j i j j
r
 

x
( c
o
s
, s
i
n
)
i i i i
j j j j
x
r y
r
 
 
(, )
R
x
y

x
R-Table
6
27
27
6
28
28
6.3 Region-based Segmentation
○ Splitting and Merging
1. Equally divide the input image into 4
sub-images;
2. Compute the characteristics of each
sub-image, e.g., intensity, color, texture etc;
3. Repeatedly divide sub-images into
sub-sub-images if their characteristics are
significantly different;
4. Repeatedly merge adjacent sub-images if
their characteristics are similar enough.
Steps:
6
29
Split
Merge
Different segmentations may result from region
splitting and region merging approaches.
6
30
30
6
31
31
6
32
Input Image Segmentation Region Boundary
6
33
33
6.3.4 Watershed Segmentation
Image data may
be interpreted as
a topographic
surface.
6
34
34
Idea: Catchment basin of the topographic surface are
homogeneous in the sense that all pixels belonging
to the same catchment basin are connected with the
basin’s region of minimum altitude by a simple path
of pixels that have monotonically decreasing altitude
along the path. Such catchment basins represent the
regions of the segmented image
Approach 1:
Steps: 1. Finding a downstream path from each pixel
to a local minimum of image surface altitude;
2. A catchment basin is defined as the set of
pixels for which their downstream paths all
end up in the same altitude minimum.
6
35
35
Approach 2 (Vincent and Soille, IEEE PAMI, 13(6), 1991):
Idea: The water fills all catchment basins. If two
basins are to merge, a dam is built all the
way to the highest surface altitude and the
dam represents the watershed line.
6
36
36
1. Sorting step:
i, Compute a histogram of the intensity image
ii, Create a list of pointers to pixels of each
intensity h
Algorithm 6.21
i, Every pixel having grey level <= k has been
assigned a catchment basin label.
ii, A pixel having grey level k+1 belongs to a label
l if at least one of its neighbors carries this label.
iii, Construct a geodesic influence zones for all
determined catchment basins.
2. Flooding step:
6
37
37
For basin , this is the locus of non-labeled pixels
of grey-level k+1 that are contiguous (via pixels of
intensity k+1) with the basin for which their
distances to is smaller than their distances to any
other
i
l
i
l

i
l
j
l
6
38
38
iv, (a) Pixels that belong to the influence zone of
catchment l are also labeled as l.
(b) Pixels that are on the boundary of influence
zones are marked as watershed.
(c) Pixels that can not be assigned an existing
label or watershed represent newly discovered
catchment basis are marked with new and
unique labels.
6
39
39
6
40
40
6.4. Matching
6
41
41
6.5. Evaluation Issues in Segmentation
6

More Related Content

Similar to segmentation ppt.pptx

Computer Graphics Unit 1
Computer Graphics Unit 1Computer Graphics Unit 1
Computer Graphics Unit 1aravindangc
 
05 histogram processing DIP
05 histogram processing DIP05 histogram processing DIP
05 histogram processing DIPbabak danyal
 
Image Texture Analysis
Image Texture AnalysisImage Texture Analysis
Image Texture Analysislalitxp
 
Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...
Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...
Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...atsidaev
 
Scale Invariant Feature Tranform
Scale Invariant Feature TranformScale Invariant Feature Tranform
Scale Invariant Feature TranformShanker Naik
 
Hierarchical matrix approximation of large covariance matrices
Hierarchical matrix approximation of large covariance matricesHierarchical matrix approximation of large covariance matrices
Hierarchical matrix approximation of large covariance matricesAlexander Litvinenko
 
DETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTDETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTAM Publications
 
2012 mdsp pr08 nonparametric approach
2012 mdsp pr08 nonparametric approach2012 mdsp pr08 nonparametric approach
2012 mdsp pr08 nonparametric approachnozomuhamada
 
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKSFACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKSijaia
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processingMohammed Kamel
 
改进的固定点图像复原算法_英文_阎雪飞
改进的固定点图像复原算法_英文_阎雪飞改进的固定点图像复原算法_英文_阎雪飞
改进的固定点图像复原算法_英文_阎雪飞alen yan
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptxshubham loni
 

Similar to segmentation ppt.pptx (20)

Computer Graphics Unit 1
Computer Graphics Unit 1Computer Graphics Unit 1
Computer Graphics Unit 1
 
05 histogram processing DIP
05 histogram processing DIP05 histogram processing DIP
05 histogram processing DIP
 
regions
regionsregions
regions
 
Image Texture Analysis
Image Texture AnalysisImage Texture Analysis
Image Texture Analysis
 
Lec12 review-part-i
Lec12 review-part-iLec12 review-part-i
Lec12 review-part-i
 
Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...
Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...
Optimal Scanning of Gaussian and Fractal Brownian Images with an Estimation o...
 
Scale Invariant Feature Tranform
Scale Invariant Feature TranformScale Invariant Feature Tranform
Scale Invariant Feature Tranform
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Hierarchical matrix approximation of large covariance matrices
Hierarchical matrix approximation of large covariance matricesHierarchical matrix approximation of large covariance matrices
Hierarchical matrix approximation of large covariance matrices
 
DETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTDETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECT
 
2012 mdsp pr08 nonparametric approach
2012 mdsp pr08 nonparametric approach2012 mdsp pr08 nonparametric approach
2012 mdsp pr08 nonparametric approach
 
Interactive High-Dimensional Visualization of Social Graphs
Interactive High-Dimensional Visualization of Social GraphsInteractive High-Dimensional Visualization of Social Graphs
Interactive High-Dimensional Visualization of Social Graphs
 
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKSFACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
 
Edge detection
Edge detectionEdge detection
Edge detection
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
 
Dip mcq1
Dip mcq1Dip mcq1
Dip mcq1
 
改进的固定点图像复原算法_英文_阎雪飞
改进的固定点图像复原算法_英文_阎雪飞改进的固定点图像复原算法_英文_阎雪飞
改进的固定点图像复原算法_英文_阎雪飞
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptx
 
Test
TestTest
Test
 

Recently uploaded

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

segmentation ppt.pptx

  • 1. 0 6.1. Thresholding 6.1.1 Threshold Detection Methods 6.1.2 Optimal Thresholding 6.1.3 Multi-Spectral Thresholding 6.2. Edge-based Segmentation 6.2.2 Edge Relaxation 6.2.3. Border Tracing 6.2.6 Hough Transforms 6.3. Region-based Segmentation 6.3.4. Watershed segmentation 6.4. Matching 6.5. Evaluation Issues in Segmentation Chapter 6 – Segmentation I 6
  • 2. 1 Objective: Divide an image into separate regions that are homogeneous wrt some properties, e.g., brightness, color, reflectivity, texture, proximity. ( i ) , ; ( i i ) , ; ( i i i ) i i j i R i R R i j R R         Categories of segmentation techniques: Thresholding, Edge-based, Region-based Mathematically, image segmentation = set partition Color Proximity 6
  • 3. 2 6.1 Thresholding 1 i f ( ,) ( ,) 0 o t h e r w i s e fij T g ij      (A) Global Thresholding – threshold T is determined from the whole image f, i.e., T = T(f) Input image High threshold Low threshold How to determine a threshold? 6
  • 4. 3 3 1 i f ( ,) ( ,) 0 o t h e r w i s e fij D g ij      D: a set of gray values (B) Band Thresholding (C) Multiple Thresholding 1 2 1 if ( , ) 2 if ( , ) ( , ) if ( , ) 0 otherw ise n f i j D f i j D g i j n f i j D                (D) Semi-thresholding ( ,)i f( ,) ( ,) 0 o t h e r w i s e f i j f i j T g i j      6
  • 5. 4 4 (E) Adaptive Thresholding -- Threshold values vary over the image as a function of local image characteristics (i) Divide image into strips (ii) Apply global threshold method to each strip 6
  • 6. 5 。 P-tile Thresholding – The percentage of foreground and background after segmentation is known a priori e.g., In a printed text sheet, we know that characters of text cover 1/p of the sheet area 。 Mode Method – Find local maxima; then detect minima between them as thresholds 6.1.1 Threshold Detection Methods 6
  • 7. 6 6 。 Histogram Transformation – build a histogram with a better peak-to-valley ratio e.g., (a) Weight histogram in favor of pixels with high image gradients (b) Uses only high-gradient pixels to build the histogram (unimodal) 。 Histogram concavity analysis method 。 Entropic method 。 Relaxation method 。 Multi-threshold 6
  • 8. 7 7 • Otsu’s threshold method Describe the histogram as a probability distribution by i i p n / N  6.1.2 Optimal Thresholding 6
  • 9. 8 8 Let t be the determined threshold value Define Find t such that 2 ( ( ) ( ) ) m a x { } , ( ) ( ) a t N m t m a t a t b t  1 0 1 ( ) , ( ) , t L i i i it a t pb t p         1 0 ( ) ( ) 1 L i i a t b t p       0 ( ) , : i m a g e s i z e t a i i m t ip N    1 0 w h e r e , L i i m i p      6
  • 10. 9 9 Histogram h of an image Fitting Gaussian distributions Fitted Gaussian distributions • MOG fitting method – approximate the histogram of an image with a mixture of Gaussian 6
  • 11. 10 2 2 ( )/ 2 ( ) , 1 , 2 k k i k k e G i k        1 12 2 ( ) , f i P G P G   • Mixture of Gaussians let v be the gray level corresponding to the deepest valley of a histogram h 1 2 1 2 1 2 T o d e t e r m i n e , , , , , , P P     6
  • 12. 11 1 2 2 2 2 1 ( ) ( ) L iv h i i N          2 2 2 2 2 2 2 1 ( ) /2 L i i v N P e          1 1 2 0 ( ) , ( ) v L i iv N h i N h i          1 1 2 0 1 2 1 1 ( ) , ( ) v L i i v h ii h ii N N              2 1 1 0 1 1 ( ) ( ) , v i h i i N         2 2 1 1 1 1 1 ( ) /2 0 , v i i N P e         Compute Compute the optimal threshold T by 2 21 12 2 1 22 22 22 1 2 12 2 1 12 1 1 ( )2 ( ) 2 l n0 P T T P                  6
  • 14. 13 13 6.2 Edge-Based Segmentation Problems: over-threshold, under-threshold • Edge detection by edge magnitude thresholding 6
  • 15. 14 Let Step 1: Smoothing and Edge detection (a) Horizontal direction (b) Vertical direction (c) Edge magnitude v v E I G    2 2 2 3 () 2 x x G x e       , h h E I G    2 2 2 1 () , 2 x G x e      : I n p u t i m a g e , I 2 2 h v E E E   • Canny edge detector (See sec. 5.3.3) 6
  • 16. 15 Step 2: Non-maximum suppression (a) For each pixel p, (b) Quantize to 0, 45, 90 or 135 degs. (c) Along p is marked if its edge magnitude is larger than both its two neighbors p is deleted otherwise 1 t a n ( ) v p h E E    p  p   p   p E 6
  • 18. 17 Step 3: Hysteresis thresholding For each marked pixel p, (a) If > or (b) If and p is adjacent to an edge pixel p is considered as an edge pixel H t p E L p H t Et   6
  • 20. 19 9-19 6.2.6 Hough Transforms (HT) Edge magnitude image Thresholding Thinning 6
  • 21. 20 9-20 ○ Line equation: y = ax + b A point on the line Rewrite as Another point on the line Parameter space Accumulator array 0 0 ( , ) x y 0 0 y a x b   0 0 bx ay   1 1 ( , ) x y 1 1 bx ay   6
  • 22. 21 9-21 ○ Line equation: c o s s i n s x y    0 0 1 1 0 1 01 10 0 1 0 1 , , y a x b y a x b y y xy x y a b x x x x           ○ Randomized HT 6
  • 24. 23 9-23 ○ Circle equation: 2 22 ( ) ( ) x ay b r     6
  • 26. 25 25 ○ Generalized Hough Transform: 1. Select a reference point inside the sample region 2. Construct a line starting at aiming region border 3. Find the edge direction at the intersection 4. Construct a reference table (caller R-table) Assume the shape, size and orientation of the desired region are known R x R x 6
  • 27. 26 9-26 5. For each , compute potential reference points by ()(, ) i i j i j j r    x ( c o s , s i n ) i i i i j j j j x r y r     (, ) R x y  x R-Table 6
  • 29. 28 28 6.3 Region-based Segmentation ○ Splitting and Merging 1. Equally divide the input image into 4 sub-images; 2. Compute the characteristics of each sub-image, e.g., intensity, color, texture etc; 3. Repeatedly divide sub-images into sub-sub-images if their characteristics are significantly different; 4. Repeatedly merge adjacent sub-images if their characteristics are similar enough. Steps: 6
  • 30. 29 Split Merge Different segmentations may result from region splitting and region merging approaches. 6
  • 33. 32 Input Image Segmentation Region Boundary 6
  • 34. 33 33 6.3.4 Watershed Segmentation Image data may be interpreted as a topographic surface. 6
  • 35. 34 34 Idea: Catchment basin of the topographic surface are homogeneous in the sense that all pixels belonging to the same catchment basin are connected with the basin’s region of minimum altitude by a simple path of pixels that have monotonically decreasing altitude along the path. Such catchment basins represent the regions of the segmented image Approach 1: Steps: 1. Finding a downstream path from each pixel to a local minimum of image surface altitude; 2. A catchment basin is defined as the set of pixels for which their downstream paths all end up in the same altitude minimum. 6
  • 36. 35 35 Approach 2 (Vincent and Soille, IEEE PAMI, 13(6), 1991): Idea: The water fills all catchment basins. If two basins are to merge, a dam is built all the way to the highest surface altitude and the dam represents the watershed line. 6
  • 37. 36 36 1. Sorting step: i, Compute a histogram of the intensity image ii, Create a list of pointers to pixels of each intensity h Algorithm 6.21 i, Every pixel having grey level <= k has been assigned a catchment basin label. ii, A pixel having grey level k+1 belongs to a label l if at least one of its neighbors carries this label. iii, Construct a geodesic influence zones for all determined catchment basins. 2. Flooding step: 6
  • 38. 37 37 For basin , this is the locus of non-labeled pixels of grey-level k+1 that are contiguous (via pixels of intensity k+1) with the basin for which their distances to is smaller than their distances to any other i l i l  i l j l 6
  • 39. 38 38 iv, (a) Pixels that belong to the influence zone of catchment l are also labeled as l. (b) Pixels that are on the boundary of influence zones are marked as watershed. (c) Pixels that can not be assigned an existing label or watershed represent newly discovered catchment basis are marked with new and unique labels. 6
  • 42. 41 41 6.5. Evaluation Issues in Segmentation 6