PE-5112 Ch2 Machine Vision and Robot Process Capabilities
PE-5112 Ch2 Machine Vision and Robot Process Capabilities
1
Introduction
Machine vision involves the acquisition, processing, and
interpretation of image data by computer for some useful
application.
Vision systems can be classified as 2-dimensional or 3-
dimensional.
Two-dimensional systems view the scene as a 2-D image,
technology.
It describes the understanding and interpretation of
4
1. Image acquisition and digitizing
Itis accomplished by a video camera connected to a
digitizing system to store the image data for subsequent
processing.
With the camera focused on the subject, an image is obtained
6
ILLUMINATION
Illumination is another important aspect of machine vision.
The scene viewed by the vision camera must be well illuminated, and
machine
vision application rather than rely on ambient lighting in the facility.
7
Image acquisition and digitizing contd…
There are two types of vision cameras:
◦ Analog
◦ Digital
Analog cameras are not very common any more, but are still around.
Digital cameras are much more common and mostly similar to each other.
Video camera is a digital camera with added videotape recording section.
The captured image is analog or digital, in vision system the image is
eventually digitized.
In a digital form, all data are binary and are stored in computer file.
The first stage of any vision system is the image acquisition stage.
After the image has been obtained, various methods of processing can be
applied to the image to perform the many different vision tasks required
today.
However, if the image has not been acquired satisfactorily then the
electrical signal.
The signal, variable voltage (current) vs time , can be
Scan 2 1
2
3
4
5 Return
6
beam
Image acquisition and digitizing contd…
Rasterization
Rasterization is the task of taking an image described in a
vector graphics format (shapes) and converting it into a raster
image (pixels or dots) for output on a video display or printer,
or for storage in a bitmap file format.
For
Image acquisition and digitizing contd…
color images, the projected image is decomposed into the
three colors of red, green, and blue (RGB).
Each pixel in a color image has a “color value” which is a
combination of amounts of red, green and blue.
Each pixel value is an ordered triple, such as (23,14,51), that
prescribes the densities of the red, green and blue.
Each value in the triple (RGB) has a certain number of bits, and
color depth is the sum of these values.
Many images have a color depth of eight (one byte): 3 bits for the
red and the green and 2 bits for the blue. Each pixel has one of
256 colors.
In highest quality (true-color) images, have a color depth of 24,
one byte for each component.
This achieves the best color production the eye can perceive: More bits do
not improve an image.
However, such images require a lot of memory. A true-color image of
1,080 1,024 pixels requires over 3 million bytes.
The Color Depth
pixel value
y
Color depth = 6 bits 2 (= 64) colors
6
Color:Typically one byte per pixel and color. Three bytes are
needed to obtain full color information. One pixel thus
contains three components(R, G, B).
Image acquisition and digitizing contd…
Common Colors
Digital camera
As with other cameras, a set of lenses is used to project the
Digital images
either stored in the computer storage unit in an image format such as:
◦ Tagged Image File Format (TIFF) files,
◦ Graphics Interchange Format (GIF) files,
◦ Joint Photographic Group (JPG) files,
◦ Bitmap (BMP) files, etc.
Image acquisition and digitizing contd…
The displayed image is a two-dimensional matrix of thousands or
millions of pixels each of which has its own address, size, and
color representation.
Digitizing a photograph means converting or capturing its image
mapping class.
It converts a grayscale image into a binary image.
It has advantages in terms of both speed and in allowing you
to use some bits of each byte for other purposes (e.g., bits can
be turned on or off for binary masking).
Histogram
A histogram determines for each gray level, count the number of
pixels having that level for each level, a stick represent the number
of pixels or determines the distribution of the different gray
level(can group nearby levels to form a bin and count number of
pixels in it)
Histogram
Frequency Domain
Definition
Techniques are based on modifying the spectral transform of an
image
Transform the image to its frequency representation
Perform image processing
Compute inverse transform back to the spatial domain
26
Frequency domain vs. spatial domain
image.
Used for filtering basics, smoothing filters, sharpening
filters, etc.
Techniques
Smoothing
Example: A video camera has a 512 x 512 pixel matrix. Each pixel
must be converted from an analog signal to the corresponding
digital signal by an AOC. The analog-to-digital conversion
process takes 0.1 microseconds (O.l x lO-6sec) to complete,
including the time to move between pixels.
(a)How long will it take to collect the image data for one frame ?
(b)Is this time compatible with processing at the rate of 30 frames
per second?
Solution:
There are 512 X 512 = 262.144 pixels to be scanned and converted.
The total time to complete the analog-to-digital conversion process
is:
(262,144 pixels)(O.1 x 10-6 sec) = 0.0262 sec
At a processing rate of 30 frames per second, the processing time
for each frame is 0.0333 sec, which is significantly longer than the
0.0262 sec required to perform the 262,144 analog-to-digital
conversions. 28
2. Image processing and analysis
As indicated by the above Example, the amount of data that must be
processed is significant. The data for each frame must be analyzed within
the time required to complete one scan (1/30 sec).
A number of techniques have been developed for analyzing the image dat
Number of pixels
Number of pixels
8K 8K
6K 6K
4K 4K
2K 2K
For 0 17 34 51 68 85 102 119 136 153 170 187 204 221 238 256
(b)
Image processing and analysis contd…
Some examples on histogram
Image processing and analysis contd…
Thresholding is the process of dividing an image into
different portions or levels by picking a certain grayness level
as a threshold, comparing each pixel value with the
threshold&then assigning the pixel to different portions or
level .
Depending on whether the pixel’s grayness level is below the
the image.
The edges tell you where:
40
Opening: The figure below shows erosion followed by
dilation (opening) in order to remove protrusion
Figure . As a result of a fill operation, the hole in the nut is filled with
foreground pixels, thus eliminating the hole. 41
Structuring Elements
A structuring element is a shape mask used in
the basic morphological operations.
box
hexagon disk something
box(length,width) disk(diameter)
42
Dilation with Structuring Elements
origin
0 01 1 0 0 0 0 0 0
1 erode
0 01 1 0 0 0 1 1 0
1
0 01 1 0 0 0 1 1 0
1
1 11 1 1 0 0 0 0 0
B S B S
44
Opening and Closing
45
46
Gray Morphology Operations
Gray morphology operations are similar to binary morphology
47
Object Recognition by Features
Objects in an image may be recognized by their features. These
features may include: gray level histograms; morphological
features such as area, perimeter,number of holes, and others;
eccentricity; cord length; and moments.
Moments
The moment of an object within an image is the moment of the
49
Aspect Ratio
Aspect ratio is the width to length ratio of an enclosing
rectangle about the object, as shown in Figure below.
All aspect ratios are sensitive to orientation, except the
50
3. Interpretation of an image
For any given application, the image must be interpreted
based on the extracted features.
The interpretation function is usually concerned with
teamed
with a robot or similar machine to control the movement of the machine.
Examples of these applications include seam tracking in continuous arc
states before and after certain operations. A common method is to set up a cell
where an image of the part is taken and subsequently modified, improved, and
altered.
The processed image is compared to a look-up image. If there is a match, the
environment.
Reading license plates of cars.
Reading addresses on parcels and checking their dimensions.
Summary
Image processing can modify, alter, improve, or enhance an
image as well as data can be extracted from an image for
subsequent applications.
This information may be used for a variety of applications,
57
Thank you !!!
58