Color Analysis of Coffee Cherry Image Using Image Processing and Machine Learning
Main Article Content
Abstract
This research aimed to analyze and compare the color values of coffee cherries at different ripening stages, including unripe, ripe, and overripe stages, using histogram analysis and color segmentation with K-means clustering in the RGB color system. The results showed that histogram analysis highlighted the significance of the green color in the unripe stage, which decreased significantly in the ripe and overripe stages, reflecting the degradation of chlorophyll. Meanwhile, the red color increased in the ripe stage and decreased in the overripe stage, corresponding to pigment changes in the coffee cherries. The blue color exhibited minimal changes but contributed to the balance of the analysis. For color segmentation using K-means clustering, the number of clusters (k) significantly impacted the segmentation results. A value of k=3 was suitable for analyzing primary colors, while k=4 provided more detailed shades, enhancing the segmentation of different tones, such as lighter and darker greens in the unripe stage or purple tones in the ripe and overripe stages. These techniques effectively identified the ripeness levels of coffee cherries and could be applied to automated sorting systems in the coffee industry, improving sorting processes with greater accuracy.
Article Details

This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.
บทความที่ได้รับการตีพิมพ์เป็นลิขสิทธิ์ของวารสาร มรภ.กพ. วิทยาศาสตร์ คณิตศาสตร์ และเทคโนโลยี
ข้อคิดเห็นใดๆ ที่ปรากฎในวารสารเป็นวรรณกรรมของผู้เขียนโดยเฉพาะ ซึ่งมหาวิทยาลัยราชภัฏกำแพงเพชรและบรรณาธิการไม่จำเป็นต้องเห็นด้วย
References
วริทธิ์นันท์ ชุมประเสริฐ, นุชนารถ คูประเสริฐ, อาทร เจียมเด่นงาม และ อภิชญา ศรีรัตน์. (2563). กาแฟคุณภาพ…ทางออกของเกษตรกรไทย. Regional Letter, ฉบับที่ 2/2563. จาก https://www.bot.or.th/th/research-and-publications/articles-and-publications/articles/regional-articles/reg-article-2020jun02.html
Winston, E., Marsh, T., Lempke, H. and Chapman, K. (2005). Arabica coffee manual for Lao-PDR. FAO Regional Office for Asia and the Pacific. From: https://www.fao.org/4/ae939e/ae939e00.htm#Contents
นพรุจ พัฒนสาร และ ณัฐวุฒิ ศรีวิบูลย์. (2020). การประมวลผลภาพสำหรับการจำแนกคุณภาพมะม่วงพันธุ์โชคอนันต์โดยการจำลองการมองเห็นของมนุษย์ด้วยวิธีการเรียนรู้เชิงลึก. Journal of Information Science and Technology, 10(1), 24-29.
พิมพา ชีวาประกอบกิจ. (2019). การปรับปรุงประสิทธิภาพในการจำแนกภาพด้วยโครงข่ายประสาทแบบคอนโวลูชันโดยใช้เทคนิคการเพิ่มภาพ. Journal of Engineering and Technology, 7(1), 59-64.
Demidenko, E. (2004). Kolmogorov-Smirnov Test for Image Comparison. Computational Science and Its Applications – ICCSA 2004, Lecture Notes in Computer Science, vol 3046. Springer, Berlin, Heidelberg.
Won, K.H., Jung, S.K. (2011). Localized Earth Mover’s Distance for Robust Histogram Comparison. Computer Vision – ACCV 2010, Lecture Notes in Computer Science, vol 6492. Springer, Berlin, Heidelberg.
ศศิน เทียนดี, สุณัฎฐา ไวธัญญะกรรม, ปรวี วงศ์สวัสดิ์สุริยะ และ อรอุมา พร้าโมต. (2563). การคัดแยกความสุกดิบของกล้วยด้วยการเรียนรู้ของเครื่อง. การประชุมวิชาการ ครั้งที่ 4 มหาวิทยาลัยเกษตรศาสตร์ วิทยาเขตศรีราชา วันที่ 28 สิงหาคม พ.ศ. 2563 ณ มหาวิทยาลัยเกษตรศาสตร์ วิทยาเขตศรีราชา จังหวัดชลบุรี.
Singh, S. M., (2012). Image Retrieval based on the Combination of Color Histogram and Color Moment. International Journal of Computer Applications, 58(3), 27-34.
Myagmarsuren, S. (2024). Exploring the Use of Silhouette Score in K-Means Clustering for Image Segmentation. International Journal of Engineering Research & Technology (IJERT), 13(4).
ศิริเรือง พัฒน์ช่วย, อาทิตย์ อยู่เย็น และ มหศักดิ์ เกตุฉ่า. (2565). การจำแนกความสุกของผลกาแฟด้วยการประมวลผลภาพปริภูมิสี. วารสารวิชาการเทคโนโลยีอุตสาหกรรมและวิศวกรรม มหาวิทยาลัยราชภัฏพิบูลสงคราม, 4(3), 369-381.