Abstract
Automated quality control and sorting based on computer vision techniques is a well-established practice in industrial production. However, sorting translucent samples—where light passes through the material—presents significant challenges for standard imaging systems. This paper presents a robust methodology for grading translucent materials, specifically applied to Chios Mastiha, a high-value aromatic resin from Greece. By combining a controlled "black box" hardware environment with a multi-stage image processing pipeline, the proposed system achieves nearly 100% accuracy in grading samples by size and purity.
The Challenge of Translucency
In modern manufacturing, surface characteristics like colour typically guide automated decision-making. Translucency complicates this process because light interacts with the internal structure of the object rather than just reflecting off the surface. Standard algorithms often fail to distinguish between the object's true hue, internal impurities, and the background.
Chios Mastiha, known as the "Tears of Chios," exemplifies this challenge. Traditionally, these resin tears are sorted by hand—a labor-intensive process prone to human fatigue and error. Existing automated solutions are often expensive or slow, treating samples as single pixels rather than complex objects. There is a clear need for a high-speed, cost-effective system capable of analyzing both the internal and external characteristics of these translucent samples.
Methodology: A Dual-Pronged Approach
The proposed solution integrates a custom hardware setup with a specialized software pipeline to overcome the optical difficulties of translucency.
Hardware Configuration
To minimize light scattering and maximize contrast, samples are processed within a "black box" enclosure. As shown in Figure 1, the samples travel on a conveyor belt and are illuminated with white light against a dark background. This controlled environment ensures that impurities within the translucent resin stand out clearly to the overhead camera.
Image Processing Pipeline
The software workflow consists of several critical stages designed to extract meaningful data from the captured frames:
- Dark-pixel Rejection: Filters out sensor noise in low-light areas.
- Grayscale Conversion & Contrast Enhancement: Prepares the image for better separation of the resin from the belt.
- Binarization: Utilizes Otsu’s method to create a precise binary mask of the objects.
- Morphological Processing: Employs erosion and dilation to bridge fragmented parts of a single sample and remove noise.
- Blob Detection & Analysis: Extracts geometric features, including bounding boxes and convex hulls.
- Heuristic Decision Making: Applies thresholds for size, saturation, and brightness to categorize each sample into a specific grade.
Key Insights
A central finding of this research is that controlling the physical environment significantly reduces the need for computational complexity. By using the "black box" setup, classical image processing techniques can achieve near-perfect results without the need for hyper-complex deep learning models.
Furthermore, the use of relative measures (percentage-based size and purity) makes the system resolution-agnostic. This allows the algorithm to remain effective across different camera setups or distances without extensive recalibration. The inclusion of convex hull calculations is particularly effective for identifying irregular shapes or clusters, ensuring accurate size grading.
Results and Performance
Testing was conducted using real-world samples provided by the Chios Mastiha Growers Association. The system demonstrated:
- High Accuracy: Nearly 100% sorting accuracy compared to expert human graders under ideal conditions.
- Operational Speed: Processing approximately 3 samples per second, even when limited by a low-cost 5 fps camera.
- Real-time Monitoring: The system provides visual feedback with colour-coded boundaries to indicate the grade of each sample in real-time.
Limitations and Future Directions
One current limitation is the "age factor"; Mastiha naturally yellows over time. The current algorithm does not yet distinguish between yellowing due to age and yellowing due to organic impurities. Additionally, the prototype's speed is limited by the frame rate of the inexpensive camera used. Future work will focus on upgrading to high-speed industrial cameras and integrating the software into a full mechatronic system capable of physical sorting.
Summary updated