You are on page 1of 5

1

Texture segmentation using Uniform Local Binary


Pattern
G.Madasamy Raja and A.Suruliandi*
*Reader,
Department of computer Science & Engineering,
Manonmaniam Sundaranar University,
Tirunelveli.
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 UNIFORM LOCAL BINARY PATTERNS (ULBP) for
texture segmentation. MATLAB has been used for the implementation
purpose.
Keywords: Local Binary Pattern, Uniform Local binary Pattern,
Segmentation, Kullback Leibler distance.
1 Introduction
Analysis
of
two-dimensional
textures has many potential
applications, for example, in
industrial
surface
inspection,
remote sensing, and biomedical
image analysis, but only a limited
number of examples of successful
exploitation of texture exist. A
major problem is that textures in
the real world are often not uniform
due to variations in orientation,
scale, or other visual appearance.
The gray-scale invariance is often
important
due
to
uneven
illumination or great within-class
variability. In addition, the degree
of computational complexity of

most proposed texture measures


is too high.
Recently,
a
nonparametric
approach to texture analysis has
been developed in which the
distributions of simple texture
measures based on Local Binary
Patterns (LBP) are used for texture
description. Perhaps the most
important property of the LBP
operator in real-world applications
is its tolerance against illumination
changes.
Another
equally
important is its computational
simplicity, which makes it possible
to analyze images in challenging
real-time settings.

2 Local Binary Patterns (LBP)


The Local Binary Patterns (LBP)
operator introduced by Ojala is in
essence a filter that labels an
image
by
thresholding
the
neighborhood of each pixel with
the value of the center pixel and
concatenating the obtained binary
values. Histogram of the labeled
image is then used as a mean of
texture description. The basic LBP
operator is illustrated in Fig 2.1

symmetric
neighborhood
gp(p=0,1,2, . . . P-1) giving:
T=t(gc;g0-gc;g1-gc;.gp-1-gc)
=t (gc, gp)
Where gc corresponds to the value
of the centre pixel (Pc) of the local
neighborhood and gi corresponds
to the value of a pixel (pi, where
i=0,..., P) in the neighborhood of

pC

Fig.2.1 the basic LBP operator


Each pattern in the image is
assigned a unique label by the
following equation
P-1
LBPP,R = u(ti tc)2i.
i=0
Where tc is the intensity of the
center pixel, ti is the intensity of the
neighbor i, and u(x) is the step
function. It is clear that the LBP
defined in the above Equation is
not rotation-invariant as the
intensity value of ti changes when
the circle is rotated by a specific
angle. Two patterns should be
treated as Uniform if one can be
obtained from the other through
rotating by a certain angle.
3 Uniform Local Binary Patterns
(ULBP)
As the first step toward gray-scale
invariance, we subtract, without
losing information, the gray value
of the center pixel (gc) from the
gray values of the circularly

Ojala et al.found that not all local


binary patterns describe properties
of texture well. They introduce a
uniformity measure U to define
uniform patterns. U corresponds
to the number of spatial transitions
or bitwise 0/1 changes in the
pattern.
P
U ( LBPP,R)= Is(gi-gc)- s(gi-1-gc)I
i=1
where gp = g0
Patterns that have uniformity
values of at most 2 are designated
as uniform resulting in the
following operator for grey scale
and rotation invariant texture
description
To formally define the uniform
patterns, we introduce a uniformity
measure U (pattern), which
corresponds to the number of
spatial transitions (bitwise 0/1
changes) in the pattern. For
example, patterns 000000002 and
111111112 have U value of 0, while
the other seven patterns in the first
row of the fig 3.1 have U value of 2
as there are exactly two 0/1
transitions in the pattern. Similarly,
the other 27 patterns have U value
of at least 4. It is designated,
patterns that have U value of at
most 2 as uniform and propose

the LBPriu2 P,R for gray-scale and


rotation
invariant
texture
description instead of LBPri P,R.

4.1
Segmentation
through
Uniform Local Binary pattern
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.

Fig 3.1
The 36 unique rotation
invariant binary patterns that can
occur in the circularly symmetric
neighbor set of LBPri 8,R. . Black and
white circles correspond to bit
values of 0 and 1 in the 8-bit
output of the operator. The first row
contains
the
nine
uniform
patterns and the numbers inside
them correspond to their unique
LBPriu2 8,R codes.
Superscript riu2 reflects the use of
rotation invariant uniform patterns
that have U value of at most 2. By
definition, exactly P+1 uniform
binary patterns can occur in a
circularly symmetric neighbor set
of P pixels. The following Equation
assigns a unique label to each of
them corresponding to the number
of 1 bits in the pattern (0 to P),
while the no uniform patterns are
grouped
under
the
miscellaneous label (P+1).
LBPriu2

