IPMV Module 4.Pptx
IPMV Module 4.Pptx
IMAGE SEGMENTATION
4.1 Point, Line, and Edge Detection: Detection of Isolated Points, Line
detection, edge models, Canny's edge detection algorithm , Edge linking :
Local processing and boundary detection using regional processing (polygonal
fitting)
4.2 Thresholding : Foundation, Role of illumination and reflectance, Basic
global thresholding
4.3 Region Based segmentation: Region Growing, Region Splitting and merging
Introduction to image segmentation
Discontinuity Similarity
e.g. e.g.
- Point Detection - Thresholding
9
• Example 2
• Segmentation based on texture
• Enables object surfaces with varying patterns of
grey to be segmented
10
• Example 3
• Segmentation based on motion
• The main difficulty of motion segmentation is that
an intermediate step is required to (either implicitly
or explicitly) estimate an optical flow field
• The segmentation must be based on this estimate
and not, in general, the true flow
11
Motion based image segmentation
12
• Example 3
• Segmentation based on depth
• This example shows a range image, obtained with
a laser range finder
• A segmentation based on the range (the object
distance from the sensor) is useful in guiding
mobile robots
13
Range image
Original
image
Segmented
image
14
Background First-order derivatives
generally produces thicker
edges in an image.
Second order derivatives
have a stronger response to
fine details such as thin
lines, isolated points and
noise
second order- produce a
double edge response at
ramp and step transitions in
intensity.
The sign of .the 2nd order
derivative can be used to
determine whether
transition is from light to
dark or vice versa
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.
Detection of Discontinuities
Isolated Point Detection
Point Detection (cont…)
T equal to 90% of the highest absolute pixel of
the image in middle figure
Prewitt operators
Sobel operators
Detection of Discontinuities
Gradient Operators
Sobel gradient
X
Marr and Hildreth Edge Operator
Zero Crossings
Quality of an Edge Detector
• Robustness to Noise
• Localization
• Too Many/Too less Responses True Edge
In this example,
we can find the
license plate
candidate after
edge linking
process.
Edge Linking the Hough Transform
• Hough transform: a way of finding edge points in an image that lie
along a straight line.
• Example: xy-plane v.s. ab-plane (parameter space)
Edge Linking and Boundary Detection
Global Processing via the Hough Transform
2,3,4
1,4
Edge Linking and Boundary Detection
Hough Transform Example
How can we divide an image into uniform regions
?
Foundation:
Thresholding
• In A: light objects in dark background
• To extract the objects
• Select a T that separates the objects from the
background
• i.e. any (x,y) for which f(x,y)>T is an object point.
⚫ A thresholded image:
(objects)
(background)
• T- constant----- global thresholding
• T- variable ----- variable thresholding
Thresholding
(multilevel thresholding)
⚫ So: (x,y) belongs:
⚫ To one object class if T1<f(x,y)≤T2
⚫ To the other if f(x,y)>T2
⚫ To the background if f(x,y)≤T1
A) classic bi-modal intensity distribution. -- successfully segmented
using a single threshold T1.
B) slightly more complicated- the central peak represents the
objects we are interested in and so threshold segmentation requires
two thresholds: T1 and T2.
C) the two peaks of a bi-modal distribution have run together and so
it is almost certainly not possible to successfully segment this image
using a single global threshold
Thresholding
⚫ Success of intensity thresholding is directly related to width
and depth of valley separating the histogram modes
• Then, for any image f(x,y) = i(x,y) r(x,y), divide by g(x,y). This
yields:
So:
if r(x,y) can be segmented by using a single threshold
T, then h(x,y) can also be segmented by using a single
threshold of value T/k.
Illumination and reflection role in thresholding
Due to the severe illumination gradient across the scene, the peaks
corresponding to foreground and background have run together and
so simple thresholding does not give good results. Following images
show the resulting bad segmentations for single threshold values of
80 and 120 respectively (reasonable results can be achieved by using
adaptive thresholding on this image).
Basic
An algorithm usedGlobal
to obtainThresholding
T
automatically for global thresholding
92
• Consider a seed pixel of 2 in the given image and a threshold value of 3, if a pixel has a
value greater than 3 then it will be considered inside the seed pixel region. Otherwise, it
will be considered in another region. Hence 2 regions are formed in the following image
based on a threshold value of 3.
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.
Region Splitting
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.
Numerical
Question: Apply Region Splitting And Merging Algorithm To The
Following Image And Show The Resulting Quad Tree. Predicate to be
used is “ all pixels in a region should have the same grey value.
• Apply region splitting on following image . Assume the threshold
value <=3.
5 6 4 7 4 5 5 3
6 7 7 6 3 3 2 1
6 6 4 4 3 2 5 6
4 5 4 5 4 6 2 3
3 2 3 0 7 5 3 2
1 0 1 0 2 2 6 5
1 0 1 1 3 0 4 4
0 2 1 0 2 3 5 4
• segment the following image using region split and merge
technique. Draw quad tree representation for the corresponding
segmentation.
Results – Region grow
Results – Region Split
Results – Region Split and Merge