0% found this document useful (0 votes)
11 views

Basics Lighting EN

The document discusses lighting for machine vision applications. Proper lighting is important for machine vision systems to perform tasks consistently. Many factors must be considered when selecting lighting, including wavelength, geometry, and material properties. The document also discusses different types of light sources like LEDs, which are commonly used in machine vision due to advantages like fast response and long lifetime.

Uploaded by

Samir Bagalkote
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Basics Lighting EN

The document discusses lighting for machine vision applications. Proper lighting is important for machine vision systems to perform tasks consistently. Many factors must be considered when selecting lighting, including wavelength, geometry, and material properties. The document also discusses different types of light sources like LEDs, which are commonly used in machine vision due to advantages like fast response and long lifetime.

Uploaded by

Samir Bagalkote
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Lighting

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.

For every application, the main objectives are the following:

1. Maximizing the contrast of the features that must be inspected or measured


2. Minimizing the contrast of the features of no interest
3. Getting rid of unwanted variations caused by:
a. Ambient light

b. Differences between items that are non-relevant to the inspection task

www.opto-engineering.com
Light in machine vision

In machine vision, light is mostly characterized by its wavelength,


which is generally expressed in nm (nanometers).
Light visible to the human eye has wavelengths in the range of
400-700 nm, between the infrared (with longer wavelengths)
and the ultraviolet (with shorter wavelengths): special
Basically light is electromagnetic radiation within a certain applications might require IR or UV light instead of visible light.
portion of the electromagnetic spectrum (cf. Fig. 1): it can be
quasi-monochromatic (which means that it is characterized
by a narrow wavelength band, i.e. with a single color) or white
(distributed across the visible spectrum, i.e. it contains all colors).

UV VISIBLE INFRARED
0.4 0.76
1000

X-RAYS MICROWAVES

0.9 1.7 3 5 8 14

SWIR MWIR LWIR

Fig. 1: Electromagnetic specturm

XXVIII www.opto-engineering.com
Lighting

Basically, light interacts with materials (Fig. 2) by being


Transmitted
• Reflected and/or
• Transmitted and/or
• Absorbed
Emitted
Reflected
Additionally, when light travels across different media it refracts,
i.e. it changes direction. The amount of refraction is inversely
proportional to the light wavelength; i.e. violet light rays are bent
more than red ones.

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

T here are many different types of light


sources available (Fig. 3) including the
following:
Mercury Quartz Halogen / Tungsten

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)

Fig. 3: Emission spectra of different light sources

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

A n LED illuminator can be controlled by either setting the


voltage V across the circuit or by directly feeding the circuit
with electric current I.
200
180
100

Forward current (mA)


50

One important consideration is that the luminous flux produced


by a single LED increases almost linearly with the current
10
while it does not do so with respect to the voltage applied:
1% uncertainty on the driving current will translate into 1%
luminance uncertainty, while 1% uncertainty on the input voltage
can result in a several percentage points variation (Fig. 4).
1
For this reason, it is suggested to directly regulate the current 2.0 2.5 3.0 3.5 4.0 4.5
Forward voltage (V)
and not the voltage, so that the light output is stable, tightly
controlled and highly repeatable. Forward current vs Relative luminous flux
4.0
For example, in measurement applications, it is paramount to
obtain images with a stable grey level background to ensure 3.5

Relative luminous flux (a.u.)


consistency of the results: this is achieved by avoiding light 3.0

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

forward current intensity leading to very stable performances. 1.0

0.5

0.5
0 50 100 150 200 250
Forward current (mA)

Fig. 4: LED current, tension and light output graphs

LED pulsing and strobing

L EDs can be easily driven in a pulsed (on/off) regime and can be


switched on and off in sequence, turning them on only when
necessary. Usage of LEDs in pulsed mode has many advantages
T

including the extension of their lifespan.


If the LED driving current (or voltage) is set to the nominal value t on max
declared by the LED manufacturer for continuous mode, we talk
t off
about pulsed mode: the LED is simply switched on and off.
LEDs can also be driven at higher intensities (i.e. overdriven)
than the nominal values, thus producing more light but only
for a limited amount of time: in this case we say that the LED is
operated in strobed mode.
Strobing is needed whenever the application requires an Fig. 5: Duty cycles parameters
increased amount of light to freeze the motion of fast moving
objects, in order to eliminate the influence of ambient light, to
preserve the LED lifetime and to synchronize the ON time of your
light (ton) with the camera and item to be inspected.
To properly strobe an LED light, a few parameters must be
considered (Fig. 5 and 6): Trigger signal Trigger signal

