Classification of COVID-19 from X-ray Images using GLCM Features and Machine Learning


  • Fallah H Najjar ᵃDepartment of Computer System Techniques, Technical Institute of Najaf, Al-Furat Al-Awsat Technical University, Iraq; ᶜFaculty of Engineering, School of Computing, Universiti Teknologi Malaysia, 81310 UTM Johor Bahru, Johor, Malaysia
  • Karrar A Kadhim ᵇComputer Techniques Engineering Department, Faculty of Information Technology, Imam Jaafar Al-Sadiq University, Baghdad, Iraq; ᶜFaculty of Engineering, School of Computing, Universiti Teknologi Malaysia, 81310 UTM Johor Bahru, Johor, Malaysia
  • Munaf Hamza Kareem Department of Computer System Techniques, Technical Institute of Najaf, Al-Furat Al-Awsat Technical University, Iraq
  • Hanan Abbas Salman Department of Computer System Techniques, Technical Institute of Najaf, Al-Furat Al-Awsat Technical University, Iraq
  • Duha Amer Mahdi Department of Computer System Techniques, Technical Institute of Najaf, Al-Furat Al-Awsat Technical University, Iraq
  • Horya M Al-Hindawi Computer Engineering Department, Faculty of Engineering, Mustansiriyah University, Baghdad, Iraq



COVID-19, feature extraction, GLCM, kNN, SVM


As the world continues to battle the devastating effects of the COVID-19 pandemic, it has become increasingly crucial to screen patients for contamination accurately and effectively. One of the primary screening methods is chest radiography, utilizing radiological imaging to detect the presence of the virus in the lungs. This study presents a cutting-edge solution to classify COVID-19 infections in chest X-ray images by utilizing the Gray-Level Co-occurrence Matrix (GLCM) and machine learning algorithms. The proposed method analyzes each X-ray image using the GLCM to extract 22 statistical texture features and then trains two machine learning classifiers - K-Nearest Neighbor and Support Vector Machine - on these features. The method was tested on the COVID-19 Radiography Database and was compared to a state-of-the-art method, delivering highly efficient results with impressive sensitivity, accuracy, precision, F1-score, specificity, and Matthew's correlation coefficient. The proposed approach offers a promising new way to classify COVID-19 infections in chest X-ray images and has the potential to play a crucial role in the ongoing fight against the pandemic.


WHO. (2020). WHO Director-General's opening remarks at the media briefing on COVID-19 - 11 March 2020. [Online]. Available:

W. H. Organization. (2020). Coronavirus disease 2019 (COVID-19) situation report-51.

Salim, A. A., Ghoshal, S. K., Suan, L. P., Bidin, N., Hamzah, K., Duralim, M., & Bakhtiar, H. (2018). Liquid media regulated growth of cinnamon nanoparticles: Absorption and emission traits. Malaysian Journal of Fundamental and Applied Sciences, 14(3-1), 447-449.

Hathot, S. F., Abbas, S. I., AlOgaili, H. A. T., & Salim, A. A. (2022). Influence of deposition time on absorption and electrical characteristics of ZnS thin films. Optik, 260, 169056.

Keni, R., Alexander, A., Nayak, P. G., Mudgal, J., & Nandakumar, K. (2020). COVID-19: emergence, spread, possible treatments, and global burden. Frontiers in Public Health, 216.

Vandenberg, O., Martiny, D., Rochas, O., van Belkum, A., & Kozlakidis, Z. (2021). Considerations for diagnostic COVID-19 tests. Nature Reviews Microbiology, 19(3), 171-183.

Salim, A. A., Bakhtiar, H., Ghoshal, S. K., & Huyop, F. (2020). Customised structural, optical and antibacterial characteristics of cinnamon nanoclusters produced inside organic solvent using 532 nm Q-switched Nd: YAG-pulse laser ablation. Optics & Laser Technology, 130, 106331.

Haralick, R. M., Shanmugam, K., & Dinstein, I. H. (1973). Textural features for image classification. IEEE Transactions on Systems, Man, and Cybernetics, 6, 610-621.

Singh, S., Srivastava, D., & Agarwal, S. (2017, August). GLCM and its application in pattern recognition. 2017 5th International Symposium on Computational and Business Intelligence (ISCBI) (pp. 20-25). IEEE.

Khudhair, K. T., Kadhim, O. N., Najjar, F. H., Abedi, F., Jamaluddin, A. N., & Al-Kharsan, I. H. (2022, May). Soft edge detection by mamdani fuzzy inference of color image. 2022 5th International Conference on Engineering Technology and its Applications (IICETA) (pp. 379-383). IEEE.

Salim, A. A., Ghoshal, S. K., Bakhtiar, H., Krishnan, G., & Sapingi, H. H. J. (2020, April). Pulse laser ablated growth of Au-Ag nanocolloids: Basic insight on physiochemical attributes. Journal of Physics: Conference Series.1484(1), 012011. IOP Publishing.

Goyal, S., & Singh, R. (2021). Detection and classification of lung diseases for pneumonia and Covid-19 using machine and deep learning techniques. Journal of Ambient Intelligence and Humanized Computing, 1-21.

