Image processing for maturity classification of tomato using otsu and manhattan distance methods - Anindita Septiarini; Hamdani Hamdani; Muhammad Sofian Sauri; Joan Angelina Widians (Universitas Ahmad Dahlan, 2022)
Currently, image processing-based systems have been widely applied in various fields, one of which is agriculture. The system can be used to classify fruit maturity. Tomato is one of the agricultural products consumed by the community. Therefore, the requirement for ripe tomatoes increases. In this work, the classification method based on image processing for grading the maturity level of tomato was developed to distinguish tomato into three classes: unripe, half-ripe, and ripe. Classification is carried out based on the skin color of the tomato. The method required five main processes; initially, the detection of the region of interest (ROI) applied using the Otsu method followed by the conversion of RGB to HSV color space. Afterward, segmentation with Otsu thresholding on the S channel of the HSV color space was implemented. Subsequently, the extraction of the mean, median, max, and min features on each channel from the YIQ color space; therefore, a total number of 12 features was produced. Finally, the K-nearest neighbor (KNN) method using Manhattan distance is applied with the values of k = 1, 3, 5, 7, and 9. The dataset used consists of 90 images of tomatoes (30 raws, 30 half-ripes, and 30 ripes), where the dataset is divided into two types, including 54 images as training data and 36 images as testing data. The evaluation results were able to achieve the highest accuracy value of 0.9722.