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

Dinul Akhiyar, Iskandar Fitri, Gunadi Widi Nurcahyo

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.

Keywords


K-Means++; CNN; color segmentation; texture analysis; GLCM; deterioration; spinach leaves

Full Text:

PDF

References


Y. Wang, et al., "Technology applications in reducing post-harvest loss in the fresh produce industry," J. Food Sci. Technol., vol. 56, no. 9, pp. 4703-4712, 2023. doi: 10.1007/s11483-023-07841-4.

J. Liu, et al., "Color-based segmentation for detecting vegetable quality," Comput. Electron. Agric., vol. 182, p. 105968, 2023. doi: 10.1016/j.compag.2021.105968.

H. Zhang, et al., "Combined color and texture analysis for improved vegetable quality assessment," J. Agric. Eng. Res., vol. 84, pp. 15-25, 2023. doi: 10.1016/j.jaer.2023.03.005.

R. Smith and A. Brown, "The role of real-time quality monitoring in retail: Case studies," Retail Technol. Rev., vol. 11, no. 2, pp. 134-145, 2024. doi: 10.1016/j.retailtech.2024.02.003.

Z. Chen, et al., "Deep learning models for vegetable condition classification using large datasets," Int. J. Agric. Biol. Eng., vol. 17, no. 5, pp. 30-41, 2024. doi: 10.25165/j.ijabe.2024.017010.

S. Kim, et al., "Remote sensing technology for real-time monitoring of plant health in retail environments," Agric. Syst., vol. 195, p. 102729, 2023. doi: 10.1016/j.agsy.2023.102729.

V. Patel and R. Kumar, "Multidisciplinary approaches for effective quality monitoring in agriculture," Agric. Innov., vol. 22, no. 4, pp. 221-230, 2024. doi: 10.1016/j.agriinn.2024.03.005.

M. Barbosa, et al., "Effective vegetation segmentation using K-means clustering in sugarcane fields," Comput. Electron. Agric., vol. 156, pp. 60-71, 2023. doi: 10.1016/j.compag.2023.105968.

X. Chen, et al., "Enhanced K-means clustering for vegetation segmentation with UAV-LiDAR data," Remote Sens. Lett., vol. 14, no. 7, pp. 688-696, 2023. doi: 10.1080/2150704X.2023.1928239.

R. Qumsiyeh and M. Sabha, "Integrating K-means clustering with convolutional neural networks for plant disease detection," Comput. Biol. Med., vol. 104, pp. 56-67, 2023. doi: 10.1016/j.compbiomed.2023.104034.

A. Ghimire, et al., "Texture analysis in vegetable quality assessment using GLCM," Agric. Eng. J., vol. 74, pp. 103-115, 2023. doi: 10.1016/j.agrieng.2023.02.002.

P. Jain and S. Sharma, "Challenges in the adoption of real-time quality monitoring technologies in retail," J. Retail Technol., vol. 9, no. 2, pp. 45-54, 2024. doi: 10.1016/j.retailtech.2024.01.003.

Q. Li, et al., "Real-time quality monitoring systems for agricultural produce in retail environments," J. Agric. Technol., vol. 31, no. 6, pp. 150-160, 2024. doi: 10.1016/j.jat.2024.03.002.

S. Wang and T. Yu, "Enhancing customer satisfaction through technology-based quality monitoring in food retail," Food Quality & Preference, vol. 39, pp. 89-99, 2024. doi: 10.1016/j.foodqual.2024.02.003.

F. Gao, et al., "Integration of image processing and machine learning for automated vegetable quality detection," J. Agric. Inf. Tech., vol. 32, no. 4, pp. 202-211, 2024. doi: 10.1016/j.jagriinf.2024.01.001.

Barbosa, A., Santos, J., & Ferreira, R. (2023). K-Means clustering for sugarcane segmentation in aerial imagery. Precision Agriculture, 24(2), 345–362.

Chen, T., Wang, H., & Kim, Y. (2023). Weighted K-Means and local optimization for UAV-LiDAR data processing. Remote Sensing, 15(8), 2045.

Qumsiyeh, R., & Sabha, D. (2023). Integrating K-Means with CNNs for plant disease detection. Plant Phenomics, 5(1), 100.

