Professional Documents
Culture Documents
Cognex Gsinsight
Cognex Gsinsight
LL
Copyright, Trademarks, Patents
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 2000-2001 Cognex Corporation.
All Rights Reserved.
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.
Cognex P/N 590-6368
March 2001
LLL
The hardware and portions of the software described in this document may be covered by one
or more of the following U.S. patents. Other U.S. and foreign patents are pending.
In-Sight Patents pending
Hardware 4,972,359; 5,526,050; 5,657,403; 5,793,899
Vision Tools 5,495,537; 5,548,326; 5,583,954; 5,602,937;
5,640,200; 5,717,785; 5,742,037; 5,751,853;
5,768,443; 5,796,868; 5,818,443; 5,825,483;
5,825,913; 5,845,007; 5,859,466; 5,872,870;
5,909,504
The following are registered trademarks of Cognex Corporation:
Cognex
Cognex, Vision for Industry
The following are trademarks of Cognex Corporation:
The Cognex logo
In-Sight
Other product and company names mentioned herein are the trademarks, or registered
trademarks, of their respective owners.
LY
CE Compliance Statement
CE Declaration of Conformity
Manufacturer Cognex Corporation
One Vision Drive
Natick, MA 01760 USA
Declares this CE-marked product
Product Number In-Sight 3000
Complies With 73/23/EEC Low Voltage Directive
89/336/EEC Electromagnetic Compatibility Directive
Compliance Standards EN 60950:1992
Electrical Safety
A1:1993, A2:1993, A3:1995
EN 55022
RF Emissions
Information Technology
EN 50082-1
EMC Immunity Standard
European Representative Cognex France
Immeuble le Patio
104 avenue Albert 1er
92563 Rueil Malmaison
France
Y
Table of Contents
Introduction................................................................................................................... xi
Who Should Read This Book? ................................................................................xi
How to Use This Book.............................................................................................xi
For More Information.............................................................................................. xii
Part 1: Using the Interface............................................................................................ 1
Chapter 1: Acquiring a Working Image....................................................................... 2
Acquiring a Working Image ..................................................................................... 2
Step 1 Start In-Sight ................................................................................... 2
Step 2 Adjust the Camera .......................................................................... 3
Chapter 2: Moving Around the Interface..................................................................... 6
What is the Spreadsheet?....................................................................................... 6
Navigating the In-Sight Interface............................................................................. 6
Main Menus..................................................................................................... 8
Using the Control Pad................................................................................... 10
Using the Keyboard....................................................................................... 12
Using the Mouse ........................................................................................... 13
Using Interactive Graphics............................................................................ 13
Chapter 3: Saving & Loading Jobs............................................................................ 15
What is a Job?....................................................................................................... 15
Lesson: Saving a Job.................................................................................... 15
Lesson: Loading a Job.................................................................................. 16
Chapter 4: Entering Formulas.................................................................................... 17
What is a Formula? ............................................................................................... 17
Cell References............................................................................................. 17
The Formula Editor................................................................................................ 18
Cell Section Mode......................................................................................... 20
Lesson: Entering Simple Formulas............................................................... 21
Lesson: Entering Formulas with Cell References......................................... 21
Lesson: Entering Simple Functions .............................................................. 23
Lesson: Editing Formulas.............................................................................. 24
Chapter 5: Working With Blocks................................................................................ 25
What is a Block?.................................................................................................... 25
Lesson: Marking a Block............................................................................... 25
Lesson: Editing Blocks.................................................................................. 26
YL
Chapter 6: Using Property Sheets............................................................................. 30
What is a Property Sheet? .................................................................................... 30
What is a Structure?.............................................................................................. 31
Lesson: Opening A Property Sheet .............................................................. 31
Lesson: Changing Parameter Values ........................................................... 31
Lesson: Using Interactive Graphics .............................................................. 32
Lesson: Inserting Cell References in Values ................................................ 34
Lesson: Inserting Formulas in Values........................................................... 34
Part 2: Vision Processing........................................................................................... 37
Chapter 7: Acquiring Images ..................................................................................... 38
How Does the Spreadsheet Update?.................................................................... 38
Lesson: Acquiring From Manual Triggers..................................................... 38
Lesson: Acquiring from External Triggers..................................................... 39
Chapter 8: Finding Features....................................................................................... 41
Why Do I Need to Find Features?......................................................................... 41
Finding Connected Regions.................................................................................. 42
Lesson: Finding Connected Regions Using ExtractBlobs ............................ 42
Lesson: Finding Connected Regions Using FindBlobs................................. 45
Lesson: Finding Connected Regions Using SortBlobs................................. 47
Finding Edges........................................................................................................ 49
Lesson: Finding Edges Using FindLine ........................................................ 50
Lesson: Finding Edges Using FindSegment................................................. 53
Lesson: Finding Edges Using FindMultiLine................................................. 54
Lesson: Finding Edges Using FindCurve ..................................................... 56
Lesson: Finding Edges Using FindCircle...................................................... 59
Finding Patterns .................................................................................................... 62
Lesson: Finding Patterns Using FindPatterns .............................................. 62
Chapter 9: Using Features to Find Objects .............................................................. 66
Why Combine Features?....................................................................................... 66
Lesson: Using PointToLine........................................................................... 67
Lesson: Using LineToLine ............................................................................ 70
Lesson: Using PointToPointAngle ................................................................ 73
Lesson: Creating a Fixture............................................................................ 75
Chapter 10: Making Measurements........................................................................... 79
What is a Measurement? ...................................................................................... 79
Lesson: Counting Pixels ............................................................................... 79
Lesson: Counting Features........................................................................... 84
Lesson: Measuring Distances....................................................................... 84
YLL
Chapter 11: Creating Decision Points....................................................................... 88
What is a Decision Point? ..................................................................................... 88
Converting Measurements into Decision Points ................................................... 88
Comparison................................................................................................... 89
Logical ........................................................................................................... 89
Conditionals .................................................................................................. 89
Decision Point Formula Examples ........................................................................ 89
Chapter 12: Communicating Results ........................................................................ 91
Using Discrete Output ........................................................................................... 91
Lesson: Configuring Discrete Output Options............................................... 92
Lesson: Writing Discrete Outputs ................................................................. 93
Using Serial Output ............................................................................................... 95
Lesson: Configuring Serial Output Options................................................... 95
Lesson: Writing Serial Outputs ..................................................................... 96
Chapter 13: Making a Run-time Interface.................................................................. 98
What is a Custom View? ....................................................................................... 98
Lesson: Understanding Graphics Functions................................................. 99
Lesson: Defining a Custom View................................................................ 102
Chapter 14: Configuring for Startup........................................................................ 105
Lesson: Selecting the Startup Job....................................................................... 105
Appendix A: The Profiler .......................................................................................... 106
Appendix B: Remote Job Selection......................................................................... 107
Lesson: Initiating a Job Load............................................................................... 107
Lesson: Responding to a Job Load..................................................................... 108
Appendix C: Sample Images .................................................................................... 110
YLLL
List of Figures
Figure 1-1. System Menu............................................................................................. 3
Figure 1-2. Unfocused Image in Live Mode................................................................. 4
Figure 1-3. Focused Image Beneath the Transparent Spreadsheet Overlay.............. 5
Figure 2-1. Enter, Edit, and System Menus................................................................. 8
Figure 2-2. In-Sight Interface Control Pad ................................................................. 10
Figure 3-1. Save & Load Dialog................................................................................. 15
Figure 3-2. Save Job Dialog ...................................................................................... 16
Figure 4-1. Formula Editor ......................................................................................... 18
Figure 4-2. Cell Selection Mode................................................................................. 20
Figure 4-3. Simple Arithmetic Formula in the Formula Editor.................................... 21
Figure 4-4. Formula with Cell Reference in Formula Editor....................................... 22
Figure 4-5. Cell Reference Formula in Spreadsheet ................................................. 22
Figure 4-6. Simple Function in Formula Editor .......................................................... 23
Figure 5-1. Edit Menu................................................................................................. 26
Figure 5-2. Hiding Rows............................................................................................. 28
Figure 6-1. Typical Property Sheet ............................................................................ 30
Figure 6-2. Typical Structure...................................................................................... 31
Figure 6-3. Options within the Enter Menu ................................................................ 32
Figure 6-4. Defining a Move Region .......................................................................... 33
Figure 6-5. Inserting Formulas in Values................................................................... 35
Figure 7-1. Triggering Options within the AcquireImage Property Sheet .................. 39
Figure 8-1. Different Types of Features..................................................................... 41
Figure 8-2. ExtractBlobs Property Sheet ................................................................... 43
Figure 8-3. Defining a Region.................................................................................... 44
Figure 8-4. ExtractBlobs Function Inserted in Spreadsheet ...................................... 45
Figure 8-5. FindBlobs Property Sheet........................................................................ 46
Figure 8-6. FindBlobs Function Inserted in Spreadsheet .......................................... 47
Figure 8-7. SortBlobs Property Sheet ........................................................................ 48
Figure 8-8. SortBlobs Function Inserted in Spreadsheet........................................... 49
Figure 8-9. FindLine Property Sheet.......................................................................... 50
Figure 8-10. Defining a FindLine Region ................................................................... 51
L[
Figure 8-11. FindLine Function Inserted in Spreadsheet........................................... 52
Figure 8-12. FindSegment Property Sheet ................................................................ 53
Figure 8-13. FindSegment Function Inserted in Spreadsheet ................................... 54
Figure 8-14. FindMultiLine Property Sheet ................................................................ 55
Figure 8-15. FindMultiLine Function Inserted in Spreadsheet ................................... 56
Figure 8-16. Defining a FindCurve Region ................................................................ 57
Figure 8-17. FindCurve Function Inserted in Spreadsheet ........................................ 58
Figure 8-18. FindCircle Property Sheet ..................................................................... 59
Figure 8-19. Defining a FindCircle Region................................................................. 60
Figure 8-20. FindCurve Function Inserted in Spreadsheet ........................................ 61
Figure 8-21. FindPatterns Property Sheet ................................................................. 62
Figure 8-22. Defining a Model Region ....................................................................... 63
Figure 8-23. Defining a Find Region.......................................................................... 64
Figure 8-24. FindPatterns Function Inserted in Spreadsheet .................................... 65
Figure 9-1. PointToLine Function............................................................................... 67
Figure 9-2. PointToLine Property Sheet .................................................................... 68
Figure 9-3. PointToLine Function Inserted in Spreadsheet ....................................... 69
Figure 9-4. LineToLine Function................................................................................ 70
Figure 9-5. LineToLine Property Sheet ...................................................................... 71
Figure 9-6. LineToLine Function Inserted in Spreadsheet......................................... 72
Figure 9-7. PointToPointAngle Function.................................................................... 73
Figure 9-8. PointToPointAngle Property Sheet.......................................................... 74
Figure 9-9. PointToPointAngle Function Inserted in Spreadsheet............................. 75
Figure 9-10. Fixture in the Spreadsheet .................................................................... 76
Figure 9-11. PlotCross Property Sheet ...................................................................... 77
Figure 9-12. PlotCross Function Inserted in Spreadsheet ......................................... 78
Figure 10-1. ExtractHistogram Property Sheet .......................................................... 80
Figure 10-2. Defining an ExtractHistogram Region ................................................... 81
Figure 10-3. ExtractHistogram Function Inserted in Spreadsheet............................. 82
Figure 10-4. FindMultiLine Function .......................................................................... 85
Figure 10-5. PairEdges Property Sheet ..................................................................... 86
Figure 10-6. PairEdges Function Inserted in Spreadsheet ........................................ 87
[
Figure 12-1. Discrete Output Dialog .......................................................................... 92
Figure 12-2. Output Details Dialog............................................................................. 93
Figure 12-3. WriteDiscrete Property Sheet ................................................................ 94
Figure 12-4. Serial Port 1 Dialog................................................................................ 95
Figure 12-5. WriteSerial Property Sheet .................................................................... 97
Figure 13-1. Custom View.......................................................................................... 98
Figure 13-2. Graphics Control Functions................................................................. 100
Figure 13-3. Graphics Display Functions................................................................. 101
Figure 13-4. Configuring a Custom View in the Spreadsheet.................................. 102
Figure 13-5. Custom View Dialog ............................................................................ 103
Figure 13-6. Custom View of the Spreadsheet ........................................................ 104
Figure 14-1. Startup Dialog...................................................................................... 105
Figure A-1. In-Sight Profiler ..................................................................................... 106
Figure B-1. Discrete Input Dialog............................................................................. 107
Figure C-2. Discrete Output Dialog.......................................................................... 108
Figure C-3. Discrete Output Details Dialog.............................................................. 109
Figure C-1. Image1A.bmp........................................................................................ 110
Figure C-2. Image1B.bmp........................................................................................ 111
Figure C-3. Image1C.bmp ....................................................................................... 111
Figure C-4. Image2A.bmp........................................................................................ 112
Figure C-5. Image2B.bmp........................................................................................ 112
List of Tables
Table 2-1. In-Sight Interface Navigation Configurations.............................................. 7
Table 2-2. Basic Keyboard Navigation Keystrokes.................................................... 12
Table 2-3. Basic Mouse Navigation Actions .............................................................. 13
Table 2-4. Accessing Interactive Graphics ................................................................ 13
[L
Introduction
Welcome to In-Sight, a compact, stand-alone machine vision sensor for automated
inspection and process control. In-Sights innovative, built-in spreadsheet interface greatly
simplifies the task of developing, operating, and maintaining vision applications.
Who Should Read This Book?
You should read Getting Started with In-Sight to quickly learn the most important features of
In-Sights spreadsheet-based user interface. It is written primarily for engineers and
programmers who are configuring In-Sight systems, though novice users will also find it helpful.
Getting Started with In-Sight does not assume an in-depth knowledge of machine vision, but by
reading it you will become familiar enough with In-Sight to start creating your own machine
vision applications.
This book is not a comprehensive reference to every detail of the interface; nor is it a
generalized tutorial on machine vision. Its goal is to make you comfortable enough with the
In-Sight interface to explore it on your own, and to prepare you for understanding its more
advanced features.
How to Use This Book
Getting Started with In-Sight consists primarily of a series of lessons designed to introduce you
to the fundamentals of the In-Sight spreadsheet interface. Some lessons depend on concepts
introduced in previous lessons, so it is generally best to read them in order, particularly if you
are new to machine vision.
To assist you in following along with the lessons, bitmap images of the part used for this books
lessons are included on the CD-ROM that came with your In-Sight (Image1A.bmp,
Image1B.bmp, Image1C.bmp, Image2A.bmp, and Image2B.bmp). Alternatively, you can setup
the In-Sight camera to acquire images directly from the images in Appendix C: Sample Images.
NOTE: The screen captures shown and the features described in this book are current
as of version 2.00 of the In-Sight firmware. Visit the In-Sight Online Support
Center at www.cognex.com/inSight to download updated documentation, if
available.
[LL
For More Information
Other resources available to help you learn about the In-Sight vision sensor and its
spreadsheet interface include:
The following documents describe how to connect the vision processor, digital camera,
control pad, and other components. They also contain specifications, mechanical
drawings, and other hardware details:
Installing the In-Sight 1000
Cognex P/N 590-6346 (English)
Cognex 590-6346F (French)
Cognex 590-6346J (Japanese)
Installing the In-Sight 3000
Cognex P/N 590-6348 (English)
Cognex 590-6348F (French)
Cognex 590-6348J (Japanese)).
In-Sight Guide and Reference, an HTML Help file provided on the In-Sight CD-ROM.
In-Sight computer-based tutorials, which are included on CD-ROM with In-Sight Starter
Accessories Kits.
The In-Sight Online Support Center at
http://www.cognex.com/insight/support/support.asp.
1
Part 1: Using the Interface
The chapters in this part of the book introduce the basic components of the spreadsheet
interface. You will learn how to acquire an image from the In-Sight camera and how to navigate
the interface.
2
Chapter 1: Acquiring a Working Image
In this chapter, you will see how to start In-Sight and capture a working image to use in learning
the In-Sight graphic user interface.
Acquiring a Working Image
Before you can learn how to use the In-Sight interface, you will need to capture a working
image. The following describes this procedure.
Step 1 Start In-Sight
To start the In-Sight system:
1. Ensure that the hardware is connected properly as described in your In-Sight installation
manual.
2. For the In-Sight 3000, switch on the VGA monitor, then apply power to the In-Sight
processor.
3. Ensure that the In-Sight spreadsheet overlay is visible on the VGA monitor. If not, refer to
your In-Sight installation manual.
Chapter 1: Acquiring a Working Image
3
Step 2 Adjust the Camera
The first time you use the system, you will need to adjust the cameras focus and aperture to
produce a clear image on your monitor.
NOTE: For specific information on navigating within the In-Sight interface, refer to
Navigating the Interface in the In-Sight Guide & Reference contained on your
In-Sight CD-ROM.
To adjust the camera:
1. Open the System menu (see Figure 1-1).
Figure 1-1. System Menu
Getting Started with In-Sight
4
2. Select Live from the System menu to put the system into live video mode. This will
temporarily remove the semitransparent spreadsheet overlay (see Figure 1-2).
Figure 1-2. Unfocused Image in Live Mode
3. Adjust the cameras position, focus ring, and lens aperture until you get a clear image on
the monitor.
Chapter 1: Acquiring a Working Image
5
4. Press any key or button to return to the spreadsheet (see Figure 1-3).
Figure 1-3. Focused Image Beneath the Transparent Spreadsheet Overlay
You now have a working image to use as you learn about the In-Sight spreadsheet interface in
the following chapters.
6
Chapter 2: Moving Around the Interface
In this chapter, youll learn the basics of navigating in the In-Sight interface using the control
pad, a keyboard, or a mouse.
What is the Spreadsheet?
The In-Sight graphical user interface (GUI) consists of a semitransparent spreadsheet
superimposed on a 640x480-pixel video image.
The spreadsheet is a table of cells arranged in 400 rows (0 to 399) and 26 columns (labeled A
through Z). Individual cells are referred to by column letter and row number: for example, cell
C4 is at the intersection of column C and row 4. In most respects, the In-Sight spreadsheet
works much like other spreadsheets you may be familiar with.
You will use the spreadsheet to configure vision applications by inserting expressions called
formulas into its cells (Formulas are discussed in Chapter 4: Entering Formulas). Since the
spreadsheet is semitransparent, the image will always be in view.
You configure the spreadsheet one cell at a time. When a cell is highlighted, its formula is
displayed in the Formula Bar at the top-left corner of the spreadsheet. If you attempt to move
off the edge of the screen, the spreadsheet will automatically scroll to keep the selected cell in
view.
Navigating the In-Sight Interface
The In-Sight user interface may be configured using the In-Sight control pad, a keyboard and
mouse connected to a Windows