Jurnal Teknik Pertanian Lampung (Journal of Agricultural Engineering)
Vol. 15 No. 2 (2026): April 2026

Image-Based Classification of Robusta Coffee Roasting Degree Using LDA–KNN with Color and Shape Features

Desi Kris Tanti Ritonga (IPB University)
Usman Ahmad (IPB University)
Sutrisno Suro Mardjan (IPB University)



Article Info

Publish Date
17 Apr 2026

Abstract

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%.

Copyrights © 2026






Journal Info

Abbrev

JTP

Publisher

Subject

Agriculture, Biological Sciences & Forestry Engineering

Description

Jurnal Teknik Pertanian Lampung or Journal of Agricultural Engineering (JTEP-L) is a peer-reviewed open-access journal. The journal invites scientists and engineers throughout the world to exchange and disseminate theoretical and practice-oriented researches in the whole aspect of Agricultural ...