Illumination ❖Lighting Types >> Ring Light SICK IVP, “Machine Vision Introduction,” 2006... Illumination ❖Lighting Types >> Spot Light SICK IVP, “Machine Vision Introduction,” 2006... Il
Trang 1XỬ LÝ ẢNH TRONG CƠ ĐIỆN
Machine Vision
TRƯỜNG ĐẠI HỌC BÁCH KHOA
Giảng viên: TS Nguyễn Thành Hùn
Đơn vị: Bộ môn Cơ điện tử, Viện Cơ
Trang 2Chapter 1 Introduction to machin
Trang 31 Introduction
❖Definition
➢Machine vision (MV) is the technology and methods used to based automatic inspection and analysis for such applications asinspection, process control, and robot guidance, usually in indus
➢Machine vision is a term encompassing a large number of tecsoftware and hardware products, integrated systems, actions, meexpertise
➢ Machine vision as a systems engineering discipline can be consfrom computer vision, a form of computer science
➢ It attempts to integrate existing technologies in new ways and asolve real world problems
Trang 41 Introduction
❖Definition
➢ The overall machine vision process includes planning the detailrequirements and project, and then creating a solution During rprocess starts with imaging, followed by automated analysis of extraction of the required information
Trang 51 Introduction
❖Definition
Trang 61 Introduction
❖Application: Locate
➢ To find the object and report its position and orientation.
Trang 71 Introduction
❖Application: Measure
➢ To measure physical dimensions of the object
Trang 81 Introduction
❖Application: Inspect
➢ To validate certain features
Trang 91 Introduction
❖Application: Inspect
Trang 101 Introduction
❖Application: Identify
Trang 11Chapter 1 Introduction to machin
Trang 122 Basic elements of machine visio
Trang 132 Basic elements of machine visio
❑ 2.1 Overview
Trang 142 Basic elements of machine visio
❑ 2.1 Overview
How to automatically detect the d
Trang 152 Basic elements of machine visio
❑ 2.1 Overview
❖Illumination
➢ Illumination: is the way an object is lit up and lighting is the actgenerates the illumination
❖Imaging (Camera and lens)
➢ The term imaging defines the act of creating an image
Trang 162 Basic elements of machine visio
❑ 2.1 Overview
❖Image processing and analysis
➢ This is where the desired features are extracted automatically byconclusions are drawn
➢ A feature is the general term for information in an image, for exdimension or a pattern
➢ Algorithms are also referred to as tools or functions
Trang 172 Basic elements of machine visio
Trang 182 Basic elements of machine visio
❑ 2.2 Illumination
❖The goal of lighting in machine vision is to obtain a robust appl
➢ Enhancing the features to be inspected
➢ Assuring high repeatability in image quality
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 192 Basic elements of machine visio
❑ 2.2 Illumination
❖Illumination Principles
Light can be described as waves with three properties:
➢ Wavelength or color, measured in nm (nanometers)
➢ Intensity
➢ Polarization
Trang 202 Basic elements of machine visio
Trang 212 Basic elements of machine visio
❑ 2.2 Illumination
❖Illumination Principles
➢ The optical axis is a thought line through the center of the lenthe camera is looking
Trang 222 Basic elements of machine visio
❑ 2.2 Illumination
❖Illumination Principles
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 232 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Ring Light
➢ A ring light is mounted around the optical axis of the lens, eithesomewhere in between the camera and the object
Trang 242 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Ring Light
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 252 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Spot Light
➢ A spot light has all the light emanating from one direction that optical axis For flat objects, only diffuse reflections reach the c
Mainly dif reach t Object
Spot light
Trang 262 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Spot Light
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 272 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Backlight
➢ The backlight principle has the object being illuminated fromcontour or silhouette
Trang 282 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Backlight
SICK IVP, “Machine Vision Introduction,” 2006.
Pros
• Very good contrast
• Robust to texture, color, and ambient light
Cons
• Dimension must be larger than object
Ambient light. Backlight: Enhances contourby creating a silhouette
Trang 292 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Darkfield
➢ Darkfield means that the object is illuminated at a large angle o
Trang 302 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Darkfield
SICK IVP, “Machine Vision Introduction,” 2006.
Pros
• Good enhancement of scratches, protruding
edges, and dirt on surfaces
Cons
• Mainly works on flat
• Requires small distan
• The object needs to be
Ambient light Darkfield: Enhances relief
ntours, i.e., lights up edge
Trang 312 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> On-Axis Light
➢ When an object needs to be illuminated parallel to the optical a
transparent mirror is used to create an on- axial light source
Trang 322 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> On-Axis Light
SICK IVP, “Machine Vision Introduction,” 2006.
Pros
• Very even illumination, not hot spots
• High contrast on materials with different
reflectivity
Cons
• Low intensity req
• Cleaning off semi splitter) often nee
Inside of a can
as seen with ambient light
Ins
as (on
Trang 332 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Dome Light
➢ The dome light produces the needed uniform light intensity inswalls
Trang 342 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Dome Light
SICK IVP, “Machine Vision Introduction,” 2006.
Pros
• Works well on highly reflective
materials
• Uniform illumination, except for the
darker middle of the image No hot
spots
Cons
• Low intensit long exposu
• Dimensions larger than o
• Dark area in the image
Trang 352 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Dome Light
Ambient light On top of the key numbers is a c transparent material causing direct reflections.
The direct reflections are eliminated by the dome light’s even illumination.
Trang 362 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Types >> Laser Light
➢ A 2D camera with a laser line can provide a cost efficient solutand 3D inspections
SICK IVP, “Machine Vision Introduction,” 2006.
Pros
• Robust against ambient light
• Allows height measurements (z parallel
to the optical axis).
• Low-cost 3D for simpler applications
Cons
• Laser safety issu
• Data along y is l
• Lower accuracy
Trang 372 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting 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 sign.
The laser line cl height differenc
Trang 382 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Variants and Accessories >> Strobe or Constant
➢ A strobe light is a flashing light
➢ Strobing allows the LED to emit higher light intensity than whaconstant light by turbo charging
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 392 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Variants and Accessories >> Diffusor Plate
➢ The diffusor plate converts direct light into diffuse
➢ The purpose of a diffusor plate is to avoid bright spots in the imthe direct light's reflections in glossy surfaces
Two identical white bar lights, with diffuso plate (top) and without (bottom).
Trang 402 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Variants and Accessories >> LED Color
➢ LED lightings come in several colors Most common are red analso LEDs in blue, white, UV, and IR
➢ Different objects reflect different colors A blue object appears reflects the color blue
➢ Therefore, if blue light is used to illuminate a blue object, it wilgray scale image
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 412 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Variants and Accessories >> LED Color
Trang 422 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Variants and Accessories >> Optical Filters
➢ An optical filter is a layer in front of the sensor or lens that absowavelengths (colors) or polarizations
➢ Two main optical filter types are used for machine vision:
SICK IVP, “Machine Vision Introduction,” 2006.
1
2 Polarization filter: Only transmits light with a certain polarizatipolarization when it is reflected, which allows us to filter out uBand-pass filter: Only transmits light of a certain color, i.e witwavelength interval example, a red filter only lets red through
Trang 432 Basic elements of machine visio
❑ 2.2 Illumination
❖Lighting Variants and Accessories >> Optical Filters
Original image Image seen by gray
scale camera with ambient light and without filter
Red light and a red band-pass filter
Trang 442 Basic elements of machine visio
Trang 452 Basic elements of machine visio
❑ 2.3 Imaging
➢ The term imaging defines the act of creating an image.
➢ Imaging has several technical names: Acquiring, capturing
➢ To grab a high-quality image → the number one goal for a sucapplication
Trang 462 Basic elements of machine visio
❑ 2.3 Imaging
❖Basic Camera Concepts
➢ A simplified camera setup consists of camera, lens, lighting
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 472 Basic elements of machine visio
❑ 2.3 Imaging
❖Basic Camera Concepts: Digital Imaging
➢ A sensor chip is used to grab a digital image
➢ On the sensor there is an array of lightsensitive pixels
Sensor chip with an array
of light-sensitive pixels.
Trang 482 Basic elements of machine visio
❑ 2.3 Imaging
❖Basic Camera Concepts: Digital Imaging
There are two technologies used for digital image sensors:
➢ CCD (Charge-Coupled Device)
➢ CMOS (Complementary Metal Oxide Semiconductor).
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 492 Basic elements of machine visio
❑ 2.3 Imaging
❖Basic Camera Concepts: Digital Imaging
Trang 502 Basic elements of machine visio
❑ 2.3 Imaging
❖Basic Camera Concepts: Lenses and Focal Length
➢ The lens (Objective) focuses the light that enters the camera
creates a sharp image
SICK IVP, “Machine Vision Introduction,” 2006.
Focused or sharp image.
Trang 512 Basic elements of machine visio
❑ 2.3 Imaging
❖Basic Camera Concepts: Lenses and Focal Length
➢ The angle of view determines how much of the visual scene the
Trang 522 Basic elements of machine visio
❑ 2.3 Imaging
❖Basic Camera Concepts: Lenses and Focal Length
➢ The focal length is the distance between the lens and the focal p
➢ When the focal point is on the sensor, the image is in focus
SICK IVP, “Machine Vision Introduction,” 2006.
Trang 53The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Lenses and Focal Length
▪ Focal length is related to angle of view in that a long focal length small angle of view, and vice versa.
Basic Camera Concepts
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 54The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Field of View in 2D
▪ The FOV (Field of View) in 2D systems is the full area that a cam
is specified by its width and height.
▪ The object distance is the distance between the lens and the obBasic Camera Concepts
SICK IVP, “Machine Vision Introduction,” 2006
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 55The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Aperture and F-stop
▪ The aperture is the opening in the lens that controls the amount onto the sensor In quality lenses, the aperture is adjustable.
Basic Camera Concepts
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 56The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Aperture and F-stop
▪ The size of the aperture is measured by its F-stop value A large
a small aperture opening, and vice versa.
▪ For standard CCTV lenses, the F-stop value is adjustable in the ra and F16.
Basic Camera Concepts
SICK IVP, “Machine Vision Introduction,” 2006
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 57The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Depth of Field
▪ The minimum object distance (sometimes abbreviated MOD
distance in which the camera lens can focus and maximum obj
farthest distance.
Basic Camera Concepts
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 58The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Depth of Field
▪ The focal plane is found at the distance where the focus is as sh
▪ Objects closer or farther away than the focal plane can also be co focus This distance interval where good-enough focus is obtaine
field (DOF).
Basic Camera Concepts
SICK IVP, “Machine Vision Introduction,” 2006
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 59The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Depth of Field
Basic Camera Concepts
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 60The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Depth of Field
▪ The depth of field depends on both the focal length and the apertuBasic Camera Concepts
SICK IVP, “Machine Vision Introduction,” 2006
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 61The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Depth of Field
▪ By adding a distance ring between the camera and the lens, the
thus the MOD) can be moved closer to the camera A distance rin
as shim, spacer, or extension ring.
Basic Camera Concepts
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 62The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
Depth of Field
▪ A side-effect of using a distance ring is that a maximum object
introduced and that the depth of field range decreases.
Basic Camera Concepts
SICK IVP, “Machine Vision Introduction,” 2006
2 Basic elements of machine visio
❑ 2.3 Imaging
Trang 63The spectral response of a sensor is the sensitivity curve for difwavelengths Camera
sensors can have a different spectral response than the human e
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.
Basic Image Concepts
2 Basic elements of machine visio
❑ 2.3 Imaging