0% found this document useful (0 votes)
33 views5 pages

Learning Texture Features From GLCM For Classification of Brain Tumor MRI Images Using Random Forest Classifier

This document describes a study that used texture features extracted from grey-level co-occurrence matrices (GLCM) and a random forest classifier to classify brain tumor MRI images. A dataset of 245 brain MRI images consisting of 154 images with tumors and 91 images without tumors was used. Various GLCM texture features were extracted and evaluated using the random forest classifier, achieving promising accuracy and other performance metrics for brain tumor classification.

Uploaded by

Harshini M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views5 pages

Learning Texture Features From GLCM For Classification of Brain Tumor MRI Images Using Random Forest Classifier

This document describes a study that used texture features extracted from grey-level co-occurrence matrices (GLCM) and a random forest classifier to classify brain tumor MRI images. A dataset of 245 brain MRI images consisting of 154 images with tumors and 91 images without tumors was used. Various GLCM texture features were extracted and evaluated using the random forest classifier, achieving promising accuracy and other performance metrics for brain tumor classification.

Uploaded by

Harshini M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/360059891

Learning Texture Features from GLCM for Classification of Brain Tumor MRI
Images using Random Forest Classifier

Article · April 2022


DOI: 10.37394/232014.2022.18.8

CITATIONS READS

13 108

1 author:

Ashwani Kumar
Sant Longowal Institute of Engineering and Technology
58 PUBLICATIONS 627 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Energy urbanization population nexus View project

Multiobjective optimization in Signal Processing View project

All content following this page was uploaded by Ashwani Kumar on 13 May 2022.

The user has requested enhancement of the downloaded file.


WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.8 Ashwani Kumar Aggarwal

Learning Texture Features from GLCM for Classification of Brain


Tumor MRI Images using Random Forest Classifier
ASHWANI KUMAR AGGARWAL
Department of Electrical and Instrumentation Engineering
Sant Longowal Institute of Engineering and Technology
Longowal-148106, Punjab, INDIA

Abstract—In computer vision, image feature extraction methods are used to extract features so that the features are
learnt for classification tasks. In biomedical images, the choice of a particular feature extractor from a diverse range
of feature extractors is not only subjective but also it is time consuming to choose the optimum parameters for a
particular feature extraction algorithm. In this paper, the focus is on the Grey-level co-occurrence matrix (GLCM)
feature extractor for classification of brain tumor MRI images using random forest classifier. A dataset of brain
MRI images (245 images) consisting of two classes viz. images with tumor (154 images) and images without tumor
(91 images) has been used to assess the performance of GLCM features on random forest classifier in terms of
accuracy, true positive rate, true negative rate, false positive rate, false negative rate derived from the confusion
matrix. The results show that by using optimum parameters, the GLCM feature extracts significant texture
component in brain MRI images for promising accuracy and other performance metrics.

Keywords—statistical texture features, image matching, descriptors, dissimilarity, entropy


Received: April 15, 2021. Revised: February 16, 2022. Accepted: March 20, 2022. Published: April 19, 2022.

