Cucumber is one of the agricultural commodities that is vulnerable to quality degradation due to the rotting process. Manual classification of fresh and rotten cucumbers can be time-consuming and inconsistent, thus requiring a more efficient automated method. The main objective of this research is to implement an automated image processing-based classification system to classify fresh and rotten cucumbers based on visual features such as color, texture, and shape, in order to improve efficiency and consistency in the cucumber quality selection process. The applied method involves image processing with color space conversion from RGB to LAB to separate brightness and color. Additionally, improvements were made using noise reduction techniques and a median filter to minimize noise interference in the images, resulting in more accurate analysis. Noise reduction is applied to reduce noise that appears during the image acquisition process, which can disrupt the recognition of important features in cucumber images. The use of a median filter helps smooth the images without reducing important details, which is essential to preserve relevant visual information for classification. The K-Means Clustering algorithm is used to group the images into two clusters, namely fresh and rotten cucumbers. The data used includes 70 test images, consisting of 35 fresh cucumbers and 35 rotten cucumbers. The results of this study indicate that this method, with the application of noise reduction enhancement and median filter, successfully classifies fresh and rotten cucumbers with an accuracy rate of 98.6%, where 69 out of 70 images are correctly identified. The K-Means Clustering method enhanced with noise reduction and median filter is proven to be effective and accurate in determining the types of fresh and rotten cucumbers
                        
                        
                        
                        
                            
                                Copyrights © 2025