Accurate detection of tomato ripeness is crucial for post-harvest processes, reducing waste, and ensuring the consistent quality product delivered which maintaining quality in agricultural production. This study investigates two feature extraction techniques for detection of tomato ripeness using a Support Vector Machine classifier: (1) color-based features combining HSV and RGB, and (2) texture-based features using LBP (Local Binary Patterns). The experimental results show that color based feature approach achieves a high classification accuracy of 98.88%, whereas the texture based method which records an accuracy of 82.3%. The superior performance of color features indicates their strong ability to capture the visual changes in color associated with different ripeness stages. While texture features provide useful information, they are less effective alone in distinguishing ripeness variations. The cross-validation results for color based feature show that the model achieves a high average accuracy of 95.51% with a low standard deviation of ±2.36%, indicating strong and consistent performance across different data splits.
Introduction
Overview
This study explores the use of Support Vector Machine (SVM), a supervised machine learning algorithm, to accurately classify tomato ripeness. The goal is to replace manual and subjective inspection with an automated, scalable solution using color and texture-based features.
Problem Motivation
Traditional ripeness detection is subjective, labor-intensive, and inconsistent.
There is a growing need for automated, non-destructive, and accurate methods in agriculture and food processing.
Machine learning techniques like SVM can deliver robust performance in image classification tasks.
Objectives
Develop a feature extraction method using both color (HSV + RGB) and texture (Local Binary Pattern - LBP) features.
Build and train an SVM classifier using cross-validation to minimize overfitting.
Evaluate the performance and accuracy of the classifier.
Literature Insights
[1] Used SVM for classifying tomatoes into ripe, unripe, and defective using color and texture features. Future scalability suggested via hardware integration.
[2] Showcased high accuracy (up to 100%) in ripeness classification using models like SVM, YOLOv5, and CNNs. Also emphasized the integration of ML in IoT and smart farming.
Feature Extraction Techniques
Color Features:
HSV (Hue, Saturation, Value): Represents overall tone, intensity, and brightness.
Example: H = 15.25, S = 127.50, V = 195.00
RGB (Red, Green, Blue): Measures color intensity.
Example: R = 195.00, G = 151.25, B = 115.00
Texture Features:
Local Binary Pattern (LBP): Captures texture by comparing each pixel to its neighbors and encoding patterns into binary values.
Example: A center pixel might get an LBP value of 92 based on surrounding intensities.
Research Methodology
Image Dataset:
Sourced from Kaggle, containing 3,560 images (1,975 ripe and 1,585 unripe).
Image Preprocessing:
Resize all images to a uniform size.
Split dataset into ripe and unripe categories.
Feature Extraction:
Combine mean HSV + RGB for color features.
Use average LBP values for texture.
Classification:
Train an SVM classifier using 80% of the data; 20% used for testing.
Apply grid search and cross-validation to tune parameters like kernel type, C, and gamma.
Evaluate different SVM kernels (linear, RBF, polynomial) to find the best configuration.
Conclusion
Using HSV and RGB color features with a Support Vector Machine worked very well for detecting tomato ripeness. This method reached a high accuracy of 98.82%. It showed that color features are much better at recognizing ripeness than texture features like LBP, which only gave 82.07% accuracy. The results prove that color changes are the most helpful signs for checking how ripe a tomato is. This project shows that using color-based features can help build accurate and reliable systems to check tomato ripeness in farms and food processing, saving time and reducing human effort.
References
[1] Vaibhav G B, 2019, Identification of Ripeness of Tomatoes, International Journal of Engineering Research & Technology (IJERT)
[2] Jesie B. Abad,2024, Integration Of Machine Learning Techniques In Determining Tomato Ripeness: A Literature Review, International Journal of Engineering Applied Sciences and Technology, 2024 Vol. 8, Issue 09, ISSN No. 2455-2143
[3] Rini Nuraini1 ,2023, Tomato Ripeness Detection Using Linear Discriminant Analysis Algorithm with CIELAB and HSV Color Spaces, Building of Informatics, Technology and Science (BITS) Volume 5, No 2, September 2023
[4] Dhiren R. Patel, 2019, Texture Classification of Machined Surfaces Using Image Processing and Machine Learning Techniques, FME Transactions VOL. 47, No 4, 2019 ? 871
[5] PriyankaPaygude, 2020, Image Processing Using Machine Learning, Ijsdr | Volume 5 Issue 9
[6] WindaAstuti, 2018,Automatic fruit classification using support vector machines: acomparison with artificial neural network, doi:10.1088/1755-1315/195/1/012047, IOP Conf. Series: Earth and Environmental Science