radio waves in the brain. After the radio waves are stopped,
the MRI imager receives the energy signals from the body to
1. Introduction image the brain [10]. The MRI images are sometimes taken
with a dye to enhance the contrast of the image. This paper is
Brain tumors occur due to abnormal growth of cells [1].
Like other tumors, the brain tumors may be benign tumors or organized as follows. Section II discuss the related work.
malignant tumors. A malignant tumor usually spreads more Section III presents the dataset and methodology. Section IV
rapidly than a benign tumor [2]. If a brain tumor starts from presents the results obtained and the discussion. Section V
the brain, it is known as primary brain tumor, whereas a tumor concludes the work.
which spreads to brain from other parts of the body is known
as secondary brain tumor. The symptoms of brain tumor vary 2. Related Work
from a person to person, however, some of the common
symptoms are nausea, vomiting, headache, seizures, and loss The automatic detection of tumors in medical images is
of balance, etc. There are hundreds of types of brain tumors, challenging task. The feature section and the choice of
the most common types are gliomas, meningioma, and classifier is very important for the detection results to give a
medulloblastoma [3]. The gliomas brain tumor may be low- significant accuracy. The features derived from the grey-level
grade astrocytoma which is a slow growing tumor and is co-occurrence matrix have been used to classify the brain
usually benign or glioblastoma multiforme which is rapidly tumors using a two-layered artificial neural network [11]. The
growing and is usually malignant [4]. The meningioma accuracy obtained using the method is 97.5%. The brain
usually starts from brain and usually is benign. images are classified into four classes viz. astrocytoma,
Medulloblastoma is more common in children than in adults meningioma, metastatic bronchogenic carcinoma, and
[5]. The brain tumor imaging modalities help the radiologists sarcoma. A total of 16 features are extracted based on
and oncologists during pre-therapy (for assess the lesion correlation, contrast, dissimilarity, energy, homogeneity,
extent, grading), therapy (delineation), and post-therapy variance, and entropy. The conditional entropy is used using
(therapy response, monitoring) [6]. The brain tumor imaging evolutionary algorithm [12].
modalities include mass spectroscopy, brain perfusion (CT The segmentation and the classification of brain tumors
and MRI), diffusion tensor imaging (DTI), and functional has been done by using texture features derived from GLCM
magnetic resonance imaging (fMRI), etc. [7]. The magnetic and using wavelets. The brain MRI images are segmented
resonance imaging (MRI) uses a very strong magnet and radio using Otsu thresholding method and then k-means clustering
waves to image the brain [8]. All the metal objects need to be is performed. The texture features are obtained from GLCM
removed before taking MRI scan as the metallic objects along with features extracted using wavelets. The combined
interfere with the magnetic field and causes erroneous signal. features are given to PCA before classifying the images with
The patients with metallic implants such as pacemaker are support vector machines. It is shown that linear kernels
sometimes undergone alternative imaging modality by the outperform than polynomial kernels for the classification of
radiologist. The MRI imagers are closed type of open type. In brain MRI images [13]. The image retrieval using features
case of open type MRI scanners, the image quality is not as based on ttexture and shape are used [14]. An overview of
good as that obtained with closed type MRI scanners [9]. The methods for brain tumor images using features derived from
magnet produces a strong magnetic field and rf coils send the grey-level co-occurrence matrix and classified using artificial

E-ISSN: 2224-3488 60 Volume 18, 2022


WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.8 Ashwani Kumar Aggarwal

neural networks is given [15]. Brain MRI images are classified done at various resolutions. The texture features can be
using various features obtained from GLCM and kernel classified as statistical, structural, and model based methods.
support vector machines as a classifier. The feature reduction The statistical texture features are extracted based on
module is used after extraction of features and before giving correlation of neighboring pixels, frequency of occurrence of
the features to the kernel support vector machines for pairs of pixel intensity values in a neighborhood, and entropy.
classification [16]. The classification of brain tumor MRI The statistical features may be first order features (mean,
images is done using schematic segmentation and support median, variance, entropy) or second order features
vector machine-based classification of features extracted from (relationships between groups of pixels). In this paper, the
grey-level co-occurrence matrix [17]. The images are pre- texture features are extracted using grey-level co-occurrence
processed using median filtering. the method is shown to have matrix (GLCM). The GLCM is a second order statistical
accuracy of 93.05% for the classification. texture feature extraction method [20]. The GLCM maps the
input image into a table that represents the number of
3. Dataset and Methodology occurrences of a pair of pixel values at a certain distance and
angle. The angle and distance values are varied over a range
3.1 Dataset of 0-360 degree and 1 pixel to 8 pixels respectively. The
The dataset consists of brain tumor MRI images. The total GLCM is a two-dimensional array where each dimension of
number of images is 245. The number of images with tumor the array is same and is equal to the number of greyscale levels
is 154 and the number of images without tumor is 91. The size in the image [21]. For 8-bit image, the number of levels is 256,
of the dataset is 7.22 MB. The image size of images in the and therefore, the GLCM has 256 rows and 256 columns.
dataset is not same, for example, some of the images have There is one such 256x256 matrix for each combination of
spatial resolution of 300x168 while others have spatial distance (offset) and angle value. Each diagonal cell
resolution of 200x200. The data size is also not same as some represents the texture homogeneity in the image, whereas off-
of the images are 4.46 KB while others are 5.76 KB. The diagonal cells count for texture heterogeneity in the image.
image format of the images in the dataset is jpg format. The matrix is made symmetric by adding the matrix with its
transpose. The matrix is then normalized by dividing each
3.2 Methodology element by the sum of all the elements in the matrix. The
The features such as Scale Invariant Feature Transform GLCM is used to obtain the second-order statistical texture
(SIFT), Speeded-Up Robust features (SURF), and Oriented features such as angular second moment, entropy, variance,
FAST and Rotated BRIEF (ORB) are used for image correlation, inverse difference moment, energy, dissimilarity,
classification [18]. These feature extractors extract geometric, homogeneity, and contrast etc. The energy is obtained by
color, textural, and shape information to construct a feature taking the square root of angular second moment. The
vector that represents the small neighborhood around the statistical features in an image give several features in the
feature point. SIFT is 128-dimensional feature vector that is image that are useful for the classification of brain MRI
robust to many affine transformations, illumination changes, images. The following statistical texture features have been
and sensor noise [19]. The SIFT features extracted on the brain obtained from GLCM for the brain tumor MRI images.
tumor MRI images are shown in Fig. 1. As the dimensions of 1) Energy feature: The energy feature is the square root
SIFT are 128 and there are hundreds of such features in a of angular second moment feature. This feature represents
single image, it becomes computationally expensive to the uniformity in the image texture. The energy feature
compute SIFT features for brain tumor MRI image
classification and therefore, SIFT has not been used in this obtained from GLCM is given by (1). The maximum value of
work. the energy is unity as GLCM is a normalized matrix.

