Image Texture Feature Extraction Using GLCM Approach: P. Mohanaiah, P. Sathyanarayana, L. Gurukumar

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 1

ISSN 2250-3153

Image Texture Feature Extraction Using GLCM


Approach
P. Mohanaiah*, P. Sathyanarayana**, L. GuruKumar***
*
Professor, Dept. of E.C.E, N.B.K.R.IST, Vidyanagar, Nellore, India
**
Professor, Dept. of E.C.E, S.V University Tirupati, India
***
Asst.Professor, Dept. of E.C.E, N.B.K.R.IST, Vidyanagar, Nellore, India

Abstract- Feature Extraction is a method of capturing visual


content of images for indexing & retrieval. Primitive or low level II. EXTRACTION OF GLCM
image features can be either general features, such as extraction In statistical texture analysis, texture features are computed
of color, texture and shape or domain specific features. This from the statistical distribution of observed combinations of
paper presents an application of gray level co-occurrence matrix intensities at specified positions relative to each other in the
(GLCM) to extract second order statistical texture features for image. According to the number of intensity points (pixels) in
motion estimation of images. The Four features namely, Angular each combination, statistics are classified into first-order, second-
Second Moment, Correlation, Inverse Difference Moment, and order and higher-order statistics. The Gray
Entropy are computed using Xilinx FPGA. The results show that Level Coocurrence Matrix (GLCM) method is a way of
these texture features have high discrimination accuracy, requires extracting second order statistical texture features.
less computation time and hence efficiently used for real time The approach has been used in a number of applications, Third
Pattern recognition applications. and higher order textures consider the relationships among three
or more pixels. These are theoretically possible but not
Index Terms- Texture, Pattern recognition, Features, Frames. commonly implemented due to calculation time and
interpretation difficulty.
A GLCM is a matrix where the number of rows and
I. INTRODUCTION columns is equal to the number of gray levels, G, in the image.
The matrix element P (i, j | ∆x, ∆y) is the relative frequency with
F eature extraction involves simplifying the amount of
resources required to describe a large set of data accurately.
When performing analysis of complex data one of the major
which two pixels, separated by a pixel distance (∆x, ∆y), occur
within a given neighborhood, one with intensity ‘i’ and the other
problems stems from the number of variables involved. Analysis with intensity ‘j’. The matrix element P (i, j | d, ө) contains the
with a large number of variables generally requires a large second order statistical probability values for changes between
amount of memory and computation power or a classification gray levels ‘i’ and ‘j’ at a particular displacement distance d and
algorithm which over fits the training sample and generalizes at a particular angle (ө). Using a large number of intensity levels
poorly to new samples. Feature extraction is a general term for G implies storing a lot of temporary data, i.e. a G × G matrix for
methods of constructing combinations of the variables to get each combination of (∆x, ∆y) or (d, ө). Due to their large
around these problems while still describing the data with dimensionality, the GLCM’s are very sensitive to the size of the
sufficient accuracy. Texture tactile or visual characteristic of a texture samples on which they are estimated. Thus, the number
surface. Texture analysis aims in finding a unique way of of gray levels is often reduced. GLCM matrix formulation can be
representing the underlying characteristics of textures and explained with the example illustrated in fig 2.1 for four different
represent them in some simpler but unique form, so that they can gray levels. Here one pixel offset is used (a reference pixel and
be used for robust, accurate classification and segmentation of its immediate neighbour). If the window is large enough, using a
objects. Though texture plays a significant role in image analysis larger offset is possible. The top left cell will be filled with the
and pattern recognition, only a few architectures implement on- number of times the combination 0,0 occurs, i.e. how many time
board textural feature extraction. In this paper, Gray level co- within the image area a pixel with grey level 0 (neighbour pixel)
occurrence matrix is formulated to obtain statistical texture falls to the right of another pixel with grey level 0(reference
features. A number of texture features may be extracted from the pixel).
GLCM. Only four second order features namely angular second
moment, correlation, inverse difference moment, and entropy are
computed. These four measures provide high discrimination
accuracy required for motion picture estimation. These features
are calculated and implemented using Xilinx ISE 13.4.

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 2
ISSN 2250-3153

IDM =
...2

IDM weight value is the inverse of the Contrast weight.

3.3. Entropy
Entropy shows the amount of information of the image that
is needed for the image compression. Entropy measures the loss
of information or message in a transmitted signal and also
Fig 2.1. GLCM calculation measures the image information.

