Machine Vision

No Leakage

Ensuring wine preservation with 3D imaging

20.06.2013 -

Due to its specific properties, cork has been used as a sealer since the 5th century BC, when the ancient Greeks already used cork bungs to seal their wine amphoras. Thanks to its lightness, squeezability - with a high recovery capacity - airtightness and adherence, cork has proven to be the best material for wine bottle sealing. Preselection, however, is essential to maintain this reputation.

Cork is still the most widely used wine stopper, with more than 13 billion units produced per year, especially in Portugal and Spain. However, being an organic material also has some disadvantages. Cork can house fungus or other bacteria which may cause mold or it can contain holes which may allow oxygen in, all leading to the same result: the ruination of the wine. Leaving the microorganism aspect aside, this article explains how the system integrator Baixcat Visión addressed the holes issue and successfully solved it thanks to 3D technologies.

Case study

The cork bungs industry usually distinguishes between two kind of machines: the "classifiers" which scan the lateral part of the corks and the "orientators" which scan the top and bottom of the cork to select which would be the best side to be placed on the inside part of the bottle. This particular project was related to an orientator machine.

"Cork stoppers for wine, like most natural products, have many spots and irregularities in different colors and shades. Some are surface marks that have little importance while others are deep and may even cause the air to enter into the bottle spoiling the wine" says Mercè Bruned, Technical Director of Baixcat Visión S.L.

"2D machine vision cannot measure depth. It is necessary to use lighting tricks and to implement algorithms based on deductions (observing a lot of samples and making deductions about shape and color) to figure out if a mark is deep or it's only a spot color. Even using artificial intelligence systems to optimize these deductions, 2D systems are not robust enough. 3D systems can directly measure depth, and that's basically the reason why its use provides the opportunity to build inspection systems more simply and more robust: there is no need for complex lighting systems, no possibility that a dark mark could be confused with a deep one. With 3D we know the depth; with 2D we were inferring the depth from the light intensity or from the color."

Another point to be taken into account is the cork visual aspect. While some corks may not have any airtightness problem, they may not look nice for the final customer due to their roughness. These 'not so nice' parts are usually chosen to be marked with the wine cellar emblem so that the defects are covered.

In this context, 3D technology seemed to be the perfect solution. It is robust, non-contact and, specially, color independent. The main problems: speed and difficulty.

Fast yet Simple

"In Baixcat Visión we are working to redesign the products related to the analysis of cork stoppers for wine and champagne" says Mercè Bruned. "A project like that was very difficult before 3D. We requested an easy, yet flexible way to use 3D to scan 10,000 corks each hour and Aqsense provided the perfect solution. We used their software to obtain depth maps. For our purpose, the analysis of depth maps is simpler and much more robust than the analysis of gray level or color images. Depth is the parameter that the cork industry needed."

"The 3D Express software helped us to develop a convincing solution in less time" adds Mercè. "It provided all 3D functionalities we needed together with graphical assistance". The final solution entailed a laser-triangulation system which scanned the corks while moving on a cogwheel (Illustration 1). The system 3D analyzed the stoppers and provided a result in less than 50ms, before reaching the pneumatic actuators which would move the corks according to their characteristics.

Calibrating the system

"We faced a new calibration challenge with the corks project" says Dr. Carles Matabosch, Technical Director at Aqsense S.L. "We had 3 calibration systems - static, lineal and angular - none of which was suitable to calibrate a system where the objects were rotating about an axis." Each angle moved by the wheel lead to a different displacement for each part of the cork: the farther the point from the wheel center, the longer its movement. Obviously this was leading to a reconstruction where the holes placed farther from the center seemed bigger than the ones nearer.

The final calibration had to be a specific custom development which provided an easy static calibration system. By only acquiring one laser profile from the calibration pattern, the system was fully calibrated and each frame could be mathematically adjusted to obtain a perfect 3D reconstruction with both the perspective distortion and the rotational movement corrected.

The final solution

All in all, the final product had to accomplish one main goal: detect holes and bumps which may compromise the cork airtightness and may look unpleasant to the final customer. Baixcat Visión conceived a solution entailing the scanning of both sides of the cork stoppers while they were rotating on a geared wheel (Illustration 1). By means of Aqsense technologies, a cloud of points (COP) of each side was generated, containing real metric information of the cork surface. This 3D reconstruction was then processed and finally exported to a Zmap: a 2D matrix representing a projection of the COP on the XY plane (Z=0), with every value of that matrix representing the Z coordinate at that point (Illustration 2 - Step 5 and 5b).

However, as the corks were not perfectly perpendicular to the camera view, this 3D reconstructed plane was tilted with respect to the z=0 plane, leading to less resolution and more complex 2D processing (Illustration 2 - Step 3). To avoid this, before generating the ZMap, the cork surface plane was detected and then the cloud of points mathematically rotated so that it met the projection plane and thus the generated ZMap (Illustration 2 - Step 5 and 5b) is perfectly aligned with the cork plane.

Having the 2D representation (with 3D information) of both sides, a final processing stage was done to detect their deviation degree. Thanks to the cork's plane being orientated, all the correct points belonged to the same plane and thus, detecting deviations only entailed setting a single threshold (Illustration 2 - Step 6). The final classification was done by means of pneumatic activators which rejected the stoppers with 2 unusable sides, classified the bungs depending on their good side and, in the case of two usable surfaces, placed the "nicest" one on the top face.

Contact

Aqsense SL

C/Pic de Peguera 15
17003 Girona
Spain

+34 (0)972 183215

Top Feature

Digital tools or software can ease your life as a photonics professional by either helping you with your system design or during the manufacturing process or when purchasing components. Check out our compilation:

Proceed to our dossier

Top Feature

Digital tools or software can ease your life as a photonics professional by either helping you with your system design or during the manufacturing process or when purchasing components. Check out our compilation:

Proceed to our dossier