(Department For Technology Enhanced Learning) : Teaching Innovation - Entrepreneurial - Global
(Department For Technology Enhanced Learning) : Teaching Innovation - Entrepreneurial - Global
(Department For Technology Enhanced Learning) : Teaching Innovation - Entrepreneurial - Global
c
c
c
c
=
(
= V
y
f
x
f
G
G
y
x
f
2
1
2
2
2
1
2 2
] [ ) f (
(
(
|
|
.
|
\
|
c
c
+
|
.
|
\
|
c
c
=
+ = V = V
y
f
x
f
G G mag f
y x
the magnitude becomes nonlinear
y x
G G f + ~ V
commonly approx.
LECTURE 3:- Detection of Discontinuities
DTEL
50
51
Gradient Masks
LECTURE 3:- Detection of Discontinuities
DTEL
51
52
Diagonal edges with Prewitt
and Sobel masks
LECTURE 3:- Detection of Discontinuities
DTEL
52
53
Example
54
Example
LECTURE 3:- Detection of Discontinuities
DTEL
54
55
Example
LECTURE 3:- Detection of Discontinuities
DTEL
55
56
Laplacian
2
2
2
2
2
) , ( ) , (
y
y x f
x
y x f
f
c
c
+
c
c
= V (linear operator)
Laplacian operator
)] , ( 4 ) 1 , ( ) 1 , (
) , 1 ( ) , 1 ( [
2
y x f y x f y x f
y x f y x f f
+ + +
+ + = V
LECTURE 3:- Detection of Discontinuities
DTEL
56
57
Laplacian of Gaussian
Laplacian combined with smoothing to find
edges via zero-crossing.
2
2
2
) (
o
r
e r h
=
where r
2
= x
2
+y
2
, and
o is the standard deviation
2
2
2
4
2 2
2
) (
o
o
o
r
e
r
r h
(
= V
LECTURE 3:- Detection of Discontinuities
DTEL
57
58
Mexican hat
the coefficient must be sum to zero
positive central term
surrounded by an adjacent negative region (a function of distance)
zero outer region
LECTURE 3:- Detection of Discontinuities
DTEL
58
59
Linear Operation
second derivation is a linear operation
thus, V
2
f is the same as convolving the
image with Gaussian smoothing function
first and then computing the Laplacian of
the result
LECTURE 3:- Detection of Discontinuities
DTEL
59
60
Example
a). Original image
b). Sobel Gradient
c). Spatial Gaussian
smoothing function
d). Laplacian mask
e). LoG
f). Threshold LoG
g). Zero crossing
LECTURE 3:- Detection of Discontinuities
DTEL
60
61
Zero crossing & LoG
Approximate the zero crossing from LoG
image
to threshold the LoG image by setting all its
positive values to white and all negative
values to black.
the zero crossing occur between positive
and negative values of the thresholded LoG.
LECTURE 3:- Detection of Discontinuities
DTEL
61
DTEL
62
THANK YOU
LECTURE 3:- Detection of Discontinuities
LECTURE 4:- Edge Linking
DTEL
63
63
Edge linking and
boundary detection
64
Edge linking and boundary detection
Ideally, edge detecting methods should yield
pixels lying only on edges.
In practice, edge should not be complete
because of noise, nonuniform illumination,
and other effects.
Linking procedures assemble edge pixels
into meaningful edges.
LECTURE 4:- Edge Linking
DTEL
64
65
Local processing
Two factors:
the strength of the gradient operators
the direction of the gradient operators
Small analysis window
33 or 55
Two equations
A y x y x
E y x f y x f
<
s V V
) , ( ) , (
) , ( ) , (
0 0
0 0
o o
LECTURE 4:- Edge Linking
DTEL
65
66
Local processing
LECTURE 4:- Edge Linking
DTEL
66
67
Global processing via the Hough transform
Given n points in an image, suppose that we
want to find subsets of these points that lie
on straight lines.
Hough transform: xy-plane to ab-plane
LECTURE 4:- Edge Linking
DTEL
67
68
Global processing via the Hough transform
Subdividing the parameter space (ab-plane)
into accumulator cells.
Accumulator value A(i, j).
A(p, q) = A(p, q) +1
LECTURE 4:- Edge Linking
DTEL
68
69
Global processing via the Hough transform
Normal representation of a line
u u = + sin cos y x
LECTURE 4:- Edge Linking
DTEL
69
70
Global processing via the Hough transform
LECTURE 4:- Edge Linking
DTEL
70
71
Global processing via the Hough transform
LECTURE 4:- Edge Linking
DTEL
71
DTEL
72
THANK YOU
LECTURE 4:- Edge Linking
LECTURE 5:- Thresholding
DTEL
73
73
Basic global
thresholding and
Adaptive thresholding
74
Thresholding
image with dark
background and
a light object
image with dark
background and
two light objects
LECTURE 5:- Thresholding
DTEL
74
75
Multilevel thresholding
a point (x,y) belongs to
to an object class if T
1
< f(x,y) s T
2
to another object class if f(x,y) > T
2
to background if f(x,y) s T
1
T depends on
only f(x,y) : only on gray-level values Global
threshold
both f(x,y) and p(x,y) : on gray-level values and its
neighbors Local threshold
LECTURE 5:- Thresholding
DTEL
75
76
The Role of Illumination
f(x,y) = i(x,y) r(x,y)
a). computer generated
reflectance function
b). histogram of reflectance
function
c). computer generated
illumination function (poor)
d). product of a). and c).
e). histogram of product image
easily use global thresholding
object and background are separated
difficult to segment
LECTURE 5:- Thresholding
DTEL
76
77
Basic Global Thresholding
generate binary image
use T midway between the
max and min gray levels
LECTURE 5:- Thresholding
DTEL
77
78
Basic Global Thresholding
based on visual inspection of histogram
1. Select an initial estimate for T.
2. Segment the image using T. This will produce two groups
of pixels: G
1
consisting of all pixels with gray level values >
T and G
2
consisting of pixels with gray level values s T
3. Compute the average gray level values
1
and
2
for the
pixels in regions G
1
and G
2
4. Compute a new threshold value
5. T = 0.5 (
1
+
2
)
6. Repeat steps 2 through 4 until the difference in T in
successive iterations is smaller than a predefined
parameter T
o
.
LECTURE 5:- Thresholding
DTEL
78
79
Example: Heuristic method
note: the clear valley of the
histogram and the effective
of the segmentation
between object and
background
T
0
= 0
3 iterations
with result T = 125
LECTURE 5:- Thresholding
DTEL
79
80
Basic Adaptive Thresholding
subdivide original image into small areas.
utilize a different threshold to segment each
subimages.
since the threshold used for each pixel
depends on the location of the pixel in terms
of the subimages, this type of thresholding
is adaptive.
LECTURE 5:- Thresholding
DTEL
80
81
Example : Adaptive Thresholding
LECTURE 5:- Thresholding
DTEL
81
82
Further subdivision
a). Properly and improperly
segmented subimages from previous
example
b)-c). corresponding histograms
d). further subdivision of the
improperly segmented subimage.
e). histogram of small subimage at
top
f). result of adaptively segmenting d).
LECTURE 5:- Thresholding
DTEL
82
DTEL
83
THANK YOU
LECTURE 5:- THRESHOLDING
LECTURE 6:- REGION ORIENTED SEGMENTATION
DTEL
Region Growing and
Split / Merge algorithms
84
84
Bahadir K. Gunturk EE 7730 - Image Analysis I 85
Region-Oriented Segmentation
Region Growing
Region growing is a procedure that groups pixels or
subregions into larger regions.
The simplest of these approaches is pixel aggregation, which
starts with a set of seed points and from these grows
regions by appending to each seed points those neighboring
pixels that have similar properties (such as gray level, texture,
color, shape).
Region growing based techniques are better than the edge-
based techniques in noisy images where edges are difficult to
detect.
LECTURE 6:- REGION ORIENTED SEGMENTATION
DTEL
85
Bahadir K. Gunturk EE 7730 - Image Analysis I 86
Region-Oriented Segmentation
LECTURE 6:- REGION ORIENTED SEGMENTATION
DTEL
86
Bahadir K. Gunturk EE 7730 - Image Analysis I 87
Region-Oriented Segmentation
LECTURE 6:- REGION ORIENTED SEGMENTATION
DTEL
87
Bahadir K. Gunturk EE 7730 - Image Analysis I 88
Region-Oriented Segmentation
Region Splitting
Region growing starts from a set of seed points.
An alternative is to start with the whole image as a single
region and subdivide the regions that do not satisfy a
condition of homogeneity.
Region Merging
Region merging is the opposite of region splitting.
Start with small regions (e.g. 2x2 or 4x4 regions) and merge
the regions that have similar characteristics (such as gray
level, variance).
Typically, splitting and merging approaches are used
iteratively.
LECTURE 6:- REGION ORIENTED SEGMENTATION
DTEL
88
Bahadir K. Gunturk EE 7730 - Image Analysis I 89
Region-Oriented Segmentation
LECTURE 6:- REGION ORIENTED SEGMENTATION
DTEL
89
DTEL
90
THANK YOU
LECTURE 6:- REGION ORIENTED SEGMENTATION
DTEL
References Books:
1. Digital Image Processing, by R.C. Gonzalez &
R.E. Woods, 2nd edition, Addison
Wesley/Pearson education publication 2002.
2. Fundamentals of Digital Image processing by
A. K. Jain, PHI publication, 2nd edition
91
References Web: