Eye diseases are one of the health issues that can lead to a decline in visual acuity if not detected and treated at an early stage. With advances in digital image processing and machine learning technologies, eye images can be utilised as a source of information to support the automated classification of eye diseases. This study aims to apply the K-Nearest Neighbour (K-NN) algorithm to classify eye diseases based on eye images. The dataset used in this study consists of 4,217 eye images categorised into four classes: cataract, glaucoma, diabetic retinopathy, and normal. The research stages included image pre-processing, comprising conversion to greyscale images, normalisation, segmentation, and resizing. Next, texture features were extracted using the Gray Level Co-occurrence Matrix (GLCM) method to obtain features representing the characteristics of the eye images. The data were then split into training and test sets in an 80:20 ratio before classification was carried out using the K-NN algorithm. The evaluation results show that the K-NN algorithm with K = 7 achieved an accuracy rate of 81 per cent, indicating that the model is able to classify the majority of eye images accurately.
Copyrights © 2026