𝑁−1
 𝐸 = √∑ ∑𝑁−1
𝑗=0 {𝑃(𝑖, 𝑗)}
2 (1) 
𝑖=0

2) Dissimilarity Feature: The dissimilarity represents the


heterogeneity in the image texture. The dissimilarity feature
is obtained by multiplying the GLCM cell values with linear
weights as given by (2).

𝑁−1
𝑁−1
 𝐷=∑ ∑ |𝑖 − 𝑗 |𝑃(𝑖, 𝑗) (2)
Fig. 1. Extracted SIFT fesatures 𝑗=0
𝑖=0

3) Homogeneity Feature: The large homogeneity in the


The texture of an image is spatial variation of pixel image texture is represented by large values of the diagonal
intensities in an image. If the pixel intensities vary a lot, that elements of the GLCM. If the image pixel values are same,
means the texture is coarse and if the pixel intensities do not the homogeneity is maximum. A large contrast reduces the
vary much, in that case, the texture is smooth. The texture is homogeneity in the image. The homogeneity feature is given
very useful clue for classifying the image contents. The
by (3).
texture descriptors may be obtained based on the direction,
color, and contrast. The texture analysis of an image can be .

E-ISSN: 2224-3488 61 Volume 18, 2022


WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.8 Ashwani Kumar Aggarwal

𝑁−1
𝑁−1
𝑃(𝑖,𝑗)
 𝐻=∑ ∑ 2 (3) 
𝑗=0 1+(𝑖−𝑗)
𝑖=0

4) Contrast Feature: The contrast feature is a measure of


difference between the smallest pixel value and the largest
pixel value in a group of pixels. The contrast feature is given
by (4).

𝑁−1
𝑁−1

𝐻 = ∑ ∑ 𝑃(𝑖, 𝑗)(𝑖 − 𝑗)2 (4)


𝑗=0
𝑖=0

A feature vector is obtained from these four features by


