Illumination Principles Nguyễn tắc chiếu sáng The spectral response quang phổ of a sensor is the sensitivity curve for different wavelengths.. The spectral response of a sensor is the
Trang 1XỬ LÝ ẢNH TRONG CƠ ĐIỆN TỬ
Machine Vision
Giảng viên: TS Mạc Thị Thoa Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí
Trang 22 Basic elements of machine vision system (các thành phần cơ bản của thị
giác máy)
3 Classification (Phân loại)
4 Technical specifications (thông số kỹ thuật)
5 Designing a Machine Vision System (Thiết kế hệ thống thị giác máy )
Trang 3 Machine vision – thị giác máy (MV) is the technology and methods used to
provide imaging-based automatic inspection and analysis for such applications
as automatic inspection, process control, and robot guidance, usually in industry
Machine vision is a term encompassing a large number of technologies,
software and hardware products, integrated systems, actions, methods and
expertise
Machine vision as a systems engineering discipline can be considered distinct
from computer vision, a form of computer science.
It attempts to integrate existing technologies in new ways and apply them to
Trang 4 Các quá trình thị giác máy tính bao gồm lập kế hoạch chi tiết các yêu cầu sau đóđưa ra các giải pháp, bao gồm: lấy và lưu trữ các ảnh, các quá trình xử lý ảnh,
lấy các thông tin cần thiết
Trang 6 To find the object and report its position and orientation.
Trang 7 To measure physical dimensions of the object
Trang 8 To validate certain features
Trang 112.2 Illumination (Sự chiếu sáng)
2.3 Imaging (Ảnh)
2.4 Image processing and analysis (Xử lý và phân tích ảnh)
Trang 13 Illumination: is the way an object is lit up and lighting is the actual lamp that
generates the illumination
Imaging (Camera and lens)
The term imaging defines the act of creating an image
Trang 14Image processing and analysis
This is where the desired features are extracted automatically by algorithms and conclusions are drawn
A feature is the general term for information in an image, for example a
dimension or a pattern
Algorithms are also referred to as tools or functions
Trang 15The goal of lighting in machine vision is to obtain a robust application by:
Enhancing the features to be inspected
Assuring high repeatability in image quality
Trang 16Illumination Principles
Light can be described as waves with three properties:
Wavelength or color, measured in nm (nanometers)
Intensity
Polarization.(Phân cực)
Trang 17Illumination Principles ( Nguyễn tắc chiếu sáng)
The spectral response (quang phổ) of a sensor is the sensitivity curve for
different wavelengths
Spectral response of a gray scale CCD sensor
Maximum sensitivity
is for green (500 nm).
A charge-coupled device (CCD)
Trang 18Illumination Principles
The optical axis is a thought line through the center of the lens, i.e the direction the camera is looking
Trang 19Illumination Principles
Trang 20Lighting Types >> Ring Light
A ring light is mounted around the optical axis of the lens, either on the camera or somewhere in between the camera and the object
Trang 21Lighting Types >> Ring Light
Pros
• Easy to use
• High intensity and short exposure time possible
Cons
• Direct reflections, called hot spots, on reflective surfaces
Ring light The printed matte surfac
e is evenly illuminated Hot spots appear on shiny surfaces (center), one for each of the 12 LEDs of the ring light.
Trang 22Lighting Types >> Spot Light
A spot light has all the light emanating from one direction that is different from the optical axis For flat objects, only diffuse reflections reach the camera
Mainly diffuse reflections reach the camera Object
Spot light
Emanating: phát ra Diffuse: Khuyếch tán
Trang 23Lighting Types >> Spot Light
Trang 24Lighting Types >> Backlight – Ánh sáng chiếu nền
The backlight principle has the object being illuminated from behind to produce a contour or silhouette (bóng)
Trang 25Lighting Types >> Backlight
Pros
• Very good contrast
• Robust to texture, color, and ambient light
Cons
• Dimension must be larger than object
Trang 26Lighting Types >> Darkfield
Darkfield means that the object is illuminated at a large angle of incidence (góc
tới)
Trang 27Lighting Types >> Darkfield
Pros
• Good enhancement of scratches, protruding
edges, and dirt on surfaces (Cải thiện tốt các vết
xước, gờ lồi, bám bẩn trên bề mặt)
Cons
• Mainly works on flat surfaces with small features
• Requires small distance to object
• The object needs to be somewhat reflective
Trang 28Lighting Types >> On-Axis Light
When an object needs to be illuminated parallel to the optical axis, a
semi-transparent mirror is used to create an on- axial light source
Ánh sáng đồng trục
Trang 29Lighting Types >> On-Axis Light
Pros
• Very even illumination, not hot spots
• High contrast on materials with different
reflectivity
Cons
• Low intensity requires long exposure times
• Cleaning off semi-transparent mirror splitter) often needed
(beam-Inside of a can
as seen with ambient light
Inside of the same can
as seen with a coaxial (on-axis) light
Trang 30Lighting Types >> Dome Light
The dome light produces the needed uniform light intensity inside of the dome
walls
Trang 31Lighting Types >> Dome Light
Pros
• Works well on highly reflective
materials
• Uniform illumination, except for the
darker middle of the image No hot
• Dark area in the middle of the image
Trang 32Lighting Types >> Dome Light
Ambient light On top of the key numbers is a curved, transparent material causing direct reflections.
The direct reflections are eliminated by the dome light’s even illumination.
Trang 33Lighting Types >> Laser Light
A 2D camera with a laser line can provide a cost efficient solution for low-contrast and 3D inspections
Pros
• Robust against ambient light (ánh sáng
môi trường xung quanh)
• Allows height measurements (z parallel
to the optical axis).
• Low-cost 3D for simpler applications
Cons
• Laser safety issues
• Data along y is lost in favor of z (height) data
• Lower accuracy than 3D cameras
Trang 34Lighting Types >> Laser Light
Ambient light Contract lens containers, the
left is facing up (5mm high at cross) and the
right is facing down (1mm high at minus sig
n.
The laser line clearly shows the height difference.
Trang 35Lighting Variants and Accessories >> Strobe or Constant light
A strobe light is a flashing light
Strobing allows the LED to emit higher light intensity than what is achieved with a constant light by turbo charging
Trang 36Lighting Variants and Accessories >> Diffusor Plate – Tấm khuyếch tán
The diffusor plate converts direct light into diffuse
The purpose of a diffusor plate is to avoid bright spots in the image, caused by
the direct light's reflections in glossy surfaces (bề mặt bóng)
Two identical white bar lights, with diffusor plate (top) and without (bottom).
Trang 37Lighting Variants and Accessories >> LED Color
LED lightings come in several colors Most common are red and
green There are also LEDs in blue, white, UV, and IR
Different objects reflect different colors A blue object appears blue
because it reflects the color blue
Therefore, if blue light is used to illuminate a blue object, it will appear bright in a gray scale image
Trang 38Lighting Variants and Accessories >> LED Color
Trang 39Lighting Variants and Accessories >> Optical Filters (Bộ lọc quang học)
An optical filter is a layer in front of the sensor or lens that absorbs certain
wavelengths (colors) or polarizations
Two main optical filter types are used for machine vision:
1
2 Polarization filter (Bộ lọc phân cực): Only transmits light with a certain
polarization Light changes its polarization when it is reflected, which allows us to filter out unwanted reflections
Band-pass filter (Bộ lọc băng thông): Only transmits light of a certain color, i.e
within a certain wavelength interval example, a red filter only lets red through
Trang 40Lighting Variants and Accessories >> Optical Filters (
Red light and a red band-pass filter
Green light and a green band-pass filter
Trang 41 The term imaging defines the act of creating an image.
Imaging has several technical names: Acquiring, capturing, or grabbing
To grab a high-quality image the number one goal for a successful vision
application
Trang 42Basic Camera Concepts
A simplified camera setup consists of camera, lens ( ống kính), lighting, and
object.
Trang 43Basic Camera Concepts: Digital Imaging
A sensor chip is used to grab a digital image.
On the sensor there is an array of lightsensitive pixels ( nhạy sáng)
Sensor chip with an array
Trang 44Basic Camera Concepts: Digital Imaging
There are two technologies used for digital image sensors:
CCD (Charge-Coupled Device)
CMOS (Complementary Metal Oxide Semiconductor).
Trang 45Basic Camera Concepts: Digital Imaging
Trang 46Basic Camera Concepts: Lenses and Focal Length
The lens (Objective) focuses the light that enters the camera in a way that
creates a sharp image
Focused or sharp image.
Unfocused or blurred image.
Trang 47Basic Camera Concepts: Lenses and Focal Length
The angle of view determines how much of the visual scene the camera sees.
Trang 48Basic Camera Concepts: Lenses and Focal Length
The focal length is the distance between the lens and the focal point
When the focal point is on the sensor, the image is in focus.
Trang 49The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Lenses and Focal Length
Focal length is related to angle of view in that a long focal length corresponds to a small angle of view, and vice versa.
Trang 50The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Field of View in 2D
The FOV (Field of View) in 2D systems is the full area that a camera sees The FOV
is specified by its width and height.
The object distance is the distance between the lens and the object.
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 51The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Aperture and F-stop
The aperture is the opening in the lens that controls the amount of light that is let
onto the sensor In quality lenses, the aperture is adjustable.
Trang 52The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Aperture and F-stop
The size of the aperture is measured by its F-stop value A large F-stop value means
a small aperture opening, and vice versa.
For standard CCTV lenses, the F-stop value is adjustable in the range between F1.4 and F16.
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 53The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Depth of Field
The minimum object distance (sometimes abbreviated MOD) is the closest
distance in which the camera lens can focus and maximum object distance is the
farthest distance.
Trang 54The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Depth of Field
The focal plane is found at the distance where the focus is as sharp as possible.
Objects closer or farther away than the focal plane can also be considered to be in
focus This distance interval where good-enough focus is obtained is called depth of
field (DOF).
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 55The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Depth of Field
Trang 56The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Depth of Field
The depth of field depends on both the focal length and the aperture adjustment.
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 57The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Depth of Field
By adding a distance ring between the camera and the lens, the focal plane (and
thus the MOD) can be moved closer to the camera A distance ring is also referred to
as shim, spacer, or extension ring.
Trang 58The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Depth of Field
A side-effect of using a distance ring is that a maximum object distance is
introduced and that the depth of field range decreases.
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 59The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Pixels and Resolution
A pixel is the smallest element in a digital image Normally, the
pixel in the image corresponds directly to the physical pixel on the sensor.
To the right is an example of a very small image with dimension
8x8 pixels The dimensions are called x and y, where x corresponds to the image columns and y to the rows.
Trang 60The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Pixels and Resolution
Typical values of sensor resolution in 2D machine
vision are:
VGA (Video Graphics Array): 640x480 pixels
XGA (Extended Graphics Array): 1024x768 pixels
SXGA (Super Extended Graphics Array):
1280x1024 pixels
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 61The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Pixels and Resolution
The object resolution is the physical dimension on the object that corresponds to
one pixel on the sensor Common units for object resolution are μm (microns) per pixel and mm per pixel.
Example: Object Resolution Calculation: FOV width = 50 mm, Sensor resolution = 640x480 pixels, Calculation of object resolution in x:
Trang 62The spectral response of a sensor is the sensitivity curve for different
Binary: One bit per pixel.
Gray scale: Typically one byte per pixel.
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 63The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Intensity
Color: Typically one byte per pixel and color Three bytes are needed to obtain full
Trang 64The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Intensity
When the intensity of a pixel is digitized and described by a byte, the information is
quantized into discrete levels The number of bits per byte is called bit-depth.
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 65The spectral response of a sensor is the sensitivity curve for different
wavelengths Camera
sensors can have a different spectral response than the human eye
Exposure
Exposure is how much light is detected by the photographic film or sensor The
exposure amount is determined by two factors:
Exposure time: Duration of the exposure, measured in milliseconds (ms) Also called shutter time from traditional photography.
Aperture size: Controls the amount of light that passes through the lens.