P,R

P-1
= { s(gp-gc) if U( LBPP,R)<=2
P=0 P+1

otherwise

Where
U ( LBPP,R)= Is(gp-1-gc)- s(g0-gc)I
P-1
+ Is(gp-gc)- s(gp-1-gc)I
P=1

4 Algorithm, Implementation and


Results

4.2 Algorithm
The Algorithm is described as
follows:
1. Select randomly a sample
sub image of 30*30 pixels
from each texture image
(one sample per texture)
2. Calculate ULBP for each
sample sub image, by
moving the 3*3 matrix,
across the sample with
overlap
3. Scan the input image by a
window of 30*30 pixels and
calculate the ULBP for
each window.
4. Calculate
the absolute
difference between the
ULBP of each window and
one of the each sample
10
D (i) = I W (j)-S (i ,j) I
J=1

i=1,2,3,4

Where:
D(i)
denotes
the
absolute
difference between the ULBP of a
window and the ULBP of a sample
sub image i; W(j) represents the
occurrence value of Binary Pattern
j in the ULBP of the window
considered; S(i,j) represents the
occurrence value of Binary pattern
j in the ULBP of the sample sub
image i.
5. The central pixel of the window
considered will be assigned to

class K such that D(K) is minimum


among all the D(i), for i= 1,2,3,4
4.3 Results and Evaluation
Experiment #1
By using the above algorithm, fig
4.1 (a) have been processed and
segmented. The result is illustrated
in the fig 4.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.

a) Original image (b) Segmented image

Fig 4.5 Image segmentation by


using ULBP (two- texture image)
5 Discussions and Conclusion
The following table (tab 5.1)
shows the classification Accuracy
for the varying window size with
four-texture image.
S.No
1
2
3
4

(a) Original image

(b) Segmented image

Fig.4.1 Image segmentation


by using ULBP
(four-texture image)

Window
Size
25*25
20*20
15*15
10*10

Classification
Accuracy
80%
78.3%
76.67%
68.4%

Tab 5.1 Classification Accuracy for


ULBP method (four-texture image)
The following figure (fig 5.1) shows
the bar chart of the above table 5.1

Experiment #2
By using the above algorithm, fig
4.5 (a) have been processed and
segmented. The result is illustrated
in the fig 4.5(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

Fig 5.1 Classification Accuracy Vs


Window size in ULBP - Bar chart
(four-texture image)

The following table (tab 5.2) shows


the classification Accuracy for the
varying window size with the twotexture image.
S.No
1
2
3
4

Window
Size
25*25
20*20
15*15
10*10

Classification
Accuracy
98%
97%
97%
97%

Tab 5.2 Classification Accuracy


for ULBP method ( two-texture
image)
The following figure (fig 5.3) shows
the bar chart of the above table 5.2

Fig 5.3 Classification Accuracy Vs


Window size in ULBP - Bar chart
(two-texture image)
We can note in the above result
that the top left texture is not
segmented properly(in the case of
four-texture image) because of its
non uniformity(in the four-texture
image) in the texture area in the
input image, that intercept in
almost all the other textures. The
greater the uniformity in the
texture, the more quality we can
get in the output, which is proved
in the case of the bottom left
texture, this is because this ULBP
model follows the uniformity of
texture in nature .This, is the
reason for not producing smooth

boundaries
in
segmentation.

the

texture

Computational simplicity is another


advantage as the operators can be
realized with a few comparisons in
a small neighborhood and a lookup
table. This facilitates a very
straightforward
and
efficient
implementation, which may be
mandatory
in
time
critical
applications that give an average
classification rate of more than
86%, including the influence of the
boundaries of different textures.
References
[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] William K. Pratt, Digital Image
Processing,
A
Wiley
Interscience Publication, John
Wiley & sons Inc, U.S.A, 1991.
[5] D.C.He and Li Wang, Texture
Unit, Texture Spectrum and
Texture Analysis, IEEE Trans.
On Geosci and Remote
Sensing, Vol 23, No.4, pp509512, July 1990.
[6] D.C.He and Li Wang, Texture
Classification using Texture
Spectrum,
Pattern
Recognition, Vol 23, No.8, pp
905-910, 1990.
[7] D.C.He and Li Wang,
Unsupervised Textural
Classification of Images using
the Texture Spectrum, Pattern
Recognition, Vol 25, No.3,pp
247-259,1992.

You might also like