extracting these features for various values of offset and
angles. A step size of 1 and 3 pixels is taken and an angle of
0, 45, and 900 degree is taken.
The learnt features are given to a classifier to classify the
Fig. 2. Actual and Predicted class labels
brain tumor MRI images. The decision tree, support vector
machines, k-nearest neighbor, and random forest classifiers
It is observed that all the images with actual class ‘yes’, are
are some of the common classifiers used for image
predicted correctly in all the 9 test images. However, the out
classification tasks. In this paper, we have used random forest
classifier for the classification of the brain tumor MRI images. of 9 images with actual class ‘no’, only 6 are predicted
The other statistical tests like Chi-square test and t-tests are correctly as ‘no’ whereas, rest of the 3 are predicted falsely
conducted to validate the effectiveness of the method. as ‘yes’.
4.2 Confusion Matrix
4. Resuls and Discussion
A confusion matrix is obtained for evaluate the
The dataset is divided into training and testing datasets. performance of the method. The confusion matrix is put in
The training and testing sets are prepared from the given Fig. 3.
dataset by dividing it into a ratio of 0.8:0.2. The method is
repeated several times to order to make the model robust
towards various types of noise. The features are extracted
from the training dataset. The random forest classifier is
trained using the features extracted from the training dataset.
Thereafter, the features are extracted from testing datasets.
4.1 Actual and predicted Class labels
The classifier is tested for the performance on the features
extracted from the testing dataset. The results of the actual
class labels and predicted class labels for 18 test images is
shown in Fig. 2.

Fig. 3. Confusion matrix

It is observed from the confusion matrix that there is no


predicted class ‘no’ which is actually ‘yes’. The number of
images tested is 18. Out of 18 images, 9 belong to class ‘yes’
and 9 belong to class ‘no’.
4.3 Performance with various Offset and
Angle of GLCM
The GLCM is obtained for various combinations of steps
(offsets) and the angles to count the number of occurances of
a pair of pixel intensity values. A comparison of calssification

E-ISSN: 2224-3488 62 Volume 18, 2022


WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2022.18.8 Ashwani Kumar Aggarwal

