CVL 6.2 Getting Started

Cognex MVS-8000 Series
Getting Started
CVL 7.0
February 2011
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 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.
Copyright © 2011 Cognex Corporation
All Rights Reserved
Printed in U.S.A.
This document may not be copied in whole or in part, nor transferred to any other media or language, without the written
permission of Cognex Corporation.
Portions of the hardware and software provided by Cognex may be covered by one or more of the U.S. and foreign
patents listed below as well as pending U.S. and foreign patents. Such pending U.S. and foreign patents issued after the
date of this document are listed on Cognex web site at http://www.cognex.com/patents.
CVL
5495537, 5548326, 5583954, 5602937, 5640200, 5717785, 5751853, 5768443, 5825483, 5825913, 5850466, 5859923,
5872870, 5901241, 5943441, 5949905, 5978080, 5987172, 5995648, 6002793, 6005978, 6064388, 6067379, 6075881,
6137893, 6141033, 6157732, 6167150, 6215915, 6240208, 6240218, 6324299, 6381366, 6381375, 6408109, 6411734,
6421458, 6457032, 6459820, 6490375, 6516092, 6563324, 6658145, 6687402, 6690842, 6718074, 6748110, 6751361,
6771808, 6798925, 6804416, 6836567, 6850646, 6856698, 6920241, 6959112, 6975764, 6985625, 6993177, 6993192,
7006712, 7016539, 7043081, 7058225, 7065262, 7088862, 7164796, 7190834, 7242801, 7251366, EP0713593,
JP3522280, JP3927239
VGR
5495537, 5602937, 5640200, 5768443, 5825483, 5850466, 5859923, 5949905, 5978080, 5995648, 6002793, 6005978,
6075881, 6137893, 6141033, 6157732, 6167150, 6215915, 6324299, 6381375, 6408109, 6411734, 6421458, 6457032,
6459820, 6490375, 6516092, 6563324, 6658145, 6690842, 6748110, 6751361, 6771808, 6804416, 6836567, 6850646,
6856698, 6959112, 6975764, 6985625, 6993192, 7006712, 7016539, 7043081, 7058225, 7065262, 7088862, 7164796,
7190834, 7242801, 7251366
OMNIVIEW
6215915, 6381375, 6408109, 6421458, 6457032, 6459820, 6594623, 6804416, 6959112, 7383536
The following are registered trademarks of Cognex Corporation:
acuCoder
acuFinder
acuReader
acuWin
BGAII
Checkpoint
Cognex
Cognex, Vision for Industry
CVC-1000
CVL
DisplayInspect
ID Expert
PasteInspect
PatFind
PatInspect
PatMax
PatQuick
PixelProbe
SMD4
Virtual Checksum VisionLinx
VisionPro
VisionX
Other Cognex products, tools, or other trade names may be considered common law trademarks of Cognex Corporation.
These trademarks may be marked with a "™". Other product and company names mentioned herein may be the
trademarks of their respective owners.
Contents
CVL 7.0 Notes .............................................................................................................. 7
About This Release ................................................................................................ 8
New Features in This Release ........................................................................ 8
High-Accuracy Mode for RSI Search and Image Registration (6.8 CR11)
8
Support for Microsoft Windows 7 32-bit and 64-bit Editions (6.8 CR3) ... 8
Enhancements for the MVS-8602e Frame Grabber (7.0 CR1) ................ 8
Support for Large Images (6.7 CR3) ....................................................... 9
3D-Locate Calibration Wizard (6.7 CR1PR2) ........................................ 10
Cognex 3D-Locate 3D Machine Vision Software (6.7 CR1) and 3D Sample
Code (6.7 CR1PR1) ............................................................................... 10
PNG File Support (6.6 CR14) ................................................................ 10
OCVMax Availability .............................................................................. 11
3D Pose Functionality ............................................................................ 11
Camera Link Serial Communication Utility Support for 64-bit Operating
Systems (7.0 CR1) ................................................................................. 11
Support for Disconnection Recovery and Bus Configuration Change Event
for FireWire Cameras (7.0 CR1) ............................................................ 11
Support for the Maximum Data Matrix Size of 144x144 Using the Symbol
Tool (6.7 CR2) ........................................................................................ 12
Partial Match Mode Availability for PatFlex (6.8 CR12) ......................... 12
Support for Telecentric Lens Calibration, Telecentric Lens Affine
Transform, and Lens Distortion Correction (6.8 CR10) ......................... 12
Support for Line Scan Distortion Correction (6.8 CR1) ......................... 12
Documentation Supplied With This Release ................................................. 12
Installing Adobe Acrobat ....................................................................... 14
Sample Code Installed with This Release .................................................... 14
Single-File Sample Code Examples ...................................................... 14
Acquisition Sample Projects .................................................................. 21
Display Sample Projects ........................................................................ 21
3D-Locate Sample Projects ................................................................... 21
3D-Locate Sample Application .............................................................. 22
Getting Started with CVL
Supported Hardware ...........................................................................................
Image Acquisition Devices ...........................................................................
Multiple CPU Systems and Multi-core processors .......................................
Dual-Board Configurations ...........................................................................
23
23
23
24
System Information ..............................................................................................
System Requirements ...................................................................................
Video Card Requirements ............................................................................
Operating System Requirements ..................................................................
DirectX Support .....................................................................................
DEP Support ..........................................................................................
26
26
28
30
30
30
3
Contents
Locale Support ...................................................................................... 31
Development Environment Requirements .................................................... 31
Visual C++ Unicode Requirements ....................................................... 32
Installation Information .........................................................................................
Before You Install ..........................................................................................
Using Software Licensing .............................................................................
Software Licensing Overview ................................................................
Installing a Software License .................................................................
Managing Software License ..................................................................
Using a Dongle .............................................................................................
Extension of Time-Limited Dongles .......................................................
Installing CVL 7.0 Software ...........................................................................
Uninstalling CVL Software .....................................................................
Installing CVL Silently ...................................................................................
Uninstalling CVL 7.0 Silently ..................................................................
Installing 32-bit Device Drivers .....................................................................
Running the 32-bit Cognex Drivers Installer ..........................................
Installing the 32-bit Cognex Drivers Manually .......................................
Uninstalling the 32-bit Cognex Drivers ..................................................
Installing 32-bit Device Drivers Silently ........................................................
Controlling the Cognex Reminder Service During Silent Install ............
Uninstalling the 32-bit Device Drivers Silently .......................................
Installing 64-bit Device Drivers .....................................................................
Running the 64-bit Cognex Drivers Installer ..........................................
Installing the 64-bit Cognex Drivers Manually .......................................
Uninstalling the 64-bit Cognex Drivers ..................................................
Installing 64-bit Device Drivers Silently ........................................................
Controlling the Cognex Reminder Service During Silent Install ............
Uninstalling the 64-bit Device Drivers Silently .......................................
Installing the Cognex Software Licensing Center (CSLC) Silently ...............
Modifying an Existing CVL Installation ..........................................................
33
33
33
33
35
36
37
37
38
39
39
42
42
42
43
44
44
45
45
46
46
47
47
47
48
49
49
49
Compatibility Notes .............................................................................................. 50
64-bit Operating System Compatibility Issues ............................................. 50
Microsoft Windows 7 Compatibility Issues ................................................... 50
Legacy IEEE-1394 Driver Recommended ............................................. 50
Large Image Compatibility Issues ................................................................ 50
Affine Sampling Tool Interface Changed .............................................. 51
Not all Affine Sampling Modes Supported for Large Images ................ 51
Edge Tool Interface Changed to Support Large Images ...................... 51
CDB Files Created by Certain CVL and VisionPro Versions are Invalid 52
CDB Files with Large Images are Not Compatible with Earlier CVL
Releases ................................................................................................ 53
Development Environment Compatibility Issues .......................................... 53
CVL Libraries Built with Visual Studio 2005/2008 SP1 ATL Security Update
4
Getting Started with CVL
Contents
53
Edge and Blob Tools with Visual Studio 2008 on Multi-Core Systems .. 53
Device Driver Backward Compatibility ......................................................... 54
Getting Started with CVL
5
Contents
6
Getting Started with CVL
CVL 7.0 Notes
This document describes release 7.0 of the Cognex Vision Library (CVL).
This document contains the following sections:
•
About This Release provides an overview of the features of the current release.
•
Supported Hardware describes the Cognex hardware supported by this release.
•
System Information describes system requirements for this release.
•
Installation Information describes how to install and uninstall the software.
•
Compatibility Notes describes compatibility issues related to the use of this
software release and Cognex hardware.
Getting Started with CVL
7
CVL 7.0 Notes
About This Release
This section provides an overview of CVL 7.0.
New Features in This Release
CVL 7.0 is a general availability release. It includes the new features listed in this section.
Some of the features listed in this section were first released in
earlier CVL customer releases; the first release supporting each
feature is shown in parentheses after the feature name.
Note
High-Accuracy Mode for RSI Search and Image
Registration (6.8 CR11)
CVL 6.8 CR11 introduces a new high-accuracy mode for computing sub-pixel model
locations with the RSI Search tool and the Image Registration tool. The new mode
provides more accurate sub-pixel location results with no performance penalty.
Support for Microsoft Windows 7 32-bit and 64-bit
Editions (6.8 CR3)
CVL 6.8 CR3 introduces support for the Microsoft Windows 7 operating system. For
additional information about Microsoft Windows 7 support, see the section Compatibility
Notes on page 50.
Enhancements for the MVS-8602e Frame Grabber
(7.0 CR1)
The following enhancements have been made to the MVS-8602e Frame Grabber:
•
Support for 64-bit operating systems.
•
Upgraded firmware (from rev. 3.52 to 3.56).
•
Support for greater than 8-bit acquired monochrome image depth values (that is,
the values of 10, 12, 14, and 16 bits per pixel are supported).
Notes
MVS-8601 and MVS-8602 do not support the use of greater then 8-bit acquired
monochrome image depth values (that is, they cannot create Acq FIFO using
greater than 8-bit monochrome image depth values).
8
Getting Started with CVL
CVL 7.0 Notes
Support for Large Images (6.7 CR3)
In CVL 6.7 CR3, the image processing, image analysis, and vision tools listed in Table 1
support the use of images without any upper limit to their size (the only limit is the amount
of the available physical memory). In versions of CVL prior to 6.7 CR3, certain tools did
not work properly when used with certain large image sizes. All of these limitations have
been removed, subject to the changes described in the section Large Image
Compatibility Issues on page 50.
Image Processing Tools
Image Analysis and Vision Tools
•
•
•
•
•
•
•
•
•
Affine Transform Tool
Image Stitching Tool
Convolution Tool
Edge Tool (including hysteresis
thresholding)
• Pixel mapping
• Image Arithmetic Tools:
• Pel Clear
• Pel Copy
• Pel Equal
• Pel Expand
• Pel Flip (horizontal)
• Pel Set
• Pel Subtract
• Pel Transpose
• Image Filter Tools:
• Maximum
• Minimum
• MinMax
• Median (3x3 kernel only)
• Spatial Averaging
• Sampling
Table 1.
Getting Started with CVL
PatMax
Calibration (grid of dots only)
Caliper
Blob
Histogram (including WGV
thresholding tool)
Tools with large image support
9
CVL 7.0 Notes
3D-Locate Calibration Wizard (6.7 CR1PR2)
CVL 7.0 includes an easy to use program that lets you perform 3D calibration on from
one to four cameras. To start the calibration wizard, select
Cognex->CVL->Utilities->Calibration Wizard from the Windows Start menu.
The calibration wizard lets you acquire multiple calibration plate viewsets and compute
a 3D calibration based on those viewsets. You can save an archive containing the
calibration that you can load from inside your 3D-Locate application. The calibration
wizard also lets you validate an existing calibration.
If you are using a Cognex-supplied calibration plate with a machine-readable 2D
symbol (Data Matrix code) that indicates the plate pitch, the Calibration wizard can
locate and decode the symbol and then automatically set the grid pitch based on the
symbol.
To use this functionality, the symbol must be visible within the camera’s field of view. To
set the grid pitch automatically, click the Read Grid Pitch from Cal Plate button in the
Setup tab of the wizard.
Cognex 3D-Locate 3D Machine Vision Software
(6.7 CR1) and 3D Sample Code (6.7 CR1PR1)
CVL 7.0 includes support for Cognex 3D-Locate 3D machine vision software. 3D-Locate
provides the following 3D machine vision capabilities:
•
Highly accurate 3D camera calibration for single and multiple camera systems.
•
Hand-eye calibration for both hand-mounted and fixed cameras.
•
3D triangulation, fitting, and pose estimation for single and multiple cameras.
•
3D framework support including shapes, graphics, and transformations.
3D-Locate is described in detail in two manuals provided with this release:
•
The 3D-Locate Developer’s Guide describes the underlying 3D machine vision
technology and shows how to use it.
•
The 3D-Locate Class Reference provides reference pages for all of the 3D-Locate
programming interface.
PNG File Support (6.6 CR14)
CVL 7.0 includes support for the Portable Network Graphics (PNG) file format. PNG is a
lossless image compression format.
10
Getting Started with CVL
CVL 7.0 Notes
OCVMax Availability
CVL 7.0 fully supports the OCVMax tool.
The OCVMax tool is described in detail in two manuals provided with this release:
•
The OCVMax Tool chapter of the CVL Vision Tools Guide provides an overview of
the tool and information on how to use the tool.
•
The CVL Class Reference provides reference pages for the OCVMax programming
interface.
3D Pose Functionality
The CDB pose functionality encodes a 3D rigid pose as a string which can be inserted
into the comment field of a CDB record. This functionality also provides decoding
functionality for extracting the 3D rigid pose from a CDB record.
3D pose computation functions have been added for CVL 7.0 to the 3D-Locate Class
Reference. See the %VISION_ROOT%\defs\ch_c3d\cdbpose.h file for more information.
Camera Link Serial Communication Utility
Support for 64-bit Operating Systems (7.0 CR1)
The Camera Link Serial Communication Utility runs on 64-bit operating systems.
Support for Disconnection Recovery and Bus
Configuration Change Event for FireWire
Cameras (7.0 CR1)
This release allows limited removal and reconnection of IEEE 1394 (FireWire) cameras
as your vision application executes. Be aware, however, that changing camera
topology, such as moving a camera to a different port on your IEEE 1394 adapter, can
cause unexpected behavior.
In addition, this release allows your CVL application to detect an IEEE 1394 bus
configuration changed event without needing to stop and restart. Depending on the
nature of the bus event, your vision application may not be able to acquire images until
you correct the problem. For example, if a FireWire camera was disconnected, then
reconnecting the camera will generate another bus event and should resume image
acquisition capabilities.
See the FireWire Cameras (IEEE 1394 DCAM) User’s Guide for details.
Getting Started with CVL
11
CVL 7.0 Notes
Support for the Maximum Data Matrix Size of
144x144 Using the Symbol Tool (6.7 CR2)
The Symbol Tool supports the maximum data matrix size of 144x144.
Partial Match Mode Availability for PatFlex (6.8
CR12)
The partial match mode is available for the PatFlex algorithm.
Support for Telecentric Lens Calibration,
Telecentric Lens Affine Transform, and Lens
Distortion Correction (6.8 CR10)
The calibration tools included with CVL 7.0 support a telecentric lens distortion model.
This allows you to use telecentric lenses in both 2D and 3D vision applications. This
release also includes support for computing image affine transformations between
telecentric cameras. See the files %VISION_ROOT%\defs\ch_cvl\ccalib.h,
%VISION_ROOT%\defs\ch_cog\ccalibtl.h, and %VISION_ROOT%\defs\ch_c3d\telaff.h
for more information on this functionality.
CVL 7.0 includes support for generating resampled images that remove the effect of
optical distortion, as long as the image is acquired from a calibrated camera. See the
file %VISION_ROOT%\defs\ch_c3d\imgcrrct.h file for more information on this
functionality.
Support for Line Scan Distortion Correction (6.8
CR1)
CVL 7.0 supports nonlinear distortion correction for line scan cameras without the need
to use a calibration plate.
Documentation Supplied With This Release
The documentation included with this release is available online once you install CVL,
and can also be found in the Doc directory of the CVL installation DVD-ROM. To access
the online documentation, from the Windows Start menu, select Programs -> Cognex
-> CVL -> Documentation.
12
Getting Started with CVL
CVL 7.0 Notes
Table 2 lists the online documentation supplied with CVL 7.0 release.
Document
Format
Contains
Getting Started (this manual)
PDF
New features, system requirements,
supported hardware, and software
installation information
CVL 7.0 Release Notes
HTML
Lists fixed bugs, open bugs, and known
limitations.
The version supplied on the CVL
installation CD is current as of the release
date of the product. Check the Online
Support area of www.cognex.com for the
most current information.
CVL User’s Guide
PDF
Overview of CVL programming, working
with the sample code, acquiring and
displaying images and graphics, and an
introduction to vision tools and concepts.
CVL Vision Tools Guide
PDF
Descriptions of how each vision tool
works; describes algorithms,
parameters, and results.
CVL Class Reference
PDF
Class-by-class reference manual for the
CVL C++ class library.
PC Vision Wiring Guide
PDF
Illustrated guide showing how to wire
common I/O configurations.
PC Configuration Guide
PDF
Summary document listing PC system
requirements and recommendations.
Table 2.
Getting Started with CVL
CVL 7.0 Documentation
13
CVL 7.0 Notes
Document
Format
Contains
The following hardware manuals are accessible from the Cognex MVS-8000
Hardware Manuals submenu of the Cognex Documentation and Tutorial menu:
MVS-8100C Hardware Manual
MVS-8100L Hardware Manual
MVS-8100M Hardware
Manual
MVS-8500 Hardware Manual
MVS-8600/8600e Hardware
Manual
FireWire Cameras (IEEE 1394
DCAM) User’s Guide
GigE Vision Cameras User’s
Guide
Table 2.
PDF
Electrical, mechanical, installation, and
configuration information for Cognex
MVS-8000 series hardware and FireWire
and GigE Vision cameras.
CVL 7.0 Documentation
Installing Adobe Acrobat
Most CVL documentation is delivered in Adobe Acrobat format on the CVL installation
DVD-ROM. If you have not already installed the Adobe Acrobat Reader software, you
can install it as follows:
1.
Double click the ar<ver>enu.exe icon in the Acrobat folder on the CVL installation
DVD-ROM.
2.
Follow the on-screen prompts.
Sample Code Installed with This Release
CVL 7.0 is shipped with four sets of sample code. Each set of code is described briefly
here, and in more detail in the section Programming Examples in chapter 1 of the CVL
User’s Guide.
Single-File Sample Code Examples
Each of the single-file sample code examples, which are listed in Table 3, shows how to
use a specific CVL tool or how to perform a specific function. These sample code files
are installed in %VISION_ROOT%\sample\cvl.
14
Getting Started with CVL
CVL 7.0 Notes
To use one of these examples, you add it to the framework provided by
%VISION_ROOT%\sample\cvl\cvlmain.cpp. For detailed instructions on using these
sample files, see Using the Single Code File Samples in chapter 1 of the CVL User’s
Guide.
Sample Code File
Description
acq8600.cpp
Shows how to acquire images using the MVS-8600
frame grabber and a Camera Link area scan camera
acq8600linescan.cpp
Shows how to acquire continuous line scan images
using the MVS-8600 frame grabber and a Camera Link
line scan camera
acq8600elinescan.cpp
Shows how to use two MVS-8600e-specific line scan
acquisition features: starting acquisition at a specific
encoder count and specifying encoder count
resolution.
acqbasic.cpp
Shows the textbook way to perform image acquisition
in CVL.
acq_custom.cpp
Shows how to examine and modify custom properties
implemented by GigE Vision cameras and Cognex
Imaging Devices.
acubar.cpp
Shows how to use the barcode classes.
acuread.cpp
Shows how to use the OCR class ccAcuRead.
acureadud.cpp
Shows how to use user-defined fonts with the OCR
class ccAcuRead.
acusymb2.cpp
Shows how to use of the 2D Symbology tools for
decoding QR Code symbols encoding Shift JIS
characters.
acusymbl.cpp
Shows how to use the 2D symbol classes.
afftrans.cpp
Shows how to create a synthetic image and transforms
an affine rectangular region of it into a separate
destination image.
archive.cpp
Shows how to write a persistent class.
Table 3.
Getting Started with CVL
CVL single file code samples for this release
15
CVL 7.0 Notes
Sample Code File
Description
atslenh.cpp
Demonstrates enhanced functionality of the
Auto-select tool: query mode, masking, and overlap
constraints
atslsmpl.cpp
Shows how to use the Auto-select tool.
blend.cpp
Demonstrates the blending of two images during live
display.
blob.cpp
Shows how to use the Blob tool.
bndtrckr.cpp
Shows how to use the Boundary Tracker tool in its
major modes and how to read the results.
boards.cpp
Displays the Cognex frame grabber or vision
processor boards installed on your system and their
capabilities
boundaryinspector1.cpp
Demonstrates the Boundary Inspection Tool with a
global tolerance.
boundaryinspector2.cpp
Demonstrates the Boundary Inspection Tool with a
local shape tolerance.
boundaryinspector3.cpp
Demonstrates the Boundary Inspection Tool with
statistically learned boundary tolerances.
boundaryinspector4.cpp
Demonstrates the Boundary Inspection Tool with
shape masking, shape clipping, and featurelet filtering.
boundaryinspector5.cpp
Demonstrates the local contour comparison mode of
the Boundary Inspection Tool
calib.cpp
Shows how to use the cc2XformLinear/cc2XformPoly
Calibration tool.
calib2.cpp
Shows how to use the cc2XformCalib2 Calibration
tool.
calibls.cpp
Shows how to use the Line Scan Calibration tool.
caliper.cpp
Shows how to use the Caliper tool.
cdb.cpp
Shows how to use the image database.
circfit.cpp
Shows how to use the Circle Finder tool to find a circle.
Table 3.
16
CVL single file code samples for this release
Getting Started with CVL
CVL 7.0 Notes
Sample Code File
Description
clipsket.cpp
Demonstrates rectangular region clipping of displayed
images.
clssfier.cpp
Shows how to classify numbers in one of the four
quadrants and initialize the scoring functions.
cnlsrch.cpp
Show how to use CNLSearch.
colmtchc.cpp
Show how to use the Composite Color Match tool.
colmtchs.cpp
Shows how to use the Color Match tool.
colsegm.cpp
Shows how to use the Color Segmenter tool.
constrea.cpp
Shows how to use console streams including cogOut,
the Cognex standard output stream
convolve.cpp
Shows how to use the Discrete Convolution tool.
cvlmain.cpp
Main program for most sample projects. Use this file
when building host-based projects, except enhanced
acquisition samples in
%VISION_ROOT%\sample\cvl\acquire.
dcambasic.cpp
Shows how to perform IEEE 1394 DCAM image
acquisition using a generic format.
dcamcolor.cpp
Demonstrates how to acquire from an IEEE 1394
DCAM color camera using a color DCAM video format.
The sample also shows how to perform white balance
adjustments using functions provided in the
ch_cog/dcamutil.h header.
dcamlive.cpp
Demonstrates how to display a live image from an IEEE
1394 DCAM camera using the startLiveDisplay()
method.
dcamroi.cpp
Shows how to perform IEEE 1394 DCAM image
acquisition using a Format 7 format and how to adjust
the acquired region of interest (ROI).
diag.cpp
Shows how to use the diagnostic recording classes
with CNLSearch.
Table 3.
Getting Started with CVL
CVL single file code samples for this release
17
CVL 7.0 Notes
Sample Code File
Description
disp.cpp
Shows how to use ccDisplayConsole windows to
draw graphics in an MFC application.
See Using the Display Classes in the Displaying
Images chapter for more information on
ccDisplayConsole.
dispprop.cpp
Shows how to use the ccGraphicsProps class.
disppump.cpp
Shows how to create a Windows message handler
thread for a ccDisplayConsole.
dxc390_8504.cpp
Shows how to acquire color images from a 3-tap color
camera (Sony DXC-390) using the MVS-8504.
edge.cpp
Shows how to use the Edge tool.
edgefilt.cpp
Demonstrates edgelet chain filtering.
except.cpp
Shows how to use CVL exceptions.
featureletfilter.cpp
Shows how to use the Featurelet Filtering tool.
featurelt.cpp
Shows how to use featurelets and featurelet chains.
fit.cpp
Shows how to use the Fitting tool.
flxunwrp.cpp
Shows how to use the results of a PatFlex tool to
unwarp an image.
gausmpl.cpp
Shows how to use the Gaussian Sampling tool.
gige_basler_as.cpp
gige_jai.cpp
gige_prosilica.cpp
Shows how to access camera-specific features of
several GigE Vision cameras.
gige_basler_ls.cpp
Shows how to configure a Basler GigE line scan
camera.
gige_timestamp.cpp
Shows how to use the timestamp function of GigE
Vision cameras.
gmrph.cpp
Shows how to use the Grey-scale Morphology tools.
handle.cpp
Shows how to use the Cognex handle classes.
histo.cpp
Shows how to use the Histogram tool.
Table 3.
18
CVL single file code samples for this release
Getting Started with CVL
CVL 7.0 Notes
Sample Code File
Description
idtool.cpp
Shows how to use the ID tool.
lablproj.cpp
Shows how to use the Label Projection tool.
linefit.cpp
Shows how to use the Line-fitting tools.
matrix.cpp
Shows how to work with the matrix classes.
ocv1.cpp
Shows how to use the OCV tool.
ocvmax.cpp
Shows how to use the OCVMax tool.
pdf417.cpp
Shows how to use the PDF417 OCR tool.
pelbuf.cpp
Shows how to work with images (pel buffers).
pelfunc.cpp
Shows how to use pixel processing functions
(pelfuncs).
pelrect.cpp
Shows how to use the rectangle classes.
persist.cpp
Shows how to write a complex-persistent class.
pio.cpp
Shows how to use parallel I/O.
pmalign1.cpp
Shows how to use the PatMax/Align tool.
pmalign2.cpp
Shows how to use the PatMax/Align tool with synthetic
training.
pmalign3.cpp
Shows how to use interactive mouse-manipulable
shapes to define a model for PatMax.
pmalign4.cpp
Shows how to import synthetic models from
DXF-format CAD files for use with PatMax.
pmalign5.cpp
Shows how to use CVL shapes code to draw a
synthetic model for use with PatMax.
pmalignf.cpp
Demonstrates outside region threshold PatMax, with
full scene usage
pmalignh.cpp
Shows how to use High Sensitivity PatMax
pmaligno.cpp
Demonstrates outside region threshold PatMax
Table 3.
Getting Started with CVL
CVL single file code samples for this release
19
CVL 7.0 Notes
Sample Code File
Description
pmismpl.cpp
Shows how to use the PatInspect tool to train a pattern
and do image difference calculations.
png.cpp
Demonstrates reading a PNG file.
polar.cpp
Demonstrates polar transformations.
prealign.cpp
Shows how to use the Wafer Pre-Align tool
ptmatch.cpp
Shows how to use the Point Matcher tool to train and
match sets of 2-dimensional points.
rgbplane.cpp
Shows how to extract separate red, green, and blue
images from a single color image, and create a
grey-scale image from a color image. Requires a
color-capable frame grabber and color camera.
rsi.cpp
Shows how to use the RSI Search tool.
rsltgrph.cpp
Shows how to use the result graphic classes with
CNLSearch.
sanglef.cpp
Shows how to use the Scene Angle Finder tool.
serialio.cpp
Demonstrates the CVL interface for serial I/O.
thresh.cpp
Shows how to use the Threshold tool.
timer.cpp
Shows how to use timers.
units.cpp
Shows how to use units classes to convert between
degrees and radians.
userbuf.cpp
Shows how to display the contents of a user-defined
block of data in a pel buffer.
userstor.cpp
Shows how to persist the contents of a user-defined
block of data to a file.
vector.cpp
Shows how to use the vector classes.
version.cpp
Shows how to retrieve CVL product version
information.
xform.cpp
Shows how to use the transformation object classes.
Table 3.
20
CVL single file code samples for this release
Getting Started with CVL
CVL 7.0 Notes
Acquisition Sample Projects
The CVL sample code includes five Visual Studio projects that build stand-alone CVL
applications that acquire images. The sample projects show how to
•
Acquire images from an externally triggered camera
•
Acquire RGB images from a color camera
•
Manage IEEE-1394 bandwidth use by multiple FireWire cameras
•
Perform master-slave acquisition using multiple analog cameras
•
Create a live-display loop application
These sample programs are found in the %VISION_ROOT%\sample\cvl\acquire
directory. For detailed instructions on using these sample files, see Image Acquisition
Sample Projects in chapter 1 of the CVL User’s Guide.
Display Sample Projects
The CVL sample code includes three Visual Studio projects that build stand-alone CVL
applications that display images. The sample projects show how to
•
Perform live display of both color and grey-scale images.
•
Use the display console to display images and vision tool results.
•
Use the Win32 display code to display images in an MFC application.
These sample programs are found in the %VISION_ROOT%\sample\cvl\display
directory. For detailed instructions on using these sample files, see the section Display
Sample Projects in chapter 1 of the CVL User’s Guide.
3D-Locate Sample Projects
The CVL sample code includes two Visual Studio projects, one for Visual Studio 2005
and one for Visual Studio 2009, that build an application that demonstrates 3D-Locate.
The sample projects show how to
•
Use viewsets to perform 3D camera calibration.
•
Use a set of images and poses to perform hand-eye calibration.
•
Use triangulation and pose estimation to solve 3D applications.
These sample programs are found in the %VISION_ROOT%\sample\cvl\c3d directory.
For additional instructions on using these sample files, see the 3D-Locate Developer’s
Guide.
Getting Started with CVL
21
CVL 7.0 Notes
3D-Locate Sample Application
The CVL sample code for 3D-Locate includes a fully functional sample application that
shows how to use 3D-Locate and PatMax to determine the pose of objects in 3D space.
The sample application can be found in
%VISION_ROOT%\sample\cvl\c3d\apps\fixedmulticam. For information on the sample
application, see the file
%VISION_ROOT%\sample\cvl\c3d\apps\fixedmulticam/fixedmulticamera3dlocate.doc.
22
Getting Started with CVL
CVL 7.0 Notes
Supported Hardware
This section describes the Cognex hardware configurations that CVL 7.0 supports.
Image Acquisition Devices
CVL 7.0 supports the following image acquisition devices:
•
Cognex MVS-8100L (32-bit OS only)
•
Cognex MVS-8100M (32-bit OS only)
•
Cognex MVS-8501 (32-bit OS only)
•
Cognex MVS-8504 (32-bit OS only)
•
Cognex MVS-8500Le (32-bit OS only)
•
Cognex MVS-8504e (32-bit OS only)
•
Cognex MVS-8601 (32-bit OS only; under 64-bit OS, the driver will install but the use
of the board is blocked by the software)
•
Cognex MVS-8602 (32-bit OS only; under 64-bit OS, the driver will install but the use
of the board is blocked by the software)
•
Cognex MVS-8602e (32-bit; 64-bit OS for board firmware versions 3.56 or later, the
use of the board is blocked by the software for other board firmware versions)
•
FireWire (IEEE 1394 DCAM) Cameras as listed in the Supported Cameras table for
this release (32-bit OS only)
•
GigE Vision Cameras as listed in the Supported Cameras table for this release
(32-bit and 64-bit OS)
•
Third-party Imaging Devices that conform to the Imaging Device Interface,
described in Chapter 3 of the CVL User’s Guide. The Acquisition Integration Kit
(AIK) for third-party image acquisition supports 32-bit and 64-bit OS.
In addition to frame grabber-based security, CVL 7.0 supports the use of a
Cognex-supplied dongle (security key) for licensing, as described in the section Using
a Dongle on page 37. CVL 7.0 also supports the use of software licensing, as described
in the section Using Software Licensing on page 33.
Multiple CPU Systems and Multi-core processors
CVL 7.0 supports multi-CPU systems and multi-core processors for all supported
operating systems and hardware configurations. (See Operating System Requirements
on page 30).
Getting Started with CVL
23
CVL 7.0 Notes
Dual-Board Configurations
Imaging
Device
8602e
8602e
8602
8602
8601
8601
GigE Vision
GigE Vision
FireWire
FireWire
8504e
8504e
8500Le
8500Le
8504
8504
8501
8501
8100L
8100L
8100M
8100M
8100C
8100C
CVL 7.0 supports the dual-board combinations marked in Table 4 for 32-bit operating
systems.
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
N
Y
Y
N
N
N
N
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Imaging
Device
Table 4. Dual-board frame grabber combinations supported
(32-bit OS)
24
Getting Started with CVL
CVL 7.0 Notes
Imaging
Device
8602e
GigE Vision
GigE Vision
CVL 7.0 supports the dual-board combinations marked in Table 5 for 64-bit operating
systems.
Y
Y
Y
Y
Y
Imaging
Device
Y
8602e
Table 5.
Getting Started with CVL
Dual-board frame grabber combinations supported (64-bit OS)
25
CVL 7.0 Notes
System Information
This section describes system level information, such as the operating system, service
pack levels, hardware platforms, and video card required to run CVL software.
System Requirements
To install and use CVL, the host PC must meet the following minimum requirements:
•
26
If you are using a Cognex frame grabber, the PC must be equipped with the
expansion slots and ports listed in the PC Configuration Guide and shown in the
following table
Frame
Grabber
Supported Expansion Slots
Recommended
8601 /
8602
PCI (3.3 or 5 volts; 32 or 64-bit)
PCI-X (3.3 or 5 volts; 32 or 64-bit)
PCI or PCI-X slot 64-bit / 66 MHz
or higher.
8100L /
8100M
PCI (5 volts only; 32 or 64-bit)
PCI 5 volts; 32-bit
8501
PCI (3.3 or 5 volts; 32 or 64-bit)
PCI-X (3.3 or 5 volts; 32 or 64-bit)
PCI or PCI-X slot 33 MHz or
higher.
8504
PCI (3.3 or 5 volts; 32 or 64-bit)
PCI-X (3.3 or 5 volts; 32 or 64-bit)
PCI or PCI-X slot 66 MHz or
higher.
8504e /
8500Le
PCIe x1, x4, x8, x16
PCIe x1
8602e
PCIe x4, x8, x16
PCIe x4
•
If you are using a direct-connect camera, the PC must be equipped with an
appropriate port (Gigabit-Ethernet for GigE Vision, IEEE-1394 for FireWire).
•
The host must have a 1 GHz or faster Intel Pentium (or compatible) CPU with
MMX/SSE2 instruction set support. See the PC Configuration Guide for additional
recommendations.
•
The host PC must run a Windows operating system listed in the section Operating
System Requirements on page 30.
•
To install the CVL software, the host PC must have a DVD-ROM drive, or access to
one over a network.
Getting Started with CVL
CVL 7.0 Notes
•
The PC must have a PCI, AGP, or PCI Express video card.
•
The minimum supported video card memory configuration is 8 megabytes,
which provides limited functionality.
•
PCI-based video cards are strongly discouraged, and are not supported at all
for use with the MVS-8100L frame grabber.
•
A standalone video card that plugs into a motherboard slot is strongly
preferred over a chip-based video system integrated with the motherboard.
•
An AGP or PCI Express x16 standalone video card with at least 16 megabytes
of memory is strongly recommended as the practical minimum configuration
with acceptable performance.
•
The video card’s device driver must support DirectX 8.1 or later for Windows
XP.
•
Video card recommendations are discussed in Video Card Requirements on
page 28.
To use CVL at its maximum potential, the host PC should meet the following additional
requirements:
•
The host system should have more RAM than is specified for the version of Windows
in use. The amount required is application dependent. Generally, the host system
should have enough RAM that your CVL application does not need to page to disk.
•
The Windows desktop must be in 8-, 16-, or 32-bit color mode. The desktop must
be in 16- or 32-bit mode to display color images.
•
Video card memory requirements depend on several factors, including the number
of cameras in use, the number of live display windows open, the desktop color
depth selected, and whether overlay graphics are used. More video memory than
16 megabytes may be required to assure maximum performance for some frame
grabbers and configurations, as discussed in Table 6 on page 29.
•
To use CVL manipulable graphics, the host PC must have a mouse or other pointing
device supported by your Windows version.
•
Set the PC’s BIOS to support a non plug-and-play operating system.
•
The system should use bus-mastered DMA disk drivers, as opposed to PIO drivers
for IDE (ATA) hard disks. Bus-mastered drivers improve system performance,
because the CPU is less heavily used during disk I/O. Windows XP defaults to auto
detection and use DMA mode if the disk device supports it. Check with your
motherboard vendor to determine if it provides bus-mastered IDE drivers.
Bus-mastered DMA disk drivers are required when using the MVS-8100L.
Getting Started with CVL
27
CVL 7.0 Notes
•
By default, Windows XP allows the kernel and some device drivers to be paged
from memory. If your PC has 64 MB of RAM or more, you can disable the paging of
the kernel and drivers, which keeps them in memory for faster access. To do this,
use your registry editor of choice and navigate to HKLM/SYSTEM/
CurrentControlSet/Control/Session Manager/Memory Management. In this folder,
the key DisablePagingExecutive controls kernel paging behavior and is set to 0
(false) by default. To disallow kernel and driver paging, set this key’s value to 1
(true). Once changed, the setting does not take effect until after you reboot the
computer. Always back up your registry before making edits.
Video Card Requirements
Note
Cognex provides video card recommendations in this section as a
guideline. If your video card meets all of the requirements described
in Table 6 on page 29, you may still experience less than optimal
performance depending on the video card manufacturer, the video
card driver installed, and the PC hardware in use.
The minimum requirements for video cards used with this CVL release are listed in
System Requirements on page 26. If your application requires extensive use of live
display for multiple cameras, or uses overlay graphics, more video memory is strongly
recommended.
28
Getting Started with CVL
CVL 7.0 Notes
Table 6 provides general recommendations for video card capabilities.
Video Card Feature
Recommendations
PCI video cards
Adequate when using 8-bit acquisition FIFOs and 8-bit
desktop depth when maximum acquisition frame rate is
not required.
Not supported with MVS-8100L. Results in high CPU
usage during live video and increased likelihood of
acquiring corrupted images, which would also be flagged
as corrupted.
Because PCI-type video cards cause more bus traffic to
occur when performing live display of images, the CPU
usage will be higher with a PCI video card than with an
AGP video card. This is true for all frame grabbers.
AGP video cards
Cognex strongly recommends 2X cards or faster.
AGP video cards that support the AGP Fast Write feature
may show reduced CPU usage during live display. Check
with the video card manufacturer to determine whether
your card and its driver support this feature.
PCI Express video cards
Cognex supports x16 PCI Express video cards.
8 MB of video memory
Adequate when using 8-bit acquisition FIFOs and 8-bit
desktop depth.
16 MB of video memory
•
Recommended when using 16- or 32-bit desktop
depths.
•
Required when using the overlay layer with 8-bit
acquisition FIFOs and 8-bit desktop depth, or 16-bit
acquisition FIFOs and 16-bit desktop depth.
Table 6.
Getting Started with CVL
Video card general recommendations
29
CVL 7.0 Notes
Video Card Feature
Recommendations
32 MB of video memory
•
Recommended when using 32-bit desktop depth.
•
Required when using the overlay plane with 32-bit
acquisition FIFOs and 32-bit desktop depth (if
supported by your hardware).
•
Recommended when using 32-bit desktop depth,
large desktop width x height resolutions, or
displaying live images from multiple cameras with
large video formats.
•
Recommended when using the overlay layer with 8-,
16-, or 32-bit acquisition FIFOs and 32-bit desktop
depth in a multicamera configuration and/or with
multiple display windows.
64 MB of video memory
Table 6.
Video card general recommendations
Operating System Requirements
CVL 7.0 requires one of the Microsoft operating systems listed below to be installed on
the host system. Cognex supports the US English and Japanese localized editions of
the following Windows variants:
•
Windows XP SP3 and Windows XP-J SP3
(32-bit editions of Home and Professional)
•
Windows 7
(32-bit editions for Premium, Professional, and Ultimate)
•
Windows 7
(64-bit editions for Premium, Professional, and Ultimate)
DirectX Support
For all supported operating systems, CVL 7.0 supports the version of DirectX associated
with that operating system (DirectX 9.0c for Windows XP and DirectX 11.0 for Windows
7).
DEP Support
CVL 7.0 supports PCs with hardware enabled DEP using Intel chipsets.
30
Getting Started with CVL
CVL 7.0 Notes
Locale Support
CVL 7.0 was tested on all supported operating systems (listed in the section Operating
System Requirements on page 30) with the following locales:
•
US English
•
Japanese
Development Environment Requirements
CVL 7.0 has been tested against the service pack or release levels of the Microsoft
development environment products shown in Table 7. Later service packs or release
levels may work, but have not been tested and are not supported by Cognex for use with
this version of the software.
Development
Environment
Framework
Compiler
Version
Service Pack Requirement
Visual Studio
2005
.NET
2.0
Visual
C++ v8.0
Service Pack 1 with July 2009 ATL
Security Update Installed
Visual Studio
2008
.NET
3.0
Visual
C++ v9.0
Service Pack 1 with July 2009 ATL
Security Update Installed
Visual Studio
2010
.NET
4.0
Visual
C++
v10.0
None
1 Unicode versions of the MFC libraries may be required to run some CVL samples in the default mode, as
described in the next section.
Table 7.
Development environment, framework, and operating system service pack
release levels supported by CVL 7.0
Notes+
Since CVL 7.0 is an unmanaged SDK, it only supports applications built with MSVC
2005, MSVC 2008, or MSVC 2010 in unmanaged applications. CVL 7.0 does not
support applications built with managed .NET (using the /clr compiler switch); also
known as mixed mode.
Getting Started with CVL
31
CVL 7.0 Notes
Visual C++ Unicode Requirements
The sample code provided with CVL (in %VISION_ROOT\sample\cvl) has four build
modes: Win32 Debug, Win32 DebugUnicode, Win32 Release, and Win32
ReleaseUnicode. Some sample projects, such as ConsDisplay, are installed with Win32
ReleaseUnicode as the default build mode. To be able to build these sample projects in
their default mode, Microsoft Visual C++ must be installed with support for Unicode
character sets.
If Unicode support is not present, you can build the samples in one of the non-Unicode
modes (Win32 Debug or Win32 Release). To change build modes, select either of the
non-Unicode modes from the combo box in Visual C++’s Build toolbar.
32
Getting Started with CVL
CVL 7.0 Notes
Installation Information
This section describes the procedures and limitations for installing CVL 7.0 software. For
information about installing hardware, refer to the hardware manual for your Cognex
frame grabber or adapter.
Before You Install
Please take a moment to familiarize yourself with the information in this section before
installing CVL.
•
Verify that the system on which you are installing CVL software meets all hardware
and software requirements described in System Information on page 26.
•
When installing CVL, you must have Administrator privileges for the system.
•
Set the Plug and Play (PnP) option in the PC’s BIOS setup menus to No for all
Windows platforms.
•
Fully uninstall any earlier version of CVL, the Cognex Drivers, and the Cognex
Software Licensing Center (CSLC) before installing the current version. You
uninstall the software using the Add or Remove Programs control panel (Windows
XP) or Programs and Features control panel (Windows 7), as described further in
Uninstalling CVL Software on page 39 and Uninstalling the 32-bit Cognex Drivers
on page 44.
Using Software Licensing
If your application uses a FireWire or GigE Vision camera or another method to acquire
images that doesn't require a frame grabber, you can use the Cognex Software
Licensing Service to enable license bits on your PC without installing any hardware or
security devices.
Software Licensing Overview
Software licensing uses special software to enable and disable Cognex security bits on
an individual PC. You configure and use software licensing by running the Cognex
Software Licensing Center (CSLC), a program supplied with CVL that runs on your PC.
Using an Activation ID that Cognex supplies to you after you purchase your CVL
product, you use the CSLC to install the license on one or more PCs. The CSLC
automatically contacts Cognex to verify the Activation ID that you enter, and once
verified, it sets the security bits that correspond to the tools that you have purchased,
allowing you to use these features within your application.
Getting Started with CVL
33
CVL 7.0 Notes
The CSLC normally contacts Cognex over an internet connection, but if your PC does
not have an internet connection you can use the CSLC in offline mode. In offline mode,
the CSLC generates a transaction file that you upload to a Cognex web site from a
different, internet-connected PC. Cognex processes the transaction file and lets you
download a response file which you then supply to the CSLC to complete the license
installation. Figure 1 summarizes how you install a software license.
Purchase Software License - Receive Activation ID by E-Mail
$
A-CH4N-CD7K-J7LT-LJ7Z
Use CSLC to Install License (Online Mode)
1
2
A-CH4N-CD7K-J7LT-LJ7Z
3
1. Enter Activation ID
and click
Install license.
2. CSLC verifies ID with
Cognex.
3. CSLC enables license
bits.
√
√
√
Use CSLC to Install License (Offline Mode)
1
2
3
A-CH4N-CD7K-J7LT-LJ7Z
4
5
6
Figure 1.
34
1. Enter Activation ID
and click Install
license.
2. CSLC generates
request file.
3. Log onto Cognex
licensing web site.
4. Upload requiest file,
download response
file.
5. Select Finish offline
transaction and
supply response file.
6. CSLC enables license
bits.
√
√
√
Software licensing overview
Getting Started with CVL
CVL 7.0 Notes
Installing a Software License
Start by locating your Activation ID. You should have received this ID (a coded
sequence of characters) by e-mail when you purchased CVL. If you cannot locate your
Activation ID, contact Cognex at product_services@cognex.com.
Next start the Cognex Software Licensing Center (CSLC) by selecting
Cognex->CVL->Cognex Software Licensing Center from the Start menu.
Figure 2.
CSLC main screen
The CSLC provides on-line user assistance for each action on the
right side of the CSLC window. For additional information on
software licenses, refer to this embedded on-line information.
Note
If your PC is connected to the internet, simply click on the Install license step, enter the
Activation ID, and click Install license. If your PC is not connected to the internet, click
on Configure connection type and select This PC is not connected to the internet before
you enter the Activation ID. The CSLC will prompt you to save a transaction file, which
you upload at the Cognex licensing web site
(http://license.cognex.com/flexnet/operationsportal/logon.do). After uploading the
transaction file, download the response file, restart the CSLC, click on the Finish offline
transaction step, and supply the response file.
After you complete the installation process, the Currently installed licenses list should
show the license, and running Cogtool.exe should show the correct bits enabled.
Note
Getting Started with CVL
A single Activation ID may be used to install licenses on multiple
PCs, as long as the same product configuration is being installed on
each PC. When you purchase a software license from Cognex, you
will receive a single Activation ID for each product type that you buy.
As you install licenses on individual PCs, the CSLC tracks the
number of installations made with the Activation ID.
35
CVL 7.0 Notes
Managing Software License
The CSLC makes it easy to manage software license on your PC. Table 8 describes
some of the things that you can do with the CSLC.
Task
Notes
Moving a
License to a
new PC
You can move a license from one PC to another by first uninstalling
the license from the source PC by clicking on the Uninstall license
step, then installing the license on the new PC.
Repairing a
Broken
License
If you make changes to the PC's configuration, such as adding
memory, swapping expansion cards, or adding a disk drive, the
Cognex Software Licensing Service may invalidate the license on
that PC. You can repair a broken license using the CSLC by clicking
on the Repair license step.
Note: License repairs can only be performed as offline tasks. You
can temporarily enable a software license by installing an
emergency license using the CSLC (click on the Install emergency
license step). Emergency licenses are valid for 3 days, and a limited
number of emergency licenses are available for each PC. Installing
an emergency license allows you to keep your system running while
you are processing the offline license repair transaction.
You can prevent broken licenses by uninstalling the license before
making the PC configuration changes, then reinstalling it after the
changes are complete.
Replacing
System
Disks
If you need to replace your PCs system disk because it has failed,
you can simply restore the disk image using any backup software
and the license on the restored disk should be valid, as long as the
following are true:
The backup image was created on the same PC that you are
restoring
The backup image was created after the license was installed
You have not made any other configuration changes to the PC
since the backup was created
If you wish to use a single disk image ("cookie") to restore multiple
PCs, then you must use the CSLC to create individual license
backup files for each licensed PC. You do this using You do this
using the Backup or restore installed licenses step.
Table 8.
36
Managing software licenses
Getting Started with CVL
CVL 7.0 Notes
Using a Dongle
A dongle (sometimes called a security key) is a hardware device that you attach to your
PC’s parallel port or USB port. A CVL-based application can then verify the licensing of
CVL vision tools by checking the licensing data programmed into the dongle, as an
alternative to checking the security information in a Cognex frame grabber.
Time-limited dongles expire after a set period of time programmed into the dongle. CVL
provides APIs that enable a reminder service to warn you of an impending expiration
date and allow you to extend the expiration date.
Dongle security is managed by the Cognex Security Service, a Windows service that is
automatically installed when you install the Cognex Drivers package. The Cognex
Drivers package also installs all of the driver files required by all supported dongle
types.
See Installing 32-bit Device Drivers on page 42 for information on installing and
uninstalling the dongle drivers and the Cognex Security Service.
Extension of Time-Limited Dongles
Time-limited dongles are programmed to expire after a specified time limit, usually one
year. The expiration date of a time-limited dongle can be extended, without returning it
to Cognex. Contact Cognex Technical Support if you need a dongle’s expiration date
extended.
To extend a dongle’s expiration date, you must give Technical Support the serial
number and upgrade code programmed into your dongle. You can display the serial
number and upgrade code with the Cogtool utility. In a DOS command prompt window,
type the following command:
cogtool --print | more
The dongle responds with information like the following:
Board 0 - Cognex Security Key v3
Serial Number: nnnnnnnn
Upgrade Code: TR5
State: Active
Time Remaining: 363 days 0 hours
Battery: ok
Host Tools Enabled:
...
Supply the serial number and upgrade code from the second and third lines to Cognex
Technical Support. They can then provide instructions on extending the expiration date
of your dongle.
Getting Started with CVL
37
CVL 7.0 Notes
Installing CVL 7.0 Software
This section describes how to install CVL 7.0 software.
Notes
One installation DVD-ROMs is provided for both 32-bit operating systems and
64-bit operating systems.
If the installer detects an older installed CVL version it displays a message
instructing you to uninstall CVL before attempting this installation. Remove the
existing version of CVL and try again.
If the installer detects that the CVL version you are now installing is already installed,
the InstallShield Wizard displays a screen with the choices Modify, Repair and
Remove. Follow the on-screen instructions.
1.
Insert your release DVD-ROM and follow the on-screen instructions.
2.
Follow the on-screen prompts through the Preparing..., Welcome... and License
Agreement screens.
3.
On the Setup Type screen, select one of the following:
•
Select Complete to install all files required to develop CVL applications with
the supported Microsoft Visual C++ versions, all Cognex online documentation
and CVL sample code.
•
Select Custom to choose MSVS C++ .NET 2005, MSVS C++ 2008, or MSVS
C++ 2010 as your CVL development environment, and whether to include or
exclude Cognex online documentation, CVL sample code and CVL
deployment-only files.
Choosing Custom leads to the Custom Setup dialog where you can choose
the features you wish to install. Browse through the displayed tree and choose
the features you wish to install. Note that an x next to a feature indicates it will
NOT be installed.
38
4.
The Ready to Install the Program dialog gives you a chance to review what will be
installed. Click Back to review or change your selections, or click Install to install
CVL.
5.
The Installing Cognex CVL 7.0 screen displays while the software is being
installed.
6.
When the installation is complete the InstallShield Wizard Complete screen
appears. By default, the box in this screen is checked to launch the Cognex driver
installer and the Cognex Software Licensing Center (CSLC). (See Installing 32-bit
Device Drivers on page 42 and Installing the Cognex Software Licensing Center
(CSLC) Silently on page 49). Uncheck the box(es) if you do not wish to install the
drivers or the CSLC. Click Finish to proceed.
Getting Started with CVL
CVL 7.0 Notes
There is no need to reboot your PC after installing CVL.
Uninstalling CVL Software
To uninstall CVL use the Add or Remove Programs control panel (Windows XP) or
Programs and Features control panel (Windows 7). Find the CVL version to remove in
the program list and click on it to highlight and expand it. Click on Remove to uninstall
it. You must uninstall the Cognex Drivers and Cognex Software Licensing Center
separately.
Installing CVL Silently
It is possible to install CVL unattended, without the need for operator intervention to click
on screen dialog buttons. This is known as silent operation. Note that when you install
CVL silently, if you wish to also install Cognex device drivers silently a separate
operation is required. For information on installing Cognex device drivers silently, see
Installing 32-bit Device Drivers Silently on page 44.
Getting Started with CVL
39
CVL 7.0 Notes
The CVL silent install is run from a DOS prompt command line. Arguments you include
on the command line name CVL features you wish to install. These are the same features
you see in the screen dialog of an interactive Custom install. See Setup Type on
page 38. These features are summarized in Table 9 (for the 32-bit installer) and
Table 10 on page 41 (for the 64-bit installer).
Command line
argument
gigecfg
devvc80
devvc90
devvc100
docsw
dochw
sample
Defaults







Screen dialog names
GigE Vision Configuration Tool
Visual Studio C++ 2005 Development Files
Visual Studio C++ 2008 Development Files
Visual Studio C++ 2010 Development Files
CVL Developer Manuals
Acquisition Hardware Manuals
Sample Code
dplvc80a
Visual Studio C++ 2005 ANSI1
dplvc80u
Visual Studio C++ 2005 UNICODE1
dplvc90a
Visual Studio C++ 2008 ANSI1
dplvc90u
Visual Studio C++ 2008 UNICODE1
dplvc100a
Visual Studio C++ 2010 ANSI1
dplvc100u
Visual Studio C++ 2010 UNICODE1
Note 1: Deployment-only files
Table 9.
40
CVL installation Features (32-bit installer)
Getting Started with CVL
CVL 7.0 Notes
Command line
argument
Defaults
dev90x64



dev100x64

gigecfg
dev80x64
docsw
dochw
sample



Screen dialog names
GigE Vision Configuration Tool
Visual Studio C++ 2005 x64 Development Files
Visual Studio C++ 2008 x64 Development Files
Visual Studio C++ 2010 x64 Development Files
CVL Developer Manuals
Acquisition Hardware Manuals
Sample Code
dpl80a64
Visual Studio C++ 2005 x64 ANSI1
dpl80u64
Visual Studio C++ 2005 x64 UNICODE1
dpl90a64
Visual Studio C++ 2008 x64 ANSI1
dpl90u64
Visual Studio C++ 2008 x64 UNICODE1
dpl100a64
Visual Studio C++ 2010 x64 ANSI1
dpl100u64
Visual Studio C++ 2010 x64 UNICODE1
Note 1: Deployment-only files
Table 10. CVL installation Features (64-bit installer)
To run a silent install, execute setup.exe located in the root directory of your CVL release
DVD-ROM. For example:
setup /s /v”/qn ADDLOCAL=dpl80a64,dpl80u64
INSTALLDIR=\”c:\Program Files\Cognex\CVL\””
This command installs CVL into the c:\Program Files\Cognex\CVL directory. You
can install it in another directory if you wish by changing the Path in the above command
line.
Following ADDLOCAL= is a comma-separated list (with no spaces) of the features you
wish to install. These must be names from the left-hand column of Table 9 (32-bit) and
Table 10 (64-bit). If you omit ADDLOCAL= the installer installs the defaults which are the
same as the defaults used in the interactive installation when you choose a Complete
install. These defaults are shown in Table 9 and Table 10.
Getting Started with CVL
41
CVL 7.0 Notes
To install all features, use ADDLOCAL=ALL.
Note that the path you specify following INSTALLDIR must be enclosed with quotes if
there are any spaces in the path name.
Uninstalling CVL 7.0 Silently
To uninstall CVL 7.0 silently run the following command from a DOS command line
prompt.
setup/s /v"/qn REMOVE=ALL"
Installing 32-bit Device Drivers
This section describes installing the 32-bit Cognex Drivers 4.1 package for CVL 7.0.
After installing CVL the installer dialog gives you the option to run the drivers installer. If
you install both VisionPro and CVL on the same PC you need run the drivers installer only
once. Note that on PCs with both CVL and VisionPro installed, you should not uninstall
the drivers unless you are uninstalling both CVL and VisionPro.
Running the 32-bit Cognex Drivers Installer
The final dialog screen of the CVL 7.0 install includes a check box labeled Launch
Cognex Driver Installer which is checked by default. The recommended procedure is
to leave the box checked which will then automatically start the Cognex Drivers installer
which installs device drivers.
When you run the Cognex Drivers installer, follow these steps:
1.
The Welcome screen displays. Click Next, click I accept..., and Next again to
display the Setup Type screen.
2.
If while starting, Windows XP detects new hardware (your frame grabber or
adapter) it displays the Files Needed dialog. Click Cancel to skip this dialog. Do
not use this method to install the drivers.
3.
On the Setup Type screen, select Complete to install the security device drivers.
4.
The Installing Cognex Drivers screen displays while the drivers are being
installed.
5.
When the installation is complete the InstallShield Wizard Complete screen
appears. Click Finish to proceed.
There is no need to reboot your PC after installing device drivers.
42
Getting Started with CVL
CVL 7.0 Notes
Cognex Reminder Service
The Reminder Service’s only function is to display a warning dialog when it detects a
time-limited dongle with an upcoming expiration date. Warning dialogs are displayed
when the development dongle has 30 days remaining, and again when there are 10 and
5 days remaining, and warns that the dongle has expired after 0 days remain.
To disable the Cognex Reminder Service, follow these steps:
1.
Right click on My Computer (Windows XP) or Computer (Windows 7) in the
Windows Start menu and select Manage...
2.
Expand the Services and Applications item in the Computer Management
window and click on Services.
3.
Locate and select the entry for Cognex Reminder Service in the right-hand pane.
4.
Right-click and select Properties from the pop-up menu.
5.
In the General tab of the Properties window, set the Startup Type to Disabled.
6.
Click OK and close the Computer Management window.
Installing the 32-bit Cognex Drivers Manually
If you did not launch the drivers installer after installing CVL 7.0, or if you later add
hardware such as an IEEE 1394b adapter, you will need to run the driver installer
manually. To do this, double click on the file setup.exe in the drivers subfolder of the
setup32bit folder on your CVL release DVD-ROM.
Running the Cognex Drivers installer will cause one of the following to happen:
1.
If an older set of drivers is installed a display asks you to uninstall them. Uninstall
the drivers and try again. (Also, see Uninstalling the 32-bit Cognex Drivers below).
2.
If the installer detects that the driver version you are now installing is already
installed, the InstallShield Wizard displays a screen with the choices Modify,
Repair and Remove. Follow the on-screen instructions. Also, see the following
paragraphs for more about these options.
If you know that the drivers are currently installed and you wish to only make some driver
changes or reinstall drivers, you do not need to uninstall the drivers. In this case go to
the Add or Remove Programs control panel (Windows XP) or Programs and Features
control panel (Windows 7), select Cognex Drivers, and click on Change. The installer
starts and leads to a screen with the choices Modify, Repair and Remove. Repair
causes the previously installed driver set to be reinstalled. This is most often used if you
suspect a driver problem and want to reinstall the drivers. The Repair option proceeds
with no intervention since there are no choices to make.
Remove will uninstall all of the Cognex drivers.
Getting Started with CVL
43
CVL 7.0 Notes
Notes
The installer may require you to insert your release DVD-ROM if it needs files that
are not stored on your hard drive. You will be prompted to do so if necessary.
Uninstalling the 32-bit Cognex Drivers
To uninstall device drivers use the Add or Remove Programs control panel (Windows
XP) or Programs and Features control panel (Windows 7). Find Cognex Drivers in the
program list and click on it to highlight and expand it. Click on Remove to cause the
device drivers to be uninstalled. The installer will then ask you to reboot, which is
required.
Installing 32-bit Device Drivers Silently
It is possible to install device drivers unattended, without the need for operator
intervention to click on screen dialog buttons. This is known as silent operation. You
initiate a silent install from a DOS prompt command.
The silent Cognex Drivers installer runs from a DOS prompt command line. Arguments
you include on the command line name device drivers you wish to install. These are the
same drivers you see in the screen dialog of an interactive Custom install. See Setup
Type on page 42.
The Cognex Drivers installer can install any or all of nine drivers. Each driver has an
internal name that you must use in the command line when installing silently. These
drivers are listed in the following table.
44
Command line
argument1
Screen dialog names
_8100
MVS-8100M/C/M+ Driver
_8100D
MVS-8100D Driver
_8100L
MVS-8100L Driver
_8102
MVS-8102 Driver
_8504
MVS-8500/8500e Driver
_8600
MVS-8600 Driver
_dcam
IEEE 1394 DCAM FireWire Driver
_gige
Cognex GigE Vision Interface
_hasp
Dongle (Security Key) Driver
Getting Started with CVL
CVL 7.0 Notes
Command line
argument1
Screen dialog names
_sentinel
Sentinel Dongle (Security Key) Driver
Note 1: Command line arguments are case sensitive.
To install the drivers silently, run the file setup.exe from the drivers subfolder of the
setup32bit subfolder on the CVL release DVD-ROM. The ADDLOCAL command line
option lets you specify the specific drivers to install. Specify ADDLOCAL=ALL to install
all drivers.
setup /s /v" /qn ADDLOCAL= driver,driver,driver
INSTALLDIR=directory "
Note that the path you specify following INSTALLDIR must be enclosed with quotes if
there are any spaces in the path name.
The following is an example, installing the HASP dongle driver:
setup /s /v" /qn ADDLOCAL=_hasp
INSTALLDIR=\"C:\Program Files\Cognex\Common\" "
Controlling the Cognex Reminder Service During
Silent Install
If you install the Cognex Dongle driver, the Cognex Reminder Service installs and starts
during silent installation. To prevent it from installing and starting, add the following
setting to the command line: SETREMINDERSERVICE=””. For example:
setup /s /v" /qn ADDLOCAL=_hasp
INSTALLDIR="C:\Program Files\Cognex\Common\"
SETREMINDERSERVICE=\"\" "
Uninstalling the 32-bit Device Drivers Silently
Use the following DOS command to uninstall silently all Cognex frame grabber drivers:
setup/s /v"/qn REMOVE=ALL"
Note
Getting Started with CVL
Be aware that on completion this command automatically reboots
your PC.
45
CVL 7.0 Notes
Installing 64-bit Device Drivers
This section describes installing the 64-bit Cognex Drivers 4.1 package for CVL 7.0. The
only 64-bit operating systems CVL 7.0 supports are the 64-bit editions of Windows 7;
therefore, the instructions described in this section are for these operating systems.
After installing CVL, the installer dialog gives you the option to run the drivers installer.
If you install both VisionPro and CVL on the same PC you need run the drivers installer
only once. Note that on PCs with both CVL and VisionPro installed, you should not
uninstall the drivers unless you are uninstalling both CVL and VisionPro.
Running the 64-bit Cognex Drivers Installer
The final dialog screen of the CVL 7.0 install includes a check box labeled Launch
Cognex Driver Installer which is checked by default. The recommended procedure is
to leave the box checked which will then automatically start the Cognex Drivers installer
which installs device drivers.
When you run the Cognex Drivers installer, follow these steps:
1.
The Welcome screen displays. Click Next, click I accept..., and Next again to
display the Setup Type screen.
2.
On the Setup Type screen, select Complete to install the security device drivers.
3.
The Installing Cognex Drivers screen displays while the drivers are being
installed.
4.
When the installation is complete the InstallShield Wizard Complete screen
appears. Click Finish to proceed.
There is no need to reboot your PC after installing device drivers.
Cognex Reminder Service
The Reminder Service’s only function is to display a warning dialog when it detects a
time-limited dongle with an upcoming expiration date. Warning dialogs are displayed
when the development dongle has 30 days remaining, and again when there are 10 and
5 days remaining, and warns that the dongle has expired after 0 days remain.
To disable the Cognex Reminder Service, follow these steps:
46
1.
Right click on Computer in the Windows Start menu and select Manage...
2.
Expand the Services and Applications item in the Computer Management
window and click on Services.
3.
Locate and select the entry for Cognex Reminder Service in the right-hand pane.
4.
Right-click and select Properties from the pop-up menu.
5.
In the General tab of the Properties window, set the Startup Type to Disabled.
Getting Started with CVL
CVL 7.0 Notes
6.
Click OK and close the Computer Management window.
Installing the 64-bit Cognex Drivers Manually
If you did not launch the drivers installer after installing CVL 7.0, or if you later add
hardware such as an IEEE 1394b adapter, you will need to run the driver installer
manually. To do this, double click on the file setup.exe in the drivers subfolder of the
setup64bit folder on your CVL release DVD-ROM.
Running the Cognex Drivers installer will cause one of the following to happen:
1.
If an older set of drivers is installed a display asks you to uninstall them. Uninstall
the drivers and try again. (Also, see Uninstalling the 32-bit Cognex Drivers below).
2.
If the installer detects that the driver version you are now installing is already
installed, the InstallShield Wizard displays a screen with the choices Modify,
Repair and Remove. Follow the on-screen instructions. Also, see the following
paragraphs for more about these options.
If you know that the drivers are currently installed and you wish to only make some driver
changes or reinstall drivers, you do not need to uninstall the drivers. In this case go to
the Programs and Features control panel, select Cognex Drivers, and click on
Change. The installer starts and leads to a screen with the choices Modify, Repair and
Remove. Repair causes the previously installed driver set to be reinstalled. This is most
often used if you suspect a driver problem and want to reinstall the drivers. The Repair
option proceeds with no intervention since there are no choices to make.
Remove will uninstall all of the Cognex drivers.
Notes
The installer may require you to insert your release DVD-ROM if it needs files that
are not stored on your hard drive. You will be prompted to do so if necessary.
Uninstalling the 64-bit Cognex Drivers
To uninstall device drivers use the Programs and Features control panel. Find Cognex
Drivers in the program list and click on it to highlight and expand it. Click on Remove to
cause the device drivers to be uninstalled. The installer will then ask you to reboot, which
is required.
Installing 64-bit Device Drivers Silently
It is possible to install device drivers unattended, without the need for operator
intervention to click on screen dialog buttons. This is known as silent operation. You
initiate a silent install from a DOS prompt command.
Getting Started with CVL
47
CVL 7.0 Notes
The silent Cognex Drivers installer runs from a DOS prompt command line. Arguments
you include on the command line name device drivers you wish to install. These are the
same drivers you see in the screen dialog of an interactive Custom install. See Setup
Type on page 46.
The Cognex Drivers installer can install any or all of four drivers. Each driver has an
internal name that you must use in the command line when installing silently. These
drivers are listed in the following table.
Command line
argument1
Screen dialog names
_8504
MVS-8500/8500e Driver
_8600
MVS-8600 Driver
_gige
Cognex GigE Interface for Cameras
_hasp
Dongle (security key) Driver
_sentinel
Sentinel Dongle (security key) Driver
Note 1: Command line arguments are case sensitive.
To install the drivers silently, run the file setup.exe from the drivers subfolder of the
setup64bit folder on the CVL release DVD-ROM. The ADDLOCAL command line option
lets you specify the specific drivers to install. Specify ADDLOCAL=ALL to install all
drivers.
setup /s /v" /qn ADDLOCAL= driver,driver,driver
INSTALLDIR=directory "
Note that the path you specify following INSTALLDIR must be enclosed with quotes if
there are any spaces in the path name.
The following is an example, installing the HASP dongle driver:
setup /s /v" /qn ADDLOCAL=_hasp
INSTALLDIR=\"C:\Program Files\Cognex\Common\" "
Controlling the Cognex Reminder Service During
Silent Install
If you install the Cognex Dongle driver, the Cognex Reminder Service installs and starts
during silent installation. To prevent it from installing and starting, add the following
setting to the command line: SETREMINDERSERVICE=””. For example:
48
Getting Started with CVL
CVL 7.0 Notes
setup /s /v" /qn ADDLOCAL=_hasp
INSTALLDIR="C:\Program Files\Cognex\Common\"
SETREMINDERSERVICE=\"\" "
Uninstalling the 64-bit Device Drivers Silently
Use the following DOS command to uninstall silently all Cognex frame grabber drivers:
setup/s /v"/qn REMOVE=ALL"
Be aware that on completion this command automatically reboots
your PC.
Note
Installing the Cognex Software Licensing Center
(CSLC) Silently
You can silently install the Cognex Software Licensing Center (CSLC) by running the
following command from the \cslc directory on the distribution DVD-ROM:
msiexec /i "Cognex Software Licensing Center.msi" /q
The command must appear on a single line.
Note
Modifying an Existing CVL Installation
The CVL 7.0 installation program offers the ability to modify or repair an existing CVL 7.0
installation, or to remove the entire CVL 7.0 installation.
If you start the CVL setup program with CVL software already installed, the Welcome
screen offers the following options:
•
Select Modify to add or remove individual CVL features. The Modify option offers
you the same choices as the Custom installation option during a first-time CVL
installation.
•
Select Repair to reinstall all CVL features installed by the previous setup.
•
Select Remove to remove the entire CVL installation.
Getting Started with CVL
49
CVL 7.0 Notes
Compatibility Notes
This section describes compatibility issues related to the use of Cognex hardware and
CVL 7.0 software.
64-bit Operating System Compatibility Issues
The AcuRead tool is not supported on 64-bit operating systems.
Microsoft Windows 7 Compatibility Issues
This section describes compatibility issues related to Microsoft Windows 7.
Legacy IEEE-1394 Driver Recommended
For IEEE-1394 (FireWire) cameras, Cognex recommends the use of the Legacy driver
supplied with Windows 7, not the default driver. Using the default driver may cause
acquisition failues, particularly if your application uses manual triggers and frequently
enables or disables triggering.
To enable the legacy driver, follow these steps:
Note
1.
Open the System Control Panel and click on Device Manager.
2.
Select your 1394 device from within the IEEE 1394 Bus Host Controllers node.
3.
Right-click on the selected device and pick Update Driver Software…
4.
Click Browse my computer for driver software.
5.
Click Let me pick from a list of device drivers on my computer.
6.
Select 1394 OHCI Compliant Host Controller (Legacy), then click Next
The Legacy driver only supports 1394(a) bandwidth (400 mbps).
Large Image Compatibility Issues
This section describes compatibility issues related to support for large images.
50
Getting Started with CVL
CVL 7.0 Notes
Affine Sampling Tool Interface Changed
In CVL 6.7 CR1 and earlier releases, the members used to specify the number of
samples in the X- and Y-direction for the affine sampling tool
(ccAffineSamplingParams::xNumSamples and
ccAffineSamplingParams::yNumSamples) were of type c_Int16.
In order to support sampling large images, in releases starting with CVL 6.7 CR3, the
number of samples is stored using a c_Int32 value.
The setter functions in ccAffineSamplingParams are simply changed to take a c_Int32
value; this does not cause incompatibility with existing code because the C++ compiler
promotes the 16-bit value to a 32-bit value. The getter functions, however, cannot be
changed without becoming incompatible with existing code. CVL 6.7 CR3 added two
new members to ccAffineSamplingParams:
•
ccAffineSamplingParams::xNumSamples32() returns the number of samples in
the X-direction.
•
ccAffineSamplingParams::yNumSamples32() returns the number of samples in
the X-direction.
The existing getter functions that return 16-bit values are deprecated, and they will now
throw an error if the number of samples is greater than or equal to 32768.
Not all Affine Sampling Modes Supported for
Large Images
Only the following sampling modes are supported by the Affine Sampling Tool for input
or output images with more than 32768 pixels in either the X- or Y-dimension:
•
ccAffineSamplingParams::eNone
•
ccAffineSamplingParams::eBilinearAccurate
The remaining modes (eBilinearApprox, eHighPrecision, and eBilinear) are not
supported; if you specify one of the unsupported modes and either the input or output
image has an X- or Y-dimension greater than 32768, the tool will throw an error.
Edge Tool Interface Changed to Support Large
Images
CVL 6.7 CR1 and earlier releases, the Edge tool stored the whole-pixel locations of
sub-pixel edges (edgelets) using 16-bit values. This meant that any edgelet that had
whole pixel positions outside the range -32768 to +32767 could not be represented.
Getting Started with CVL
51
CVL 7.0 Notes
Starting with CVL 6.7 CR3, the Edge tool allows you to specify the storage method for
edgelets.
•
If you request ccEdgeletDefs::eRequestContiguous, the edgelets will be stored in
a single contiguous block. If no edgelet has a whole-pixel location with an image Xor Y-coordinate outside the range -32768 through +32767, the edgelets are stored
in a vector of ccEdgelet and accessed through ccEdgeletSet::edges(). If any
edgelet has a whole pixel location with an image X- or Y-coordinate that is outside
the range outside the range -32768 through +32767, the edgelets are stored in a
vector of ccEdgelet2 and accessed through ccEdgeletSet::edges2() or through
the ccEdgeletIterator or ccEdgeletIterator_const classes obtained by calling
ccEdgeletSet::begin().
•
If you request ccEdgeletDefs::eRequestEdges2, the edgelets are stored in a vector
of ccEdgelet2 and accessed through ccEdgeletSet::edges2() or through the
ccEdgeletIterator or ccEdgeletIterator_const classes obtained by calling
ccEdgeletSet::begin().
•
If you request ccEdgeletDefs::eRequestEdgesAndOffsets, the edgelets are stored
in one or more separate blocks of memory, where each block contains an array of
ccEdgelet objects and a pair of 32-bit offset specifiers. Edgelets are accessed
using the ccEdgeletIterator or ccEdgeletIterator_const classes. You obtain one
of these objects by calling ccEdgeletSet::begin().
Multiple blocks are only used when at least one edgelet has a whole pixel location
with an image X- or Y-coordinate that is outside the range outside the range -32768
through +32767. If only a single block is created, you can use both
ccEdgeletSet::edges() and the ccEdgeletIterator() methods for accessing the
set’s edgelets.
Because the ccEdgeletIterator or ccEdgeletIterator_const classes obtained by
calling ccEdgeletSet::begin() can be used to access edgelets regardless of the
storage method, Cognex recommends that you use this interface.
CDB Files Created by Certain CVL and VisionPro
Versions are Invalid
Any CDB or IDB files created using the IDBEdit program supplied with CVL 6.8 CR1,
CVL 6.8 CR2, or VisionPro 6.0 are unreadable by the IDBEdit program supplied with
earlier versions of CVL and VisionPro.
The IDBEdit program supplied with CVL 7.0 (and with VisionPro 6.1 or 6.2) can be used
to repair invalid CDB or IDB files. Simply open the affected file using the newer IDBEdit
program, then select File->Save As... and save it under a different name. The newly
saved file is readable by all versions of IDBEdit.
52
Getting Started with CVL
CVL 7.0 Notes
CDB Files with Large Images are Not Compatible
with Earlier CVL Releases
If you use a CVL application built with CVL 6.8 CR3 to save an image that is larger than
32768 pixels in either the X- or Y-dimension, attempts to load that image into a CVL
application built using an CVL releases 6.7 CR1 and earlier will produce a 1x1 pixel
image.
Development Environment Compatibility Issues
This section describes compatibility issues related to supported development
environments.
CVL Libraries Built with Visual Studio 2005/2008
SP1 ATL Security Update
In July 2009, Microsoft released a pair of security updates for the ATL (Active Template
Library) provided with Visual Studio 2005 SP1 and Visual Studio 2008 SP1. CVL 7.0 can
be built using the updated versions of Visual Studio 2005 and 2008. Any application that
you build using CVL 7.0 requires that the updated run-time files associated with the
updates be present at application run time.
CVL 7.0 ships with the release-mode versions of these run-time files, which are installed
for both development and deployment installations of CVL, but Microsoft does not allow
Cognex to redistribute the Debug-mode versions of these files.
If you need to debug a CVL 7.0 application, you must install the Visual Studio 2005 SP1
Security Update (if you are using Visual Studio 2005) or the Visual Studio 2008 SP1
Security Update (if you are using Visual Studio 2008).
You can download the updates for both Visual Studio 2005 and 2008 here:
•
http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx
For more information, see these locations:
•
http://support.microsoft.com/kb/971090/ (Visual Studio 2005)
•
http://support.microsoft.com/kb/971092/ (Visual Studio 2008)
Edge and Blob Tools with Visual Studio 2008 on
Multi-Core Systems
Under specific conditions, the Blob tool and the Edge tool may exhibit performance
degradation when used in applications built with Visual Studio 2008. This problem also
affects applications that use the CVL graphics list container class (ccGraphicsList).
Getting Started with CVL
53
CVL 7.0 Notes
Performance degradation, when compared with the same application built with Visual
Studio 2005, is seen when all of the following conditions are true:
•
The application is built using Visual Studio 2008.
•
The application uses multiple threads.
•
The application is running on a PC with multiple physical cores (multiple CPUs, a
single multi-core CPU, or multiple multi-core CPUs).
•
One of the affected tools (Edge, Blob, or graphic lists) is running simultaneously on
multiple threads.
The problem may also occur when your application runs a combination of the
affected tools on multiple threads (Blob on one thread, graphics lists on another
thread, for example).
The performance degradation is strongly influenced by the number of cores in the
system. For systems with only two physical cores, the performance impact may be
minimal. For an eight-core system, the performance impact may be significant.
To avoid this issue, build your application using Visual Studio 2005. Alternatively, if you
must use Visual Studio 2008, make sure that the affected tools do not run on multiple
threads.
Device Driver Backward Compatibility
Device drivers supplied with CVL 7.0 are backward compatible with the versions listed
in Table 11. Backward compatibility in this sense implies that the specified older CVL
version will continue to operate when using the newer driver from this release.
Frame Grabber,
Dongle, or Camera
Earliest CVL
Version
Compatible with
7.0 Driver
(Windows XP)
Earliest CVL
Version
Compatible with
7.0 Driver
(Windows 7)
MVS-8100L/M
CVL 6.0
CVL 6.8 CR3
MVS-8100D
CVL 6.0
CVL 7.0
MVS-8501
MVS-8504
CVL 6.6
CVL 6.8 CR3
MVS-8601
MVS-8602
CVL 7.0 CR1
CVL 7.0 CR1
Table 11. Device driver compatibility
54
Getting Started with CVL
CVL 7.0 Notes
Frame Grabber,
Dongle, or Camera
Earliest CVL
Version
Compatible with
7.0 Driver
(Windows XP)
Earliest CVL
Version
Compatible with
7.0 Driver
(Windows 7)
MVS-8602e
CVL 7.0 CR1
CVL 7.0 CR1
MVS-8500Le
MVS-8504e
CVL 6.6
CVL 6.8 CR3
IEEE-1394 DCAM
CVL 6.4 CR2
CVL 6.8 CR3
GigE Vision
Performance Drivers
CVL 6.6
CVL 6.8 CR3
Dongles
CVL 6.5
CVL 6.8 CR3
Table 11. Device driver compatibility
Getting Started with CVL
55
CVL 7.0 Notes
56
Getting Started with CVL
Download PDF

advertising