The classification of tomato ripeness is crucial for post-harvest processing, quality assurance, and agricultural automation, as manual evaluation is often subjective, inconsistent, and time-consuming. This research investigated the impact of color space selection and hyperparameter optimization on tomato ripeness classification using machine learning (SVM, Random Forest, K-NN, GNB) and deep learning (CNN) approaches. Evaluation results indicated that YCbCr was the best-performing color space for classical models, with SVM achieving the highest accuracy (91.24%) and RF following closely (89.54%), whereas HSV yielded optimal performance for CNN (90.46%), highlighting differences in feature extraction mechanisms. Confusion matrix and ROC curve analyses demonstrated that models capturing nonlinear and interdependent color features, such as SVMs and CNNs, achieved superior class separability, particularly for the Ripe and Unripe classes. Dominant channel analysis revealed that chrominance channels, Cb in YCbCr and H in HSV, played a critical role in ripeness discrimination. These findings emphasized the importance of preprocessing for feature selection and provided guidance on selecting appropriate models and color spaces to improve the accuracy and reliability of automated tomato ripeness classification.
Copyrights © 2026