Thepade, S. D., & Jha, H. (2021). COVID-19 identification using machine learning classifiers with GLCM features of chest x-ray images. Trends in Sciences, 18(23), 46-46.

Najjar, F. H., Al-Jawahry, H. M., Al-Khaffaf, M. S., & Al-Hasani, A. T. (2021, April). A novel hybrid feature extraction method using LTP, TFCM, and GLCM. Journal of Physics: Conference Series, 1892(1), 012018. IOP Publishing.

Zhang, W., Pogorelsky, B., Loveland, M., & Wolf, T. (2021). Classification of COVID-19 X-ray images using a combination of deep and handcrafted features. arXiv preprint arXiv:2101.07866.

Abbood, E. A., & Al-Assadi, T. A. (2022). GLCMs Based multi-inputs 1D CNN deep learning neural network for COVID-19 texture feature extraction and classification. Karbala Int. J. Mod. Sci., 8(1), 28-39.

Shaban, W. M., Rabie, A. H., Saleh, A. I., & Abo-Elsoud, M. A. (2020). A new COVID-19 patients detection strategy (CPDS) based on hybrid feature selection and enhanced KNN classifier. Knowledge-Based Systems, 205, 106270.

Ozdemir, M. A., Ozdemir, G. D., & Guren, O. (2021). Classification of COVID-19 electrocardiograms by using hexaxial feature mapping and deep learning. BMC Medical Informatics and Decision Making, 21(1), 1-20.

Shiri, I., Mostafaei, S., Haddadi Avval, A., Salimi, Y., Sanaat, A., Akhavanallaf, A., ... & Zaidi, H. (2022). High-dimensional multinomial multiclass severity scoring of COVID-19 pneumonia using CT radiomics features and machine learning algorithms. Scientific Reports, 12(1), 14817.

Chicco, D., & Jurman, G. (2020). The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics, 21, 1-13.

Bakheet, S., & Al-Hamadi, A. (2021). Automatic detection of COVID-19 using pruned GLCM-Based texture features and LDCRF classification. Computers in Biology and Medicine, 137, 104781.

Konar, D., Panigrahi, B. K., Bhattacharyya, S., Dey, N., & Jiang, R. (2021). Auto-diagnosis of COVID-19 using lung CT images with semi-supervised shallow learning network. IEEE Access, 9, 28716-28728.

Panwar, H., Gupta, P. K., Siddiqui, M. K., Morales-Menendez, R., & Singh, V. (2020). Application of deep learning for fast detection of COVID-19 in X-Rays using nCOVnet. Chaos, Solitons & Fractals, 138, 109944.

Waheed, S. R., Rahim, M. S. M., Suaib, N. M., & Salim, A. A. (2023). CNN deep learning-based image to vector depiction. Multimedia Tools and Applications, 1-20.

Hathot, S. F., Jubier, N. J., Hassani, R. H., & Salim, A. A. (2021). Physical and elastic properties of TeO2-Gd2O3 glasses: Role of zinc oxide contents variation. Optik, 247, 167941.

Salim, A. A., Ghoshal, S. K., & Bakhtiar, H. (2021). Growth mechanism and optical characteristics of Nd: YAG laser ablated amorphous cinnamon nanoparticles produced in ethanol: Influence of accumulative pulse irradiation time variation. Photonics and Nanostructures-Fundamentals and Applications, 43, 100889.

Shukla, P., Verma, A., Verma, S., & Kumar, M. (2020). Interpreting SVM for medical images using Quadtree. Multimedia Tools and Applications, 79, 29353-29373.

Ji, T., Liu, Z., Wang, G., Guo, X., Lai, C., Chen, H., ... & Zhou, Q. (2020). Detection of COVID-19: A review of the current literature and future perspectives. Biosensors and Bioelectronics, 166, 11245.

Salim, A. A., Ghoshal, S. K., Shamsudin, M. S., Rosli, M. I., Aziz, M. S., Harun, S. W., ... & Bakhtiar, H. (2021). Absorption, fluorescence and sensing quality of Rose Bengal dye-encapsulated cinnamon nanoparticles. Sensors and Actuators A: Physical, 332, 113055.

Podder, P., Bharati, S., Mondal, M. R. H., & Kose, U. (2021). Application of machine learning for the diagnosis of COVID-19. Data Science for COVID-19 (pp. 175-194). Academic Press.

Najjar, F. H., Khudhair, K. T., Khaleq, A. H. A., Kadhim, O. N., Abedi, F., & Al-Kharsan, I. H. (2022, May). Histogram features extraction for edge detection approach. 2022 5th International Conference on Engineering Technology and its Applications (IICETA) (pp. 373-378). IEEE.

Salim, A. A., Bakhtiar, H., Shamsudin, M. S., Aziz, M. S., Johari, A. R., & Ghoshal, S. K. (2022). Performance evaluation of rose bengal dye-decorated plasmonic gold nanoparticles-coated fiber-optic humidity sensor: A mechanism for improved sensing. Sensors and Actuators A: Physical, 347, 113943.

Ali, A. H., & Najjar, F. H. (2018, September). Integrating the kernel method to autonomous learning multi-model systems for online data. 2018 International Conference on Artificial Intelligence and Data Processing (IDAP) (pp. 1-5). IEEE.