Lighting Techniques For Machine Vision
Lighting Techniques For Machine Vision
Lighting Techniques For Machine Vision
Machine Vision
October, 2022
Daryl Martin
Technical Sales and Product Specialist
Advanced illumination
「 Lighting is our passion
802-767-3830 x251
Flexibility is our model 「 [email protected]
Who is Advanced illumination?
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Topics
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Primary Objective of Vision Lighting
Why?
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Vision Lighting Development
• Wave and Look (most common)
- Image the part while trying different sources at different positions
Contrast:
(Image) Contrast: A difference in image grayscale that distinguishes an object or feature from its background.
Multiple formulas to formally quantitate “image contrast” – largely image content dependent
Grayscale: Characterizes only the amount of light (intensity information), typically calibrated from “0”
(black) to “255” (white) – for an 8-bit (28 values) camera image.
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Lighting Image Contrast
It’s All About (creating) Contrast
Contrast!! Have we?
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Characterizing Light for Vision
Light: Photons propagating as an oscillating transverse
electromagnetic energy wave - characterized by:
Photons:
Energy packets exhibiting properties of
waves and particles.
Images Courtesy Wikimedia Commons Public Domain
100,000 nm
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
MV Electromagnetic Spectrum
Eyes and cameras “see” differently
Nanometers (nm)
400 500 600 700
Human Visible
Micro-
Gamma Rays X-Rays UV IR waves Radio Waves
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Light / Object Interaction
Properties when interacting with media (objects):
• Diffusion: Spreading, or dispersal of light into the object - may be wavelength specific
• Reflection: If not viewing a source directly, light must interact (mostly reflect) with objects for us to see it!
• Refraction: Wave front direction change upon entering media of a different index of refraction (violet > red)
• Diffraction: Bending around edges – Not a major factor in machine vision lighting (red > violet)
Angle of Dispersion
Φ1 = Φ2
Φ1 Φ2
White Light
Specular Reflection
n = 1.5 (glass) Φ1 > Φ2
n = 1.0 (air)
Diffuse Reflection
Courtesy Wikimedia Commons
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Light / Object Interaction
Total Light In = Reflected + Absorbed + Transmitted + Emitted (fluorescence) Light
Reflect –
Specular or
Diffuse
WD
Emit (fluorescence) Transmit
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Vision Lighting Sources
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Primary Vision Light Sources
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Intensity vs. Wavelength
Quartz Halogen / Tungsten
Mercury (Purple)
100
Daytime Sunlight
80 Fluorescent
Relative Intensity (%)
60
Xenon White
LED
40
20 Red
LED
0
300 400 500 600 700
Wavelength (nm)
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
LED Types
T1 ¾, The Standard
Courtesy Sun LED
(more practical)
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
White Light Color Temperature
Definition No Photobiological No Photobiological Hazard under No Hazard due to Aversion Response Hazardous even for Momentary
Hazard Normal Behavior to Bright Light or Thermal Discomfort Exposure
Hazard
Ultraviolet hazard Not required Minimize exposure to eyes or skin. Eye or skin irritation may result from Avoid eye and skin exposure to
200 nm to 400 nm Use appropriate shielding. exposure. Use appropriate shielding. unshielded product.
Retinal blue light Not required Not required Do not stare at operating lamp. May be Do not look at operating lamp. Eye
hazard 300 nm to harmful to the eyes. injury may result.
400 nm
Retinal blue light or Not required Not required Do not stare at operating lamp. May be Do not look at operating lamp. Eye
thermal hazard harmful to the eyes. injury may result.
400 nm to 780 nm
Cornea/lens Not required Use appropriate shielding or eye Avoid eye exposure. Use appropriate Avoid eye exposure. Use
infrared hazard protection. shielding or eye protection. appropriate shielding or eye
780 nm to 3000 nm protection.
Retinal thermal Not required Do not stare at operating lamp. Do not stare at operating lamp. Do not look at operating lamp.
hazard, weak visual Images Courtesy of
stimulus 780 nm to Cree
1400 nm
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Human Eye vs. Camera
Radiometric: Measured radiant power considering the entire electromagnetic spectrum
Photometric: Radiometric measures scaled to the human eye response (visible spectrum only)
25000
1800
507 nm
Human vs. NIR Enhanced
1600 Human Day vs. Night
20000 Camera Response & Range
Vision Response
1400
1200
15000
1000
555 nm
800
10000
600
400 5000
200
0 0
400 450 507 555 600 650 700 300 400 507 555 600 700 800 900 1000
Scotopic – Night Adapted (lm / W) Photopic – Daytime (lm / W) Relative NIR Enhanced Sensor Response
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Sensors and Wavelength
IR Enhanced Analog
80 Digital Interline Transfer
Standard Analog
CMOS
60 UV Enhanced Analog
Human Scotopic (Night)
Absolute QE (%)
Human Photopic
IR Block (Short Pass)
40
20
0
300 400 500 600 700 800 900 1000
Wavelength (nm)
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
4 Contrast Enhancement Concepts
How do we change (create) contrast?
• Change Light / Object / Camera Geometry Warm Cool
– 3-D spatial relationship
Important: impact of incident light on the part and its immediate background!
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Image Contrast Enhancement Concepts
1&2: Lighting Geometry/Structure
Techniques
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Basic Lighting Techniques
1 – Partial (Directional)
Bright Field
2 - Dark Field
3 - Back Lighting
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Advanced Lighting Techniques
Off-axis Co-axial
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Bright Field vs. Dark Field
Classic “W” Pattern
Partial Bright Field Lights in
White Area (Inside the “W”) Dark Field Lights in Grey
Areas (Outside the “W”)
Scratch
45
Mirrored Surface
Light from right for demo clarity
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Bright Field vs. Dark Field Light
Bright Field Dark Field
- Specular surfaces reflect glare if light is high-angle - Emphasizes Height, Edges, Shape, Contours
- Diffuse, flat and smooth surfaces reflect evenly - Diffuse Surfaces Bright
- Flat Polished Surfaces Dark
Bright Field
Dark Field
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Dark Field Example
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Back Lighting
• Edge or hole detection
• Useful on translucent materials
Liquid fill levels
Glass/plastic defects
Longer λ light may penetrate some objects better
• Part P/A, location and/or orientation
• Vision-Guided Robotics: Pick & Place
High-accuracy gauging: • Gauging
• Use monochromatic light
• Shorter wavelengths best
• Use collimation – parallel rays
Limiting factor is lens optics and/or camera sensor resolution, not the light wavelength
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Back Lighting Example
660 nm Red Backlight
Small Bottle – Determine Fill Level
Consider colors and materials
properties also.
Longer wavelength isn’t always
best for penetration!
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Collimated Backlight Illumination
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Diffuse Dome
- Similar to the light on an
overcast day.
- Creates minimal glare.
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Co-Axial Diffuse Illumination
- Light directed at beam splitter
- Used on non-curved, reflective objects
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Flat Diffuse
- Diffuse sheet directed downward
- Long WD and larger FOV
- Hybrid diffuse (dome and Co-Axial)
On-Axis BF Ring Diffuse Co-Axial
Diffuse
On-Axis
On-Axis
Diffuse BFDome
DFRing
Ring
Co-Axial
Flat Diffuse
Flat Diffuse
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Advantages - Disadvantages
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Technique vs. Object Surface
Geometry Surface Reflectivity Profile
Independent
Area Matte Mixed Mirror Specular
Directional
Flat Bright Field
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Inspection Environment
Physical Constraints
- Access for camera, lens & lighting in 3-D (working volume)
- The size and shape of the working volume
- Min and max camera, lighting working distance and FOV
Part Characteristics
- Is the part presented consistently in orientation & position?
- Any potential for ambient light contamination?
- Object stationary, moving, or indexed?
- If moving or indexed: speeds, feeds & expected cycle time?
- Strobing? Expected pulse rate, on-time & duty cycle?
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Contrast Enhancement Concept 3:
Using Color and Wavelength
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Create Contrast with Color
Use Monochrome Light to Create Contrast
Warm Cool
1 - Use Like Colors or Families to Lighten:
R V
(red light makes red features brighter)
O B
2 - Use Opposite Colors or Families to Darken:
(red light makes green features darker) Y G
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Create Contrast with Color
Warm Cool
R V
Red Green
O B
Y G
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Wavelength vs. Composition
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Contrast Enhancement Concept 4:
Using Pass and Polarizing Filters
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Ambient Light
Any light other than the vision-specific lighting that
the camera collects.
Controlling and Negating Ambient Light
Turn off the ambient contribution
Most effective . . . Least Likely!
Build a shroud
Very effective, but time-consuming, bulky and expensive
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Avoiding Surface Glare
Change Geometry – 3D spatial arrangement of
Light, Sample, and Camera (preferred)
Strobe to overwhelm glare from ambient sources
Use polarization filters (least preferred)
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Polarizing Filters in Vision
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Polarizing Filters in Vision
On-axis Light
w/ Polarizers
Up to 2 ½
f/stops
Off-axis Light
w/o Polarizers opened! w/ Polarizers
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Polarizing Filters in Vision
6-pack Plastic Ring Carrier
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Avoiding Surface Glare
3-D Reflection Geometry: Light - Sample - Camera
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Avoiding Surface Glare - Bar Code
Off-Axis
On-Axis Broad
Dark
Bright
Co-Axial Area
Field
Field
Diffuse RingLinear
RingLight
Light
Illuminator
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Imaging with UV & Near IR Light
Contrast Enhancement
Concepts 3 & 4
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Vision Lighting Spectrum
Typical CCD
Sensor
Human Visual
System
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Imaging with UV Light - Fluorescence
Colors (wavelengths) and filters work together
Fluorescing Printing
Fluorescing Polymers
Caveats: (nylon)
1) UV light is not always needed – part dependent
2) Use band pass filters to enhance feature contrast
3) Goal is collecting emitted light from part, NOT excitation source light (unlike visible)
4) Emitted (fluorescent yield) light from part is always:
- longer wavelength, thus less energy and less “bright” than source
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Imaging with UV Light - Fluorescence
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Vision Lighting Design Method
1) Determine the Exact Features of Interest
2) Analyze Part Access / Presentation
Clear or obstructed, Moving / Stationary
Min / Max WD range, Sweet Spot FOV, etc.
3) Analyze Surface Characteristics
Texture
Reflectivity / Specularity
Effective Contrast – Object vs. background
Surface flat, curved, combination
4) Understand Light Types and Applications Techniques
Rings, Domes, Bars, Spots, Controllers, etc
Bright Field, Diffuse, Dark Field, Back Lighting
5) Determine Critical Image Contrast Enhancement Issues
3-D Geometry, Structure, Color & Filters
6) Eliminate Ambient Light Effects / Environmental Issues
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
9 Guidelines for Applying MV Lighting
1) Coordinated Lighting & Optics are crucial – when properly selected, they provide
the foundation for the MV system.
2) Develop the lighting solution early in the vision system design process – on the
bench first, if necessary.
3) Dedicated Lighting = Control of the Lighting Environment.
4) A primary key for producing accurate, reproducible, robust & standardized
inspection results is creating Feature-Appropriate Lighting image contrast.
5) Understand that a final lighting solution may require considerable compromise.
6) Apply the 4 image contrast enhancement concepts.
7) Consider that light MAY interact differently w/ respect to surface texture, color,
composition and incident wavelength, especially UV and NIR.
8) Be aware of your camera sensor’s spectral sensitivity and range, understanding
that it will be considerably better in both factors compared with your eyes.
9) Understand the Inspection Environment w/ respect to Physical Constraints,
Object Characteristics, Ambient Light and Ergonomic / Safety aspects.
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com
Contact Information
Light Available Transmitted or Emitted Light
(At a Surface) (Through or From a Surface)
Solid Angle Ω
= A/r2
Illuminance, Irradiance
Lumens / m2 (LUX); W / m2 www.1stvision.com
Light
978-474-0044
Light Power (Through an area)
(From an infinitely small sphere) Luminance, Radiance
Luminous, Radiant Flux Lumens / m2 / Sr or cd / m2; W / m2 / Sr
Lumens (lm); Watts (W)
Precision Lighting for Vision and Imaging 440 State Garage Road, Rochester, VT 05767 +1802-767-3830 www.advancedillumination.com