K. Koyama, S. Mizushima, S. Kaizuka, and T. Nozawa, “Predicting sensory evaluation of spinach freshness using objective features from machine learning,” PLOS ONE, vol. 16, no. 3, e0248769, 2021, doi: 10.1371/journal.pone.0248769.

K. P. Ferentinos, “Deep learning models for plant disease detection and diagnosis,” Computers and Electronics in Agriculture, vol. 145, pp. 311–318, 2018, doi: 10.1016/j.compag.2018.01.009.

S. P. Lloyd, “Least squares quantization in PCM,” IEEE Trans. Inf. Theory, vol. 28, no. 2, pp. 129–137, 1982, doi: 10.1109/TIT.1982.1056489.

A. K. Jain, M. N. Murty, and P. J. Flynn, “Data clustering: A review,” ACM Comput. Surv., vol. 31, no. 3, pp. 264–323, 1999, doi: 10.1145/331499.331504.

A. Bhargava and A. Bansal, “Fruits and vegetables quality evaluation using computer vision: A review,” J. King Saud Univ.–Comput. Inf. Sci., vol. 33, no. 3, pp. 243–257, 2021, doi: 10.1016/j.jksuci.2018.06.002.

R. M. Haralick, K. Shanmugam, and I. Dinstein, “Textural features for image classification,” IEEE Trans. Syst., Man, Cybern., vol. SMC-3, no. 6, pp. 610–621, 1973, doi: 10.1109/TSMC.1973.4309314.

R. G. Keys, “Cubic convolution interpolation for digital image processing,” IEEE Trans. Acoust., Speech, Signal Process., vol. 29, no. 6, pp. 1153–1160, 1981, doi: 10.1109/TASSP.1981.1163711.

D. P. Mitchell and A. N. Netravali, “Reconstruction filters in computer graphics,” SIGGRAPH Comput. Graph., vol. 22, no. 4, pp. 221–228, 1988, doi: 10.1145/378456.378514.

N. Otsu, “A threshold selection method from gray-level histograms,” IEEE Trans. Syst., Man, Cybern., vol. 9, no. 1, pp. 62–66, 1979, doi: 10.1109/TSMC.1979.4310076.

G. Sharma, W. Wu, and E. N. Dalal, “The CIEDE2000 color-difference formula: Implementation notes, supplementary test data, and mathematical observations,” Color Research & Application, vol. 30, no. 1, pp. 21–30, 2005, doi: 10.1002/col.20070.

D. Liu, J. Liu, J. Wang, G. Zhong, and Z. Cai, “A brief review of image denoising techniques,” Vis. Comput. Ind., Biomed., Art, vol. 2, no. 7, 2019, doi: 10.1186/s42492-019-0016-7.

J. Canny, “A computational approach to edge detection,” IEEE Trans. Pattern Anal. Mach. Intell., vol. PAMI-8, no. 6, pp. 679–698, 1986, doi: 10.1109/TPAMI.1986.4767851.

S. M. Pizer et al., “Adaptive histogram equalization and its variations,” Comput. Vis., Graph., Image Process., vol. 39, no. 3, pp. 355–368, 1987, doi: 10.1016/S0734-189X(87)80186-X.

T. Arici, S. Dikbas, and Y. Altunbasak, “A histogram modification framework and its application for image contrast enhancement,” IEEE Trans. Image Process., vol. 18, no. 9, pp. 1921–1935, 2009, doi: 10.1109/TIP.2009.2021548.

M. Ahmed, A. Seraj, and S. M. Islam, “The k-means algorithm: A comprehensive survey and performance evaluation,” Electronics, vol. 9, no. 8, 1295, 2020, doi: 10.3390/electronics9081295.




DOI: https://doi.org/10.47738/jads.v7i2.1094

Refbacks

  • There are currently no refbacks.



Barcode

Journal of Applied Data Sciences

ISSN:2723-6471 (Online)
Publisher:Bright Publisher
Website:http://bright-journal.org/JADS
Email:taqwa@amikompurwokerto.ac.id (principal contact)
  support@bright-journal.org (technical issues)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0