# Automatic System for the Detection of Defects on Olive Fruits in an Oil Mill
## 1 Introduction
The use of cameras with spectra other than the visible band started with [11; 12], where the authors show the ability of infrared cameras to capture defects in the olives that are not perceptible in the visible band. In these contributions, the layout of the olives in the images is similar to those found in the conveyor belts of the reception area of a olive oil mill; however, these contributions do not detail how to perform the olive segmentation automatically in these conditions. In turn, in [13], the authors propose the classification of complete olive batches, assigning the same class to all the olives in the image. This work compares the results obtained using Fisher Linear Discriminant and ANN, reporting success rates above 90% in both cases, and slightly better for ANN. The authors continued the batch classification approach in [14], where the images employed were taken from the conveyor belt in the reception area of an olive oil mill. In this contribution, the authors employ a methodology similar to their previous paper and report success rates over 95% in all the cases. The same batch analysis approach, without individually segmenting olives, can be found in [15], where olive images were used to predict the quality level of the VOO obtained from them. In this work, the features used were Haralick descriptors computed from the whole image removing the background. The prediction models were built using partial least squares regression and offered good results for different VOO quality parameters. The individual olive segmentation approach can be found again in [16], where the authors employ structured images to estimate the size and weight of olives. Ref. [17] is a continuation of the work, showing less strict requirements regarding the disposition of the olives in the images, but still avoiding the superposition of olives for the segementation. A third related article by the same authors is [18], where the objective is to segment olives directly from the olive branch. For this, the authors employ convolutional neural networks (CNN) and compare the results obtained using different CNN described in the literature, reporting sensitivity values around 80% and precision values between 84.4% and 88.8%. A different approach for the evaluation of the properties of olives in the groves can be found in [19]. In this work, the authors propose a method consisting of sampling the olives and presenting them in structured conditions to obtain color, ripeness and detection of bruises. Finally, two works that employ computer vision on olives with objectives other than the determination of their quality are [20], where the cultivar variety of the olives is determined based on images from their pit; and [21], where the position of table olives is detected using ANN for the pit-removal processing. Other interesting applications of computer vision for quality control in other industries can be found in [22; 23]. The main technological challenge that this paper addresses is the use of images of the olives that are acquired under regular operating conditions of an olive oil mill for the detection of defects on indiviual olives. This way, this work proposes and validates an automatic defect detection system based on the extraction of information from olive images acquired with a infrared camera installed in the reception yard of the mill. The main contributions of this work are:  
* Development of a non-invasive industrial monitorization system that allows us to capture data without interfering with the regular productive process of the mill. * Development of an iterative process that employs active contours combined with mathematical morphology for the detection of individual olives after the washing process, using images that were acquired during the regular operation of the mill. * Development of a segmentation algorithm for the detection of defects in olives.