Basics Lighting EN
Basics Lighting EN
I llumination is one of the most critical components of a machine vision system. The selection of
the appropriate lighting component for a specific application is very important to ensure that
a machine vision system performs its tasks consistently and reliably.
The main reason is that improper illumination results in loss of information which, in most cases,
cannot be recovered via software. This is why the selection of quality lighting components is of
primary importance: there is no software algorithm capable of revealing features that are not
correctly illuminated.
To make the most appropriate choice, one must consider many different parameters, including:
• Lighting geometry
• Light source type
• Wavelength
• Surface property of the material to be inspected or measured (e.g. color, reflectivity)
• Item shape
• Item speed (inline or offline application)
• Mechanical constraints
• Environment considerations
• Cost
Since many parameters must be considered, the choice can be difficult and sometimes the wisest
advice is to perform feasibility studies with different light types to reveal the features of interest.
On the other hand, there are a number of simple rules and good practices that can help select the
proper lights and improve the image quality.
www.opto-engineering.com
Light in machine vision
UV VISIBLE INFRARED
0.4 0.76
1000
X-RAYS MICROWAVES
0.9 1.7 3 5 8 14
XXVIII www.opto-engineering.com
Lighting
This means that light with short wavelengths gets scattered more
easily than light with long wavelengths when hitting a surface
and is therefore, generally speaking, more suited for surface
inspection applications.
Incident Absorbed
In fact, if we ideally consider wavelength as the only parameter
to be considered from the previous list, blue light is advised for
applications such as scratch inspection while longer wavelengths
such as red light are more suited for enhancing the silhouette of
transparent materials.
Fig. 2: Interaction of light with matter: reflection, adsorption and transmission
LED illumination
Daytime sunlight
• Incandescent lamps
0.8
• Fluorescent lamps
• LED lights Fluorescent
Relative intensity (%)
0.6 White
LED
Xenon
LED lights are by far the most commonly 0.4
used in machine vision because they offer
a number of advantages, including:
• Fast response 0.2
Red
• Suitable for pulse and strobe operations LED
• Mechanical resistance
0.0
• Longer lifetime, higher output stability
• Ease of creating various lighting 300 400 500 600 700
geometry Wavelength (nm)
Incandescent lamps are the well-known Fluorescent lamps are vacuum tubes LEDs (Light Emitting Diodes) produce
glass bulbs filled with low pressure, in which UV light is first produced (by light via the annihilation of an electron-
inert gas (usually argon) in which a thin interaction between mercury vapor and hole pair in a positive/negative junction of
metal wire (tungsten) is heated to high highly energetic electrons produced by a semiconductor chip.
temperatures by passing an electric a cathode) and then is adsorbed by the The light produced by an LED depends
current through it. tube walls, coated with fluorescent and on the materials used in the chip and is
The glowing metal emits light on a broad phosphorescent material. characterized by a narrow spectrum, i.e. it
spectrum that goes from 400 nm up to The walls then re-emit light over a is quasi-monochromatic.
the IR. The result is a white, warm light spectrum that again covers the whole White light is produced as in the
(corresponding to a temperature of 2870 visible range, providing a “colder” white fluorescent lamps, but the blue light
K) with a significant amount of heat being light source. is absorbed and re-emitted in a broad
generated. spectrum slightly peaked in the blue
region.
XXIX
LED power supply and output
Forward voltage vs. Forward current
flickering and ensuring that the LED forward current of the 2.5
telecentric light is precisely controlled: this is why Opto
2.0
Engineering ® LTLCHP telecentric illuminators feature built-
in electronics designed to have less than 1‰ variation in LED 1.5
0.5
0.5
0 50 100 150 200 250
Forward current (mA)
• Max pulse width or ON time (ton max ): the maximum amount Acquisition time Acquisition time
of time for which the LED light can be switched on at the
maximum forward current. Camera Camera
• Duty cycle D is defined as (usually expressed in %): acquiring acquiring
t on t on
D = ton/(ton+toff )
t off
Strobed LED Strobed LED
Where toff is the amount of time for which the LED light is off and light output light output
T = ton+toff is the cycle period. The duty cycle gives the fraction LED constant light output
in % of the cycle time during which the LEDs can be switched Time
on. The period T can be also given as the cycle frequency f = 1/T,
expressed in Hertz (Hz). Fig. 6: Triggering and strobing
XXX www.opto-engineering.com
Lighting
LED lifetime
T he life of an LED is defined as the time that it takes for the LED luminance to decrease to 50% of its initial luminance at an ambient
temperature of 25°C.
W hen dealing with online applications, there are some important parameters that have to be considered.
Specifically, depending on the object speed and image sharpness that is required for the application, the camera exposure time
must be always set to the minimum in order to freeze motion and avoid image blurring. Additionally, black and opaque objects that tend
to absorb instead of reflecting light, are particularly critical.
As an example, let’s suppose to inspect an object moving with speed vo using a lens with magnification m and a camera with pixel size p.
The speed of the object on the sensor will be m times vo:
vi = m vo,
Therefore the space travelled by the object xi during the exposure time t is xi = vi t. If this space is greater than the pixel size, the object
will appear blurred over a certain number of pixels. Suppose that we can accept a 3 pixels blur: in other words, we require that
xi = vi t = m vo t < 3 p
t < 3 p / (m vo )
For example, using p = 5.5 µm, m = 0.66, vo = 300 mm/s (i.e. a line speed of 10,800 samples/hr on a 100 mm FoV) we find a maximum
exposure time of t = 83 µs.
At such speed, the amount of light emitted by LED illuminator used in continuous mode is hardly ever enough - so that strobing the
illuminator for an equivalent amount of time is the best solution.
Another parameter that we can adjust in order to get more light into the system is the lens F/#: by lowering the lens F/# we will gather
more light; however, this will lower the depth of field of the system. Moreover, this might also lower the image quality since, in general,
a lens performs better in the center and worse towards the edges due to lens aberrations, leading to an overall loss of sharpness.
Increasing the camera gain is another way, however this always introduces a certain amount of noise, thus again leading to a degraded
image where fewer details can be distinguished.
As a result, it is always a good practice to choose sufficiently bright lighting components, allowing you to correctly reveal the features
of interest the inspected of object when used in combination with lenses set at the optimum F/# and without the need to digitally
increase the camera gain.
XXXI
Illumination geometries and techniques
Application purpose
Illumination angle
Once we have established whether front or back illumination is more suitable, we must set the angle at which light hits the object
surface. Although the angle may vary, there are two important subgroups of front and backlight illumination: bright field and dark field
illumination. The four combinations that follow are described below (Fig. 7).
FRONT LIGHTING
FRONT FRONT
bright field bright field
and collimated illumination
Front coaxial
FRONT FRONT
dark field dark field
OBJECT
and collimated illumination
BACK BACK
dark field dark field
Back coaxial
BACK BACK
bright field bright field
BACK LIGHTING
XXXII www.opto-engineering.com
Lighting
a b
Fig. 9: Ringlight (a) and barlight (b) geometry Fig. 10. a: image of engraved sample with front Fig. 10.b: image of a metal coin (featuring embossed
brigth field illumination (ringlight) parts) with front bright field illumination (ringlight)
Fig. 12: Low angle ringlight geometry Fig. 13.a: image of engraved sample with front dark Fig .13.b: image of a metal coin (featuring embossed
field illumination (ringlight) parts) with front dark field illumination (ringlight)
XXXIII
In bright field, backlight illumination, light is either stopped
or transmitted by the surface if the material is opaque (Fig. 14)
or transparent.
In the first case, we see the outline of the object (black object on
white background - see Fig. 16 and 18).
Fig. 17: Telecentric backlight geometry Fig. 18: image of a precision mechanical component
with telecentric backlight illumination
XXXIV www.opto-engineering.com
Lighting
Fig. 21: Coaxial illumination geometry Fig. 22: image of engraved sample
(standard and collimated) with coaxial illumination
XXXV
D ome lights and tunnel lights.
If an object with a complex curved geometry must be
inspected to detect specific surface features, front light
In fact, dome lights are sometimes also referred to as “cloudy day”
illuminators because they provide uniform light as on a cloudy
illumination coming from different angles is the most appropriate day.
choice in order to get rid of reflections that can lead to uneven Another type of lighting geometry is tunnel illumination: these
illumination: Dome lights are the ideal solution for these type of lights are designed to provide uniform illumination on long and
applications because they are designed to provide illumination thin cylindrical objects and they feature a circular aperture on
coming from virtually any direction (Fig. 23 e 24). top (as dome lights).
Fig. 24: Image of a metal coin (featuring embossed parts) with dome
Fig. 23: Dome illumination geometry light illumiantion
Fig. 25: Combined light (dome + low angle ringlight) illumination geometry
XXXVI www.opto-engineering.com
Lighting
Telecentric illumination
Parallel rays
The use of a collimated light in combination with a telecentric lens Therefore, the optical system behaves as if the lens had the same
increases the natural depth of field of the telecentric lens itself NA as the illuminator in terms of field depth, while maintaining
by approximately +20/30% (this however also depends on other the same image resolution given by the actual telecentric lens
factors such as the lens type, light wavelength and pixel size). NA.
Additionally, thanks to the excellent light coupling, the distance Collimated light is the best choice if you need to inspect objects
between the object and the light source can be increased where with curved edges; for this reason, this illumination technique is
needed without affecting image quality. This happens because the widely used in measurement systems for shafts, tubes, screws,
illuminator’s numerical aperture (NA) is lower than the telecentric springs, o-rings and similar samples.
lens NA.
XXXVII
Wavelength and optical performance
O B
Additionally, in some cases a specific wavelength might
be preferred for other reasons: for example, Opto Engineering ®
telecentric lenses are usually optimized to work in the
visible range and they offer the best performance in terms
Y G of telecentricity and distortion when used with green light.
Furthermore, green light is a good tradeoff between the
resolution limit (which improves with shorter wavelengths)
and the transmission characteristics of common glasses
Fig. 28: One way to maximize contrast is to select the light color (which in fact have low transmission at short wavelengths).
that is on the opposite side of the wheel of the feature color. In cases where any wavelength will fit the application, one might
In such case, features will appear dark on the image sensor choose a specific LED color just based on cost considerations.
XXXVIII www.opto-engineering.com
Lighting
Blue filter
Red filter
Object Object
Image Image
Red light is reflected off the red background, Blue light is reflected off the blue circle,
but is absorbed by the blue circle. but is absortbd by the red background.
Fig. 29: Filtering and coloured samples: concept scheme and monochromatic result
Fig. 30: Color camera Fig. 31: Mono camera Fig. 32: Red filter
Polarizing filters consist of special materials characterized by a distinctive optical direction: all light oscillating in this direction passes
through, while the other components of the wave are suppressed.
Since light reflected by a surface is polarized in the direction parallel to the surface itself, such reflection can be significantly reduced
or blocked by means of two polarization filters - one on the light and one on the lens.
Polarizing filters are used to eliminate glare effects occurring when imaging reflective materials, such as glass, plastic etc.
XXXIX
Structured illumination
Although both LED and laser sources are commonly used for
pattern projection, the latter present several disadvantages
(Fig. 36). The laser light profile of the line has a Gaussian shape,
being higher at the center and decreasing at the edges of the
stripe.
Additionally, projecting a laser onto a surface produces the so
called “speckle effect”, i.e. an interference phenomenon that
causes loss of edge sharpness of the laser line, due to the high
coherent nature of the laser light.
Projected pattern Seen pattern With laser emitters the illumination decays both across the line
cross section and along the line width. Additionally, lines from
laser emitters show blurred edges and diffraction/speckle effects.
Fig. 35: Structured light technique
On the other hand, using LED light for structured illumination LED pattern projectors ensure thinner lines, sharper edges and
will eliminate these issues. Opto Engineering ® LED pattern more homogeneous illumination than lasers.
LED
light. Additionally, white light can be easily produced and used in Laser emitters lines are thicker and show blurred edges;
the projection process. diffraction and speckle effects are also present.
IEC/EN 62471 gives guidance for evaluating the photobiological Risk Group
safety of lamps including incoherent broadband sources of Exempt No photobiological hazard
optical radiation such as LEDs (but excluding lasers) in the
wavelength range from 200 nm through 3000 nm. Group Ia No photobiological hazard under normal behavioral limitations
XL www.opto-engineering.com