accuracy for various values of steps and angles is given in [5] Mathew, A. Reema, P. Babu Anto, and N. K. Thara. "Brain tumor
segmentation and classification using DWT, Gabour wavelet and
Table I. GLCM." 2017 International Conference on Intelligent Computing,
Instrumentation and Control Technologies (ICICICT). IEEE, 2017.
TABLE I. COMPARISON OF CLASSIFICATION ACCURACY FOR
[6] A. Kaur, A. P. S. Chauhan, and A. K. Aggarwal, “An automated slice
VARIOUS OFFSET AND ANGLE VALUES OF GLCM
sorting technique for multi-slice computed tomography liver cancer
Classification Accuracy images using convolutional network,” Expert Systems with
Applications, vol. 186, p. 115686, 2021.
Offset (pixels) Angle (degree) 32 x 32 64 x 64
[7] Jellinger, K. "Glioblastoma multiforme: morphology and
1, 3 0, π/4 61.1% 83.3% biology." Acta neurochirurgica 42.1 (1978): 5-32.
[8] Rochkind, Semion, et al. "Extracranial metastases of medulloblastoma
1, 3, 5 0, π/4 72.2% 66.7%
in adults: literature review." Journal of Neurology, Neurosurgery &
1, 3 0, π/4, π/2 72.2% 66.7% Psychiatry 54.1 (1991): 80-86.
[9] A. K. Aggarwal, “Biological Tomato Leaf Disease Classification using
1, 3, 5 0, π/4, π/2 66.7% 72.2% Deep Learning Framework,” International Journal of Biology and
Biomedical Engineering, vol. 16, no. DOI:
1, 3, 5, 7 0, π/4 44.4% 66.7% 10.46300/91011.2022.16.30, pp. 241–244, 2022.
1, 3, 5, 7 0, π/4, π/2 83.3% 66.7% [10] Huang, Raymond Y., et al. "Pitfalls in the neuroimaging of
glioblastoma in the era of antiangiogenic and immuno/targeted
The performance of the method drops significantly if the therapy–detecting illusive disease, defining response." Frontiers in
neurology 6 (2015): 33.
spatial resolution of the image is reduced. For the same
[11] Dimou, S., et al. "A systematic review of functional magnetic
combination of offset (1 pixel and 3 pixels), and angles (0, π/4), resonance imaging and diffusion tensor imaging modalities used in
the accuracy reduces from 83.3% to 61.1% on reducing the presurgical planning of brain tumour resection." Neurosurgical
spatial resolution from 64 x 64 to 32 x 32. review 36.2 (2013): 205-214.
[12] Katti, Girish, Syeda Arshiya Ara, and Ayesha Shireen. "Magnetic
resonance imaging (MRI)–A review." International journal of dental
5. Conclusion clinics 3.1 (2011): 65-70.
The brain tumor MRI images are classified into two [13] M. Garg, J. S. Ubhi, and A. K. Aggarwal, “Neural Style Transfer for
classes viz. images with tumor and images without tumor. The Image within Images and Conditional GANs for Destylization,”
Journal of Visual Communication and Image Representation, 2022.
grey-level co-occurrence matrix obtained from the brain
[14] Foster‐ Gareau, Paula, et al. "Imaging single mammalian cells with a
tumor MRI images gives statistical texture features which are 1.5 T clinical MRI scanner." Magnetic Resonance in Medicine: An
computationally fast as compared to SIFT features. the Official Journal of the International Society for Magnetic Resonance in
random forest classifier classifies the images with an accuracy Medicine 49.5 (2003): 968-971.
of 83.3 % on a limited dataset. the performance of the method [15] Armstrong, Peter, and Stephen F. Keevil. "Magnetic resonance
could be improved by applying some pre-processing imaging--1: Basic principles of image production." BMJ: British
operations on the images. Another feature extraction methods Medical Journal 303.6793 (1991): 35.
may be combined with GLCM features to enhance the [16] Zulpe, Nitish, and Vrushsen Pawar. "GLCM textural features for brain
accuracy. The method can be extended by using additional tumor classification." International Journal of Computer Science Issues
(IJCSI) 9.3 (2012): 354.
layers in the model.
[17] Chauhan, Sumika, Manmohan Singh, and Ashwani Kumar Aggarwal.
"An effective health indicator for bearing using corrected conditional
Acknowledgment entropy through diversity-driven multi-parent evolutionary
algorithm." Structural Health Monitoring (2020): 1475921720962419.
The authors are thankful to their colleagues for
[18] Arora, Kratika and Ashwani Kumar Aggarwal. "Approaches for Image
proofreading this paper before submission. Database Retrieval Based on Color, Texture, and Shape
Features." Handbook of Research on Advanced Concepts in Real-Time
References Image and Video Processing, edited by Md. Imtiyaz Anwar, et al., IGI
Global, 2018, pp. 28-50. http://doi:10.4018/978-1-5225-2848-7.ch002
[19] Jain, Shweta. "Brain cancer classification using GLCM based feature
[1] Surawicz, Tanya S., et al. "Brain tumor survival: results from the
extraction in artificial neural network." International Journal of
National Cancer Data Base." Journal of neuro-oncology 40.2 (1998):
Computer Science & Engineering Technology 4.7 (2013): 966-970.
151-160.
[20] Kadam, Megha, and Avinash Dhole. "Brain tumor detection using
[2] Albini, A., et al. "A rapid in vitro assay for quantitating the invasive
GLCM with the help of KSVM." International Journal of Engineering
potential of tumor cells." Cancer research 47.12 (1987): 3239-3245.
and Technical Research 7.2 (2017).
[3] Waage, Ingunn Syversen, Ingeborg Vreim, and Sverre Helge Torp. "C-
[21] Hussain, Ashfaq, and Ajay Khunteta. "Semantic Segmentation of Brain
erb B2/HER2 in Human Gliomas, Medulloblastomas, and
Tumor from MRI Images and SVM Classification using GLCM
Meningiomas: a Minireview." International journal of surgical
Features." 2020 Second International Conference on Inventive
pathology 21.6 (2013): 573-582.
Research in Computing Applications (ICIRCA). IEEE, 2020.
[4] A. K. Aggarwal, “GPS-Based Localization of Autonomous Vehicles,”
Autonomous Driving and Advanced Driver-Assistance Systems
(ADAS): Applications, Development, Legal Issues, and Testing, p. Creative Commons Attribution License 4.0
437, 2021.
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the Creative
Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en_US

E-ISSN: 2224-3488 63 Volume 18, 2022

View publication stats

You might also like