Vision Pro With 3 DExpress
Vision Pro With 3 DExpress
04/26/2018
Table of Contents
Table of Contents
Table of Contents 2
Legal Notices 3
Symbols 4
Cognex 3D Sensors 5
Cognex 3DExpress 5
Supported Cameras 6
Camera and Laser Orientation 6
Calibration Target 7
Encoder Resolution and Camera Frame Rate 10
Configure a 3DExpress AIK Server 11
Launching VisionPro and 3DExpress 11
Accessing Camera Properties 12
Configuring a New Image Source 13
Choose the Camera Driver 14
Detect the Laser Line 15
Restrict the Region of Interest 17
Acquisition Configuration 17
Lens Calibration 19
Perform a Metric Calibration 20
Create Output Sources 21
ZMap Output for 3D Range Images 21
ZMap Texture Output for RangeWithGrey Images 22
Configure the VisionPro AIK Client 25
Resolving Issues 27
3DExpress Software Does Not Launch 27
Missed Acquisition Triggers 27
Precautions 29
2
Legal Notices
Legal Notices
The software described in this document is furnished under license, and may be used or copied only in accordance with
the terms of such license and with the inclusion of the copyright notice shown on this page. Neither the software, this
document, nor any copies thereof may be provided to, or otherwise made available to, anyone other than the licensee.
Title to, and ownership of, this software remains with Cognex Corporation or its licensor. Cognex Corporation assumes
no responsibility for the use or reliability of its software on equipment that is not supplied by Cognex Corporation.
Cognex Corporation makes no warranties, either express or implied, regarding the described software, its
merchantability, non-infringement or its fitness for any particular purpose.
The information in this document is subject to change without notice and should not be construed as a commitment by
Cognex Corporation. Cognex Corporation is not responsible for any errors that may be present in either this document or
the associated software.
Companies, names, and data used in examples herein are fictitious unless otherwise noted. No part of this document
may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, nor
transferred to any other media or language without the written permission of Cognex Corporation.
Copyright © 2017. Cognex Corporation. All Rights Reserved.
Portions of the hardware and software provided by Cognex may be covered by one or more U.S. and foreign patents, as
well as pending U.S. and foreign patents listed on the Cognex web site at: http://www.cognex.com/patents.
3
Symbols
Symbols
The following symbols indicate safety precautions and supplemental information.
WARNING: This symbol indicates the presence of a hazard that could result in death, serious personal injury or
electrical shock.
CAUTION: This symbol indicates the presence of a hazard that could result in property damage.
Tip: Tips provide helpful suggestions and shortcuts that may not otherwise be apparent.
4
Cognex 3D Sensors
Cognex 3D Sensors
Typical Cognex 3D sensors combine GigE Vision cameras and laser-stripe illumination to generate information about
three-dimensional objects as they pass within the field of view. The illumination of the laser plane generates a laser
stripe whose shape is determined by the height profile of the object.
Cognex software can combine a series of height-data images and generate a 3D range image, which can then be
viewed as a static 2D image or dynamically through a 3D viewing option:
Once you have a 3D range image, VisionPro supports a variety of 3D vision tools for performing tasks such as:
Cognex 3DExpress
Use Cognex 3DExpress to configure an area scan camera as a 3D sensor for applications that require a larger field of
view than the standard Cognex 3D displacement sensors support, or in production environments where a 3D
displacement sensor cannot be incorporated due to space constraints.
3DExpress supports a separate user interface for configuring acquisition properties and calibrating the software to report
results in real-world units. The software also provides an Acquisition Integration Kit (AIK) server that communicates with
VisionPro and allows it to access the configured acquisition parameters set in 3DExpress. Both VisionPro and
3DExpress run simultaneously as your vision application executes.
See the topic Configure a 3DExpress AIK Server on page 11 for details on configuring 3DExpress for your image
acquisitions.
5
Cognex 3D Sensors
As you use 3DExpress, be aware it supports its own documentation set, available through the Start menu (Cognex-
>VisionPro 3DExpress Documentation) or installed by default at %ProgramFiles%\Cognex\3DExpress\doc.
Supported Cameras
The VisionPro image acquisition module for 3DExpress supports the following Cognex Industrial Cameras:
In addition, the module supports the following monochrome cameras from Photonfocus:
Contact your Cognex sales engineer for questions about additional camera support.
6
Cognex 3D Sensors
Typical applications using a vertical laser use a camera angle between 20 to 30 degrees to capture a field of view within
the laser profile:
The precise angle you use will depend on your vision application. Because the camera views the object at an angle,
some areas cannot be in the field of view as it passes through the laser. This results in 3D range images with portions of
missing pixels where the height information is not known.
A smaller camera angle produces 3D range images containing fewer missing pixels but less height data resolution,
while larger camera angles produce good height information at the risk of missing height data. You may need to
experiment in order to find the best angle for your vision application.
Refer to your installed 3DExpress documentation for much more information on choosing the right camera, laser, and
motion system for your vision application. Be aware that the laser must be active during every image acquisition, but that
control over the laser is independent of your VisionPro application. Contact your Cognex sales representative for
possible laser solutions depending on your production environment.
3DExpress also supports multi-camera usage for applications that require multiple images of the same field of view, as
well as multi-cameras and multi-lasers for applications where the cameras use a shared coordinate space. Your
3DExpress documentation contains guidance on such applications.
Calibration Target
3DExpress supports metric calibration to relate camera pixels with metric units by creating a coordinate system attached
to the plane of the laser.
7
Cognex 3D Sensors
To calibrate you must acquire an image of a non-moving calibration target shaped as shown in the following figure:
The 3DExpress calibration interface allows you to specify the location and dimension, in the desired metric units, for the
following vertices of the target:
The calibration target must be user-supplied, with a height and width based on your field of view. In general, given a
width W for the field of view, your calibration target would ideally be, at least, between 1/3W and 2/3W. In addition,
Cognex makes the following recommendations about creating a calibration target:
8
Cognex 3D Sensors
Your 3DExpress installation includes the VisionPro 3DExpress Target Designer utility, available from the Start menu, for
creating a calibration target based on your field of view:
l For metal targets, choose a material to minimize specular highlights or choose a white andodized or sand blasted
finish.
l Matte resin can generate good results for certain large field of view requirements.
l Take expansion into consideration in high-accuracy vision applications. The pattern might have to be accurately
measured to get its 3D coordinates instead of trusting the design measures. With temperature variations between
the measurement time and the scan time, low thermal expansion coefficient materials may be preferred to
decrease errors due to pattern expansion.
Be aware that not all vision applications require metric calibration. For example, applications involving surface
inspection generally do not require the 3D-location of results.
9
Cognex 3D Sensors
10
Configure a 3DExpress AIK Server
Use the 3DExpress main panel to configure the input source(s) you want to use in your VisionPro application. Each input
source appears in its own row:
The 3D Express main panel also allows you to configure several types of output image formats to examine the images
you capture as you configure the AIK server. Your 3DExpress documentation has more information on how to use the
main panel.
11
Configure a 3DExpress AIK Server
For example, you may need to enable/disable hardware trigger detection, limit the region of interest the camera
acquires, and more.
12
Configure a 3DExpress AIK Server
Start by selecting the type of camera you are using. The topic Supported Cameras on page 6 lists the cameras this
release supports. 3DExpress offers two options:
Click Next.
13
Configure a 3DExpress AIK Server
You may have several cameras connected to the PC. The interface allows you a number of ways to select the particular
camera. If you know the IP address, the MAC address, or the serial number of the camera you can enter it here. If you
select Choose From Dialog and click Next, the interface offers a dialog similar to the following for choosing the desired
camera:
Click Next when you have configured all the driver settings.
14
Configure a 3DExpress AIK Server
The topic Launching VisionPro and 3DExpress on page 11 describes how you can access the custom properties of your
camera. Disable any hardware trigger detection on your camera and click Yes to acquire a live image of your production
environment. The following figure shows an example live image of a Cognex calibration frustum:
The preceding image shows an over-saturation in the pixels representing the laser line. Ideally you want the image to
contain only pixels representing the laser and how it changes shape as your object moves past the camera.
Finding the proper settings to detect the laser involves a combination of your production environment, your camera
settings, and the 3DExpress interface.
l Change the settings on the camera hardware to limit the amount of light on the scene.
l Introduce a laser filter to restrict unwanted light wavelengths.
l Use the 3DExpress Threshold parameter and set it to the highest background pixel value that does not represent
15
Configure a 3DExpress AIK Server
the laser.
Use your PC mouse button to zoom in on the image to read the individual pixel values in your live image for guidance in
setting the Threshold parameter: :
Use the zoom feature to examine your laser line across your object. Cognex recommends you see a near contiguous red
line across the width of the laser, as shown in the following close-up:
The following image shows a laser line that is not adequately detected across the object and will not properly detect
features in your vision application.
Click Next when you are satisfied your laser will adequately illuminate your object as it passes the field of view of the
camera.
16
Configure a 3DExpress AIK Server
Be sure to specify a region of interest large enough to enclose the laser line as it changes shape over the object under
inspection.
Acquisition Configuration
3DExpress acquires a series of profile images and combines them to form three-dimensional data about an object as it
passes within the field of view of the camera. 3DExpress offers acquisition parameters that determine the number of
profiles it will acquire and the ability to use the laser to perform presence detection:
17
Configure a 3DExpress AIK Server
Profile Parameters
3DExpress offers two options for ending an image acquisition:
l Frame timeout: 3DExpress stops acquiring profiles if the time between profile acquisitions exceeds this value.
l Max. profiles: The maximum number of profiles the output image can have.
If your application continues to acquire profiles after this maximum value, 3DExpress divides the total number of
profiles into separate output types.
Specify a value greater than the number of encoder pulses per metric unit multiplied by the length of the object
under inspection.
l Presence Detection
Experiment with these values to get the best settings for your production environment.
Cognex also recommends you specify a Min. profiles value greater than 1 to prevent an image acquisition from starting
due to vibrations or other noise in your production environment.
Presence Detection
As your application executes the objects on your motion system will intersect the laser plane and cause it to change
shape. 3DExpress allows you to use the changing shape of the laser to determine when to begin building a 3D image.
Check Enable presence detector and use the parameters Presence top and Presence bottom to define the top and
bottom, respectively, of a region of interest where the profile of the laser will appear as the object breaks the laser plane.
You might perform the following steps to determine the best values for Presence top and Presence bottom:
l Capture a single profile image showing the laser plane on the surface of the motion system and as your object
begins to break the laser plane:
18
Configure a 3DExpress AIK Server
l Use your mouse to hover over the image and discover the Y-value for the location of the laser plane on the
surface of the motion system:
l Set values for Presence top and Presence bottom above the Y-value to define the region of interest where the
object will break the laser plane.
For example, in the preceding figure you might set a Presence top of 0 and a Presence bottom of 115. If the
object broke the laser plane at a higher value of Y, you could choose a lower value for Presence bottom.
l Choose a value for Presence minpoints to capture the first profile with more points than the value you set.
3DExpress stops the image acquisition if fewer points than Presence minpoints are detected. This parameter
works in coordination with the Frame timeout and Max profiles parameter, so ensure these values are high
enough to capture the entire object.
The following figure shows how the presence absence detection could be configured:
Lens Calibration
3DExpress allows you to remove radial distortion due to the camera lens. Lens calibration is not a requirement, but
recommended if the lens distortion is greater than the required accuracy of your vision application.
Calibrate your image source to remove radiant distortion by capturing an image of a checkerboard or dot pattern:
Cognex recommends the checkerboard pattern in cases of high distortion, but only if the pattern is a high-quality print.
For many applications the dot pattern will be sufficient.
If you calibrate for lens distortion and later change the aperture or focus settings for the camera, then you must perform a
new lens calibration.
19
Configure a 3DExpress AIK Server
The Lens Calibration interface allows you to save the lens calibration parameters to a file for later reuse.
20
Configure a 3DExpress AIK Server
3. Change the Profile value from the default of 1 to choose which profile of the calibration target you want to use.
Some profiles in your 3D image can exhibit noise from a variety of factors in your production environment.
Capturing multiple profiles allows you to select which profile in the 3D image represents the best profile to use
when performing a calibration.
4. Click Grab One to acquire a 3D image of your calibration target.
The interface displays an upside-down outline of the calibration target.
5. Use the ROI left and ROI right parameters to isolate just the features of the calibration target before you calibrate.
Extraneous features can cause the calibration to fail.
6. Use the Encoder step parameter to enter the distance, in metric units, the motion system travels for each encoder
step.
Refer to your encoder documentation for details. See the topic Encoder Resolution and Camera Frame Rate on
page 10 for more information.
If you do not know the encoder resolution, Cognex recommends the following:
a. Set the Encoder step to a value of 1.
b. Continue the process of generating a calibration result and adding an output ZMap (ZMap Output for 3D
Range Images on page 21).
c. Use 3DExpress to scan an object of known length.
Scan the object several times to ensure you get a consistent measurement. Refer to the topic Resolving
Issues on page 27 for resolving issues when using 3DExpress.
a. Compare the expected length with the measured length in the ZMap and use that comparison to
determine the correct value for Encoder step. You do not have to recalibrate.
You must click Set encstep to have the Encoder step parameter take effect.
7. Click Calibrate.
3DExpress generates a calibration result and displays the error values. Lower values indicate a better
calibration.
8. Click Next when you are done.
The interface provides additional options such as saving the metric units of your target to an external file. Refer to your
installed 3DExpress documentation for details.
21
Configure a 3DExpress AIK Server
1. Click the Add output icon in 3DExpress to create a new output source.
2. Choose the ZMap output type.
Choose values for X units/pixel and Y units/pixel for both of the ZMap factors, which map your metric units to pixels
along the x-axis and y-axis, respectively.
For example, a value of 1 maps the metric unit you are using to one pixel in the ZMap, while a value of 0.5 maps half the
metric unit to one pixel in the ZMap. Specify a value of 0.10 to create a ZMap where 10 rows of pixels contain 1 metric
unit of 3D feature information.
You may choose to use different values for X units/pixel and Y units/pixel in vision applications where you want to
emphasize the 3D features along one particular axis.
22
Configure a 3DExpress AIK Server
Use a ZMap output source to generate 3D range image data for VisionPro, as described in the topic ZMap Output for 3D
Range Images on page 21. By adding a separate ZMap Texture output source to your 3DExpress AIK server, you can
also generate greyscale information about the object and add that to the images you send to the VisionPro AIK client.
VisionPro combines the ZMap and ZMap Texture output sources to generate a single RangeWithGrey image type.
Perform the following steps to add a ZMap Texture to your 3DExpress AIK server configuration:
1. Click the Add output icon in 3DExpress to create a new output source.
2. Choose the ZMap Texture output type:
The 3DExpress main panel should contain only the ZMap and ZMap Texture output sources:
Configuring the VisionPro AIK client either for 3D range images or combined RangeWithGrey images is identical except
you must specify a width for the VisionPro image at least twice the width of the ZMap. See the topic Configure the
VisionPro AIK Client on page 25 for more information.
23
Configure a 3DExpress AIK Server
When complete, your VisionPro application will display both the 3D Range image and the 16-bit greyscale image side-
by-side, as shown:
See your installed VisionPro documentation for details on how to split a RangeWithGrey images for additional image
processing.
24
Configure the VisionPro AIK Client
2. Choose Camera.
3. Choose the 3DExpress input source and click Initialize Acquisition.
The numeric value of the input source in QuickBuild matches the value of the input source from 3DExpress. For
example, choose 3DExpress input 0 if the 3DExpress input also has an index of 0.
4. Select the Strobe & Trigger tab and select the Free Run option.
25
Configure the VisionPro AIK Client
5. Select the Image Properties tab and choose a Width and Height for the 3D range image in VisionPro.
Open the ZMap to view the width and across the top if you want to use the same values for the dimensions of the
VisionPro 3D range image:
Note: If you are acquiring RangeWithGrey images, which combine 3D range image information with 16-bit
greyscale information about the object, then specify a Width at least double the width of the ZMap. See the topic
ZMap Texture Output for RangeWithGrey Images on page 22 for more information.
6. Run the Job once to test that the VisionPro AIK client receives an image from the 3DExpress AIK server.
26
Resolving Issues
Resolving Issues
Cognex your Cognex sales representative or Cognex customer support for additional assistance.
l A dialog box appears that you do not have the proper security.
Cognex software uses a security system to ensure that the software is properly licensed. VisionPro security
licenses can be set in non-volatile memory on a Cognex USB security key attached to the PC.
Contact your Cognex sales representative for details, and see the topic Understanding VisionPro Security in your
installed Cognex VisionPro documentation for more details on Cognex software security.
l VisionPro launches but no interface for 3DExpress appears.
In some instances the 3DExpress software has launched but the user interface does not appear on the display.
Check your Windows system tray for the 3DExpress icon:
Clicking the icon should re-enable the user interface on the display.
l No interface for 3DExpress appears and there is no 3DExpress icon in the taskbar.
If the 3DExpress software fails to launch completely, contact Cognex support. You might want to examine the
Windows registry for the particular error message at the following location:
Computer\HKEY_CURRENT_USER\Software\Cognex\AIK\Errors
27
Resolving Issues
The 3DExpress main panel indicates if your vision application is missing acquisition triggers. Any value for lost frames
counter above the value of 0 indicates missed acquisition triggers, as shown in the following example:
To prevent lost profiles and inaccurate 3D range images, Cognex recommends you perform some combination of the
following:
28
Precautions
Precautions
Observe these precautions when installing the Cognex product, to reduce the risk of injury or equipment damage:
l To reduce the risk of damage or malfunction due to over-voltage, line noise, electrostatic discharge (ESD), power
surges, or other irregularities in the power supply, route all cables and wires away from high-voltage power
sources.
l Changes or modifications not expressly approved by the party responsible for regulatory compliance could void
the user’s authority to operate the equipment.
l Cable shielding can be degraded or cables can be damaged or wear out more quickly if a service loop or bend
radius is tighter than 10X the cable diameter. The bend radius must begin at least six inches from the connector.
l This device is a business-use (Class A) EMC-compliant device. The seller and user are advised to be aware of
this fact. This device is intended for use in areas outside the home.
l This device should be used in accordance with the instructions in this manual.
l All specifications are for reference purpose only and may be changed without notice.
29
P/N 59x-xxxx-xx Rev. A