You are on page 1of 6

Texture Segmentation Using Texture Spectrum method

combined with Kullback- Leibler distance


G.Madasamy Raja,
Lecturer, Department of Computer Science and Engineering,
Vivekanandha Institute of Engineering and Technology for Women,
anushpriya2004@yahoo.com
B.Sasikumar,
Lecturer, Department of Electrical and Electronics Engineering,
Vivekanandha Institute of Engineering and Technology for Women,
balusasi_skg@rediffmail.com
N.G.Malathy,
Lecturer, Department of Master of Computer Application,
Vivekanandha Institute of Information and Management Studies,
Tiruchengode, Namakkal Dist.
anushpriya2005@yahoo.com
Abstract: Image segmentation is one of the most challenging problems in
image processing. The result of image segmentation is a set of regions that
collectively cover the entire image, each of the pixels in a region are similar
with respect to some characteristic or computed property, such as color,
intensity, or texture. Several approaches have been proposed using texture
measures for image segmentation .One of the important issues here is how
well these methods work on differentiating various textures that are available
in a single image. This paper analyses the strengths and weaknesses of the
well known method TEXTURE SPECTRUM (TS) for texture segmentation by
combining this method with the Kullback-Leibler distance. MATLAB has been
used for the implementation purpose.
Keywords: Texture spectrum, Segmentation, Unsupervised Classification,
Kullback Leibler distance.
1 Introduction
Texture is the term used to
characterize the surface of a given
phenomenon in an image and it is
undoubtedly one of the principal
features used in image processing
and pattern recognition. Texture
classification plays an important
role in the interpretation and
analysis of terrain images, as well
as radiographic and microscopic
cell images.
Methods of texture analysis
are usually divided into two major
categories. The first is the

structural approach, where texture


is considered as a repetition of
some primitives, with a certain rule
of placement. The traditional
Fourier spectrum analysis is often
used to determine the primitives
and placement rule.
Several
authors have applied this method
to texture classification and texture
characterization with a certain
degree of success. Problems may
be encountered in practice in
identifying the primitives and the
placement rule in natural images,
such as for some remotely sensed
data.

The
second
major
approach in texture analysis is the
statistical method. Its aim is to
characterize
the
stochastic
properties of the spatial distribution
of grey levels in an image.
The purpose of this paper
is to present a new statistical
method of texture analysis which is
focused on texture characterization
and discrimination. The concept of
texture unit is proposed first. It
may be considered as the smallest
complete
unit
which
best
characterizes the local texture
aspect of a given pixel and its
neighborhood in all eight directions
of a square raster. Then a texture
image is characterized by its
texture spectrum, which describes
the distribution of all the texture
units within the image.
2 Texture Unit and Texture
Spectrum

for i = 1,2, , 8.
From the above formula, each
element can be assigned one of
three possible values so the total
number of possible texture units
for the eight elements can be
estimated as
38 = 6561.
Texture unit number is defined
according
to
the
following
equation:
8
NTU = Ei*3(i-1)
i=1

2.1 Texture Unit

Where NTU varies from 0 to 6560.

In a digital image the main goal is


to extract the local texture
information of a neighborhood of
pixels. In our case the size of the
neighborhood is 3*3 pixels. This
pattern of the image, consisting by
9 pixels, is denoted by a set of
nine
elements, where
each
element represents the intensity
value of one of the nine pixels.

There is no unique way to label


and order all the texture units.

Representing the intensity value of


the central pixel as V0 and the
intensity value of each neighboring
pixel as Vi, the set that is
considered
as
the
smallest
complete unit of the under
consideration image is: V = {V0,
V1, V2, , V8}.
Considering the smallest positive
value within the neighborhood of
zero, the corresponding texture
unit is defined as: TU = {E1 E8},
where
2
0
0
2
2

0
2

a
h
g

b
f

c
d
e

Fig 2.1 Eight clockwise successive


ordering ways of the eight
elements of the texture
units.
An Example of transforming
neighborhood to a texture unit with
the texture number under the
ordering way a.
Neighborhood
V
5
2
={ 6,8,5, 8
2,
1,7,3,9,
7}
7
6
1
The
9
3
7
corresponding Texture Unit is,

TU= {2,0,0,0,2,0,2,2}
The corresponding NTU will
be,

n
n
n
G = 2 ([ filogfi]-[ ( fi)log( fi)]
s,m i=1
s,m i=1
i=1
n
-[ (fi)log( fi)]
I=1s,m
n
n
+[( fi)log( fi)])
s,m i=1
s,m i=1

NTU=2+162+1458+4374=599
6
2.2 Texture Spectrum
The set of 6561 texture units
corresponds to the relative gray
level relationships between a pixel
and its neighbors in all possible
directions; that is the local texture
aspect of a given pixel in
accordance with its neighbors. The
basic idea of the texture spectrum
approach is to transform an image
using the texture units and to
characterize the global texture of
an image by its texture spectrum.
The texture spectrum can then be
defined
as
the
occurrence
frequency function of all the texture
units.

Here s and m are the sample and


model distributions, n is the
number of bins and si, mi are the
respective sample and model
probabilities at bin i.
3 Algorithm, Implementation and
Results
3.1
Segmentation
through
Texture spectrum method
Sample and model distributions
were obtained by scanning the
texture samples and prototypes
with the chosen operator and
dividing
the
distributions
of
operator outputs into histograms
having a fixed number of bins.

2.3 Kullback Leibler distance

3.2 Algorithm

The Kullback Leibler distance


