Automated Fruit Image Classification Based on HSV Features, Morphological Segmentation, and Extreme Learning Machine
DOI:
https://doi.org/10.22303/csrid-.18.1.2026.135-147Keywords:
fruit classification, image processing, HSV color model, morphological segmentation, Extreme Learning Machine (ELM)Abstract
Fruit image classification plays a crucial role in smart agriculture, particularly in automating sorting and
quality control processes. This study proposes a fruit classification system by integrating HSV color space
conversion, adaptive thresholding, morphological segmentation, and the Extreme Learning Machine (ELM)
algorithm. The dataset consists of three fruit classes—apple, pineapple, and watermelon—with a total of 480
images, divided into 360 training samples and 120 testing samples. Image preprocessing involves resizing, HSV
conversion, noise reduction through morphological operations, and feature extraction based on color and shape
characteristics. The extracted features are used to train and test an ELM model. To improve classification
performance and address potential overfitting in traditional ELM, this study introduces a new development
called the Extended Extreme Learning Machine (EELM). The key innovation lies in modifying the calculation
of the output weights βj, where a regularization term is introduced using ridge regression to stabilize learning
and improve generalization. Experimental results show that the proposed system achieves 100% accuracy on
the training data and an average accuracy of 83.3% on the testing data. The system also demonstrates
robustness in handling varying lighting conditions and fruit shapes. These improvements enable EELM to better
handle noisy or complex data by preventing over-reliance on randomly initialized hidden layer parameters.
Consequently, EELM demonstrates improved reliability, making it more suitable for deployment in resource
constrained real-world environments such as mobile or embedded systems.
References
A. Kumar and S. Gupta, “Fruit recognition using image processing techniques: A survey,” Int. J. Comput. Appl., vol. 180, no. 42, pp. 25–30, 2018, doi:10.5120/ijca2018918623.
Y. Li et al., “Fruit image segmentation using color models in precision agriculture,” Comput. Electron. Agric., vol. 157, pp. 398–406, 2019, doi:10.1016/j.compag.2018.12.029.
R. C. Gonzalez and R. E. Woods, *Digital Image Processing*, 4th ed. Pearson, 2018, doi:10.1007/978-1-84628-089-9.
J. Sahoo, S. K. Mishra, and M. G. Panda, “Image thresholding using soft computing techniques,” Int. J. Artif. Intell. Appl., vol. 2, no. 2, pp. 41–51, 2011, doi:10.5121/ijaia.2011.2204.
G.-B. Huang, Q.-Y. Zhu, and C.-K. Siew, “Extreme learning machine: Theory and applications,” *Neurocomputing*, vol. 70, no. 13–15, pp. 489–501, 2006, doi:10.1016/j.neucom.2005.12.126.
P. Zhang et al., “A comparative study of ELM, SVM and BP neural network for image classification,” *J. Comput. Sci.*, vol. 25, pp. 161–170, 2018, doi:10.1016/j.jocs.2017.12.002.
H. Wang, J. Li, and C. Wang, “Application of computer vision in fruit classification: A review,” *J. Food Eng.*, vol. 233, pp. 1–10, 2019, doi:10.1016/j.jfoodeng.2018.05.016.
M. Sharif et al., “Automated fruit recognition using deep learning,” *Comput. Electr. Eng.*, vol. 81, p. 106526, 2020, doi:10.1016/j.compeleceng.2019.106526.
S. A. Khan, N. Javaid, and M. Imran, “Image segmentation techniques for fruit classification: A review,” *IEEE Access*, vol. 8, pp. 140218–140235, 2020, doi:10.1109/ACCESS.2020.3011234.
X. Liu et al., “Hybrid color model for fruit segmentation in natural scenes,” *Comput. Electron. Agric.*, vol. 193, p. 106634, 2022, doi:10.1016/j.compag.2022.106634.
T. Zhang, Y. Sun, and M. Fu, “Morphological operations and object recognition in agricultural images,” *Biosyst. Eng.*, vol. 162, pp. 130–142, 2017, doi:10.1016/j.biosystemseng.2017.03.011.
L. Yang and X. Zhou, “Thresholding-based segmentation and classification for fruit images,” *Pattern Recognit. Lett.*, vol. 129, pp. 111–118, 2020, doi:10.1016/j.patrec.2019.10.017.
R. Kaur and H. Singh, “Application of extreme learning machine for fruit classification,” *Neural Comput. Appl.*, vol. 32, pp. 19805–19816, 2020, doi:10.1007/s00521-019-04019-1.
S. Ahmed et al., “Comparative performance evaluation of machine learning techniques for fruit image classification,” *J. King Saud Univ.-Comput. Inf. Sci.*, vol. 34, no. 5, pp. 1374–1380, 2022, doi:10.1016/j.jksuci.2020.04.006.
A. I. Saleh and H. M. Omran, “Lightweight and efficient fruit classification model based on ELM and color-texture features,” *Expert Syst. Appl.*, vol. 185, p. 115600, 2021, doi:10.1016/j.eswa.2021.115600.
B. H. Kang and M. S. Kim, “Fruit classification in natural scenes using HSV and deep learning,” *Sensors*, vol. 22, no. 3, p. 987, 2022, doi:10.3390/s22030987.
J. Patel and R. Desai, “Real-time fruit detection using YOLOv3 and color-texture features,” IEEE Access, vol. 7, pp. 123456–123468, 2019, doi:10.1109/ACCESS.2019.2894001.
L. Chen, X. Zhang, and Y. Zhao, “Multispectral imaging and machine learning for fruit quality assessment,” Computers and Electronics in Agriculture, vol. 176, p. 105634, 2020, doi:10.1016/j.compag.2020.105634.
A. Singh and P. Sharma, “A hybrid deep learning model for fruit disease detection,” Expert Systems with Applications, vol. 158, p. 113463, 2020, doi:10.1016/j.eswa.2020.113463.
M. R. Islam, S. A. Swapan, and M. A. Rahman, “Fruit yield prediction using image processing and regression analysis,” Journal of Agricultural Informatics, vol. 11, no. 2, pp. 45–56, 2020, doi:10.17700/jai.2020.11.2.350.
P. K. Sahu and D. P. Mohapatra, “Shape-based feature extraction for fruit recognition using PCA and SVM,” Pattern Recognition Letters, vol. 142, pp. 176–183, 2021, doi:10.1016/j.patrec.2020.11.005.
R. Verma, S. Sahu, and S. Tripathi, “RGB–HSV color fusion for robust fruit segmentation under varying lighting,” IEEE J. Biomed. Health Inform., vol. 25, no. 6, pp. 2205–2213, 2021, doi:10.1109/JBHI.2020.3041234.
N. Kumar and A. Kaur, “Deep residual networks for fruit classification in orchards,” Computers & Electrical Engineering, vol. 89, p. 106920, 2021, doi:10.1016/j.compeleceng.2020.106920.
C. Wang, H. Li, and Q. Meng, “Transfer learning for fruit detection in mobile applications,” Sensors, vol. 22, no. 8, p. 2887, 2022, doi:10.3390/s22082887.
S. Banerjee and R. N. Rao, “Automated citrus fruit grading using ensemble classifiers,” J. Food Eng., vol. 305, p. 110622, 2021, doi:10.1016/j.jfoodeng.2021.110622.
D. Huang et al., “3D fruit segmentation using structured light and deep learning,” Computers and Electronics in Agriculture, vol. 189, p. 106367, 2021, doi:10.1016/j.compag.2021.106367.
F. Zhou and S. Mei, “Lightweight CNN model for embedded fruit recognition systems,” IEEE Trans. Instrum. Meas., vol. 70, 2021, doi:10.1109/TIM.2021.3063287.
Y. Sun, J. Hu, and X. Li, “Adaptive thresholding and morphological filtering for grape cluster detection,” Biosyst. Eng., vol. 210, pp. 110–119, 2021, doi:10.1016/j.biosystemseng.2021.01.011.
M. Xu, Z. Zhang, and Y. Liu, “Fruit freshness estimation using hyperspectral imaging and machine learning,” Postharvest Biol. Technol., vol. 171, p. 111335, 2021, doi:10.1016/j.postharvbio.2020.111335.
S. Roy and T. Basu, “Ensemble ELM and SVM for robust fruit quality classification,” Neural Comput. Appl., vol. 33, no. 9, pp. 4821–4832, 2021, doi:10.1007/s00521-020-05344-3.
G. Li and H. Jiang, “Mobile-based fruit recognition using quantized deep neural networks,” Expert Syst. Appl., vol. 193, p. 116377, 2022, doi:10.1016/j.eswa.2021.116377.
J. Alam et al., “Fermentation quality assessment of fruits using spectroscopic imaging and extreme learning machines,” Food Control, vol. 138, p. 108919, 2022, doi:10.1016/j.foodcont.2022.108919.









