Experienced machine vision engineers will agree on this statement: the success or failure of a machine vision project hinges on obtaining a well-lit image. If the acquired image itself is of poor quality, then subsequent image processing will face numerous difficulties.
Thanks to project requirements and the efforts of light source manufacturers, the types of machine vision light sources are now quite diverse, including strip lights, backlights, parallel backlights, coaxial lights, point lights, tunnel lights, bowl lights, ring lights, spherical lights, and strip focused lights. Based on the wavelength and color of the light, they can also be categorized as X-rays, blue light, red light, white light, and infrared light.
There is a wealth of information online about light source selection, so I don't want to repeat it. I'd like to talk about something else.
Among the many types of light sources, there is one that is the most flexible and versatile: ring light. Ring light comes in different types, such as low-angle ring light, high-angle ring light, 0° ring light, 30° ring light, 45° ring light, 60° ring light, and 90° ring light.
Different sources define the "angle" of this ring light differently. Some refer to the "angle between the direction of the light source and the horizontal plane," while others refer to the "angle between the direction of the light source and the optical axis of the lens (usually the vertical direction)." This article adopts the latter definition.
Why are there so many variations of ring lights? Because their aperture can be different, their "angle" can be different, their light color can be different, and their installation height can also be different (other light sources generally don't have such large differences in installation height).
Below, I will take the lens module as an example and use ring lights of different "angles" to capture images at different heights along the optical axis of the lens. You can observe the characteristics and changes of the images.
(This is a mobile phone camera module, about 6mm high, with a transparent, scratched glass lens in the middle.)
Note: In each of the following series of images, the height of the light source continuously decreases from high to low.
① 90° ring light (i.e., ring light where the direction of the light source is at a 90° angle to the vertical direction)
②30° ring light
If you've read this far, you might want to pause and think about why the images differ when illuminated by ring lights at different angles and heights.
The core idea is to always capture which light is reflected and then captured by the camera along the vertical direction. An object becomes an image in the camera because light is reflected from its surface and enters the camera; this light is captured by the camera, thus forming an image.
If you want to improve your ability to select light sources, it is essential to have a deep understanding of the two sentences above.
When there's only a light source and no camera available, how can you guess what the image captured by the camera will look like? I have a little trick: put your head directly above the object being measured and observe the lighting situation vertically from top to bottom. Why observe in this posture? Because the camera also "observes" the object in this posture.
As can be seen from the two sets of images above, if you want to detect scratches on the lens of a module, using a 90° ring light at a suitable height can produce a high-quality image that is easy to process. But is this the best solution? Not necessarily.
Let's try using backlighting:
The scratches are clearly visible and well separated from the background. Of course, this doesn't mean that backlighting is always superior to 90° ring lighting, because often, due to limitations in the site conditions, it's impossible to install backlighting.
I snapped a picture of the coaxial lighting and am posting it here as well:
Coaxial light sources are generally expensive. I suspect that the reason they are expensive is partly because they emit parallel light, and partly because their internal 45° "semi-transparent and semi-reflective" device requires high assembly precision.
Observing the images above taken with coaxial lighting, it can be seen that images taken with coaxial lighting generally look rather "mediocre." Coaxial lighting can highlight the unevenness of an object's surface and overcome interference caused by surface reflections.
These are determined by the characteristics of coaxial light: the coaxial light that ultimately shines on the object being measured is vertically downward light. After the light is reflected by the object, only the vertically upward reflected light can pass through the "semi-transparent and semi-reflective" device of the coaxial light and enter the camera vertically (therefore the reflection is not visible because the reflection is refracted to other directions and does not enter the camera).
In addition, many users have probably noticed that when camera lens parameters, installation height, and other conditions are the same, setting the coaxial light source to its brightest setting generally results in images with very low brightness. Why is this? This is because coaxial light undergoes two "semi-transparent, semi-reflective" processes from emission to final capture by the camera, resulting in a significant loss of brightness from the light source.
I'll repeat the two sentences I said earlier at the end:
The camera always focuses on which light is reflected and captured along the optical axis. An object forms an image in the camera because light from its surface is reflected into the camera, and this light is captured by the camera, thus forming an image.