Unsupervised Texture Segmentation Using Feature Distributions
Unsupervised Texture Segmentation Using Feature Distributions
Abstract
This paper presents an unsupervised texture segmentation method, which uses distributions of local binary patterns
and pattern contrasts for measuring the similarity of adjacent image regions during the segmentation process. Non-
parametric log-likelihood test, the G statistic, is engaged as a pseudo-metric for comparing feature distributions.
A region-based algorithm is developed for coarse image segmentation and a pixelwise classification scheme for improving
localization of region boundaries. The performance of the method is evaluated with various types of test images. 1999
Pattern Recognition Society. Published by Elsevier Science Ltd. All rights reserved.
Keywords: Texture segmentation; Feature distribution; G statistic; Spatial operator; Local binary pattern; Contrast
0031-3203/99/$ — See front matter 1999 Pattern Recognition Society. Published by Elsevier Science Ltd. All rights reserved.
PII: S 0 0 3 1 - 3 2 0 3 ( 9 8 ) 0 0 0 3 8 - 7
478 T. Ojala, M. Pietikäinen / Pattern Recognition 32 (1999) 477—486
nonuniform textures. Unsupervised segmentation of im- describes the spatial structure of the local texture, but it
ages containing texture primitives at very different scales does not address the contrast of the texture. For this
may even be unrealistic, because it is hard to discriminate purpose we combine LBP with a simple contrast measure
small image regions from large texture primitives without C, which is the difference between the average gray-level
any prior knowledge. of those pixels which have value 1 and those which have
The choice of highly discriminating texture features is value 0 (Fig. 1b).
the most important factor for a success in texture seg- The LBP/C distribution is approximated by a discrete
mentation, but this has been neglected in most earlier two-dimensional histogram of size 256;b, where b is the
approaches. The features should easily discriminate vari- number of bins for C. Choosing b is a trade-off between
ous types of textures and the window size used for com- the discriminative power and the stability of the texture
puting textural features should be small enough to be transform. If b is too small, the histogram will lack
useful for small image regions and to provide small error resolution and feature C will add very little dis-
rates at region boundaries. criminative information to the process. However, since
Our recent studies show that excellent texture dis- the image region contains a finite number of pixels, it
crimination can be obtained with local texture operators does not make sense to go to the other extreme, for then
and nonparametric statistical discrimination of sample the histogram becomes sparse and unstable. Based on the
and prototype distributions. Texture classification re- results of our past texture classification experiments with
sults obtained by using distributions of local binary the LBP/C transform, we chose to use 8 bins, although
patterns (LBP) or gray-scale differences have been we expect to achieve comparable results with 4 or 16 bins
better than those obtained with the existing methods as well. See Ref. [27] for a detailed description of the
[26—29]. Our method can be easily generalized to utilize mapping from the continuous C space to the discrete bin
multiple texture features, multiscale information, color index.
features and combinations of multiple features using A log-likelihood-ratio, the G statistic [30], is used as
the new multichannel approach to texture descrip- a pseudo-metric for comparing LBP/C distributions. The
tion [29]. value of the G statistic indicates the probability that the
This paper presents an efficient method for unsuper- two sample distributions come from the same popula-
vised texture segmentation based on texture description tion: the higher the value, the lower the probability that
with feature distributions. A region-based algorithm is the two samples are from the same population. We mea-
developed for coarse image segmentation and a pixelwise sured the similarity of two histograms with a two-way
classification scheme for improving the localization of test of interaction or heterogeneity:
region boundaries.
L L L
G"2 f log f ! f log f
G G G G
2. Texture description QK G QK G G
L
The texture contents of an image region are character- ! f log f
G G
ized by the joint distribution of local binary pattern G QK QK
(LBP) and contrast (C) features [27]. The original 3;3
neighborhood (Fig. 1a) is thresholded by the value of the L L
# f log f (1)
center pixel. The values of the pixels in the thresholded G G
QK GK QK G
neighborhood (Fig. 1b) are multiplied by the binomial
weights given to the corresponding pixels (Fig. 1c) and where s, m are the two sample histograms, n is the
obtained values (Fig. 1d) are summed for the LBP num- number of bins and f is the frequency at bin i. The more
G
ber (169) of this texture unit. By definition LBP is invari- alike the histograms s and m are, the smaller is the value
ant to any monotonic gray-scale transformation. LBP of G.
Fig. 2. Texture mosaic C1; the main sequence of the proposed segmentation algorithm.
480 T. Ojala, M. Pietikäinen / Pattern Recognition 32 (1999) 477—486
MI"p;G, (3)
Mosaics C4 (Fig. 7a) and C5 (Fig. 8a) are composed Our method achieves a smaller misclassification error of
of textures taken from outdoor scenes [20]. In their 1.4% (Fig. 7c). The difference between MIR (4.1) and
study, Jain and Karu tackled the problem of texture MIR (1.3) is considerable, which reflects the reliability
segmentation with a neural network generalization of the of the analysis.
traditional multichannel filtering method, using various For mosaic C5, which is 384;384 pixels in size, Jain
filter banks for feature extraction. For mosaic C4, which and Karu reported a labeling error of 6% with Laws’
is 256;256 pixels in size, they obtained a segmentation filters in supervised mode. Our unsupervised method
error of 3.3% with learned masks in unsupervised mode. gives a clearly better segmentation result of 2.1%. Note
Their method was not strictly unsupervised, though, be- that the pixelwise classification clearly improves the re-
cause the number of clusters was manually set to five. sult of the agglomerative merging phase (7.8%). The
T. Ojala, M. Pietikäinen / Pattern Recognition 32 (1999) 477—486 483
Fig. 9. Segmentation of a mosaic which contains two different orientations of a directional texture.
difference between MIR (2.8) and MIR (1.2) is still can observe from the image, the textures of natural scenes
noticeable, but by far the smallest in the three cases, are generally more nonuniform than the homogeneous
reflecting the inherent difficulty of this problem. textures of the test mosaics. Also, in natural scenes adjac-
LBP/C transform is by definition rotation-variant. ent textured regions are not necessarily separated by
Fig. 9 demonstrates how the segmentation algorithm well-defined boundaries, but the spatial pattern smoothly
works in the case of an edge between two different ori- changes from one texture to another. Further, we have to
entations of a directional texture. The original texture observe the infinite scale of texture differences present in
(D21 from the Brodatz album) was rotated 30° in both natural scenes; choosing the right scale is a very subjec-
clockwise and counterclockwise direction using cubic in- tive matter. For these reasons there is often no ‘correct’
terpolation, and the rotated textures were merged into the segmentation for a natural scene, as is the case with
200;200 mosaic shown in Fig. 9a. This size guarantees texture mosaics.
that the edge between the two orientations is not acciden- The parameters X and ½ primarily control the scale of
tally aligned with the initial blocks which could bias the texture differences that will be detected. With values
result. The same set of parameter values was used as with X"1.1 and ½"1.5 the rough segmentation results after
texture mosaics C1 to C5. The final segmentation result the agglomerative merging phase are presented in Figs.
in Fig. 9b contains 66 mislabelled pixels along the edge. 10b and 11b, and the final segmentation results are
We also applied the texture segmentation method to shown in Figs. 10c and 11c, respectively. If we decreased
natural scenes. The scenes were originally in RGB format ½ further, the segmentation result would contain an
[25], but we converted them to gray-level intensity im- increasing number of regions. The invariance of the
ages. As an example, scene C1 (Fig. 10a) is a 384;384 LBP/C transform to average gray-level shows in the
image of rocks in the sea and scene C2 (Fig. 11a) is bottom part of the image, where the sea is interpreted as
a 192;192 image of a beach, water and foliage. As we a single region despite the shadows.
484 T. Ojala, M. Pietikäinen / Pattern Recognition 32 (1999) 477—486
The results obtained for these natural scenes are very ther, we could consider a particular feature at multiple
satisfactory, considering that important color or gray scales, by straightforwardly computing the desired fea-
scale information is not utilized in the segmentation. ture for suitably symmetrical discrete neighborhoods of
any size, such as disks or boxes of odd or even size.
A simple way to define a ‘‘multiresolution’’ LBP would
5. Discussion be to choose the eight neighbors of the center pixel from
the corresponding positions in different neighborhoods
In the presented method texture is described by joint (3;3, 5;5, 7;7, etc.).
occurrences of LBP and C. Obvious generalizations are The remaining question is how to combine the mul-
to use other texture features or feature domains (e.g. tiple feature channels obtained with several features
color) and scale. Although LBP/C is a very powerful and/or scales. We can hardly expect to reliably estimate
texture transform, we expect to achieve better results by joint distributions for a large number of features. Also,
combining a larger number of features in the analysis. multidimensional histograms with large numbers of bins
Other powerful texture measures, like distributions based are very computationally intensive and consume very
on gray-level difference histograms or co-occurrence ma- much memory. An alternative is to use an approximation
trices, can be easily incorporated into our algorithm. In with marginal distributions and to employ each indepen-
Pietikäinen, Nieminen, Marszalec and Ojala [33] we dent feature separately, as a 1-D histogram, to compute
demonstrated that a method based on comparison of a similarity score such as G for each feature, and then
feature distributions can be used for high-accuracy color integrate individual scores into an aggregate similarity
measurements. This suggests that distributions of color score. This approach has given very promising results in
features could be easily used to find small color differ- our texture classification experiments [29] and more
ences between neighboring regions in segmentation. recently in color classification as well [33]. Combining it
Color features should make our method efficient for with a carefully chosen set of non-redundant com-
segmenting images containing color textures, like the plementary features we expect to improve the perfor-
original color images used in the experiments [25]. Fur- mance of our segmentation method considerably. In
T. Ojala, M. Pietikäinen / Pattern Recognition 32 (1999) 477—486 485
a similar way, joint pairs of features, like LBP/C, can be for providing images used in this study; Richard C.
combined with other single features or feature pairs. It Dubes, Anil K. Jain, John Lees and Kalle Karu from the
would also be possible to use single features or joint Michigan State University and Glenn Healey and David
features one by one, by e.g. first comparing the uniform- Slater from the University of California at Irvine.
ity of regions with respect to texture and then with
respect to color.
The histogram comparison approach based on the References
G test could be replaced with some other related method,
like histogram intersection [34] or a statistical chi-square [1] M. Tuceryan, A.K. Jain, Texture analysis, in Handbook
test. According to our experience the choice of proper of Pattern Recognition and Computer Vision, C.H. Chen,
texture measures is usually a much more important fac- L. F. Pau, P.S.P. Wang, eds., Ch. 2.1, pp. 235—276. World
tor in texture discrimination than the particular method Scientific, Singapore, 1993, pp. 235—276.
used for histogram comparison [29]. However, it would [2] R.M. Haralick, L.G. Shapiro, Image segmentation tech-
niques, Computer Vision Graphics, Image Processing 29
be interesting to study the performances of different types
(1985) 100—132.
of approaches in the case of very small image windows.
[3] T.R. Reed, J.M.H. Du Buf, A review of recent texture
In recent texture classification studies [35], we have segmentation, feature extraction techniques, CVGIP
compared the performance of LBP and other operators Image Understanding 57 (1993) 359—372.
to that of GMRF and Gabor energy features. The image [4] N.R. Pal, S.K. Pal, A review on image segmentation tech-
data included both Brodatz textures and the many differ- niques, Pattern Recognition 26 (1993) 1277—1294.
ent texture images available at MeasTex [36] which is an [5] P.C. Chen, T. Pavlidis, Segmentation by texture using
independent texture classification algorithm evaluation a co-occurrence matrix and a split-and-merge algorithm,
site accessible in WWW. LBP did well in these classifica- Comput. Graphics Image Processing 10 (1979) 172—182.
tion experiments, hence it should be suitable for texture [6] M. Pietikäinen, A. Rosenfeld, Image segmentation by tex-
ture using pyramid node linking, IEEE Trans. Systems
segmentation as well.
Man Cybernet. 11 (1981) 822—825.
[7] L.S. Davis, A. Mitiche, Mites: A model driven, iterative
texture segmentation algorithm, Comput. Graphics Image
6. Conclusion Processing 19 (1982) 95—110.
[8] M. Spann, R. Wilson, A quad-tree approach to image
We proposed a solution to unsupervised texture seg- segmentation which combines statistical and spatial in-
mentation, in which a method based on comparison of formation, Pattern Recognition 18 (1985) 257—269.
feature distributions is used to find homogeneously tex- [9] M. Unser, M. Eden, Multiresolution feature extraction
tured image regions and to localize boundaries between and selection for texture segmentation, IEEE Trans. Pat-
regions. Texture information is measured with a method tern Anal. Machine Intelligence 11 (1989) 717—728.
based on local binary patterns and contrast (LBP/C) that [10] J.Y. Hsiao, A.A. Sawchuk, Unsupervised texture image
we have recently developed. A region-based algorithm is segmentation using feature smoothing and probabilistic
relaxation techniques, Comput. Vision Graphics Image
developed for coarse image segmentation and a pixelwise
Processing 48 (1989) 1—21.
classification scheme for improving the localization of
[11] A. Khotanzad, A. Bouarfa, A parallel non-parametric clus-
region boundaries. tering algorithm with application to image segmentation,
The method performed very well in experiments. It is Proc. 22nd Asilomar Conf. on Signals, Systems, and Com-
not sensitive to the selection of parameter values, does puters, pp. 305—309, Pacific Grove, CA 1988.
not require any prior knowledge about the number of [12] J. Mao, A.K. Jain, Texture classification and segmentation
textures or regions in the image, and seems to provide using multiresolution simultaneous autoregressive models,
significantly better results than existing unsupervised tex- Pattern Recognition 25 (1992) 173—188.
ture segmentation approaches. The method can be easily [13] J.F. Silverman, D.B. Cooper, Bayesian clustering for un-
generalized, e.g. to utilize other texture features, multi- supervised estimation of surface and texture models, IEEE
scale information, color features, and combinations of Trans. Pattern Anal. Machine Intelligence 10 (1988)
multiple features. 482—495.
[14] C. Bouman, B. Liu, Multiple resolution segmentation of
textured images, IEEE Trans. Pattern Anal. Machine In-
telligence 13 (1991) 99—113.
Acknowledgements
[15] B.S. Manjunath, R. Chellappa, Unsupervised texture seg-
mentation using Markov random field models, IEEE
The financial support provided by the Academy of Trans. on Pattern Anal. Machine Intelligence 13 (1991)
Finland, the Technology Development Center of 478—482.
Finland, and the Graduate School in Electronics, Tele- [16] F.S. Cohen, Z. Fan, Maximum likelihood unsupervised
communications and Automation is gratefully acknow- textured image segmentation, CVGIP: Graphical Models
ledged. The authors also wish to thank following persons and Image Processing 54 (1992) 239—251.
486 T. Ojala, M. Pietikäinen / Pattern Recognition 32 (1999) 477—486
[17] A. Bovik, M. Clark, W.S. Geisler, Multichannel texture [27] T. Ojala, M. Pietikäinen, D. Harwood, A comparative
analysis using localized spatial filters, IEEE Trans. Pattern study of texture measures with classification based on
Anal. and Machine Intelligence 12 (1990) 55—73. feature distributions, Pattern Recognition 29 (1996) 51—59.
[18] A.K. Jain, F. Farrokhnia, Unsupervised texture segmenta- [28] T. Ojala, M. Pietikäinen, J. Nisula, Determining composi-
tion using Gabor filters, Pattern Recognition 24 (1991) tion of grain mixtures by texture classification based on
1167—1186. feature distributions, Int. J. Pattern Recognition Artif.
[19] H. Greenspan, R. Goodman, R. Chellappa, C.H. Ander- Intelligence 10 (1996) 73—82.
son, Learning texture discrimination rules in a multi- [29] T. Ojala, Multichannel approach to texture description
resolution system, IEEE Trans. Pattern Anal. Machine with feature distributions, Technical Report CAR-TR-846,
Intelligence 16 (1994) 894—901. Center for Automation Research, University of Maryland,
[20] A.K. Jain, K. Karu, Learning texture discrimination 1996.
masks, IEEE Trans. Pattern Anal. Machine Intelligence [30] R.R. Sokal, F.J. Rohlf, Introduction to Biostatistics, 2nd
18 (1996) 195—205. edn. W.H. Freeman and Co, New York, 1987.
[21] M. Unser, Texture classification and segmentation using [31] P. Brodatz, Textures: A Photographic Album for Artists
wavelet frames, IEEE Trans. Image Processing 4 (1995) and Designers. Dover, New York, 1966.
1549—1560. [32] P.P. Ohanian, R.C. Dubes, Performance evaluation for
[22] A. Laine, J. Fan, Frame representations for texture seg- four classes of textural features, Pattern Recognition 25
mentation, IEEE Trans. Image Processing 5 (1996) (1992) 819—833.
771—780. [33] M. Pietikäinen, S. Nieminen, E. Marszalec, T. Ojala,
[23] B.B. Chaudhuri, N. Sarkar, Texture segmentation using Accurate color discrimination with classification based
fractal dimension, IEEE Trans. Pattern Anal. Machine on feature distributions, Proc. 13th Int. Conf. on
Intelligence 17 (1995) 72—77. Pattern Recognition, Vol. 3, pp. 833—838, Vienna, Austria,
[24] J.-L. Chen, A. Kundu, Unsupervised texture segmentation 1996.
using multichannel decomposition and hidden Markov [34] M. Swain, D. Ballard, Color indexing, Int. J. Computer
models, IEEE Trans. Image Processing 4 (1995) 603—619. Vision 7 (1991) 11—32.
[25] D.K. Panjwani, G. Healey, Markov random field models [35] T. Ojala, Nonparametric texture analysis using spatial
for unsupervised segmentation of textured color images, operators, with applications in visual inspection, Ph.D.
IEEE Trans. Pattern Anal. Machine Intelligence 17 (1995) thesis, Acta Univ. Oul. C 105, University of Oulu, Finland,
939—954. 1997.
[26] D. Harwood, T. Ojala, M. Pietikäinen, S. Kelman, [36] G. Smith, I. Burns, MeasTex Image Texture Database
L.S. Davis, Texture classification by center-symmetric and Test Suite, CSSIP, University of Queensland,
auto-correlation, using Kullback discrimination of distri- Australia. http://www.cssip.elec.uq.edu.au/)guy/meastex/
butions, Pattern Recognition Lett. 16 (1995) 1—10. home.html.
About the Author—TIMO OJALA received the M.S. degree in Electrical Engineering with honors from the University of Oulu, Finland,
in 1992, and the Dr. Tech. degree from the same university in 1997. He is a member of Machine Vision and Media Processing Group at
the University of Oulu. From 1996 to 1997 he was visiting the University of Maryland Institute for Advanced Computer Studies
(UMIACS). His research interests includes pattern recognition, texture analysis and object-oriented software design.
About the Author—MATTI PIETIKA®INEN received his Doctor of Technology degree in Electrical Engineering from the University of
Oulu, Finland, in 1982. Currently he is Professor of Information Technology, Scientific Director of Infotech Oulu—a center for
information technology research, and Head of Machine Vision and Media Processing Group, at the University of Oulu. From 1980 to
1981 and from 1984 to 1985 he was visiting the Computer Vision Laboratory at the University of Maryland, USA. His research interests
include machine vision, document analysis, and their applications. He has authored about 100 papers in journals, books and
conferences. He is the editor (with L.F. Pau) of the book ‘‘Machine Vision for Advanced Production’’, published by World Scientific in
1996. Prod. Pietikäinen is Fellow of International Association for Pattern Recognition (IAPR) and Senior Member of IEEE, and serves
as Member of the Governing Board of IAPR and Chairman of IAPR Education Committee. He also serves on program committees of
several international conferences.