Image-Based Classification of Robusta Coffee Roasting Degree Using LDA–KNN with Color and Shape Features - Desi Kris Tanti Ritonga; Usman Ahmad; Sutrisno Suro Mardjan (The University of Lampung, 2026)
The determination of robusta coffee roast levels is commonly conducted through visual assessment, which is inherently subjective and prone to inconsistency due to overlapping visual characteristics between adjacent roasting stages. On the other side, objective measurement equipment is often costly and not easily accessible. This study addresses this problem by proposing a digital image–based classification method for five robusta coffee roast levels (green, light, medium, medium-dark, and dark). Parameters included color feature extraction from RGB (Red, Green, Blue), HSV (Hue, Saturation, Value), and shape features including area, perimeter, and circularity are extracted from captured images. A hybrid Linear Discriminant Analysis (LDA) and K-Nearest Neighbor (KNN) classifier with Manhattan distance is employed to enhance class separability and improve classification accuracy. Model performance was evaluated using a confusion matrix (precision, accuracy, recall and F-1 score). Results showed that by integrating multiple visual features and employing a hybrid classification strategy, the proposed approach was able to improve the classification of Robusta coffee roasting levels. The evaluation using a 90:10 data split with an optimal k = 16 resulted in the highest accuracy of 83%.