(KLD) or relative entropy between
two densities s and m is defined as
n
D(s: m) = si log (si /mi)
I=1
Here s and m are the sample and
model distributions, n is the
number of bins and si, mi are the
respective sample and model
probabilities at bin i.

The Algorithm is described as


follows:

2.4 Modified Kullback Leibler


distance
The modified version of the same
Kullback-Leibler distance (G) is

1. Select randomly a sample


sub image of 30*30 pixels
from each texture image
(one sample per texture)
2. Calculate texture spectrum
for each sample sub image,
by moving the 3*3 matrix,
across the sample with
overlap
3. Scan the four-texture or
two-texture image by a
window of 30*30 pixels with
a step of two pixels in the
row and column directions,
and calculate the Texture
spectrum for each window.

4. Calculate the KullbackLeibler


distance(G)
between
the
Texture
spectrum of each window
and one of the each
sample.
5. The central pixel of the
window considered will be
assigned to class K such
that G(K) is minimum
among all the G(i), for i=
1,2,3,4, where G(i) denotes
the Kullback-Leibler
distance between the
Texture spectrum of a
window and the Texture
Spectrum of a sample sub
image i;
3.3 Results and Evaluation
Experiment #1
By using the above algorithm, fig
3.1 (a) have been processed and
segmented. The result is illustrated
in the fig 3.1(b), where four
different textures are represented
by four different grey levels. For
getting
higher
classification
accuracy Kullback-Leibler distance
is used as a similarity measure
and the window size is kept as
25*25.

By using the above algorithm, fig


3.2 (a) have been processed and
segmented. The result is illustrated
in the fig 3.2(b), where two
different textures are represented
by two different grey levels. For
getting
higher
classification
accuracy Kullback-Leibler distance
is used as a similarity measure
and the window size is kept as
25*25

a) Original image (b) Segmented


image
Fig 3.2 Image segmentation by
using Texture spectrum
(two-texture image)
4 Discussions and Conclusion
The following table (tab 4.1)
shows the classification Accuracy
for the varying window size with
four-texture image.
o
1
2
3
4

S.N Window
Size
25*25
20*20
15*15
10*10

Classification
Accuracy
95%
93%
92%
86%

Tab 4.1 Classification Accuracy for


Texture Spectrum method
(four-texture image)
(a) Original image (b) Segmented
image
Fig.3.1Image segmentation (four
texture image) by using Texture
Spectrum
Experiment #2

The following figure (fig 4.1) shows


the bar chart of the above table 4.1

By this study, we realized that


the above classification rates
are calculated over all the
pixels including the region near
the boundaries of textures. If
we remove these pixels from
the counter, the classification
accuracy will be higher.
Fig 4.1 Classification Accuracy Vs
Window size in Texture
spectrum - Bar chart
(Four-texture image)
The following table (tab 4.2) shows
the classification Accuracy for the
varying window size with the twotexture image.
S.No
1
2
3
4
Tab 4.2

Window Classification
Size
Accuracy
25*25
95%

20*20
15*15
10*10

95%
96%
99%

Classification Accuracy
for Texture Spectrum
method
(two-texture image)

The following figure (fig 4.2) shows


the bar chart of the above table 4.2

The
Texture
Spectrum
combined with Kullback-Leibler
distance has been evaluated
from the point of view of
discriminating
performance.
The discrimination method was
simple, and the number of
mathematical
operations
applied was small, while
promising results have been
obtained with the average
classification rate of more than
92%, including the influence of
the boundaries of different
textures.
Further evaluation shows that
Texture Spectrum combined
with Kullback-Leibler distance
is sensitive to the directional
aspect of texture. The larger
window size results in better
classification accuracy in the
four-texture image but reverse
in the two-texture image. When
the Window-size is larger, the
execution time will also be high
but this is suitable for both fourtexture and two-texture image.
References

Fig 4.2 Classification Accuracy Vs


Window size in Texture
spectrum - Bar chart
(Two-texture image)

[1] Rafael C.GonZalez,R.E.Woods,


and Steven L.Eddins, Digital
Image
Processing
using
MATLAB, Pearson Education,
2004.
[2] Anil K.Jain, Fundamentals of
Digital Image Processing,
Prentice Hall OF India, INDIA,
1995.

[3] Mahar A. Sid Ahmed, Image


Processing, Mc Graw Hill
Publications, U.S.A.
[4] Turtinen Markus: Learning and
Recognizing Texture
Characteristics Using Local
Binary Patterns, Oulu
University Press, Oulu 2007.
[5] R. Vidal, Y. Ma, and S. Sastry,
Generalized
Principal
component analysis(gpca),
IEEE TRANSACTIONS ON
PATTERN ANALYSIS
AND
MACHINE
INTELLIGENCE
(PAMI), vol. 27, no. 12, pp.
1945 1959,Dec 2005.
[6] P. Xing, A. Y. Ng, M. I. Jordan,
and S. Russell. Distance metric
learning with application to
clustering with side information
In
Advances in Neural
Information
Processing
Systems, volume 15. The MIT
Press, 2002.
[7] Shifeng Weng, Changshui
Zhang and Zhonglin Lin.
Exploring the structure of
supervised
data
by
Discriminant
Isometric
Mapping. Pattern Recognition,
38(4),Pages 599-601, 2005
[8] W. H. Press, S. A. Teukolsky,
W. T. Vetterling, and B. P.
Flannery, R. O. Stehling, M.
A. Nascimento, and A. X.
Falcao.A
compact
and
efficient
image
retrieval
approach
based
on
border/interior
pixel
classification. In CIKM, pages
102109.ACM Press 2002.

You might also like