Laboratory detection of flat glass shapes using its reflection

Glass is reflective in large angles of incidence. The using this property for detections of shapes is the basic goal of the research. The detection of 2D shapes from flat glass is a relatively simply example that has been used at the beginning of the research. The detection is based on three steps: capturing of an object in a large angles of incidence, inclusion distortion and other optical defects of the scan and a reconstruction of the shape.


Introduction
Vision systems for monitoring and control in the glass industry are applied especially for quality monitoring of container glass wares, window glass and automotive glass.The possibilities of the vision system applications in the glass industry are mostly: counting products, measurement and quality production monitoring, shape recognition, positioning and production monitoring and control using feedback.Despite an intensive investigation of machine vision for several decades, this is still a large field of research for solutions of some specific problems because glass has special properties [1].The major problem is the transparency of colourless glass.
The systems have different requirement for monitoring glass melt and cold glass semi-finished or final products.The typical and general scheme of a monitoring and/or a control system is in Figure 1.Not all equipment mentioned in the figure must be used for an analysis of data from production.
The system generally consists of specific parts and for applications in glass production has some specific requirements: • suitable tape of illumination must be chosen for scanning transparent materials (area array, backlight, ring illuminator, dome illuminator, diffuse light illuminator, multi-axis illuminator, polarized illuminator); • position of an object must correspond with illumination; • adapters for lenses can be used instead of (or with) illumination for better visibility of the object (polarisation illumination adapter, coaxial vertical illumination adapter, diffuse illuminator adapter, ...); • filters can be used for the separation of some wave lengths from acquisition images; • lenses (optic);  The research at the Department of Glass Producing Machines and Robotics is focused to analyses of structured images using fractal dimension [3].The data have character of digital images and obtained dividing lines (e.g.profiles [4], roughness and the dividing line of light and shadow).The analyses are applied for example in corrugation that uses a reflection of zebra plate [5].The idea to use the reflection for a detection of glass objects comes from this application.

Glass reflection
When light moves from a medium of a given refractive index n i (air) into a second medium with refractive index n t (glass), both reflection and refraction of the light may occur [6].In the Figure 2, an incident light ray PO strikes at point O the interface between two media of refractive indices n i and n t .Part of the ray is reflected as ray OQ and part refracted as ray OS.The angles that the incident reflected and refracted rays to the normal of the interface are given as ș i , ș r and ș t .The relation between these angles is given by the law of reflection: and Snell's law: The fraction of the incident power that is reflected from the interface is given by the reflectance R and the fraction that is refracted is given by the transmittance T.
The amount of light reflected from the material under normal incidence (angle of incidence ș i § ș t § 0) is proportional to the square of the index change at the face: R = [(n i -n t )/(n i +n t )] 2  (3) For common glass in air, n i = 1 and n t = 1.5; thus about = 4% of light is reflected.Note that reflection by a flat glass is from the front side as well as the back side, and that some of the light bounces back and forth a number of times between the two sides.The combined reflection coefficient R g for this case is when interference can be neglected, R g = 7.7 %.However, the reflection is for the intended detection insufficient, and illumination at a high angle must be used.

Figure 2. Scheme of reflection and refraction laws
The calculations of R and T depend on polarisation of the incident ray.Using the Fresnel Equations (after simplifying) the equations for light polarized with the electric field of the light perpendicular to the plane of the diagram in Figure 2, the reflectance R ŏ is given by: If the incident light is polarized in the plane of the diagram, the R OE is given by: Using the Snell's law (2) the equations: the R ŏ and R OE are completely derived by ș i .If the incident light is unpolarized (containing an equal mix of perpendicular and parallel polarizations), the reflection coefficient is The dependence of reflectance on the angle of incidence is in the Figure 3.
As a consequence of the conservation of energy, the transmittance in each case is given by and  The Figure 3 shows that glass is reflective in bigger angles of incidence (ș i 70° for R and R ŏ ).Furthermore the reflectance depends on polarisation of incidence light; it is higher with the electric field of the light perpendicular.In the case of incident light is polarized in the plane (parallel), the reflectance R OE degreasing to the Brewster's angle, when the light is perfectly transmitted through the surface.Then the reflectance rises.The Brewster's angle is defined: and for the plane glass surface ș Bg = 56.31°.
For the real measurement is the combined reflection coefficient R g important, because of flat glass and reflection is from the front side and the back side.Using equation (4) the graph in Figure 4 is obtained for unpolarized light.

