Aceh International Journal of Science and Technology (Nov 2023)

Tuberculosis Detection using Gray Level Co-Occurrence Matrix (GLCM) and K-Nearest Neighbor (K-NN) Algorithms

  • Fuad Anwar,
  • Mohtar Yunianto*,
  • Rahmanisya Fani Aisha Putri

DOI
https://doi.org/10.13170/aijst.12.3.33241
Journal volume & issue
Vol. 12, no. 3
pp. 402 – 410

Abstract

Read online

Research has been conducted on detecting tuberculosis (TB) using machine learning. In this study, chest X-ray (CXR) image data was used with a pixel value of 512 x 512 and PNG format consisting of normal lung images and TB-infected lung images in a 50:50 ratio; the number of images was 200 training data images and 80 testing data images. In the preprocessing stage, grayscaling is carried out so the image has a grayscale. Then, do the image improvement using contrast stretching. Furthermore, image extraction was carried out using 22 GLCM features with variations in the direction of the angles of 0°, 45°, 90°, and 135°. The result of feature extraction data is then identified using KNN Classification. The training results have the highest accuracy value with variations in the direction of the GLCM angle of 45° and the value of K = 3; at the testing stage, it produces an accuracy of 90%.

Keywords