Penerapan Algoritma K-Means Clustering dalam Segmentasi Citra Sayuran: Wortel, Kol, dan Terong Berbasis Matlab - atiqah, sri; Ramadhanu, Agung (Jurnal Sains dan Teknologi (JSIT), 2025)
The process of identifying vegetable quality faces a major challenge due to its reliance on manual inspection, which istime-consuming, inconsistent, and highly dependent on the observer’s subjectivity. This study aims to examine theapplication of the K-Means Clustering algorithm in the digital image segmentation of three types of vegetables—carrots,cabbages, and eggplants—to evaluate the algorithm’s ability to separate the main object from the background and assessidentification accuracy based on shape and texture features. The research employs an exploratory method with aconceptual prototype approach. The dataset consists of 30 digital images (10 for each vegetable type) obtained throughdirect image acquisition under controlled lighting conditions. All images were processed using MATLAB R2023a andconverted from the RGB color space to the CIELab (Lab) color space* prior to segmentation using the K-Meansalgorithm. After segmentation, shape features (area, perimeter, eccentricity) and texture features based on the Gray LevelCo-occurrence Matrix (GLCM) were extracted. Quantitative analysis was conducted to evaluate the segmentationaccuracy and the effectiveness of object separation. The results show that the K-Means algorithm successfully separatedthe main objects from the background with 100% accuracy and high consistency. This approach is considered feasible asan initial model for an automatic identification system for agricultural commodities based on digital imagery, withpotential for further development through dataset expansion and comparison with other algorithms.