## 3 Results  
The application developed in MATLAB, in collaboration with the artificial image acquisition system, enabled the extraction of 1628 segmentation masks (see Figure 6), with major axis identification for each processed oxidized black Gordal olive (processed_olives) during the pitting operation (Figure 11).  
\begin{table}
\begin{tabular}{p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt}} \hline \hline  
The overlap accuracy between the original olive image and its mask, evaluated from the contour pixels, yields a general error percentage below 0.1%. This was calculated as the non-overlapping pixels of the mask relative to the original image (Figure 12), using a \(320\times 240\) pixel space (equivalent to 76,800 pixels), through the OpenCV/Qt-Creator application.  
The segmentation masks obtained during the pitting process serve as a diagnostic tool by providing data on the area and orientation for each olive as it passes through the machine. These values are automatically generated after the morphological analysis and are stored in the file statistics.txt, which contains three columns: the first identifies the image, the second lists the area in pixels, and the third indicates the inclination angle of the olive's major axis relative to the horizontal.  
Based on these data, two output histograms have been generated, showing the distributions of the areas (Figure 13, left) and angles (Figure 13, right). These reflect the overall size distribution processed during the pitting operation of the DRR system, aligned with the nominal calibration settings, as well as the number of olives that exhibited undesirable alignment with the awl tool, potentially resulting in \"boat\" defects.  
Figure 11: Final segmentation examples with superimposed orientation axis. (**a**) Normal, (**b**) misaligned (“boat” case).  
Figure 12: Calibration frame executed via OpenCV/Qt-Creator.  
The area histogram (Figure 13, left), organized in 1000-pixel segments, shows the highest concentration of olives within the [22,000, 30,000] pixel range, accounting for 1393 cases (85.5%). The bin with the greatest density is [25,000, 26,000], with 249 olives (15.3%), corresponding to caliber 80, which matches the nominal calibration for which the machine was adjusted. To establish a direct relationship between the caliber and pixel value, the pixel value of a model olive (caliber 80) was empirically determined, maintaining a fixed camera-to-track distance.  
The angle histogram, segmented every 20\({}^{\circ}\), shows the distribution of the orientation angles detected during the pitting operation. The [80, 100]\({}^{\circ}\) range corresponds to vertically oriented olives, representing the \"boat error\" [4], with a rate of 1.1% (18 cases). Olives in the [0, 20] \(\cup\)[160, 180]\({}^{\circ}\) range are aligned parallel to the awl axis--97% of the total, i.e., 1580 cases. The remaining olives fall into an intermediate pivoting position, with potential for reorientation (tilted olives), which may be accepted or discarded depending on the specific criteria set by the pitting system.  
Additionally, the mean and variance values of the sizes recorded in the file normal.txt were calculated. A new area distribution histogram by probability was generated, with the corresponding normal curve superimposed (Figure 14).  
The contrast between the histogram and the normal distribution curve can indicate anomalies or deviations at both the segment and sample levels. In this operation, a group of 27 olives (1.66%) was detected in the [10,000, 14,000] range, corresponding to a contaminated subset of the original sample (cases 202, 299, 553, 739, 795, 800, 888, 891, 911, 933, 942, 1021, 1027, 1198, 1294, 1372, 1387, 1431, 1513, 1587; Figure 15).  
Figure 13: Histogram of calibers (**left**) and orientation angles (**right**).