• 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.

Line speed, strobing and exposure time

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

so that the camera exposure time t is required to be

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

H ow to determine the best illumination for a specific machine vision task?


There are in fact several aspects that must be taken into account to help you choose the right illumination for your vision system
with a certain degree of confidence.

Application purpose

T his is by far the first point that must be clear.


If we want to inspect the surface of an object to look for defects or features such as printed text, then front illumination is needed -
i.e. light coming from the camera side. Selecting the proper light direction or angle of incidence on the target surface as well as other
optical properties such as diffuse or direct light depends on the specific surface features that must be highlighted.
If, on the other side, we plan to measure the diameter or the length of an object or we want to locate a through-hole, the best choice
to maximize contrast at the edges is back illumination - i.e. light is blocked by the object on its way to the camera.
The choice is not so obvious when dealing with more complex situations such as transparent materials and sometimes mixed solutions
must be taken into account.

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

Fig. 7: Illumination and directionality: the ‘W rule’

XXXII www.opto-engineering.com
Lighting

I n bright field, front light illumination, light reflected by a flat


surface is collected by the optics.

This is the most common situation, in which non-flat features


(e.g. defects, scratches etc.) can scatter light outside the
maximum acceptance angle of the lens, showing dark
characteristics on a bright background (the bright field -
see Fig. 8 and 10.a 10.b).

Bright field, front light can be produced by LED barlights or


ringlights, depending on the system symmetry (Fig. 9).

In both cases LED light can be direct or diffused by a medium


(sometimes the latter is to prefer to avoid uneven illumination
on reflective surfaces).
Fig. 8: Front bright field illumination scheme

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)

In dark field, front light illumination, reflected light is not


collected by the optics. In this way, only scattered light is
captured, enhancing the non-planar features of the surface as
brighter characteristics on a dark background (the dark field -
see Fig. 11 and 13.a - 13.b ).

Again, this effect is commonly reproduced by means of low angle


ringlights (Fig. 12).

Fig. 11: Front dark field illumination scheme

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).

In the latter, the non-planar features of the transparent object


show up dark on a white background; in this second case,
contrast is usually low unless the transparent surfaces present
sharp curvatures (e.g. air bubble inclusions in plastic).

These lighting techniques can be achieved using diffuse


backlights (Fig. 15a, 15b and 16) or telecentric illuminators,
specifically designed for high accuracy applications
(Fig. 17 and 18).

Fig. 14: Bright field backlight illumination scheme

Fig. 15.a: Diffuse backlight geometry (back emitting)

Fig. 16: image of a plastic cap with backlight illumination

Fig. 15.b: Diffuse backlight geometry (side-emitting)

Fig. 17: Telecentric backlight geometry Fig. 18: image of a precision mechanical component
with telecentric backlight illumination

XXXIV www.opto-engineering.com
Lighting

In dark field, backlight illumination, only light transmitted by


the sample and scattered by non-flat features will be collected,
enhancing such features as bright on the dark background
(Fig. 19).

This can be obtained by means of ringlights or bar lights


positioned behind a transparent sample.

Fig. 19: Dark field back light illumination scheme

C oaxial illumination. When front light hits the object surface


perpendicular to the object plane, we speak of coaxial
illumination.

Coaxial illumination can additionally be collimated, i.e. rays are


parallel to the optical axis (within a certain degree).
To obtain this illumination set up, coaxial boxes are available
for use in combination with any type of lens (either fixed focal,
macro or telecentric) or telecentric lenses with built-in coaxial
illumination can be used (such as Opto Engineering® TCCX series).

The difference lies in the degree of collimation which results in


the amount of contrast that is possible to achieve searching for
defects on highly reflective surfaces. See Fig. 21 and 22. Diffuser

Fig. 20: Coaxial illumination scheme (non collimated)

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

C ombined and advanced illumination solutions. Sometimes


in order to inspect very complex object geometries it is
necessary to combine different types of lights to effectively
reveal surface defects.

For example, the combination of a dome and a low angle light is


very effective in providing uniform illumination over the entire
field of view.

