1. Trang chủ
  2. » Giáo án - Bài giảng

Xử lý ảnh introduction to machine vision Bách Khoa HN

130 7 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 130
Dung lượng 4,36 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

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 1

XỬ 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 2

2 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 11

2.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 14

Image 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 15

The 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 16

Illumination Principles

Light can be described as waves with three properties:

 Wavelength or color, measured in nm (nanometers)

 Intensity

 Polarization.(Phân cực)

Trang 17

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

Spectral response of a gray scale CCD sensor

Maximum sensitivity

is for green (500 nm).

A charge-coupled device (CCD)

Trang 18

Illumination Principles

 The optical axis is a thought line through the center of the lens, i.e the direction the camera is looking

Trang 19

Illumination Principles

Trang 20

Lighting 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 21

Lighting 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 22

Lighting 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 23

Lighting Types >> Spot Light

Trang 24

Lighting 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 25

Lighting Types >> Backlight

Pros

• Very good contrast

• Robust to texture, color, and ambient light

Cons

• Dimension must be larger than object

Trang 26

Lighting Types >> Darkfield

 Darkfield means that the object is illuminated at a large angle of incidence (góc

tới)

Trang 27

Lighting 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 28

Lighting 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 29

Lighting 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 30

Lighting Types >> Dome Light

 The dome light produces the needed uniform light intensity inside of the dome

walls

Trang 31

Lighting 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 32

Lighting 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 33

Lighting 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 34

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 sig

n.

The laser line clearly shows the height difference.

Trang 35

Lighting 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 36

Lighting 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 37

Lighting 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 38

Lighting Variants and Accessories >> LED Color

Trang 39

Lighting 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 40

Lighting 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 42

Basic Camera Concepts

 A simplified camera setup consists of camera, lens ( ống kính), lighting, and

object.

Trang 43

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 ( nhạy sáng)

Sensor chip with an array

Trang 44

Basic Camera Concepts: Digital Imaging

There are two technologies used for digital image sensors:

 CCD (Charge-Coupled Device)

 CMOS (Complementary Metal Oxide Semiconductor).

Trang 45

Basic Camera Concepts: Digital Imaging

Trang 46

Basic 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 47

Basic Camera Concepts: Lenses and Focal Length

 The angle of view determines how much of the visual scene the camera sees.

Trang 48

Basic 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 49

The 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 50

The 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 51

The 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 52

The 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 53

The 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 54

The 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 55

The 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 56

The 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 57

The 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 58

The 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 59

The 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 60

The 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 61

The 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 62

The 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 63

The 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 64

The 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 65

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

Ngày đăng: 14/12/2021, 00:04

TỪ KHÓA LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w