Chapter7 IPPR
Chapter7 IPPR
Introduction
Image Segmentation refers to the decomposition or partition of an image into meaningful
regions.
Segmentation subdivides an image into its constituent regions or objects.
Most of the image analysis algorithms perform segmentation as a first step towards
producing the description.
Applications => Identifying objects in a moving scene for object-based video compression
(MPEG4), Identifying objects which are at different distances from a sensor using dept
measurements from a laser range finder enabling path planning for a mobile robots (Stereo
Vision).
Image segmentation algorithms are based on two basic properties of intensity values:
Discontinuity and Similarity.
Discontinuity => To partition an image based on abrupt change in intensity such as edge in
image. ( Edge detection, Point detection, Line detection)
Similarity => To partition an image into regions that are similar according to a set of
predefined criteria. (Thresholding, Region growing, Region splitting etc.)
7.1 Detection of Discontinuities
The most common way to look for discontinuities is to run a mask through the image.
For 3 x 3 mask => The response (R) of the mask at any given point in the image is given by
R = w1z1 + w2z2+……………+w9z9
R=∑
w1 w2 w3
w4 w5 w6
w7 w8 w9
Where Zi is the gray level of the pixel associated with the mask coefficient wi.
The response of the mask is defined with respect to its center location.
7.1.1 Point Detection
Principle of detection of isolated points in an image.
We can say that a point has been detected at the location on which the mask is centered if
|R| T (Where T is a non-negative threshold and R is response of the mask).The point can
be detected using the mask shown below.
-1 -1 -1
-1 8 -1
-1 -1 -1
-1 -1 2
-1 2 -1
2 -1 -1
-1 2 -1
-1 2 -1
-1 2 -1
Figure 4 : Vertical Line Detection Mask
2 -1 -1
-1 2 -1
-1 -1 2
3 x 3 Region of an Image
Computation of the gradient of an image is based on obtaining the partial derivatives ∂f/∂x
and ∂f/∂y at every pixel location.
∂f/∂x = f(x+1,y) – f(x,y)
∂f/∂y = f(x,y+1) – f(x,y)
For Roberts operator : Gx =(Z9-Z5) and Gy = (Z8-Z6)
For Prewitt : Gx = (Z7+Z8+Z9) – (Z1+Z2+Z3) and Gy = (Z3+Z6+Z9) – (Z1+Z4+Z7)
For Sobel : Gx = (Z7+2Z8+Z9) – (Z1+2Z2+Z3) and Gy = (Z3+2Z6+Z9) – (Z1+2Z4+Z7)
Second order derivative => Laplacian operator
The Laplacian of two dimensional image f(x,y) is given by
2
f= +
Example: two lines connecting three points each – Fig (d) indicates that the Hough transform
exhibits a reflective adjacency relationship
Summary of Hough transform for edge linking – Compute the gradient – Specify subdivisions in
the parametric plane – Examine the counts of the accumulator cells – Examine the continuity
relationship between pixels in a chosen cell
Global processing via Graph-Theoretic Techniques
• In a directed arc ni is called parent and nj is called successor• Expansion: identifying successors
of a node.• Starting (0 or root) level, last (goal) level. Cost c (ni, nj) associated with an arc;
• Path n1, n2,…,nk, with each ni, being a successor of nj-1. Cost of a path is the sum of costs of
the arcs constituting the path.
Edge element defined between two neighboor pixels p and q (xp, yp) (xq, yq)
Associate cost with an edge element c( p,q) = H −[ f ( p) − f (q)]
7.3 Thresholding
Threshold can be chosen as the relation t = t(r,c , p(r,c)), where p(r,c) is the feature value at
the pixel (r,c).
In the case of gray level thresholding => p(r,c) = g(r,c) for all (r,c) within the image domain.
If t depends on the feature p(r,c) => Local threshold
If t depends on the pixel position (r,c) as well as on the feature p(r,c) => Dynamic Threshold.
7.3.1 Threshold Selection Using Histogram
Our objective is to segment an image g(r,c) of size M x N that contains two types of regions
say R1 and R2 by gray level thresholding.
Threshold can be selected using the information contained by gray level histogram of the
image.
Suppose gray level of pixels belonging to R2 type regions are greater than R1 and the
number of pixels contained in R2 is p% of total number of pixels in the image.
Threshold t should be such that
t = pMN/100
This method cannot be applied to unknown class of images where p is not known a priori.
Perform the split operation. => Start from 4 x 4. [ Splitting process to create m/2 x m/2 ].
5 6 6 6 7 7 6 6
6 7 6 7 5 5 4 7
6 6 4 4 3 2 5 6
5 4 5 4 2 3 4 6
1 3 2 3 3 2 4 7
0 0 1 0 2 2 5 6
1 1 0 1 0 3 4 4
1 0 1 0 2 3 5 6
Perform the merge operation => Start from 2 x 2 [ Merging process to create 2m x 2m ]
7.4.5 Split and Merge
If most of the homogeneous regions are small => Takes more time. ( Split Operation )
No a priori knowledge available about the size of regions => More Time
It is an hybrid approach which combines both splitting and merging technique.
Suppose we start with rectangular regions of size m x m pixels.
To each region homogeneity property is tested.
If test fails, the regions is split into four quadrants each of size m/2 x m/2.
If the region satisfies the homogeneity property => Merging process is followed to form a
region of size (2m) x (2m).