Professional Documents
Culture Documents
algorithms
By
Dr. Rajeev Srivastava
Contents
Introduction
Image segmentation algorithms
Evaluation Metrics
Result for segmentation
Introduction
Segmentation subdivides the image into its constituents
region or objects.
The level to which the subdivides is carried depends on the
problem being solved.
Segmentation should stop when the object of interest in an
application have been isolated.
Segmentation method can be classified into two categories
-:
- In first category approach is to partition the
images based on the abrupt changes in the
intensities.
-In second category partition an image into certain
region which are similar according to certain criteria.
Otsu-segmentation
Segmentation is then accomplished by scanning
the image pixel by pixel an labelling each pixel as
object or background depending on whether the
gray level of that pixel is greater or less than the
value of T.
Algorithm
1 Select an initial estimate for T
2 Segment the image using T . This will produce two
groups of pixels : 1 consisting of all the pixels with
gray-levels > T and 2 consist of pixels < T.
Otsu segmentation
3 Compute the average gray level of 1 and 2 for
the pixels in the region 1 and 2 .
4 Compute a new threshold value =
1
2
1 + 2 .
Edge detection
It is the most common approach for detecting the
detecting the meaningful discontinuities in gray
level. We will discuss the first and second order
for detecting the edges.
The magnitude of the first derivative can be used
to detect the presence of an edge at a point in an
image.
The sign of second derivative can be used to
determine whether an edge pixel lies on the dark
or light side of an edge.
Edge Detection
The two additional properties of second
derivative are-:
It produces two value for every edge in an image.
Imaginary straight line joining the extreme
positive and negative value of the second
derivative would cross zero near the midpoint of
the edge.
The zero-crossing property of the second derivative is
quite useful for locating the centres of thick edges.
Edge Detection
The gradient of an image is a vector of and
.There are various operator to calculate
the gradient of an image.
For an image 3x3 region where z represent the
gray level values-:
Edge Detection
Robert mask
-1
-1
Prewitt mask
-1
-1
-1
-1
-1
-1
Edge Detection
Sobel mask
-1
-2
-1
-1
-2
-1
Region Growing
It is a procedure that groups pixels or sub region
into larger regions based on predefined criteria.
The basic approach is to start with a set of seed
points and from these grow regions by appending
to each seed those neighbouring pixels that have
properties similar to the seeds.
When a priori information is not available the
procedure is to compute at every pixels the same
set of properties that ultimately will be used to
assign pixels to region during the growing
process.
K-means
Given a set of observation (1 , 2 , . , )
where each observation is a d-dimensional
real vector
K-means clustering aims to
partition the n observation into k sets (kn)
S={1 , 2 ,.., } so as to minimize
the within-cluster sum of squares
arg min
=1
K-means
Algorithm
Assignment step :
Assign each observation to the cluster whose mean is closest
to it (i.e partition the observations )
() = () ()
Update Step
Calculate the new means to be the centroids of the
observation in the new clusters.
(+1) =
1
()
()
Fuzzy-C-means
In fuzzy clustering each point has a degree of belonging
to clusters as in fuzzy logic rather than belonging
completely to just one cluster. Thus points on the edge
of a cluster may be in the cluster to a lesser degree
than points in the centre of cluster.
Any point x has set of coefficient giving the degree of
being in the k th cluster (). With fuzzy c-means the
centroid of a cluster is the mean of all points weighted
by their degree of belonging to the cluster :
=
()
FuzzyCmeans
Algorithm
1 Choose a number of clusters
2 Assign randomly to each point coefficient for
being in the clusters.
3 Repeat until the algorithm has converged
Evaluation metrics
Layout Entropy(HlofE)-: E is a evaluation function based
on information theory and the Minimum Description
length Principle (MDL).
Hl is defined as the entropy of the pixels in a
segmentation layout. Segmentation layout is an image
used to describe the result of segmentation.
According to the Minimum description Length principle
if we balance the trade-off between the uniformity of
the individual regions with the complexity of the
segmentation the minimum description length
corresponds to the best segmentation.
Layout Entropy
Layout entropy measures the segmentation complexity.
Layout entropy also gives indicates the number of bits (or
Harleys when using a base-10 logarithm) per pixel needed
to specify a region id of each pixel for a particular
segmentation I.
=
=1 log
=1
2 is
2 ( )
The
known as square colour error which
we can define as
2 =
Cx ,
Cx
Evaluation method Ecw uses E inter to measure
the inter-region colour difference, which is
defined as the weighted proportion of pixels
whose colour difference between its original
colour and the average region colour in the other
region is less that a pre-defined threshold.
Note that, for a segmented image, a large value
of intra-region visual error means plenty of pixels
may be mistakenly merged and this image could
have been undersegmented.
Where = 1 > 0 =
0
Intra region disparity quantifies the homogeneity
of each region in the image. The global intraregion disparity is proportional to the number of
pixels ri of each region Ri.
The more a rcgion has an important number of
pixels, the more it has an infiuence in the global
intra.-region disparity. The region containing two
different primitives must have a high intra-region
disparity compared to the same region composed
of one primitive.
. It measure how far one region differ from oneanother .It is criteria which quantifies the quality of
segmentation result.
1
=
=1
2
( )
F(I)
The evaluation function F(I) is defined as
=
=1
F(I)
.The term
Discrepancy
A discrepancy measure was based on the difference
between the original and smoothed pictures.
The measure proposed was the sum of the squared
differences between gray levels of corresponding
points in the original and smoothed pictures.
If we assume that the image consists of objects and
background, each having a specified distribution of
gray levels, then we can compute, for any given
threshold t, the Probability of misclassifying an object
point as background, or vice versa.
Discrepancy
This probability can be regarded as a measure
of the discrepancy between the classifications
produced by the threshold and the "ideal"
classification.
=
( (, ) (, ))
Otsu
K-means
FuzzyC-means
Gaussian
Active
Countour
Texture
Region
Growing
GraphCut
Layout Entropy
0.633104
0.6732
0.6731
0.66403
0.6689
0.6798
0.6590
0.6727
Gray-level
Uniformity
58971
59459
58903
79765
104946
59690
60336
103416
E intra of Ecw
0.5202
0.5202
0.5202
0.5138
0.5199
0.5195
0.5136
0.5202
2000528
2007256
2007457
2231478
3004150
2587649
7906856
2536798
()
125217
125453
125354
138856
172883
166398
338919
151671
15061
13057
16789
23518
21703
21816
33521
21460
Discrepancy