Journal of Applied Data Sciences
Vol 7, No 2: May 2026

Development of Color Segmentation and Texture Analysis Algorithms for Early Detection of Green Vegetable Deterioration in Retail Environments

Akhiyar, Dinul (Unknown)
Fitri, Iskandar (Unknown)
Nurcahyo, Gunadi Widi (Unknown)



Article Info

Publish Date
17 Mar 2026

Abstract

Vegetable deterioration in retail environments is often accelerated by improper storage conditions, leading to quality degradation, economic losses, and reduced consumer trust. Early detection of deterioration is therefore essential to enable timely preventive actions before visible spoilage becomes severe. This study proposes an integrated image-based framework for early detection of spinach leaf deterioration by combining K-Means++ for robust color segmentation, Gray Level Co-occurrence Matrix (GLCM) for texture feature extraction, and Convolutional Neural Network (CNN) for classification. K-Means++ improves segmentation stability through optimized centroid initialization, GLCM captures subtle texture variations associated with early spoilage, and CNN enables accurate classification by learning complex visual patterns from segmented images. The dataset consists of 642 spinach leaf images captured under controlled lighting for initial calibration and under varying lighting conditions to simulate real-world retail environments. Experimental results show that the standard K-Means algorithm achieved an average classification accuracy of 77%, while the proposed K-Means++ segmentation improved accuracy to 81.86%. Furthermore, CNN-based validation achieved the highest classification accuracy of 94.82%, demonstrating strong generalization capability. The novelty of this work lies in the optimized integration of K-Means++ segmentation under lighting variability, selective GLCM feature utilization validated through ablation analysis, and end-to-end CNN-based validation with real-time deployment feasibility. The proposed framework offers a practical, scalable, and non-destructive solution for automated freshness monitoring in retail environments and can be extended to other leafy vegetables.

Copyrights © 2026






Journal Info

Abbrev

JADS

Publisher

Subject

Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management

Description

One of the current hot topics in science is data: how can datasets be used in scientific and scholarly research in a more reliable, citable and accountable way? Data is of paramount importance to scientific progress, yet most research data remains private. Enhancing the transparency of the processes ...