The MATLAB code used for the GLCM is


q1 = imread ('Jerry.jpg');
w1 = rgb2gray (q1);
e1 = imresize (w1, [128 128]); ENTROPY =
...3
r1 = graycomatrix (e1);
disp (r1); 3.4. Correlation
t1 = imhist (e1); Correlation measures the linear dependency of grey levels
figure, imshow (e1), title ('transformed gray Jerry .jpg in gray'); of neighboring pixels.Digital Image Correlation is an optical
The output will be an 8*8matrix which is a GLCM of input method that employs tracking & image registration techniques
image. for accurate 2D and 3D measurements of changes in images.
This is often used to measure deformation, displacement, strain
and optical flow, but it is widely applied in many areas of science
III. EXTRACTION OF TEXTURE FEATURES OF and engineering. One very common application is for measuring
IMAGE the motion of an optical mouse.
Gray Level Co-Occurrence Matrix (GLCM) has proved to
be a popular statistical method of extracting textural feature from Ng 1 Ng 1
images. According to co-occurrence matrix, Haralick defines
fourteen textural features measured from the probability matrix
  (i, j) p(i, j)   
i 0 j 0
x y

to extract the characteristics of texture statistics of remote


sensing images. In this paper four important features, Angular  x y
Second Moment (energy), (inertia moment), Correlation, Correlation= ...4
Entropy, and the Inverse Difference Moment are selected for
implementation using Xilinx ISE 13.4. The formulation and extraction of the four given image
features are extracted using matlab for calculating GLCM as
3.1. Angular Second Moment image cannot be directly given as input to implement using
Angular Second Moment is also known as Uniformity or FPGA.Image feature extraction method used in this paper is
Energy. It is the sum of squares of entries in the GLCMAngular given in fig 3.1.All the texture features are real numbers. Real
Second Moment measures the image homogeneity. Angular numbers cannot be displayed using waveforms which show only
Second Moment is high when image has very good homogeneity bits as outputs.
or when pixels are very similar

ASM =
. …1
Where i, j are the spatial coordinates of the function p (i, j),
Ng is gray tone.

3.2 Inverse Difference Moment


Inverse Difference Moment (IDM) is the local
homogeneity. It is high when local gray level is uniform and
inverse GLCM is high.

Fig 3.1.Extraction of image features.

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 3
ISSN 2250-3153

So bits are converted to real numbers using “$bitstoreal” 4.2.1. Entropy


command. Hence the real number output will be displayed in the
console window. As the delay given is 10ns, till 10ns the 64
inputs are –nan and after 10ns the inputs will be assigned. The
last one is the output which is the texture feature.

IV. RESULTS

Entropy =72.68175

4.2.2. Inverse Difference Moment

RGB to Grey Converted


Image

IDM=65.738

4.2.3. Angular Second Moment

Fig 4.1. Input image & Converted output sample Image of a


video
4.2. Grey Level Co-occurrence Matrix

Asm=963.309

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 4
ISSN 2250-3153

