Precision Measurements with Machine Vision

geckokittenΤεχνίτη Νοημοσύνη και Ρομποτική

17 Οκτ 2013 (πριν από 4 χρόνια και 8 μήνες)

123 εμφανίσεις

Application Note | Case Study | Technology Primer | White Paper
Property of DALSA. Not for publication or reproduction without permission.
Copyright © 2010 DALSA Corporation. All Rights Reserved.
continued >
Precision Measurements with
Machine Vision
To make precise and accurate measurements using a machine
vision system, you must pick components appropriate to
the part or object being measured and to meet the required
precision. Simple-to-use and inexpensive machine vision
components are available for precise two-dimensional (2D) part
measures. Many parts are effectively planer and it makes sense
to try to use 2D measures on three-dimensional (3D) parts.
As an example of precision 2D measures on 3D parts is
the inspection of electrical connector pins done by Faber
Associates (
Fig. 1. Electrical connector pins emerging from a
progressive punch press. A camera lens is at the left and a
collimated light source at the right. A second camera and
lens mounts above, looking down on the stamped parts
illuminated by a collimated light source below.
These electrical connectors have a flat lug for a mating
connection and perpendicular tabs that are crimped to connect
the lug to a source wire. Parts are positioned in the fields of
view of two perpendicular cameras, lenses, and light sources.
The vertical camera views the outline of the lug and the
horizontal camera checks the height of the perpendicular tabs.
Lighting is chosen to improve the contrast of the part elements
to be measured. For the electrical connectors, collimated
lights behind the parts give a very sharp “shadow cast” or
orthographic projection image. A collimated light source is
one where all the rays of light are parallel – in a column. The
advantages of collimated light are that perspective distortion is
minimized and part edge sharpness is maximized as only light
rays from one direction reflect off an edge.
Figure 2. An object (brown) imaged in collimated (left) and
diffuse light (right). With collimated light, the object edges
are sharp but diffuse light “leaks” around the object edges
to give blurred edges. The shadow cast by the object in
collimated light stays the same as the object up or down. In
non-collimated light the object appears smaller as it moves
away from the lens (not shown).
The lens maps (magnifies or minifies) the part view onto
the camera’s sensor. Lens limitations on precision include
perspective distortion, depth of field, spatial frequency
response and optical distortion. Perspective distortion is the
apparent change in imaged part size as the part moves towards
or away from the front of the lens, along the Z or optical axis.
This apparent size change is proportional to 1/Z.
Depth of field is the range of distance along the Z axis where
the resulting part image is in acceptable focus. As the part
moves away from the plane of best focus, the image blurs. A
little blurring is not a problem for making measurements of
edges but will reduce the contrast of part features. If you are
measuring things such as defect dimensions, reducing contrast
makes these small features harder to detect and measure.
Limited depth of field is a major reason why 2D, planar
measures are preferred. Depth of field increases with
decreasing lens aperture, but this also decreases the
amount of light through the lens and hence the image
Spatial frequency is the inverse of part feature size. As part
feature size decreases the image contrast also decreases.
Some decrease in contrast is required to prevent aliasing
(sampling) artifacts with the camera sensor’s array of pixels.
As with depth of field, this reduction in contrast has more
impact on detecting small spots and features than on edge-
based dimensioning.
Application Note | Case Study | Technology Primer | White Paper
Optical lens distortion appears as changes in size of a
calibration rule as you move away from the optical axis. This
distortion can be measured and computationally removed, but
it is better for precision measurements to choose a lens with
little optical distortion.
Perspective and optical distortion are nearly eliminated by
using a telecentric lens, so these lenses are recommended for
making precision visual measurements. This type of lens only
allows rays of light parallel to the optical axis to pass to the
camera’s sensor. The field of view of a telecentric lens is limited
to the diameter of the front lens element, the element nearest
the part.
The camera’s pixel size and number of pixels along with the
required field of view (part size plus some surrounding area)
sets the lens magnification. Dividing the sensor pixel size by
the magnification gives the size of a pixel on the part being
measured. The field of view for an electrical connector is 0.92
x 0.69 inches (width x height) and a DALSA Genie™ camera
with 1600 x 1200 pixels gives a lens magnification of 0.3x. The
pixel size on the object is 0.575 mils, or about six ten-thousands
of an inch. The required measurement precision is three ten-
thousands of an inch.
Figure 3. DALSA and other vendors supply “wizard”
programs to select the proper lens given the camera type,
field of view and working distance.
The chain of electrical connector pins are tensioned to suspend
them above the lights and at specified distances from cameras
with telecentric lenses. Vibration from the stamping press
moves the connector around this specified distance, but not so
much that sharp focus is lost. Because of the light is collimated
and the telecentric lens only accepts collimated light, the
“shadow cast” images produced are very sharp and insensitive
to part motion along the Z axis.
The images are processed on a DALSA Vision Appliance™ – a
small computer that is specialized for machine vision – and
using DALSA’s Sherlock™ machine vision software. The
measurements include part edge-to-edge dimensions, center
circle dimensions, and part-to-part spacing. In addition some
inspection is done for burrs and foreign matter on the parts.
The primary question answered by the vision system is if the die
used in the progressive punch press has worn down beyond
tolerance, as indicated by a change in size of the stamped
electrical connectors.
Figure 4. A screen shot of the HMI (Human Machine
Interface) to the Sherlock software showing measurements
on the electrical connector lug (left image) and on the
perpendicular tabs (right image).
How can a required edge location precision of 0.3 mils be
attained with an on-the-part pixel size of 0.6 mils. How can a
measurement be made when you can’t see “inside” a pixel? If
we can approximate the optical blurring function we can model
what an ideal step edge looks like in the image after optical
blurring. Then we fit the pixel values to this model to recover an
approximation to the ideal edge position. A little blurring is not
bad in this case!
This assumes that the part edge is ideal and that the optical
blurring is mathematically well behaved. In practice a part
edges can be located to within at least ¼ of a pixel and to a
much greater precision in controlled conditions. So our edge
location precision is comfortably at 0.15 mils. This sub-pixel
method can sometimes be applied to measuring areas and
edge lengths, but there are other issues that complicate this.
Property of DALSA. Not for publication or reproduction without permission.
Copyright © 2010 DALSA Corporation. All Rights Reserved.
continued >
Application Note | Case Study | Technology Primer | White Paper
Last, the measures in pixels – say the diameter of the hole in
the electrical connector tab – is converted to world measures
thorough a calibration process. This process is automatically
done by the vision system after being “trained” on a calibration
grid. This converts precision to accuracy.
In summary, the precise and accurate measurement of part
features such as edges requires collimated light, careful
placement of the part, a telecentric lens, calibration and
perhaps optical distortion correction, and computation by the
vision system’s computer. Vendors of these elements provide
consultations and “wizards” to help you select the right parts.
The vision system software and processor are designed to be
easy-to-use, fast, and supporting that portion of the “chain” of
precision from part to real-world measures.
Boston, USA
Tel: +1 978-670-2002
All trademarks are registered by their respective companies. DALSA reserves the right to make changes at any time without notice. ® DALSA 2010. 011310_mv_measure
DALSA is an international leader in
digital imaging and semiconductors and has its corporate offices in Waterloo, Ontario, Canada.
Munich, Germany
Tel: +49 8142-46770
Asia Pacific
Tokyo, Japan
+81 3-5960-6353