You are on page 1of 35

Evaluation of Image Segmentation

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.

Image segmentation algorithm


We will discuss following segmentation
algorithm in the subsequent slides : Otsu,Edge
based segmentation ,K-means ,fuzzyc-means
,region-based method ,snakes , contour based
segmentation.

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 .

5 Repeat steps 2 through 4 until the difference in T


in successive iterations is smaller than predefined
parameter 0 .

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.

Region splitting and merging


The procedure to subdivide an image initially
into a set of arbitrary disjointed regions and
then merge and split the regions in an attempt
to satisfy the conditions.
Let R represent the entire image region and
select a predicate P. Approach for segmenting
R is to subdivide it successively into smaller
and smaller quadrant regions so that for any
region P( )=TRUE.

Region splitting and merging


Algorithm -:
1. Split into four disjoint quadrants any region
for which =
2. Merge any adjacent regions and for which
=

3. Stop when no further merging or splitting is


possible.

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

Where is the mean of points in

K-means
Algorithm
Assignment step :
Assign each observation to the cluster whose mean is closest
to it (i.e partition the observations )
() = () ()

Where each is assigned to exactly one () even if it could


be assigned to two or more of them.

Update Step
Calculate the new means to be the centroids of the
observation in the new clusters.
(+1) =
1
()
()

The algorithm has converged when the assignment no longer change.

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

Again, when viewed using a coding theory framework, one


can view pj = Sj/SI as the probability that a each pixel in the
image belongs to region j under a probabilistic assumption
that each pixel is independently selected to be in region j
with probability pj.

Gray level uniformity


It is based on the colour error of the region
and it helps in describing the inter region
uniformity. The algorithm which generate the
uniform images have better boundary
separating different various regions.
=

=1
2 is

2 ( )

The
known as square colour error which
we can define as

Gray level uniformity


,

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
( )

Where Sj denotes the number of pixels in region j and


Si denotes the pixels in image I.
2 ( ) denotes the square colour error for region j

F(I)
The evaluation function F(I) is defined as

=
=1

where I is the image to be segmented, R, the number


of regions in the segmented image, A, the area, or the
number of pixels of the I th region, and e, the colour
error of region .
, is defined as the sum of the Euclidean distance of
the colour vectors between the original image and the
segmented image of each pixel in the region

F(I)
.The term

is a global measure which penalizes

small regions or regions with a large colour error.


e, indicates whether or not a region is assigned
an appropriate feature (colour).
The term is a local measure which penalizes
small regions or regions with a large colour error.
e, indicates whether or not a region is assigned
an appropriate feature (colour). The smaller the
value of F, the better is the segmentation result.

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.
=

( (, ) (, ))

Result and Discussion


The evaluation of segmentation algorithm is
performed on mammographic images
databases (such as DDISM) and texture image
database.
In order to evaluate various segmentation
algorithms first we applied various
segmentation algorithms on the images and
evaluate various metrics based on the
segmentation images.

Result and Discussion


DDISM
Database

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

Texture image segmentation algorithm will require larger


number of bits to specify the region id per pixel for the
segmented image.
Active contour produces the most uniform segmented images
All the images generate the same degree of under-segmented
images.
Region growing shows the higher value of disparity value
which suggest that segmented images produce by region
growing are of better quality.

Result and Discussion


Otsu present better segmentation result.
The higher value of discrepancy of region
growing suggest that larger number of
background pixel are considered as object
pixel.

Result and Discussion

Fuzzy-c-means produces the most disorder segmented images


which suggest it will require the larger number of bits to specify the
region id per pixel.
Region Growing produces the most uniform segmented images.
All the segmented images produces the same degree of undersegmented images.
Active contour has largest disparity value which suggest that
segmented images produce by active contour is of better quality.

Result and Discussion


Fuzzy-C-means
produce
the
better
segmentation result.
Active Contour segmentation algorithm has
largest value of discrepancy value which
suggest that large number of background
pixels are considered as object pixels.

You might also like