Palm Oil Maturity Classification Using K-Nearest Neighbors Based on RGB and L*a*b Color Extraction
Shofan Saifullah, Dessyanto Boedi Prasetyo, Indahyani, Rafał Dreżewski, Felix Andika Dwiyanto
Abstract
This study aims to classify the maturity level of oil palm using the K-Nearest Neighbors (KNN) method based on the extraction of RGB and L*a*b color features. This classification determines the optimal oil production based on the color of the palm. However, this process is often carried out by humans, so sorting is not optimal because it is done manually, and it takes a long time. Thus, we propose automatic detection using machine learning based approach. In this study, the image processing methods are used to classify the level of oil palm maturity. The process starts with taking 150 photos with a smartphone. Each of them is then grouped into 3 classes, namely ripe (50), intermediate (50), and unripe (50). The oil palm image is pre-processed using the segmentation method (removing background), resizing, and cropping. Then, color features using RGB and L*a*b are extracted. Each of these extracted color features becomes input in the training and testing process of the KNN algorithm and is validated using k-fold cross-validation, with the results of accuracy being 95.4% and 97.4%. The combination of KNN and L*a*b color extraction approaches has better accuracy than KNN and RGB in terms of model accuracy (by 2–4.8 percentage points).