Development of a Computer Vision-Based Method for Sizing and Boat Error Assessment in Olive Pitting Machines
Abstract
1. Introduction
2. Materials and Methods
2.1. Olive Varieties and Treatment
2.2. Machine Vision System and DRR
2.3. Computer Vision Software for Image Processing
2.3.1. Application of Qt-Creator/OpenCV for Color Sampling of Californian Black Olives
2.3.2. Self-Developed Software to Process Black Gordal Color Images
- Binarization.
Algorithm 1: HSV segmentation and orientation extraction |
Input: RGB frame I; thresholds (Hmin…Vmax); radii (r1, r2, r3) Output: Clean mask Mclean, projected area A, major-axis angle θ |
1 IHSV ← convertRGBtoHSV(I) 2 M0 ← applyThreshold(IHSV) ▹ binary mask, see Equation (1) 3 M1 ← erode(M0, disk r1) ▹ Equation (2) 4 M2 ← dilate(M1, disk r2) ▹ Equation (2) 5 M3 ← erode(M2, disk r3) ▹ Equation (2) 6 Mask_clean← fillHoles( largestComponent(M3) ) 7 (μ20, μ02, μ11) ← centralMoments(Mclean) 8 (θ, A) ← orientationAndArea(μ20, μ02, μ11)▹ Equation (3) 9 return (Mclean, A, θ) |
- Morphological analysis.
- Statistical analysis.
Algorithm 2: Batch processing and statistical analysis |
Input: settings.txt, folder non_processed_olives Output: Folder processed_olives, normal.txt, statistics.txt, histograms 1 Read HSV thresholds (Hmin…Vmax) and radii (r1, r2, r3) from settings.txt 2 for each PNG file I in non_processed_olives do 3 (Iproc, A, θ) ← updateImage(I, thresholds, radii) 4 Save Iproc into processed_olives 5 Append A to array Areas; θ to array Angles 6 Append <filename, A, θ> to statistics.txt 7 end for 8 μ ← mean(Areas) 9 σ2 ← variance(Areas) 10 Plot histogram of Areas (PDF) and overlay N(μ, σ2) 11 Plot histogram of Angles 12 Write “Mean: μ, Variance: σ2” into normal.txt |
2.3.3. Comparison with Existing CV Approaches
3. Results
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
AI | Artificial Intelligence |
CV | Computer Vision |
DFK | Digital Frame Kamera (Imaging Source) |
DRR | Deshuesadora–Rodajadora–Rellenadora (Pitting, Slicing, and Stuffing Machine) |
GUI | Graphical User Interface |
HSV | Hue, Saturation, Value |
References
- Internacional Olive Council. Trade Standard Applying to Table Olives (COI/OT/NC, 1). 2004. Available online: https://www.internationaloliveoil.org/what-we-do/chemistry-standardisation-unit/standards-and-methods/ (accessed on 6 May 2025).
- España. Real Decreto 679/2016, de 16 de Diciembre, por el que se Establece la Norma de Calidad de las Aceitunas de Mesa. Boletín Oficial del Estado, 304. 2016. Available online: https://www.boe.es/buscar/doc.php?id=BOE-A-2016-11953 (accessed on 6 May 2025).
- Santos-Siles, F. Las nuevas tecnologías aplicadas al sector de la aceituna manzanilla fina. Grasas Y Aceites 1999, 50, 131–140. [Google Scholar]
- Soler Esteban, A.; Van Olmen, S.H. Olive Pitting Machine and Method to Pit Olives Used by Said Machine (PCT No. WO2011/131215A1). 2011. Available online: https://patents.google.com/patent/WO2011131215A1/en (accessed on 6 May 2025).
- Estrada-Cabezas, J. La Aceituna de Mesa: Nociones Sobre sus Características, Elaboración y Cualidades; Diputación Provincial de Sevilla & Fundación para el fomento y la Promoción de la Aceituna de Mesa: Seville, Spain, 2011. [Google Scholar]
- Lucas-Pascual, A.; Madueño-Luna, A.; Jódar-Lázaro, M.; Molina-Martínez, J.; Ruiz-Canales, A.; Madueño-Luna, J. Others Analysis of the Functionality of the Feed Chain in Olive Pitting, Slicing and Stuffing Machines by IoT, Computer Vision and Neural Network Diagnosis. Sensors 2020, 20, 1541. [Google Scholar] [CrossRef] [PubMed]
- Jódar-Lázaro, M.; Madueño-Luna, A.; Lucas-Pascual, A.; Molina-Martínez, J.; Ruiz-Canales, A.; Madueño-Luna, J. Others Deep Learning in Olive Pitting Machines by Computer Vision. Comput. Electron. Agric. 2020, 171, 105304. [Google Scholar] [CrossRef]
- Lucas Pascual, A. Mejoras En El Control de Máquinas Deshuesadoras-Rodajadoras y de Relleno de Aceituna de Mesa. Ph.D. Dissertation, Universidad Politécnica de Cartagena, Cartagena, Spain, 2020. [Google Scholar]
- Abdullah, M. Image Acquisition Systems. In Computer Vision Technology for Food Quality Evaluation; Sun, D., Ed.; Elsevier: Dublin, Republic of Ireland, 2016; pp. 3–39. [Google Scholar]
- Dhanush, G.; Khatri, N.; Kumar, S.; Shukla, P. A Comprehensive Review of Machine Vision Systems and Artificial Intelligence Algorithms for the Detection and Harvesting of Agricultural Produce. Sci. Afr. 2023, 21, e01798. [Google Scholar] [CrossRef]
- Liu, Z.; Wang, S.; Zhang, Y.; Feng, Y.; Liu, J.; Zhu, H. Artificial intelligence in food safety: A decade review and bibliometric analysis. Foods 2023, 12, 1242. [Google Scholar] [CrossRef]
- Xiao, Z.; Wang, J.; Han, L.; Guo, S.; Cui, Q. Application of machine vision system in food detection. Front. Nutr. 2022, 9, 888245. [Google Scholar] [CrossRef]
- Kondoyanni, M.; Loukatos, D.; Templalexis, C.; Lentzou, D.; Xanthopoulos, G.; Arvanitis, K.G. Computer vision in monitoring fruit browning: Neural networks vs. stochastic modelling. Sensors 2025, 25, 2482. [Google Scholar] [CrossRef]
- Vale Filho, E.; Lang, L.; Aguiar, M.L.; Antunes, R.; Pereira, N.; Gaspar, P.D. Computer vision as a tool to support quality control and robotic handling of fruit: A case study. Appl. Sci. 2024, 14, 9727. [Google Scholar] [CrossRef]
- Rojas Santelices, I.; Cano, S.; Moreira, F.; Peña Fritz, Á. Artificial vision systems for fruit inspection and classification: A systematic literature review. Sensors 2025, 25, 1524. [Google Scholar] [CrossRef]
- Mai, B.; Liu, T.; Liu, Z.; Liang, Z.; Liu, S. A machine vision method for detecting pineapple fruit mechanical damage. Agriculture 2025, 15, 1063. [Google Scholar] [CrossRef]
- Lopes, J.F.; Ludwig, L.; Barbin, D.F.; Grossmann, M.V.E.; Barbon, S., Jr. Computer vision classification of barley flour based on spatial pyramid partition ensemble. Sensors 2019, 19, 2953. [Google Scholar] [CrossRef] [PubMed]
- Zhu, L.; Spachos, P.; Pensini, E.; Plataniotis, K.N. Deep learning and machine vision for food processing: A survey. Curr. Res. Food Sci. 2021, 4, 233–249. [Google Scholar] [CrossRef]
- Aznan, A.; González Viejo, C.; Pang, A.; Fuentes, S. Computer vision and machine learning analysis of commercial rice grains: A potential digital approach for consumer perception studies. Sensors 2021, 21, 6354. [Google Scholar] [CrossRef]
- Huang, Y.; Li, Z.; Bian, Z.; Jin, H.; Zheng, G.; Hu, D.; Sun, Y. Overview of deep learning and nondestructive detection technology for quality assessment of tomatoes. Foods 2025, 14, 286. [Google Scholar] [CrossRef] [PubMed]
- Zhang, H.; Ji, S.; Shao, M.; Pu, H.; Zhang, L. Non-destructive internal defect detection of in-shell walnuts by X-ray technology based on improved Faster R-CNN. Appl. Sci. 2023, 13, 7311. [Google Scholar] [CrossRef]
- Hsiao, W.-T.; Kuo, W.-C.; Lin, H.-H.; Lai, L.-H. Assessment and feasibility study of lemon ripening using X-ray image information visualization. Appl. Sci. 2021, 11, 3261. [Google Scholar] [CrossRef]
- Yu, K.; Zhong, M.; Zhu, W.; Rashid, A.; Han, R.; Virk, M.S.; Duan, K.; Zhao, Y.; Ren, X. Advances in computer vision and spectroscopy techniques for non-destructive quality assessment of citrus fruits: A comprehensive review. Foods 2025, 14, 386. [Google Scholar] [CrossRef]
- Ma, L.; Sun, K.; Tu, K.; Pan, L.; Zhang, W. Identification of double-yolked duck egg using computer vision. PLoS ONE 2017, 12, e0190054. [Google Scholar] [CrossRef]
- Cheng, J.; Sun, D.; Nagata, M.; Tallada, J. Quality Evaluation of Strawberry. In Computer Vision Technology for Food Quality Evaluation; Sun, D., Ed.; Elsevier: Dublin, Republic of Ireland, 2016; pp. 327–349. [Google Scholar]
- Menendez, A.; Paillet, G. Fish Inspection System Using a Parallel Neural Network Chip and the Image Knowledge Builder Application. AI Mag. 2008, 29, 21. [Google Scholar] [CrossRef]
- Lu, Y.; Lu, R. Quality Evaluation of Apples. In Computer Vision Technology for Food Quality Evaluation; Sun, D., Ed.; Elsevier: Dublin, Republic of Ireland, 2016; pp. 273–304. [Google Scholar]
- Blasco, J.; Cubero, S.; Moltó, E. Quality evaluation of citrus fruits. In Computer Vision Technology for Food Quality Evaluation, 2nd ed.; Sun, D., Ed.; Elsevier: Amsterdam, The Netherlands, 2016; pp. 305–325. [Google Scholar]
- Gao, X.; Li, S.; Su, X.; Li, Y.; Tang, W.; Zhang, Y.; Dong, M. Application of advanced deep learning models for efficient apple defect detection and quality grading in agricultural production. Agriculture 2024, 14, 1098. [Google Scholar] [CrossRef]
- Pedreschi, F.; Mery, D.; Marique, T. Grading of potatoes. In Computer Vision Technology for Food Quality Evaluation, 2nd ed.; Sun, D., Ed.; Elsevier: Amsterdam, The Netherlands, 2016; pp. 369–382. [Google Scholar] [CrossRef]
- Manikandan, R.; Rahimi, M.; Gandomi, A.H. Computer vision system for mango fruit defect detection using deep convolutional neural network. Foods 2022, 11, 3483. [Google Scholar] [CrossRef] [PubMed]
- Isingizwe Nturambirwe, J.F.; Perold, W.J.; Opara, U.L. Classification learning of latent bruise damage to apples using shortwave infrared hyperspectral imaging. Sensors 2021, 21, 4990. [Google Scholar] [CrossRef]
- Díaz, R. Classification and Quality Evaluation of Table Olives. In Computer Vision Technology for Food Quality Evaluation; Sun, D., Ed.; Elsevier: Dublin, Republic of Ireland, 2016; pp. 351–365. [Google Scholar]
- Hayajneh, A.M.; Batayneh, S.; Alzoubi, E.; Alwedyan, M. TinyML olive fruit variety classification by means of convolutional neural networks on IoT edge devices. AgriEngineering 2023, 5, 2266–2283. [Google Scholar] [CrossRef]
- Navarro Soto, J.; Satorres Martínez, S.; Martínez Gila, D.M.; Gómez Ortega, J.; Gámez García, J. Fast and reliable determination of virgin olive oil quality by fruit inspection using computer vision. Sensors 2018, 18, 3826. [Google Scholar] [CrossRef]
- Ponce, J.; Aquino, A.; Millan, B.; Andújar, J. Automatic Counting and Individual Size and Mass Estimation of Olive-Fruits Through Computer Vision Techniques. IEEE Access 2019, 7, 59451–59465. [Google Scholar] [CrossRef]
- Ponce, J.M.; Aquino, A.; Millán, B.; Andújar, J.M. Olive-fruit mass and size estimation using image analysis and feature modeling. Sensors 2018, 18, 2930. [Google Scholar] [CrossRef]
- Nasr-Esfahani, S.; Muthukumar, V.; Regentova, E.; Taghva, K.; Trabia, M. Detection of Pitts in Olive Using Hyperspectral Imaging Data. IEEE Access 2022, 10, 58525–58536. [Google Scholar] [CrossRef]
- Cano-Marchal, P.; Satorres-Martinez, S.; Gómez-Ortega, J.; Gámez-García, J. Automatic system for the detection of defects on olive fruit in an oil mill. Appl. Sci. 2021, 11, 8167. [Google Scholar] [CrossRef]
- Figorilli, S.; Violino, S.; Moscovini, L.; Ortenzi, L.; Salvucci, G.; Vasta, S.; Tocci, F. Olive fruit selection through AI algorithms and RGB imaging. Foods 2022, 11, 3391. [Google Scholar] [CrossRef]
- Aguilera Puerto, D.; Martínez Gila, D.M.; Gámez García, J.; Gómez Ortega, J. Sorting olive batches for the milling process using image processing. Sensors 2015, 15, 15738–15754. [Google Scholar] [CrossRef]
- Gómez, A.; García, P.; Navarro, L. Elaboration of table olives. Grasas y Aceites 2006, 57, 86–94. [Google Scholar] [CrossRef]
- González, J.F.; Fernández, A.G.; García, P.G.; Balbuena, M.B.; Quintana, M.C.D. Characteristics of the fermentation process that occurs during the storage in brine of Hojiblanca cultivar, used to elaborate ripe olives. Grasas y Aceites 1992, 43, 212–218. [Google Scholar] [CrossRef]
- The Imaging Source Website. The Camera Model DFK 33GV024 2024. Available online: https://www.theimagingsource.com/en-us/product/industrial/33g/dfk33gv024/ (accessed on 6 May 2025).
- Villanueva, L.; Madueño-Luna, A.; Madueño-Luna, J.M. Matlab_Experimental_Software; Version 1.0.0; University of Seville: Seville, Spain, 2023. [Google Scholar]
- Giuliani, D. Metaheuristic algorithms applied to color image segmentation on HSV space. J. Imaging 2022, 8, 6. [Google Scholar] [CrossRef] [PubMed]
- Kang, H.-C.; Han, H.; Bae, H.; Kim, M.; Son, J.; Kim, Y. HSV color-space-based automated object localization for robot grasping without prior knowledge. Appl. Sci. 2021, 11, 7593. [Google Scholar] [CrossRef]
- Soler Esteban, A.; Van Olmen, S.H. Máquina Deshuesadora de Aceitunas y Método para Deshuesar Aceitunas que Utiliza Dicha Máquina. Spanish Patent No. ES-2403580 A2, 20 May 2013. [Google Scholar]
- Madueño Luna, A.; López Lineros, M.; Madueño Luna, J.M. Sistema y Procedimiento Basado en un Sensor de Sincronismo para la Detección de Fallos de Funcionamiento en Máquinas Deshuesdoras/Rodajadoras y de Relleno, Cuantificación y Optimización del Rendimiento, Señalización, Monitorización y Control Remoto. Spanish Patent No. ES-2529816 B2, 11 November 2016. [Google Scholar]
- Madueño Luna, A.; López Lineros, M.; Madueño Luna, J.M. Procedimiento y Sistema para la Reducción Activa de Aceitunas mal Posicionadas en las Máquinas Deshuesadoras, Rellenadoras y Rodajadoras de Aceitunas. Spanish Patent No. ES-2732765 B2, 28 December 2020. [Google Scholar]
Solution | Sensor and Detection Principle | Real-Time Action | Mechanical Modification | Advantages | Limitations |
---|---|---|---|---|---|
ES-2403580 A2 | Two area cameras compare the olive geometry during the cutting stroke; abnormal deformation ⇒ defect | Ejects defective fruit with an air pulse | None (retrofit kit) | Removes fruit that retain the stone; no downtime | Performance strongly caliber-dependent; retrofit proved unreliable; does not correct orientation |
ES-2529816 B2 | Horseshoe magnetic + optical sensor counts bucket occupancy (no imaging) | Alarm/stop only | None | Very low cost; detects empty buckets | Cannot detect mis-orientation; no angle or size data |
ES-2732765 B2 | Magnetic trigger + area camera over a machined gap in the brush; OpenCV heuristics compute orientation and area | Pneumatic pulse returns mis-oriented olives to feeder | Brush gap + compressed-air manifold | Detects all defect classes and corrects them inline | Intrusive pneumatic system; proprietary software; increased maintenance |
Proposed method | Same magnetic trigger + area camera over brush gap; HSV segmentation + morphology (offline batch) | Diagnostic report (offline) | Brush gap only (no pneumatics) | Provides θ and area for every olive; runs in 0.3 ms frame−1 on a low-power PC; open-source; minimal maintenance; low cost | Does not re-feed olives in real time and assumes stable illumination |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gandul, L.V.; Madueño-Luna, A.; Madueño-Luna, J.M.; López-Gordillo, M.C.; González-Ortega, M.J. Development of a Computer Vision-Based Method for Sizing and Boat Error Assessment in Olive Pitting Machines. Appl. Sci. 2025, 15, 6648. https://doi.org/10.3390/app15126648
Gandul LV, Madueño-Luna A, Madueño-Luna JM, López-Gordillo MC, González-Ortega MJ. Development of a Computer Vision-Based Method for Sizing and Boat Error Assessment in Olive Pitting Machines. Applied Sciences. 2025; 15(12):6648. https://doi.org/10.3390/app15126648
Chicago/Turabian StyleGandul, Luis Villanueva, Antonio Madueño-Luna, José Miguel Madueño-Luna, Miguel Calixto López-Gordillo, and Manuel Jesús González-Ortega. 2025. "Development of a Computer Vision-Based Method for Sizing and Boat Error Assessment in Olive Pitting Machines" Applied Sciences 15, no. 12: 6648. https://doi.org/10.3390/app15126648
APA StyleGandul, L. V., Madueño-Luna, A., Madueño-Luna, J. M., López-Gordillo, M. C., & González-Ortega, M. J. (2025). Development of a Computer Vision-Based Method for Sizing and Boat Error Assessment in Olive Pitting Machines. Applied Sciences, 15(12), 6648. https://doi.org/10.3390/app15126648