2. Topic’s to be covered
Introduction to Image analysis and segmentation
Detection of Discontinuity
Point, line, edge and combined detection..
Edge linking and boundary detection
Local processing, hough transform, graph-theoretic
technique..
Thresholding
Global thresholding, Optimal thresholding, threshold
selection..
Region oriented segmentation
Region growing, Region splitting and merging..
3. Introduction
Image analysis:-
Techniques for extracting information from an
image.
Segmentation is the first step for image analysis.
Segmentation is used to subdivide an image into its
constituent parts or objects.
This step determines the eventual success or failure
of image analysis.
4. Introduction
Generally, the segmentation is carried out only up to
the objects of interest are isolated. e..g. face
detection.
The goal of segmentation is to simplify and/or
change the representation of an image into
something that is more meaningful and easier to
analyze.
5. 5
Image Segmentation - 1
Extracting information form an image
Step 1: segment the image ->objects or regions
Step 2 : describe and represent the segmented
regions in a form suitable for computer
processing
Step 3 : image recognition and interpretation
Image analysis – HLIP
6. Image Segmentation
Segmentation divides an image into its constituent
regions or objects.
Segmentation of images is a difficult task in image
processing. Still under research.
Segmentation allows to extract objects in images.
Segmentation is unsupervised learning.
Model based object extraction, e.g., template
matching, is supervised learning.
7. Classification of the Segmentation
techniques
Image
Segmentation
Discontinuity Similarity
e.g.
- Point Detection
- Line Detection
- Edge Detection
e.g.
- Thresholding
- Region Growing
- Region splitting &
merging
8. Detection of Discontinuities
There are three kinds of discontinuities of intensity:
points, lines and edges.
The most common way to look for discontinuities is to
scan a small mask over the image. The mask determines
which kind of discontinuity to look for.
9
1
9
9
2
2
1
1 ...
i
i
i z
w
z
w
z
w
z
w
R
9. Point Detection
Based on Masking…
Find response R.
The emphasis is strictly to detect points. That is,
differences those are large enough to be considered as
isolated points.
So, compare and separate based on
Where R = Response of convolution
T = Non negative threshold value
-1
-1
8 -1
-1
-1 -1
-1 -1
R T
11. Line Detection
Only slightly more common than point detection is to find
a one pixel wide line in an image.
For digital images the only three point straight lines are
only horizontal, vertical, or diagonal (+ or –45).
14. Edge detection
Edge detection is an image processing technique
for finding the boundaries of objects within images. It
works by detecting discontinuities in brightness.
Edge detection is used for image segmentation and
data extraction in areas such as image processing,
computer vision, and machine vision.
15. 15
Definition
An edge is a set of connected pixels that lie on the
boundary between two regions
The difference between edge and boundary, pp.68
Edge detection steps
Compute the local derivative
Magnitude of the 1st derivative can be used to detect
the presence of an edge
The sign of the 2nd derivative can be used to
determine whether an edge pixel lies on the dark or
light side of an image
Zero crossing of the 2nd derivative is at the midpoint of
a transition in gray level, which provides a powerful
approach for locating the edge.
Edge detection
18. 18
Use gradient for image differentiation
The gradient of an image f(x,y) at point (x,y) is
defined as
Some properties about this gradient vector
It points in the direction of maximum rate of change of image at (x,y)
Magnitude
angle
Gradient operators
T
y
x
y
f
x
f
G
G
f
x
y
y
x
y
x
G
G
y
x
G
G
G
G
f
mag
1
2
2
tan
)
,
(
)
(
23. 23
A second order
derivative
Problems
Very sensitive to noise
Detect double edges
Can’t detect edge
direction
Usage
Find the location of
edge using zero-
crossing property
2
2
2
2
2
y
f
x
f
f
Laplacian edge operator
24. 24
Edge detection by gradient operations tends to
work well when
Images have sharp intensity transitions
Relative low noise
Zero-crossing approach work well when
Edges are blurry
High noise content
Provide reliable edge detection
discussion
29. Edge Linking and Boundary Detection
Local Processing
Two properties of edge points are useful for edge linking:
the strength (or magnitude) of the detected edge points
their directions (determined from gradient directions)
This is usually done in local neighborhoods.
Adjacent edge points with similar magnitude and
direction are linked.
For example, an edge pixel with coordinates (x0,y0) in a
predefined neighborhood of (x,y) is similar to the pixel at
(x,y) if
threshold
e
nonnegativ
a
:
,
)
,
(
)
,
( 0
0 E
E
y
x
y
x
f
threshold
angle
nonegative
a
:
,
)
,
(
)
,
( 0
0 A
A
y
x
y
x
30. Edge Linking and Boundary Detection
Intensity discontinuity can be utilized to find
boundary.
The lagging part of boundary detection using
intensity discontinuity is that the boundary may not
be completely defined because of
Noise
Breaks in boundary due to non-uniform illumination
So, after edge detection, edge linking process is
carried out to assemble edge pixels into meaningful
boundary
32. 1) Edge Linking – Local Processing
Analyze every pixel in small neighborhood that has
undergone edge detection.
For same characteristics (point is on same edge or
not), two principal properties used are
Strength of response of the gradient operator
The direction of gradient.
( , ) ( ', ')
f x y f x y T
( , ) ( ', ')
x y x y A
33. Thresholding
Assumption: the range of intensity levels covered by
objects of interest is different from the background.
Single threshold Multiple threshold
T
y
x
f
T
y
x
f
y
x
g
)
,
(
if
0
)
,
(
if
1
)
,
(
34. Thresholding
Thresholding can be viewed as an operation that
involves tests against a function T of the form:
)]
,
(
),
,
(
,
,
[ y
x
f
y
x
p
y
x
T
T
where p(x,y) denotes
some local property of this point.
35. Thresholding
When T depends only on f(x,y)
global threshold
When T depends on both f(x,y) and p(x,y)
local threshold
When T depends on x and y (in addition)
dynamic threshold
43. Thresholding
Optimal Global and Adaptive Thresholding
This method treats pixel values as probability density
functions.
The goal of this method is to minimize the probability of
misclassifying pixels as either object or background.
There are two kinds of error:
mislabeling an object pixel as background, and
mislabeling a background pixel as object.
46. Region-Based Segmentation
Edges and thresholds sometimes do not give
good results for segmentation.
Region-based segmentation is based on the
connectivity of similar pixels in a region.
Each region must be uniform.
Connectivity of the pixels within the region is very
important.
There are two main approaches to region-based
segmentation: region growing and region
splitting.
47. Region-Based Segmentation
Basic Formulation
Let R represent the entire image region.
Segmentation is a process that partitions R into
subregions, R1,R2,…,Rn, such that
where P(Rk): a logical predicate defined over the points in
set Rk
For example: P(Rk)=TRUE if all pixels in Rk have the same
R
Ri
n
i
1
(a)
j
i
j
i
R
R j
i
,
and
all
for
(c)
n
i
Ri ,...,
2
,
1
region,
connected
a
is
(b)
n
i
R
P i ,...,
2
,
1
for
TRUE
)
(
(d)
j
i
j
i R
R
R
R
P and
regions
adjacent
any
for
FALSE
)
(
(e)
49. Region-Based Segmentation
Region Growing
Fig. 10.41 shows the histogram of Fig. 10.40 (a). It is
difficult to segment the defects by thresholding methods.
(Applying region growing methods are better in this case.)
Figure 10.41
Figure 10.40(a)
50. Region-Based Segmentation
Region Splitting and Merging
Region splitting is the opposite of region growing.
First there is a large region (possible the entire image).
Then a predicate (measurement) is used to determine
if the region is uniform.
If not, then the method requires that the region be split
into two regions.
Then each of these two regions is independently tested
by the predicate (measurement).
This procedure continues until all resulting regions are
uniform.
51. Region-Based Segmentation
Region Splitting
The main problem with region splitting is determining
where to split a region.
One method to divide a region is to use a quadtree
structure.
Quadtree: a tree in which nodes have exactly four
descendants.
52. Region-Based Segmentation
Region Splitting and Merging
The split and merge procedure:
Split into four disjoint quadrants any region Ri for which
P(Ri) = FALSE.
Merge any adjacent regions Rj and Rk for which
P(RjURk) = TRUE. (the quadtree structure may not be
preserved)
Stop when no further merging or splitting is possible.