Advanced Image Segmentation Techniques
Advanced Image Segmentation Techniques
Edge Detection
Mar-Hildreth Edge Detection
Canny Edge Detection
Advanced Techniques for Edge
Detection
The Marr-Hildreth edge detector
x2 y 2
G ( x, y ) e 2 2
, : space constant.
Laplacian of Gaussian (LoG)
2
G ( x , y ) 2
G ( x, y )
2 G ( x, y )
x 2 y 2
x 2 2 y x y2
2 2 2 2
x y
2e 2 e 2
x y
x2 y 2 x2 y 2
x 2
1 y 1
2
4 2 e 2 2
4 2 e 2 2
x2 y 2
x y
2 2 2
e 2 2
4
08/27/2021 2
08/27/2021 3
Marr-Hildreth Algorithm
g ( x, y ) G ( x, y ) f ( x, y )
2
08/27/2021 4
08/27/2021 5
Quiz Qn : 1
Need for advanced Edge Detection
Techniques?
1st and second derivatives are more sensitive
08/27/2021 6
Quiz Qn : 2
Intensity changes are independent of image
scale. Yes or No?
Answer : NO
08/27/2021 7
Quiz Qn : 3
What are the two salient features of an edge
detection operator?
Should be a differential operator
Should be capable of being tuned to act at
08/27/2021 8
Quiz Qn : 4
Large operators are used to detect blurry
edges and small operators are used to detect
sharply focussed fine details. Yes or No?
Answer : YES
08/27/2021 9
Quiz Qn : 5
What is the operator which satisifes the two
salient features of an edge detection
operator?
ANS:
It is called as _____
Ans: Laplacian of Gaussion (LoG)
It is also called as _______
Ans: Mexican hat operator
08/27/2021 10
Quiz Qn : 6
What are two fundamental ideas in selecting
the LoG operator?
ANS:
G – blurs the image so that the noise content
is reduced
- isotropic operator
What is an isotropic operator?
Ans: Invariant to rotation
08/27/2021 11
Quiz Qn : 7
What is invariant to rotation?
Not only responds equally to changes in
08/27/2021 12
Quiz Qn : 8
What is the size of the Gaussian Filter with
respect to σ ?
08/27/2021 13
The Canny Edge Detector
Optimal for step edges corrupted by white noise.
08/27/2021 14
The Canny Edge Detector: Algorithm (1)
08/27/2021 15
The Canny Edge Detector: Algorithm(2)
Compute the gradient magnitude and direction (angle):
M ( x, y ) g x 2 g y 2
and
( x, y ) arctan( g y / g x )
where g x f s / x and g y f s / y
08/27/2021 16
The Canny Edge Detector: Algorithm(3)
08/27/2021 17
08/27/2021 18
The Canny Edge Detector: Algorithm(4)
Hysteresis thresholding:
g NH ( x, y ) g N ( x, y ) TH
g NL ( x, y ) g N ( x, y ) TL
and
g NL ( x, y ) g NL ( x, y ) g NH ( x, y )
08/27/2021 19
The Canny Edge Detector: Algorithm(5)
Depending on the value of TH , the edges in g NH ( x, y )
typically have gaps. Longer edges are formed using
the following procedure:
(a). Locate the next unvisited edge pixel, p, in g NH ( x, y ).
(b). Mark as valid edge pixel all the weak pixels in g NL ( x, y )
that are connected to p using 8-connectivity.
(c). If all nonzero pixel in g NH ( x, y ) have been visited go to
step (d), esle return to (a).
(d). Set to zero all pixels in g NL ( x, y ) that were not marked as
valid edge pixels.
08/27/2021 20
The Canny Edge Detection: Summary
Smooth the input image with a Gaussian filter
08/27/2021 21
TL 0.04; TH 0.10; 4 and a mask of size 25 25
08/27/2021 22
TL 0.05; TH 0.15; 2 and a mask of size 13 13
08/27/2021 23
08/27/2021 24
08/27/2021 25
Region Based
Segmentation
Example 1: Regions
27
Example 2:
Straight Lines
28
Example 3:
Lines and Circular Arcs
29
Region Segmentation:
Segmentation Criteria
30
So
31
•IMAGE SEGMENTATION TECHNIQUES
32
WHAT IT IS USEFUL FOR
After a successful segmenting the image, the contours of
objects can be extracted using edge detection and/or
border following techniques.
33
CATEGORIES OF SEGMENTATION TECHNIQUES
◦ EDGE-BASE SEGMENTATION
◦ REGION-BASED SEGMENTATION
34
Detecting Discontinuity :
◦ It means to partition an image based on abrupt changes
in intensity
35
EDGE-BASED SEGMENTATION
Segmentation Methods based on Discontinuity
It finds for abrupt changes in the intensity value.
These methods are called as Edge or Boundary
based methods.
36
EDGE-BASED SEGMENTATION
Image segmentation methods for detecting discontinuities
are boundary based methods.
37
REGION-BASED SEGMENTATION
Region based methods are based on continuity.
These techniques divide the entire image into
sub regions depending on some rules like all the
pixels in one region must have the same gray
level.
Region-based techniques rely on common
39
SEGMENTATIONALGORITHMS BASEDON REGION
MAINLY INCLUDE FOLLOWING METHODS:
Region Growing
40
SEGMENTATIONALGORITHMS BASEDON REGION
MAINLY INCLUDE FOLLOWING METHODS:
Region Growing
41
SEGMENTATIONALGORITHMS BASEDON REGION
1. Region Growing
43
Edge Linking and Boundary Detection
Edge detection typically is followed by linking
algorithms designed to assemble edge pixels into
meaningful edges and/or region boundaries
08/27/2021 44
Local Processing
Analyze the characteristics of pixels in a small
neighborhood about every point (x,y) that has been
declared an edge point
08/27/2021 45
Local Processing
08/27/2021 46
Local Processing: Steps (1)
1 if M ( x, y ) TM and ( x, y ) A TA
g ( x, y )
0 otherwise
TM : threshold A : specified angle direction
TA : a "band" of acceptable directions about A
08/27/2021 47
Local Processing: Steps (2)
08/27/2021 48
08/27/2021 49
Regional Processing
The location of regions of interest in an image are
known or can be determined
08/27/2021 50
08/27/2021 51
Regional Processing: Steps
08/27/2021 52
Regional Processing: Steps
Let xy and mxy denote the standard deviation and mean value
of the set of pixels contained in a neighborhood S xy , centered
at coordinates (x, y ) in an image. The local thresholds,
Txy a xy bmxy
If the background is nearly constant,
Txy a xy bm
1 if f ( x, y ) Txy
g ( x, y )
0 if f ( x, y ) Txy
08/27/2021 57
Region-Based Segmentation
Region Growing
08/27/2021 58
Region-Based Segmentation
08/27/2021 59
Region Growing based on 8-connectivity
1. Find all connected components in S ( x, y) and erode each
connected components to one pixel; label all such pixels
found as 1. All other pixels in S are labeled 0.
2. Form an image fQ such that, at a pair of coordinates (x,y),
let fQ ( x, y ) 1 if the Q is satisfied otherwise f Q ( x, y ) 0.
3. Let g be an image formed by appending to each seed point
in S all the 1-value points in f Q that are 8-connected to that
seed point.
4. Label each connencted component in g with a different region
label. This is the segmented image obtained by region growing.
08/27/2021 60
TRUE if the absolute difference of the intensities
Q between the seed and the pixel at (x,y) is T
FALSE otherwise
08/27/2021 61
08/27/2021 62
4-connectivity
08/27/2021 63
8-connectivity
08/27/2021 64
08/27/2021 65
08/27/2021 66
Region Splitting and Merging
R : entire image Ri :entire image Q: predicate
08/27/2021 67
08/27/2021 68
08/27/2021 69
TRUE if a and 0 m b
Q
FALSE otherwise
08/27/2021 70
END