To judge the quality of machine vision lighting, we must first understand what a light source needs to do! Clearly, a light source should do more than just enable the camera to "see" the parts being inspected. Sometimes, a complete machine vision system cannot function properly, but simply optimizing the light source can make the system work correctly.
The purpose of lighting is to enhance contrast. In a machine vision image, contrast represents the quality of the image signal; it reflects the difference between two regions, such as the difference between an object and its background. Therefore, the first step in designing lighting is to identify the differences between regions and then use the light source to highlight those differences.
Contrast: Contrast is crucial for machine vision. The most important task of illumination in machine vision applications is to create maximum contrast between the features to be observed and those to be ignored in the image, thus facilitating feature differentiation. Contrast is defined as a sufficient grayscale difference between a feature and its surrounding area. Good illumination should ensure that the features to be detected stand out from the background.
Brightness: When choosing between two light sources, the best choice is the brighter one. Insufficient light can lead to three problems. First, the camera's signal-to-noise ratio will be low; insufficient brightness will result in insufficient image contrast and a higher likelihood of noise. Second, insufficient brightness necessitates a larger aperture, reducing depth of field. Third, when the light source is insufficient, random light, such as natural light, will have the greatest impact on the system.
Robustness: Another way to test a good light source is to see if it has minimal sensitivity to the position of the component. The resulting image should not change when the light source is placed in different areas or at different angles within the camera's field of view. Highly directional light sources increase the likelihood of specular reflections in bright areas, which is detrimental to subsequent feature extraction. In many cases, a good light source needs to perform as well in the lab as it does in real-world applications. A good light source needs to make the features you're looking for very clear; besides being visible to the camera, a good light source should provide maximum contrast, sufficient brightness, and be insensitive to changes in the component's position. Once the light source is chosen well, the rest is much easier! Machine vision applications are concerned with reflected light (unless backlighting is used). The geometry, gloss, and color of an object's surface determine how light is reflected. The key to controlling the light source in machine vision applications boils down to controlling its reflection. If you can control the reflection of the light source, you can control the resulting image. Therefore, in machine vision applications, when a light source is incident on a given object's surface, understanding the most important aspect of the light source is controlling the light source and its reflection.
Predictable light source: When a light source is incident on an object's surface, its response is predictable. The light source may be absorbed or reflected. Light may be completely absorbed (as in black metal materials where the surface is difficult to illuminate) or partially absorbed (causing changes in color and brightness). Unabsorbed light will be reflected, and the angle of the incident light equals the angle of the reflected light. This scientific law greatly simplifies machine vision light sources because the desired effect can be achieved by controlling the light source.
Object Surfaces: If light sources propagate in a predictable manner, then what makes light source design in machine vision so challenging? The complexity of machine vision lighting stems from the variations in object surfaces. If all object surfaces were identical, there would be no need to employ different light source technologies when addressing practical applications. However, due to the differences in object surfaces, it is necessary to observe the object surfaces within the field of view and analyze their response to incident light.
Controlling Reflections: As mentioned earlier, if reflected light can be controlled, the image can be controlled. This cannot be overstated. Therefore, the most important principle in light source design for machine vision applications is to control where the light source reflects off the lens and the degree of reflection. Machine vision light source design is essentially the study of reflection. In vision applications, when observing an object to determine the necessary light source, the first questions to ask are: "How can I make the object appear?" and "How can I apply the light source to reflect the necessary light into the lens to obtain the object's appearance?" Factors affecting reflection include: the position of the light source, the texture of the object's surface, the geometry of the object's surface, and the uniformity of the light source. Light Source Position: Since light reflects according to the angle of incidence, the position of the light source is crucial for obtaining high-contrast images. The goal of the light source is to make the reflection of the feature of interest different from that of the surrounding background. Predicting how the light source will reflect off the object's surface determines the position of the light source.
Surface texture: An object's surface may be highly reflective (spectral) or highly diffuse. The main factor determining whether an object is specular or diffuse is the smoothness of its surface. A diffusely reflective surface, such as a rough sheet of paper, has complex surface angles and appears bright under a microscope because the changes in the surface angles disperse the light rays hitting the surface. A smooth sheet of paper, on the other hand, has a smooth surface that reduces the surface angles. Light rays strike the surface of the light source and are reflected according to the angle of incidence.
Surface Shape: A spherical surface reflects light differently than a planar object. The more complex the shape of an object's surface, the more complex the changes in its light source. For example, a polished mirror surface requires light to shine from different angles. Illumination from different angles reduces light and shadow. Light Source Uniformity: Uneven light causes uneven reflection. Uniformity relates to three aspects. First, regarding the field of view, the light should be uniform within the camera's field of view. Simply put, dark areas in an image lack reflected light, while bright areas reflect too much light. Uneven light will cause some areas within the field of view to receive more light than others, resulting in uneven reflection on the object's surface (assuming the object's surface reflects light equally).
A uniform light source compensates for angular variations on an object's surface, ensuring uniform reflection even across different surfaces with varying geometry. Applications of lighting technology: Lighting technology involves designing the geometry and placement of light sources to enhance image contrast. Light sources will highlight areas of interest that require machine vision analysis. When selecting a lighting technology, consideration should be given to how the object is illuminated and how the light source reflects and scatters light.
1. Basic Factors of Lighting Design
There are four key factors to consider:
1.1 Field of view of the lens
In the design of a lighting system, the field of view of the lens should be determined based on the size of the object being measured. Then, the optimal lighting system should be determined based on the size of the lens's field of view.
1.2 Distance between the lighting system and the workpiece
In designing a system, it is necessary to have a comprehensive understanding of the distance from the lens to the workpiece and the distance from the lighting system to the workpiece, so as to determine the distance between the light source and the workpiece.
1.3 The shape, condition and color of the workpiece
The choice of lighting is determined by factors such as the shape, flatness, and smoothness of the workpiece surface. The optimal lighting color (red, blue, green, white) can be determined by the color of the workpiece or the area being inspected.
1.4 Imaging Objective
Generally, the illumination system should be designed for a given imaging objective lens. The inspection criteria are: whether the parts of the workpiece that need to be visualized, scratches, defects, etc. are displayed, and whether the imprints on the workpiece surface can be identified.
2. Methods for highlighting different areas
2.1 Reflection Coefficient
The amount of light reflected from an object can be measured. There are two different methods of reflection:
a) Specular reflection: the angle of incidence equals the angle of exit.
b) Diffuse reflection: Due to the uneven surface of the object, the direction of the emitted light varies.
2.2 Color
In other words, spectral distribution; we measure color from three perspectives:
a) Wavelength: For example, the wavelength of green light is 550nm.
b) Mixing ratio of two or more light waves: The purpose of mixing is to produce another type of light. For example, yellow light (wavelength 620nm) and blue light (wavelength 480nm) mixed together will become green light. However, in reality, there is no distribution of green light in the spectrum.
c) Complementary color: The portion of light removed from white light and the remaining light are complementary colors. For example, the difference in color between white metal iron and yellow metal gold is not because gold reflects more yellow light than iron, but because it reflects less blue light. Removing blue light from white light results in yellow light.
2.3 Optical Density
Because different objects have different materials, thicknesses, and chemical properties, the amount and intensity of projected light also vary. Optical density may differ across the entire spectrum or only within a specific range. Generally, backlighting is the best method for identifying differences in optical density.
2.4 Refraction
Different transparent materials have different refractive indices, so they affect the propagation of light in different ways. For example, when air bubbles are mixed inside glass, the edges of the bubbles will appear either bright or dark when light shines on them directly.
2.5 texture
Some surface textures are discernible, while others are too minute to process, but they still affect light reflection. In some cases, texture is very important and must be highlighted by a light source; in other cases, texture is equivalent to noise, and the light source must be used to highlight other elements while weakening the texture.
2.6 depth
Direct light can emphasize the depth of an object (shadow effect), while diffused light can diminish the depth of an object.
2.7 Surface curvature
Due to variations in curvature, different parts of a surface exhibit different properties. Refracted light tends to accentuate these properties, while scattered light tends to diminish them.
3 Lighting technology
3.1 General Purpose Lighting
General lighting typically uses ring or spot lighting. Ring lights are a common type of general lighting; they are easy to mount on lenses and can provide sufficient illumination to diffuse surfaces.
3.2 Backlighting
Backlighting involves placing a light source behind the object relative to the camera. This method differs significantly from other lighting techniques because image analysis focuses on incident light rather than emitted light. Backlighting produces strong contrast. However, when using backlighting, surface features of the object may be lost. For example, backlighting can be used to measure the diameter of a coin, but it cannot determine whether the coin is heads or tails.
3.3 Coaxial lighting
Coaxial illumination projects light onto the surface of an object in the same direction as the camera's axis. It uses a special semi-reflective mirror to reflect the light source towards the lens axis of the camera. The semi-reflective mirror only allows light reflected from the object's surface perpendicular to the lens to pass through. Coaxial illumination is useful for achieving uniform illumination of flat objects with mirror-like surfaces. Furthermore, this technique can highlight areas of the surface with varying angles, as light reflected from surfaces not perpendicular to the camera lens will not enter the lens, resulting in a darker surface.
3.4 Continuous Diffuse Illumination
Continuous diffuse lighting is used on reflective surfaces or surfaces with complex angles. It employs a hemispherical, uniform illumination to reduce shadows and specular reflections. This lighting method is particularly useful for illuminating fully assembled circuit boards. This light source can achieve uniform illumination over a 170-degree solid angle.
3.5 Dark Area Lighting
Dark-field lighting provides low-angle illumination relative to the surface of an object. To determine whether a light source is bright-field lighting, photograph a mirror with the light source within its field of view. If the light source is visible within the field of view, it is considered bright-field lighting; conversely, if the light source is not visible, it is dark-field lighting. Therefore, whether a light source is considered bright-field or dark-field lighting depends on its position. Typically, dark-field lighting is used to illuminate protruding parts of a surface or to illuminate areas with varying surface textures.
3.6 Structured Light
Structured light is a type of light projected onto the surface of an object with a specific geometric shape (such as lines, circles, or squares). Typical structured light involves lasers or optical fibers. Structured light can be used to measure the distance from a camera to a light source. Multi-axis illumination: In many applications, multiple illumination techniques are needed to achieve different contrasts for different features within the field of view.
4. Selecting a light source
Once the lighting technology is selected, the next step is to choose the appropriate light source. The light source should illuminate the required shape, have sufficient uniformity, and exhibit good stability. When selecting a light source for machine vision applications, the following characteristics should be considered:
Spectral characteristics:
The color of the light source and the color of the object being measured determine the amount and wavelength of light reflected to the camera. White light or a specific spectrum can be an important factor when extracting feature information for other colors. When analyzing multi-color features, color temperature is a crucial factor when selecting a light source. For example, halogen lamps appear more yellow than xenon lamps.
efficiency:
Some light sources are highly efficient, emitting more light energy relative to their energy consumption, such as fluorescent lamps. Tungsten lamps, on the other hand, generate a considerable amount of heat and consume a lot of energy. Inefficient light sources cause localized overheating, resulting in significant energy waste. Generally, the higher the temperature of a light source, the shorter its lifespan and the higher its energy consumption.
5. Lifetime characteristics
Light sources typically need to operate continuously for several hours. A light source with a lifespan of 1000 hours will only last about a week under two-shift operation. Maintenance such as replacing the light bulb is then necessary. LED light sources are a popular choice, capable of continuous operation for extended periods, typically around 100 hours per day. For most light sources, the energy released decreases as they age. Depending on the type of light source, this decrease may be gradual or rapid and noticeable. Changes in light output can also affect spectral characteristics. When the aging rate of the light source impacts image processing results, changes in the light source should be noted.
6. Fees
Many light sources need to be replaced during the use of a vision system. If the light source is expensive, it may increase ongoing costs during the use of machine vision. Additionally, the light source should be readily available on the market.