An example of “combined” lighting is the Opto Engineering ®


LTDMLA series, featuring all-in-one dome and low angle ring
lights which can be operated simultaneously or independently of
each other (see Fig. 25).

Fig. 25: Combined light (dome + low angle ringlight) illumination geometry

XXXVI www.opto-engineering.com
Lighting

Telecentric illumination

T elecentric illumination is needed in a wide variety of applications


including:

• High speed inspection and sorting: in fact, when coupled


with a telecentric lens, the high throughput allows for extremely
short exposure times

• Silhouette imaging for accurate edge detection and defect analysis

• Measurement of reflective cylindrical objects: diffuse backlights


can generate undesired reflections from the edges of shiny round
objects, making them look smaller than they are and leading
to inaccurate measurements. Since collimated rays are typically
much less reflected, telecentric illuminators can effectively
eliminate this “border effect” ensuring accurate and consistent
readings (see Fig. 26)
• Any precision measurement application where accuracy,
repeatability and high throughput are key factors

Non-collimated back illumination

Light coming from a variety of angles

Collimated back illumination

Parallel rays

Fig. 26: Collimated vs diffuse backlight illumination

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

M any machine vision applications require a very specific light


wavelength that can be generated with quasi-monochromatic
light sources or with the aid of optical filters.
V
B
B Appears
G blue
In the field of image processing, the choice of the proper light
Y
wavelength is key to emphasize only certain colored features of O
the object being imaged. R
The relationship between wavelength (i.e. the light color) and the
object color is shown in Fig. 27. Using a wavelength that matches
the color of the feature of interest will highlight this specific
feature and viceversa, i.e. using opposite colors to darken non Blue object
relevant features (see Fig. 28).
For example green light makes green features appear brighter
V
on the image sensor while red light makes green features appear
B Appears
darker on the sensor. On the other hand, white light will contrast red
G
all colors, however this solution might be a compromise. Y
Additionally it must be considered that there is a big difference in O
terms of sensitivity between the human eye and a CMOS or CCD R
R
sensor. Therefore it is important to do an initial assessment
of the vision system to determine how it perceives the object,
in fact what human eyes see might be misleading.
Red object
Monochromatic light can be obtained in two ways: we can
prevent extraneous wavelengths from reaching the sensor by
means of optical filters, or we can use monochromatic sources. Appears
red

Optical filters allow only certain wavelengths of light to be R


R
transmitted. They can be used either to allow light of a specified
wavelength to pass through (band-pass filters) or to block desired
wavelengths (e.g. low-pass filters for UV light only).
Color filters can block other non-monochromatic light sources
often present in industrial environments (e.g. sunlight, ceiling White object
lights etc.), however they also limit the amount of light that
actually reaches the sensor.
V
On the other hand, quasi-monochromatic sources only produce Appears
B
light of a certain wavelength within a usually small bandwidth. G black
Either way, if we select monochromatic (e.g. green) light, Y
every non-green feature will appear dark grey or black on the O
sensor, depending on the filter bandwidth and the color of the R
feature. This gives us a simple way to enhance contrast by using
monochromatic light with respect to the use of white light
(Fig. 29 - 34).
Black object
WARM COOL

Fig. 27: Relationship between object color and light color


R V

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

Fig.33: Green filter Fig. 34: Blue 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

T he projection of a light pattern on a surface can easily give


information on its 3D dimensional features (Fig. 35).
For example, if we observe a line projected from the vertical
direction with a camera looking from a known angle, we can
determine the height of the object where the line is projected.
This concept can be extended using various different patterns,
such as grids, crosses, dots etc.

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

projectors feature thinner lines, sharper edges and more


homogeneous illumination than lasers. Since light is produced by
a finite-size source, it can be stopped by a physical pattern with
the desired features, collected by a common lens and projected With laser emitters the illumination decays both across the line
on the surface. cross section and along the line width.
Light intensity is constant through the projected pattern with no
visible speckle, since LED light is much less coherent than laser
LASER

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.

Fig. 36: LASER vs LED in structured light illumination

Illumination safety and class risks of LEDs


according to EN62471

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

Does not pose hazard due to aversion response to bright light


Group II
According to EN 62471 light sources are classified into risk or thermal discomfort
groups according to their potential photobiological hazard. Group III Hazardous even for momentary exposure

XL www.opto-engineering.com

You might also like