Detection of Flat Glass Shapes
The reflection under high angles of incidence can be used for detection of an object on a black, non-reflective and matt background.The angle of incidence should be selected on the basis of the function in the Figure 4. Obviously, the reflection does not dramatically change till angles of incidence 40° (8,6 % of reflectance, 7.7 % for the normal incidence).The reflectance is double for the angle 58,7° and triple for the angle 66,2°.If the higher reflectance under the high angle of incidence is used for detection of glass, the angle must be minimally 60°.

Figure 4. Dependence of reflectance on incidence angle for combined reflection coefficient R g , unpolarized light
The reflectance can be increased using the perpendicular polarised lighting (Figure 3).
The detection is based on three steps, Figure 5: 1 capturing of an object in a large angles of incidence using a standard CCD or CMOS camera and a object-lens and obtaining of object contours, 2 recomputing of the captured object including distortion and other optical defects of the scan and 3 reconstruction of the captured shape including perspective.

Figure 5. Detection of flat glass shapes using reflection
First two steps are commonly used in machine vision and image analysis.The third step has to be solved for the observed object.In the case of flat glass the one point perspective is used.Before starting the detection a pre-set must be done for the final detection.The per-set is a measurement with a ruler (an etalon), which defines relations (scale) between a captured space (in millimetres, axes x, z) and an image (in pixels, axes u, v).The position of the camera (the focal point of object-lends, x c , y c ) and the axes start (A: x c , z c ) must be also defined.

Experiment
Simple shapes were used in the experiment: circle (diameter 61 mm) and rectangle (length 50, width 40 mm).A chessboard with an edge of squares 5 mm was used for pre-set of the scale, Figure 6 and the basic relations for the conversion were defined.The position of the camera and the axes start were measured, Figure 7.The functions for the reconstruction were derived, from the known measurement in pixels (axis u, v) to the real measurement in millimetres (axis x, z): where x i is real position measured point in x axis in millimetres (axes start at the point A), v i is position of the point in axis v at image in pixel (axes start at the point C, where AŁC), y c and x c are known, Į 2 can be easily determined, and For axis z can be determined the equation: where z i is real position measured point in z axis in millimetres, u i is position of the point in axis u at image in pixel, z h1 is length of the chessboard in millimetres corresponding to length u h1 measured in pixels, both are known, horizon is defined where u h1 , u h2 and v h1 are obtained from the measurement from the chessboard image, Figure 5.

Results
Figure 8 and 9 show steps and results of the reconstruction.

Discussion of results
The first analyses were focused to verify possibilities of the methodology and also to develop a software tool (in Matlab), hence the analyses were applied without the distortion of lens-object.The results are not perfect in accuracy and during the experiment problems were found that must be solved in next research, such as: • accuracy in definition of the focal point, • quality of the diffuse light, • definition of the scale, • inclusion of distortion and other optical defects.
In the next research effect of changed parameters has also to be defined, such as: • polarization, • intensity of a lighting, • surrounding and parasite illumination, • setting of a camera (with respect necessary depth of field ), • properties of a black, non-reflective and matt background, dependence of the reconstruction accuracy on an angle of incidence.

Conclusion
The goal of this part of the research was to specify theoretical basic properties for the detection of glass using reflection under the high angles of incidence, to develop the software tool, verify possibilities of the methodology, and to specify problems and steps for next research.
The angle of incidence must be higher than 60°, optimal should be using the perpendicular polarised lighting, the equations for reconstruction were derived, the software tool was developed and was verified with experiment.
The problems of the present approach and next the steps were specified.
The final target of the research is to specify conditions and a potential for the 3D analysis of formed flat glass like automotive one.

Figure 1 .
Figure 1.Diagram of monitoring and control systems

Figure 3 .
Figure 3. Dependence of reflectance on incidence angle and polarization of light

Figure 6 Figure 7
Figure 6 Chessboard image as etalon for determining of scale

Figure 8 Figure 9
Figure 8 Reconstruction of captured rectangle )