Lecture 7 Segmentation
Lecture 7 Segmentation
Chapter: 10
Image Segmentation:
Thresholding
2
of
20
Contents
So far we have been considering image
processing techniques used to transform
images for human interpretation
Today we will begin looking at automated
image analysis by examining the thorny issue
of image segmentation:
– The segmentation problem
– Finding points, lines and edges
3
of
20
The Segmentation Problem
Segmentation attempts to partition the pixels
of an image into groups that strongly
correlate with the objects in an image
Typically the first step in any automated
computer vision application
The Segmentation Problem-2
Discontinuity:
- We assume that boundaries of
regions are different from each-other
- e.g. Edge-based segmentation
Similarity:
- Partitioning into regions that are
similar to each-other
- e.g. Region-based segmentation
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
4
of
20
Segmentation Examples
5
of
20
Detection Of Discontinuities
There are three basic types of grey level
discontinuities that we tend to look for in
digital images:
– Points
– Lines
– Edges
We typically find discontinuities using masks
and correlation
6
of
20
Point Detection
Point detection can be achieved simply
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
-This mask will give the high response to the object that has the
similar shape as the mask such as isolated points.
detect lines
The masks below will extract lines that are
one pixel thick and running in a particular
direction
9
of
20
Line Detection (cont…)
Binary image of a wire
bond mask
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
After
Result of
processing
thresholding
with -45° line
filtering result
detector
10
of
20
Edge Detection
An edge is a set of connected pixels that lie
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
15
20
Edge Detection Example
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
16
20
Edge Detection Example
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
17
20
Edge Detection Example
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
18
20
Edge Detection Example
19
of
20
Edge Detection Problems
Often, problems arise in edge detection in
that there are too much detail
For example, the brickwork in the previous
example
One way to overcome this is to smooth
images prior to edge detection
20
of
Edge Detection Example With
20 Smoothing
Original Image Horizontal Gradient Component
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
23
20
Laplacian Of Gaussian Example
24
of
20
Summary
In this lecture we have begun looking at
segmentation, and in particular edge detection
Edge detection is massively important as it is
in many cases the first step to object
recognition
25
of
20
Contents
Today we will continue to look at the problem
of segmentation, this time though in terms
of thresholding
In particular we will look at:
– What is thresholding?
– Simple thresholding
– Adaptive thresholding
26
of
20
Thresholding
Thresholding is usually the first step in any
segmentation approach
We have talked about simple single value
thresholding already
Single value thresholding can be given
mathematically as follows:
1if f (x, y) T
g(x, y)
0 if f (x, y) T
27
of
20
Thresholding Example
Imagine a poker playing robot that needs to
visually interpret the cards in its hand
of
32
20
Thresholding Example 1
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
33
20
Thresholding Example 2
34
of
Problems With Single Value
20 Thresholding
Single value thresholding only works for
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
bimodal histograms
Images with other kinds of histograms need
more than a single threshold
35
of
Problems With Single Value
20 Thresholding (cont…)
Let’s say we want to
Images taken from Gonzalez & Woods, Digital Image Processing (2002)