Computer Vision system that is able to detect and locate defects and imperfections on fruits.
Fruits appearing in the images have been acquired through a NIR (Near Infra-Red) and a color camera with little parallax effect.
- Images show three apples with clear external defects.
- Images show two apples with an unwanted reddish-brown area.
- Images show five kiwis, one of which with a clear external defect.
For each fruit appearing in each image, the vision system must provide the following information:
- Outline the fruit by generating a binary mask.
- Search for the defects on each fruit.
For each fruit appearing in each image, the vision system must provide the following information:
- Identify the russet or at least some part of it with no false positive areas (if possible), in order to correctly classify the two fruits.
For each fruit appearing in each image, the vision system must provide the following information:
- Segment the fruits and locate the defect in image “000007”. Special care should be taken to remove as “background” the dirt on the conveyor as well as the sticker in image “000006”.
Performances are calculated as the average observed FPS of 10 000 consecutive software executions on a Intel Core i5 Dual-Core 2,7 GHz processor.
- 36 FPS
-
Method 1 (K-means clustering): 0.4 FPS
-
Method 2 (Mahalanobis distance): 0.7 FPS
- 40 FPS
The following Python packages must be installed in order to run the software:
- numpy
- opencv-python
- scipy
- scikit-learn
Simply run the "main.py" script from terminal, after making sure it is located in the same directory of the "images" folder:
python main.pyor:
python3 main.py