4.2.3. Correlation [2] R.E. Haralick, K.Shanmugam, I.Dinstein, Textural Features for Image
Classification, IEEE Transactionson Systems, Man and Cybernetics, Vol.
SMC-3, No.6, Nov 1973
[3] J.L. Hennesy& D.A. Patterson, Computer Architecture, A Quantitative
Approach, Morgan Kaufmann,May 2002
[4] D.E. Maroulis, D.K. Iakovidis, S.A. Karkanis, D.A. Karras, Cold: a
versatile detection system for colorectallesions in endoscopy video frames,
Computer Methods and Programs in Biomedicine, vol 70, no. 2, pp. 99-186,
Elsevier Science, 2003
[5] W. Luk, P. Andreou, A. Derbyshire, F. Dupont-De- Dinechin, J. Rice, N.
Shirazi and D. Siganos, Field-Programmable Logic: From FPGAs to
Computing Paradigm, Springer-Verilog, Berlin, 1998
[6] M. Nibouche, A. Bouridane, D. Crookes, O. Nibouche, An FPGA-based
wavelet transforms coprocessor, in Proc. IEEE Int. Conf. Image Processing,
pp. 194-197, vol.3, 2003.
[7] H. Hikawa, Implementation of Simplified Multilayer Neural Network with
On-chip Learning, Proc. of theIEEE International Conference on Neural
Networks(Part 4), Vol. 4, 1999, pp 1633-1637.
[8] T. Nakano, T. Morie, and A. Iwata, A Face/Object Recognition System
Correlation=-4668.833 Using FPGA Implementation of Coarse Region Segmentation, SICE
Annual Conference 2003, pp. 1418-1423, Fukui, Aug. 4-6, 2003.
Texture Features Extraction for Cartoon Image [9] K. Heikkinen and P. Vuorimaa, Computation of Two Texture Features in
Hardware, Proceedings of the 10thInternational Conference on Image
Image Size Analysis and Processing, Venice, Italy, pages 125-129, September 27-29,
1999.
[10] K.C. Chang, Digital Design and Modeling with VHDL and Synthesis, IEEE
Features 64 x 64 128 x 128 256 x 256 Computer Society Press - Wiley, 1997
[11] ISO/IEC JTC 1/SC 29/WG 1 N1646R, JPEG2000 part 1 final committee
draft version 1.0, 2000.
[12] C,-T.Huang, P-C, Tseng, and L,-G Chen, “Generic RAM-based
ASM 54.8659 963.309232 17059.1454 architectures for two-dimensional discrete wavelet transform with line
based method,” IEEE Trans. on Circuits and Systems, vol. 1, pp. 363-366,
2002.
Entropy 5.0947 64.164512 436.382

Correlation -108951.191 -4668.83318 -161.7655 AUTHORS


First Author –
IDM 15.8964 65.788393 271.589 Mohanaiah P - has received B.Tech
(Electronics & Communication
As the size of the image for which Texture features are Engineering, 1992), M.Tech (Atmospheric
extracted increases the values of all the features are also Science & Engineering, 1996) and also
increased proportionally. So the optimum size to be used for Pursuing Ph.D. (Signal Processing) from
extraction is 128x128 for better resolution and minimum loss of S.V. University, Tirupati, A.P, India.
information. Presently he is working as Professor and
Head, Dept. of ECE, N.B.K.R.I.S.T,
Nellore, A.P., India. He has presented
V. CONCLUSION papers in two International conferences and five National
conferences in various fields. He is a life member of ISTE, and
The Gray Level Co-ocurrence Matrix (GLCM) method is member of IEEE. His Areas of Interest also include Video &
used for extracting four Statistical Texture Parameters i.e., Image Processing, Speech Processing & Radar Signal
Entropy, Inverse Difference Moment, Angular Second Moment Processing., Email: [email protected]
and Correlation. By extracting the features of an image by
GLCM approach, the image compression time can be greatly Second Author –
reduced in the process of converting RGB to Gray level image Dr. P. Sathyanarayana – has received
when compared to other DWT Techniques, but however DWT is B.Tech (E.C.E, 1976), M.Tech
versatile method of compressing video as a whole. These features (Instrumentation & Control systems,
are useful in motion estimation of videos and in real time pattern 1978) and Ph.D. (Digital Signal
recognition applications like Military & Medical Applications. Processing, 1987) from S.V. University
Tirupati. He also obtained his Post
Doctoral Fellow in 1-D Signal Processing
REFERENCES from Concordia University, Montreal,
[1] Design & Implementation of 3D-DWT for Video Processing Applications, Canada from 1988-1990. He worked as
International Journal of Advanced Electrical & Electronics Head, Dept. of E.C.E, S.V. University, Tirupati, A.P., India. He
Engineering(IJAEEE), vol 1, issue 3, 2012. ISSN: 2278-8948

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 5
ISSN 2250-3153

visited many countries like Malaysia, U.S.A and other countries GuruKumar Lokku -has received B.Tech (E.C.E, 2009), M.E.
as visiting faculty. He is the principal investigator for DST (VLSI Design, 2012) from S.V. University, A.P., India & Anna
sponsored projects. He is the member of expert committee of University, T.N., India respectively. Presently he is working as
NBA and chairman, BOS (E.C.E) for P.G. in S.V. University, Assistant Professor, N.B.K.I.S.T, A.P, India. He also presented 2
Tirupati and V.S. University, Nellore, A.P., India. He presented papers in International & one paper in National Conference and
16 papers in International Journals like IEEE & IETE. He also published 2 papers in International Journals. , Email:
Presented more than 30 papers in National Conferences., Email: [email protected]
[email protected]

Third Author –

www.ijsrp.org

You might also like