Professional Documents
Culture Documents
Abstract:
This report is based on the study of different texture features in images using descriptors like
GLCM(Gray Level Co-occurrence Matrix) and Law Masks. GLCM is used to derive various statistical
indicators of texture including contrast, correlation, energy and entropy. Evaluation of Law Mask
involves determining of the different convolution masks and finding which is best suited for the texture
feature identification for different statistical measures like mean, absolute mean and standard
deviation. These methods are used for different images having different pixel intensities and the best
suited statistical parameter for a given methodology applied is analyzed in this report for a given
image. In addition, this report also contains short description on GLCM and Law Masks which has
been used for our feature analysis of a texture. Both the graylevel and color images has been
considered.
Contents
1 Introduction
2 Methodologies Used for Texture Analysis
2.1 GLCM
2.2 Law Masks
3 Design and Implementation
4 Experiments and Result Analysis
5 Computation Analysis
6 Conclusion
1. Introduction
Image texture defined as the spatial variation in the pixel intensities is a wide research area with
many methods. However, we have applied two most distinct and promising descriptors, GLCM and
Laws masks. The basic idea behind this was to classify different feature pixels in an image called
'texels'. These periodic property of an image often gives the texture of an image.
2. Methods Used for Texture Analysis:
2.1 Gray-level Co-Occurrence Matrices: One of the defining quality of texture is the
spacial distribution of pixel values (Tuceryan and Jain 1993). Statistical indicator have
therefore been one of the oldest method to describe texture. The aim of statistical methods of
texture analysis is to characterize the stochastic process of spacial distribution of pixel values in
an image(He and Wang 1991).
The occurrence of the gray level values can be tabulated as a matrix called gray level co-
occurrence matrix. To explain how a GLCM is constructed, lets consider an image P of
dimension N x N and G gray levels. The image block used to derive the GLCM is based on the
nearest neighborhood cells (Haralick, Dinstein and Shanmugam 1973).In this method we
assume that the information about the texture is provided by a matrix of relative frequencies
where two neighboring pixels that are separated by a distance 'd' and an angle angle theta
occur in a block. The gray value of the two pixels involved being 'i' and 'j' respectively. These
matrices are a function of angle and distance between two pixels.
Consider a small block of image I of size 5x5,and having 4 gray levels.
0 2 0 2 0
0 2 0 2 0
0 2 0 2 0
1 1 1 3 1
1 1 1 3 1
The gray level for the above image clip where d=1 and theta =0,45,90,135 are shown below.
I(d=1,theta = 0)
0 1 2 3
0 0 0 9 0
1 0 8 0 4
2 9 0 0 0
3 0 4 0 0
I(d=1,theta = 90)
0 1 2 3
0 12 3 0 0
1 3 8 1 0
2 0 1 8 1
3 0 0 1 1
I(d=1,theta = 135)
0 1 2 3
0 0 1 4 1
1 1 4 2 1
2 4 2 0 0
3 1 2 0 0
I(d=1,theta = 45)
0 1 2 3
0 0 1 4 1
1 1 4 1 2
2 4 1 0 0
3 1 2 0 0
The Co-occurrence matrix is symmetric in nature. The number of operations required to
compute a gray level co- occurrence matrix is directly proportional to the number of pixels and
the number of gray levels present in the image. All the information required for characterizing
the image texture can be obtained for the GLCM. So different type of texture descriptors can be
extracted from the matrix. Different type of texture descriptor is tabulated in the table below.
L3(Level) [ 1 2 1]
E3(Edge) [-1 0 1]
S3(Spot) [-1 2 -1]
L5(level) L3*L3 [1 4 6 4 1]
E5(Edge) L3*E3 [-1 -2 0 2 1]
S5(spot) L3*S3 [-1 0 2 0 -1]
R5(ripple) S3*S3 [1 -4 6 -4 1]
W5(Wave) E3*S3 [-1 2 0 -2 1]
The level (L5) vector gives a center weighted local average. Edge (E5) is similar to
gradient operator and responds to row or column stepped edges in an image. Spot (S5) is
based on the second derivative and is similar to performing Laplacian over a Gaussian. Wave
responds to slight changes in pixel intensities in an image and ripple(R5) is used to detect
ripples in an image.
Laws convolution masks are derived by multiplying the two vectors while considering
one vector as row and other vector as a column vector respectively. A set of such combinations
of 3x3 and 5x5 are shown below.
-1 4 6 -4 -1 1 -4 6 -4 1 -1 0 2 0 -1
-2 -8 -12 -8 -2 -4 16 -24 16 -4 -2 0 4 0 -2
0 0 0 0 0 6 -24 36 -24 6 0 0 0 0 0
2 8 12 8 2 -4 16 -24 16 -4 2 0 -4 0 2
1 4 6 4 1 1 -4 6 -4 1 1 0 -2 0 1
L3L3 1 2 1 E3S3 1 -2 1
2 4 1 0 0 0
1 2 1 -1 2 -1
L3E3 -1 0 1 S3L3 -1 -2 -1
-2 0 2 2 4 2
-1 0 1 -1 -2 -1
L3S3 -1 2 -1 S3E3 1 0 -1
-2 4 -2 -2 0 2
-1 2 -1 1 0 -1
E3L3 -1 -2 -1 S3S3 1 -2 1
0 0 0 -2 4 -2
1 2 1 1 -2 1
E3E3 1 0 -1
0 0 0
-1 0 1
Two steps are involved in obtaining the laws of texture descriptors-
1)Applying a convolution over a image using the above masks.
2)Obtain the statistical measure using the convolution result. We can obtain three statics such as
mean ,absolute mean and standard deviation.
Following steps has been taken for the implementation of the algorithms-
LawMaskColor(image_test1,mask);
Features:
1. It calls passes the colored image 'image_test1' and 'mask' as input parameters
2. It determines the Law Mask calling the Law_Mask function above explained for the all the
three channels to extract the features.
3. Finally, these features of the texture are represented as a color of texture.
4. Texture features are also shown as by calculating the average of all the channels for different
features.
a.
b.
b.
d.
c.
e. f.
The best result for 'feli.tif' was with the masks L3 and E3 which is shown in green. The best
was seen when it was calculated for all the pixels in each channel and the absolute mean so calculated
for then after convolution was averaged to get the image. However, nearly similar result was obtained
with direct computation of the absolute mean from the gray image but previous was more better. The
image with L5E5 was somewhat blurred so we have not placed here. The image for standard deviation
showed some distict texture feature in some cases like one best we got was with R5E5 in fig.c. But,
the features were totally degraded in the case of mean computations with this image. We have
highlighted the best result in 'green rectangle'.
b.
c.
a.
d.
e.
b.
c.
a.
d.
b.
a.
c.
c.
d.
a. S5E5(Standard Deviation) → We can clearly distinguish between the rough background and the
smooth tennis bat but ball cant be seen which is its defect. We kept this image because it can easily
detect the curvy lines of the board however the image is blurred so its not better for texture feature
manipulation.
b. L3E3(abs mean) → This cannot properly give clear remark on particular features because surfaces
are seen to be uniform so its not better.
c. L5S5(abs mean) → It gives better result with clear rough background and other plain objects are
given similar shade. In addition, the ball has some reflectance which makes it distinct. So,this image
can also be considered as a better image which gives the texture features classification.
d. L3L3(Standard deviation) → This looks more like edge detection derivatives like 'sobel'. Actual
texture of the image is not clear.
a. b.
a. L3L3(Standard deviation)
b.S3E3(abs. Mean)
c. L5L5(Std. Deviation-color) c.
d. R5L5(mean-RGB) d.
With the mosaic, we didn't get satisfactory result with the law masks. However, fig4a.
gives some sense of texture feature.
5. Computation Analysis
The key factor of running the program with the 1.8GHz processor, core 2 duo, 1GB RAM and using
MATLAB as the working platform gave satisfactory running speed of less than 3 secs for all the images
for Laws Masks. However, it took nearly 4-6 minutes to get an output for GLCM with the images. So,
looking the cost of computation laws masks proves to have an upper hand over GLCM.
GLCM
Image mask direction time(in secs)
PingPong2(gray) [3 3] 0 180,98
PingPong2(color) [3 3] 0 587,9
PingPong2(gray) [5 5] 45 214
PingPong2(color) [5 5] 45 642
Laws Masks
Image mask time(in secs)
PingPong(gray) [3 3] 0.22
' ' [3 3] 0.73
PingPong(color) [5 5] 0.45
' ' [5 5] 0.8
References
1. Joan Marti, Jordi Freixenet Lecture Slides on “Texture Characterization”
2. Christian Mata Miquel, “MSc. Thesis VIBOT Texture Descriptors applied to Digital
Mammography”
3. A.N.Tassetti, E.S.Malinverni,M. Hahn,”Texture Analysis to improve supervised Classification in
Ikonos Imagery”
4. A. Karahaliou, MSC, S Skiadopoulos, PHD, L Boniatis, MSC, P Sakellaropoulos, PHD, E Likaki,
MD, G Panayiotakis, PHD and L Costaridou, PHD “Texture analysis of tissue surrounding
microcalcifications on mammograms for breast cancer diagnosis”