*(77,1*67$57(':,7+,16,*+7 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 LL 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. LLL 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 LY Cognex France Immeuble le Patio 104 avenue Albert 1er 92563 Rueil Malmaison France 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 Y 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 YL 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 YLL 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 YLLL 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 L[ 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 [ Introduction Welcome to In-Sight™, a compact, stand-alone machine vision sensor for automated inspection and process control. In-Sight’s 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-Sight’s 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 book’s 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. [L For More Information Other resources available to help you learn about the In-Sight vision sensor and its spreadsheet interface include: • • • • [LL 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. 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. 1 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. 2 Chapter 1: Acquiring a Working Image Step 2 — Adjust the Camera The first time you use the system, you will need to adjust the camera’s 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 3 Getting Started with In-Sight 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 camera’s position, focus ring, and lens aperture until you get a clear image on the monitor. 4 Chapter 1: Acquiring a Working Image 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. 5 Chapter 2: Moving Around the Interface In this chapter, you’ll 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® PC, or any combination of the three input devices. Which input device(s) you can use depends on the type of In-Sight system you are configuring. 6 Chapter 2: Moving Around the Interface Table 2-1 lists the methods by which each type of In-Sight Interface can be navigated: Table 2-1. In-Sight Interface Navigation Configurations Input Device Control Pad Keyboard Mouse In-Sight 1000 In-Sight 3000 In-Sight PC Host Local No Yes Yes 1 Network Yes 2 Yes 2 Local No Network Yes Local No Network Yes 1 Yes No 3 Yes Yes 3 No 1 Yes Yes Yes 3 Yes 1 PC must have a standard, 15-pin game port and joystick driver installed or an available USB port for a third-party control pad. 2 From any In-Sight 3000 on the network. 3 From any In-Sight PC Host on the network. The specific actions necessary for navigating the In-Sight interface are context-sensitive, and vary according to the input device that is used. 7 Getting Started with In-Sight Main Menus The In-Sight interface has three main menus, as shown in Figure 2-1: System, Enter, and Edit. Figure 2-1. Enter, Edit, and System Menus • • • The System menu contains selections for acquiring live images, saving and loading files, configuring network and serial communications, discrete I/O, user names and logon permissions, and more. The Settings menu is accessed from the System Menu. The Enter menu is used throughout the interface to enter formulas and values into spreadsheet cells and parameters in property sheets. The Edit menu provides block-editing operations for spreadsheet cells, disables selected cells to prevent them from updating, and configures the Custom View of the spreadsheet. The edit menu is also used to access the property sheets for Graphics Controls functions after they have been inserted into the spreadsheet. NOTE: Selections on the menus are context-sensitive. Unavailable selections are grayed out. 8 Chapter 2: Moving Around the Interface To open the menus from anywhere in the main spreadsheet: • The System menu Control Pad Press the • Keyboard Press or Z+s button. Right-click with mouse pointer over any cell not highlighted. The Enter menu Control Pad Press and hold the • Mouse Keyboard button. Not directly accessible using the keyboard. Mouse Left-click and hold on any cell. The Edit menu Control Pad Press the button. Keyboard Press or Z+e Mouse Right-click with mouse pointer over highlighted cell. 9 Getting Started with In-Sight Using the Control Pad Unlike a traditional vision system that requires programming from a PC and a keyboard, In-Sight can be configured using only a simple, 10-button control pad (see Figure 2-2). NOTE: For a comprehensive list of control pad actions by context within the interface, refer to Navigating the Interface in the In-Sight Guide & Reference contained on your In-Sight CD-ROM. Action Buttons Direction Buttons Shortcut Buttons Figure 2-2. In-Sight Interface Control Pad Direction Buttons The four Direction Buttons are used in many common operations, including interface navigation, manipulating graphic regions of interest, incrementing/decrementing numeric values, and selecting ranges of cells. The exact behavior of the direction buttons is contextsensitive. The up direction button moves the on-screen highlight up, decreases the size of a graphic region, and increments numeric values. In the spreadsheet, pressing ZKLOH holding the button selects an entire column of cells. The down direction button moves the highlight down, increases the size of a graphic region, and decrements numeric values. The left direction button moves the highlight left, decreases the width of a graphic region, rotates a graphic region counter-clockwise, curves a graphic region up, and selects a digit to increment in a numeric value. The right direction button moves the highlight right, increases the width of a graphic region, rotates a graphic region clockwise, curves a graphic region down, and selects a digit to increment in a numeric value. In the spreadsheet, pressing ZKLOHKROGLQJWKH button selects an entire row of cells. 10 Chapter 2: Moving Around the Interface Action Buttons The four Action Buttons are used to open menus, enter formula and values, and manipulate interactive graphics. In the spreadsheet, the up action button opens the System menu. In all other contexts throughout the interface, the button cancels changes and escapes to the previous menu or dialog. It works much like pressing the ESC key on a computer keyboard. The down action button selects the highlighted item and performs an action. The button also opens the Enter menu, but only if it is pressed and held. Otherwise, if button automatically selects the highlighted pressed and immediately released the item, or accepts any changes you have just made. Its function is similar to pressing ENTER on a computer keyboard. The left action button accesses various editing shortcuts, including backspace in the formula editor, and zeroing numbers when in numeric edit mode. However, the most common use of the left action button is to access Interactive Graphics mode. The right action button opens the Edit menu in the spreadsheet and in property sheets, and maximizes numbers when in numeric edit mode. Shortcut Buttons The two buttons in the center of the control pad perform two shortcuts: A The left-center button labeled "A" manually triggers an image acquisition and updates the spreadsheet. B The right-center button labeled "B" switches between the default view and the Custom View of the current spreadsheet job. 11 Getting Started with In-Sight Using the Keyboard Table 2-2 shows you the basic keyboard keystrokes needed to navigate within In-Sight. NOTE: For a comprehensive list of keyboard actions by context within the interface, refer to Navigating the Interface in the In-Sight Guide & Reference contained on your In-Sight CD-ROM. Table 2-2. Basic Keyboard Navigation Keystrokes Keystrokes vcxz Navigate the spreadsheet, menus, and dialogs. Adjust interactive graphics. | and vcxz Selects spreadsheet rows, columns, and cell ranges for block editing operations. @ Opens the Enter menu, selects highlighted items, and accepts changes. Opens the System menu. " Switches into Interactive Graphics mode. Opens the Edit menu. % Manually triggers an image acquire and spreadsheet update. ^ Switches between the default and the Custom View of the spreadsheet. Any alphanumeric character or symbol. 12 Action Inputs values, strings, and formulas. Chapter 2: Moving Around the Interface Using the Mouse Table 2-3 shows you the basic mouse actions needed to navigate within In-Sight. NOTE: For a comprehensive list of mouse actions by context within the interface, refer to Navigating the Interface in the In-Sight Guide & Reference contained on your In-Sight CD-ROM Table 2-3. Basic Mouse Navigation Actions Mouse Action Action Left-click Selects/opens items throughout the entire interface. Also accepts changes made to values. Left-click and hold Opens the Enter menu in the spreadsheet and in property sheets, and adjusts interactive graphics. Right-click In the spreadsheet, opens the Edit menu and the System menu, depending on whether the right-click action occurs on a selected cell, or outside the selection. Opens the Edit menu in property sheets. Cycles between interactive graphics modes. Right-click and drag Selects spreadsheet rows, columns, and cell ranges for block editing operations. Using Interactive Graphics The parameters for many Vision Processing, and other In-Sight functions, can be configured by adjusting an overlay graphic on top of the image. For example, an interactive graphic can be used to easily set the size, position, and rotation for a region of interest, or for training a model region. Interactive graphics can be accessed from any cell in the spreadsheet (while in standard or Custom View as permitted by the user’s Access level), or from any parameter value in a property sheet. As shown in Table 2-4, the actions necessary for using interactive graphics depends on which input device you are using. Table 2-4. Accessing Interactive Graphics Control Pad Press . Or, press and hold to open the Enter menu, then choose Graphics. Keyboard " Mouse Left-click and hold to open the Enter menu, then choose Graphics. When you access an interactive graphic, the semitransparent spreadsheet or property sheet overlay will disappear, and the graphic will be displayed on top of the image. If the highlighted cell or value has an associated graphic, the graphic will appear in red on the image beneath the semitransparent spreadsheet or property sheet overlay (If a cell or value does not have an associated graphic, then the default interactive graphics mode will be Zoom). 13 Getting Started with In-Sight There are 5 types of interactive graphics: regions, circles, crosses, points, and lines. The type of graphic displayed depends on the type of input required by the cell or value. NOTE: For a comprehensive list of interactive graphic actions for each input device, refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM. 14 Chapter 3: Saving & Loading Jobs In this chapter, you will learn how to save and load In-Sight Jobs. What is a Job? A Job file (*.JOB) is an In-Sight spreadsheet containing formulas and text which performs a specific set of machine vision tasks. Job file storage is limited to the amount of available flash memory on the In-Sight 1000 and In-Sight 3000 sensor. File storage is virtually unlimited on an In-Sight PC Host. The name of the job currently loaded is displayed in the lower-left corner of the Save & Load dialog. If the current job has not been saved, it will be "Unnamed." NOTE: All work entered in the spreadsheet remains in memory as long as the processor has power or the In-Sight PC Host is open. However, if the processor loses power or you close the In-Sight PC Host, you will lose all unsaved data. Therefore, make sure you save your jobs. Lesson: Saving a Job To save a job: 1. From the spreadsheet, open the System menu. 2. Select Save & Load to open the Save & Load dialog (see Figure 3-1). Figure 3-1. Save & Load Dialog 15 Getting Started with In-Sight 3. Highlight < New >, then select Save to open a Text Entry dialog (see Figure 3-2). Figure 3-2. Save Job Dialog 4. Enter a name for the job using the onscreen keypad. TIP: If you make a mistake entering your job name, backspace over the last character entered. If you need to start over, Select Cancel. 5. Select the Save button to accept your changes and return to the Save & Load dialog. 6. In the Save & Load dialog, select Close to accept your changes and return to the spreadsheet. Lesson: Loading a Job Loading a job retrieves it from memory or disk storage (In-Sight PC Host). The steps for loading a job are similar to the steps for saving a job: 1. 2. 3. 4. 16 From the spreadsheet, open the System menu. Select Save & Load to open the Save & Load dialog. Select the job that you want to load, then select the Load button. After you have loaded the job, select Close to return to the spreadsheet. Chapter 4: Entering Formulas In this chapter, you will learn how to enter formulas into In-Sight spreadsheet cells. What is a Formula? A formula is a mathematical expression consisting of values and references to values, connected by mathematical operators, and resulting in a new value or set of values. In-Sight considers everything you enter into a cell—whether a single constant or a complex visionprocessing function—to be a formula. All formulas contained in an In-Sight job spreadsheet are constructed using the formula editor (see below). Formulas can return three types of results: Values Numbers, such as 1.00 or –1.00. Strings Alphanumeric characters, such as “PASS” or “FAIL.” Structures A vision-processing function (structures are discussed Chapter 6: Using Property Sheets). Cell References Formulas can refer to other cells in the spreadsheet by using absolute and relative cell references. Relative cell references point to cells relative to the position of the formula. When copied or moved to a new location in the spreadsheet, these references automatically adjust to maintain the same position relative to the formula, as in the following examples: A5=A3+A4 If this formula is copied to cell B5, it becomes B5=B3+B4. A5=A3+A4 If this formula is copied to cell A6, it becomes A6=A4+A5. Absolute cell references point to fixed locations in the spreadsheet, regardless of the formula’s location. They do not change when the formula is copied or moved. Absolute cell references are designated by a dollar sign ($) preceding the cell’s row or column label. By placing the dollar sign appropriately, you can refer to a fixed row, column, or cell, as in the following examples: A5=$A$3+$A$4 If this formula is copied to cell B5, it becomes B5=$A$3+$A$4. A5=A$3+A$4 If this formula is copied to cell B5, it becomes B5=B$3+B$4. 17 Getting Started with In-Sight The Formula Editor As shown in Figure 4-1, In-Sight includes a formula editor that is used to enter formulas into the spreadsheet. As mentioned earlier, all formulas contained in an In-Sight job spreadsheet are constructed using the formula editor. NOTE: The formula editor is accessed from the Enter menu. Formula Bar Onscreen Keypad Function Categories Context-Sensitive Help Functions & Function Subcategories Figure 4-1. Formula Editor The formula editor is divided into four main sections: • 18 Formula Bar: The formula bar appears at the top of the formula editor dialog and shows the formula that is being edited. The formula editor automatically checks the formula for correct syntax. If a formula is not valid, the invalid syntax will be highlighted in red; the formula will not be accepted until the syntax error is corrected. A colored cursor indicates the current insertion point in the formula, where changes will be made. Chapter 4: Entering Formulas • Onscreen Keypad: The onscreen keypad occupies the left side of the formula editor dialog. In addition to the keys for inserting numeric characters and mathematical operators into formulas, the onscreen keypad provides keys for inserting cell references and text into a formula, as follows: Inserts an Absolute cell reference symbol into the formula. Complete the cell reference by manually inserting an alpha character for the Column, and a numeric character for the Row, after the ’$’ character (for example, $A1). Activates Cell Selection mode, for choosing an Absolute cell reference to insert into the formula. Activates Cell Selection mode, for choosing a Relative cell reference to insert into the formula. Opens the Text Entry dialog for inserting strings of alphanumeric characters and Symbols into the formula. • Function List: A list of tool categories and subcategories occupies the center and right sections of the formula editor. As a tool category is highlighted in the center, a list of that category’s functions appears in the right section, organized within subcategories. The current category and function selections are indicated by a V\PERO • Context Sensitive Help: The bottom part of the formula editor dialog contains contextsensitive help text for quick reference. 19 Getting Started with In-Sight Cell Section Mode The most convenient method for inserting absolute and relative cell references into formulas is to use the In-Sight Cell Selection mode. In cell selection mode, cell references are entered by highlighting and selecting the cells to reference directly in the spreadsheet; the references do not have to be typed in manually. While in cell selection mode, the display temporarily switches from the property sheet or dialog into a unique view of the In-Sight spreadsheet. In this view, the spreadsheet is opaque (the image is not visible beneath the spreadsheet), and a dashed line surrounds the first cell that is highlighted, as shown in Figure 4-2: Figure 4-2. Cell Selection Mode When cells have been highlighted and selected, the display switches back to the property sheet or dialog from which cell selection mode was initiated, and the references for those cells are inserted. In Figure 4-2, references for cells C7 and D7 will be inserted into the formula contained in cell A11. If more cells were selected than can be used as references at the insertion point of the formula, then only the first cell of the selection, cell C7, will be inserted and the reference to cell D7 will be discarded. 20 Chapter 4: Entering Formulas Lesson: Entering Simple Formulas This procedure describes the general procedure for entering simple formulas that do not contain cell references. To enter a simple formula into the spreadsheet: 1. Highlight an empty cell where you want to insert the formula. 2. Open the formula editor. 3. You can enter numbers and basic arithmetic operators (+, -, /, *) with the onscreen keypad or with the keyboard, if using the In-Sight PC Host, to create a simple formula. Figure 4-3 shows an example of a simple arithmetic formula in the formula editor. Figure 4-3. Simple Arithmetic Formula in the Formula Editor 4. Once you have entered a formula, select OK to insert the formula into the spreadsheet. Lesson: Entering Formulas with Cell References This lesson shows how cell references are included in formulas. To enter a formula that includes cell references: 1. 2. 3. 4. Highlight an empty cell where you want to insert the formula. Open the formula editor. Select Absolute Cell Reference or Relative Cell Reference from the onscreen keypad. Highlight a cell containing a formula and select that cell to insert the cell reference into the formula. 5. Select a basic math operator from the onscreen keypad to insert it into the formula. 21 Getting Started with In-Sight 6. Repeat step 3, but select a different cell reference to insert in the formula. Figure 4-4. Formula with Cell Reference in Formula Editor 7. Select OK to insert the formula into the spreadsheet (see Figure 4-5). Figure 4-5. Cell Reference Formula in Spreadsheet 22 Chapter 4: Entering Formulas Lesson: Entering Simple Functions In-Sight includes many standard math, statistic, and trigonometric functions. This lesson describes the general procedure for entering these functions into a formula. To enter a simple function: 1. 2. 3. 4. 5. 6. 7. Highlight an empty cell where you want to insert the formula. Open the formula editor. Select the Mathematics function category. Select the Trigonometry subcategory and expand that function list. Select the function you want to insert into the Formula Bar. Select Absolute Cell Reference or Relative Cell Reference from the onscreen keypad. Highlight a cell containing data and select that cell to insert a cell reference into the formula (see Figure 4-6). Figure 4-6. Simple Function in Formula Editor 8. Select the button in the formula editor to complete the formula. 9. Select OK to enter the formula in the spreadsheet. 23 Getting Started with In-Sight Lesson: Editing Formulas After you’ve entered a formula into a spreadsheet cell, you can return to it and edit it as needed. To edit a formula string: 1. Highlight the cell containing the formula you want to edit, and open the formula editor. 2. Move to the Formula Bar on the top of the formula editor. A text cursor will show the editing position on the Formula Bar. 3. With the text cursor, you are able to move right and left within the formula string as well as backspace over existing alphanumeric characters and functions. 4. When you are finished editing the formula, select OK to return to the spreadsheet. 24 Chapter 5: Working With Blocks In this chapter, you will learn how to manipulate blocks of cells in a spreadsheet. What is a Block? A Block is a contiguous, rectangular group of cells in a spreadsheet. You can cut, copy, paste, clear, hide, insert, and remove blocks using functions in the Edit menu. Lesson: Marking a Block Before you can copy, cut, hide, or perform other operations on a block of cells, you need to mark the block. To mark a block of cells: Control Pad 1. Press and hold the button. 2. Press down ( DQGULJKW ( GLUHFWLRQEXWWRQV Keyboard Press |+v to mark cells in rows. Press |+x to mark cells in columns. Mouse 1. Right-click and hold on any highlighted cell. 2. Drag in any direction. 25 Getting Started with In-Sight Lesson: Editing Blocks This lesson describes each of the block-editing functions accessible from the Edit menu, as shown in Figure 5-1. NOTE: The procedures in this section can be applied to a single cell as well as to blocks of cells. Figure 5-1. Edit Menu Copy Copies a block of cells and stores its formulas in the system’s internal clipboard, leaving the original formulas in place in the spreadsheet. To copy a block of cells: 1. Mark the block you want to copy, as described in the previous lesson. 2. Select Copy from the Edit menu. Cut Cuts a block of cells and stores its formulas in the system’s internal clipboard, removing the formulas from the spreadsheet. To cut a block of cells: 1. Mark the block you want to cut, as described in the previous lesson. 2. Select Cut from the Edit menu. 26 Chapter 5: Working with Blocks Paste Pastes previously copied formulas contained in the system’s internal clipboard back to the spreadsheet. To paste a block of cells: 1. Highlight the upper-left cell of the block’s new location. 2. Select Paste from the Edit menu. Clear Clearing cells permanently deletes their contents. Cleared cells cannot be pasted back into the spreadsheet. To clear a block of cells: 1. Mark the block of cells you want to clear. 2. Select Clear from the Edit menu. Hide/Unhide Rows & Columns Hiding rows and columns in the spreadsheet removes them from view. Their data remains in the spreadsheet, however, and becomes visible again when you unhide them. NOTE: You cannot select rows and columns at the same time. To select columns of cells: Control Pad Press and hold button. • Press up ( GLUHFWLRQ button to mark current column. • Press right ( GLUHFWLRQ button to mark additional columns. Keyboard • Press |+c to mark Mouse • Press x to mark adjacent columns to the right. • Left-click on a column label at the top of the spreadsheet. • Right-click and hold while dragging right or left to mark additional columns. Keyboard Mouse current column. To select a rows of cells: Control Pad Press and hold button. • Press up ( GLUHFWLRQ button to mark current column. • Press right ( GLUHFWLRQ button to mark additional columns. • Press |+z to mark current column. • Press v to mark adjacent columns to the right. • Left-click on a row label to the left of the spreadsheet. • Right-click and hold while dragging up or down to mark additional rows. 27 Getting Started with In-Sight To hide rows or columns of cells: 1. Select the rows or columns you want to hide, as described above. 2. Select Hide Rows or Hide Cols from the Edit menu, as shown in Figure 5-2. Figure 5-2. Hiding Rows To unhide rows and columns: 1. Mark, as described above, the rows or columns that fall on both sides of the hidden rows or columns. 2. Select Unhide Rows or Unhide Cols from the Edit menu. NOTE: You can find hidden rows and columns by looking for gaps in the row and column label sequence. For example, if column A appears next to column D, then columns B and C are hidden. 28 Chapter 5: Working with Blocks Inserting and Removing Rows You can also insert rows into, or delete rows from, the spreadsheet. To insert rows: 1. Mark a block that includes the number of rows that you want to insert. The new rows will be inserted immediately above the block you mark. 2. Select Insert Rows from the Edit menu. To remove rows: 1. Mark a block that includes the rows you want to delete. 2. Select Remove Rows from the Edit menu. NOTE: In-Sight cannot insert or delete columns. 29 Chapter 6: Using Property Sheets In this chapter, you will learn how to use functions by configuring arguments in property sheets. What is a Property Sheet? A property sheet is a table that allows you to easily configure parameters for a particular In-Sight function. Whenever a function returns a structure (see next section) or has a large number of input parameters, the In-Sight user interface provides a property sheet to simplify the task of configuring the function. Figure 6-1 shows an example of a typical property sheet. Figure 6-1. Typical Property Sheet NOTE: This property sheet contains a Vision Processing function called ExtractHistogram, which is discussed in Chapter 10: Making Measurements. For now, ExtractHistogram provides a convenient example of a property sheet. When opened, the property sheet temporarily replaces the spreadsheet with a table that lists the default parameters and values. Each row of a property sheet consists of a parameter name and a value, or a group of expanded/collapsed parameters and values. Although values are usually numbers, references to cells in the spreadsheet, or text strings, they may also be represented by checkboxes or drop-down lists. 30 Chapter 6: Using Property Sheets What is a Structure? In-Sight functions that return structures differ from conventional spreadsheet functions. Instead of returning a single value or text string to a cell, most functions that return structures automatically insert an array of additional functions and values into adjacent cells. Figure 6-2 shows an example of a typical structure. Function Array of Functions/Values Structure Name Figure 6-2. Typical Structure NOTE: Structure functions cannot be combined in a single formula with conventional values and operators. When a structure function is inserted in a cell, it must be the only entity in that cell. The In-Sight formula editor enforces this restriction by activating and deactivating selections as necessary. Lesson: Opening A Property Sheet To see an example of a property sheet: 1. 2. 3. 4. 5. Highlight an empty cell in the spreadsheet and open the formula editor. Select the Vision Processing category. Select the Histogram subcategory Select ExtractHistogram. The ExtractHistogram property sheet will open. Select OK. A structure called Hist will appear in the spreadsheet. Lesson: Changing Parameter Values Property sheets are initially configured with the default parameter values for the selected function. You can edit these values as necessary to configure the property sheet for your application. To change the values in a property sheet: 1. Highlight the cell in the spreadsheet containing the Hist structure created in the last lesson, and open its property sheet. 2. Select the value you want to change. 31 Getting Started with In-Sight 3. Open the Enter menu (see Figure 6-3), which includes the following items: Number: Relative: Absolute: Formula: Graphics: Inserts a constant value into an edit box, check box, list box, or Interactive Graphic. Switches to Cell Selection mode for selecting a cell from the spreadsheet to use as a relative reference. Switches to Cell Selection mode for selecting a cell from the spreadsheet to use as an absolute reference. Activates the formula editor. Switches to Interactive Graphics mode for changing the size and position of the interactive graphic, if available. Figure 6-3. Options within the Enter Menu 4. Select a menu option (i.e., Number). 5. Change the value as needed. 6. Select OK to accept your changes, or select Cancel to leave the property sheet unchanged. Lesson: Using Interactive Graphics Some property sheet values are contained in an expandable parameter group. These parameter groups are common in structure functions that include a graphical representation, such as an image region. A region consists of a set of image coordinates that define a contiguous section of the image for processing. Since adjusting region coordinates one value at a time would be tedious, property 32 Chapter 6: Using Property Sheets sheets allow you to adjust most image-related parameter groups as a single Interactive Graphic. NOTE: For a comprehensive list of interactive graphic actions for each input device, refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM. To use an Interactive Graphic: 1. Highlight the cell in the spreadsheet containing the Hist structure, which was created earlier. 2. Open the ExtractHistogram property sheet. 3. Expand the Region group. Highlight the X parameter value and switch to Interactive Graphics mode (see Figure 6-4). Figure 6-4. Defining a Move Region 4. Accept or cancel changes that were made to the interactive graphic. This will return you to the ExtractHistogram property sheet. 5. Select OK to accept your changes, or select Cancel to leave the property sheet unchanged. 33 Getting Started with In-Sight Lesson: Inserting Cell References in Values Function parameters can include references to other cells in the spreadsheet. To insert a cell reference as a function parameter: 1. 2. 3. 4. TIP: Highlight a cell in the property sheet where you want to insert a cell reference. Open the Enter menu. Select Relative or Absolute to Cell Selection mode. Select the cell you want to refer to, then accept your selection. You can replace multiple function arguments with cell references by marking a block of cells in the spreadsheet while in Cell Selection mode. Lesson: Inserting Formulas in Values Spreadsheet formulas that compute a single value can also be used as parameter values in a property sheet. To use the formula editor to insert a formula: 1. Highlight a row in the property sheet where you want to insert a formula. 2. Open the Enter menu, and select Formula to open the formula editor, as shown in Figure 6-5. NOTE: You can also activate the formula editor by opening the Edit menu, then selecting Formula. This method is useful for overriding property sheet check boxes, list boxes, and other embedded controls. 34 Chapter 6: Using Property Sheets 3. Use the formula editor to insert your formula directly into the parameter value, as shown in Figure 6-5. Figure 6-5. Inserting Formulas in Values 4. Select OK to accept your changes, or select Cancel to leave the property sheet unchanged. 35 Part 2: Vision Processing In the previous chapters you learned how to navigate the In-Sight interface. In the following chapters, you will learn the basic techniques for configuring a vision application in the spreadsheet. 37 Chapter 7: Acquiring Images In this chapter, you’ll learn how to acquire images, set image acquisition parameters, and trigger processing. How Does the Spreadsheet Update? Cell dependencies drive spreadsheet updates. For example, in the formula A1 = B1 + C1, cell A1 is said to be dependent on cells B1 and C1. In this case, A1 automatically updates whenever B1 or C1 changes. In-Sight dedicates cell A0 to the AcquireImage function. When AcquireImage receives a trigger from any source, it takes a digital image from the camera and assigns it to cell A0. And because the results of a visual inspection are always dependent on the input image in A0, the spreadsheet updates, or runs, whenever the input image changes. Lesson: Acquiring From Manual Triggers Manually triggered image acquisition is useful during development and testing. In-Sight has two manual modes for acquiring images: Live and Single acquire. Live Mode Live video mode acquires and displays images in rapid succession while the spreadsheet overlay is temporarily disabled. This is useful when making camera adjustments. To initiate Live video mode: 1. Open the System menu. 2. Select Live to enter Live mode. 3. Press any button to exit live mode and return to the spreadsheet. NOTE: Any spreadsheet function that depends on the acquired image updates automatically when Live mode terminates. Single Acquire Mode To manually acquire one image at a time: Control Pad Press A button once to trigger single acquisition. Keyboard Press % to trigger single acquisition. Mouse Not available. NOTE: Disabling the Manual trigger checkbox in the AcquireImage Property sheet also disables the single acquisition trigger from the control pad. 38 Chapter 7: Acquiring Images Lesson: Acquiring from External Triggers For In-Sight to run a machine vision application automatically, the system must have automatically triggered image acquisitions. This trigger is typically supplied by an external signal. To select an acquisition trigger source: 1. Highlight cell A0 in the spreadsheet. 2. Open the AcquireImage property sheet. 3. Highlight the value for the Trigger parameter, and open the drop-down list of trigger sources (see Figure 7-1). Figure 7-1. Triggering Options within the AcquireImage Property Sheet Camera Continuous External Acquires an image upon receiving a pulse to the trigger input located directly on the camera. Acquires images as fast as the camera will allow. Acquires images on either a native-mode serial command or on the rising edge applied to a discrete input bit configured as an Acquisition Trigger (In-Sight 3000 only). Manual Acquires images when pressing the A button on the control pad (In-Sight 3000 only), or % on the keyboard (In-Sight PC Host only). NOTE: All external trigger sources are disabled when the system is Offline. To go Online, return to the spreadsheet, open the System menu, and check the Online option. 39 Getting Started with In-Sight Acquisition Parameters Other parameter values in the AcquireImage function also control important image acquisition parameters. These parameters include: Exposure Light Power Gain/Offset Image exposure time can be set in milliseconds. A smaller number reduces the blurring of an object in motion. A larger numbers allows more light on the imaging sensor. Light power parameters can be set to control the current on up to four independent LED light sources (In-Sight 3000 only). Analog gain and offset parameters can be set to adjust the voltage of the analog video signal before it is converted a digital signal. To adjust any of these parameters go to cell A0 and open the AcquireImage property sheet. Changes will take effect when you accept your changes. 40 Chapter 8: Finding Features In this chapter, you will learn several techniques for locating individual object features in the field of view. Why Do I Need to Find Features? An object can be represented by the location of its coordinates in the image: row, column, and theta (angle of rotation). But objects are also composed of a variety of individual features. For example, an object can include simple features such as holes, curved edges, and straight edges, or more complex features such as irregular shapes or grayscale patterns, as shown in Figure 8-1. Curved Edge Hole Straight Edge Irregular Shape Figure 8-1. Different Types of Features While In-Sight can find and report the position of an object in its entirety, you will generally want to identify and find the object’s most important features first; finding individual features is sometimes easier than finding the object itself. This approach not only allows you to extract data about individual features, but also enables you to efficiently combine those features to locate the object or to evaluate its quality relative to a known specification. 41 Getting Started with In-Sight This chapter discusses In-Sight’s primary tools for finding these types of features: • • • Connected regions (Blobs) Edges Patterns Subsequent chapters describe basic techniques for combining features to find objects, make measurements, and create decision points based on those measurements. Finding Connected Regions Many object features can be distinguished from their backgrounds according to how bright or dark they appear in the image. These bright or dark features, commonly known as “Blobs,” can be described by a set of statistical characteristics. In-Sight provides several functions for extracting and identifying Blob features in an image: ExtractBlobs FindBlobs SortBlobs Extracts Blobs from an image. Compares extracted Blobs to a reference Blob. Sorts extracted Blobs by coordinates. Lesson: Finding Connected Regions Using ExtractBlobs To insert an ExtractBlobs function into the spreadsheet: 1. In column A, select a cell in an empty row that also has an empty row immediately above. 2. Open the formula editor. 42 Chapter 8: Finding Features 3. Under Vision Processing, select ExtractBlobs from the Blob subcategory to open the ExtractBlobs property sheet (see Figure 8-2). Figure 8-2. ExtractBlobs Property Sheet 43 Getting Started with In-Sight 4. Expand the Region group. Highlight the X parameter value and switch to Interactive Graphics mode (see Figure 8-3). Figure 8-3. Defining a Region 5. Position the region so that it completely encloses the Blobs you want to locate, then accept your changes. 6. Complete the remainder of the property sheet. 7. Select OK to accept your changes. 44 Chapter 8: Finding Features The ExtractBlobs function inserts a Blobs structure in the spreadsheet (see Figure 8-4), along with the Vision Data Access function GetNFound: GetNFound Returns the number of Blobs found. Figure 8-4. ExtractBlobs Function Inserted in Spreadsheet NOTE: You can configure ExtractBlobs to return more detailed data about each of the Blobs it extracts by entering a value for Number to Sort in the property sheet. Lesson: Finding Connected Regions Using FindBlobs To insert a FindBlobs function into the spreadsheet: 1. In the spreadsheet, verify that a Blobs structure containing the ExtractBlobs function is present. 2. In column A, select a cell in an empty row that also has one empty row immediately above and below for each Blob you expect to report. For example, if you expect five Blobs, you would insert FindBlobs into a cell with one empty row immediately above and five empty rows immediately below. 3. Open the formula editor. 4. Under Vision Processing, select FindBlobs from the Blob subcategory to open the FindBlobs property sheet. 45 Getting Started with In-Sight 5. Highlight the Blobs parameter value, and switch to Cell Selection mode. Select the cell containing the Blobs structure (see Figure 8-5). Figure 8-5. FindBlobs Property Sheet NOTE: The cell you select in the spreadsheet will provide the source Blob data for the FindBlobs function. 6. Complete the property sheet by specifying the number of Blobs to find. 7. Select OK to accept your changes. 46 Chapter 8: Finding Features The FindBlobs function inserts a Blobs structure in the spreadsheet (see Figure 8-6), plus several Vision Data Access functions that return data describing each Blob found. The most significant of these functions are these: GetRow GetCol GetAngle GetScore Returns the row centroid (Row). Returns the column centroid (Col). Returns the Blob angle (Angle). Returns the magnitude of the match (Score). NOTE: Our objective in this lesson is simply to find Blob objects. We are not concerned about Blob Color, Area, Elongation, Perimeter, or Spread at this point. Figure 8-6. FindBlobs Function Inserted in Spreadsheet Lesson: Finding Connected Regions Using SortBlobs To insert a SortBlobs function into the spreadsheet: 1. In column A, select a cell in an empty row that also has one empty row immediately above and below for each Blob you expect to report. For example, if you expect five Blobs, you would insert FindBlobs into a cell with one empty row immediately above and five empty rows immediately below. 2. Open the formula editor. 3. Under Vision Processing, select SortBlobs from the Blob subcategory to open the SortBlobs property sheet. 4. Highlight the Blobs parameter value in row 0, and switch to Cell Selection mode. 47 Getting Started with In-Sight 5. Select the Blobs structure cell containing the ExtractBlobs function (see Figure 8-7). Figure 8-7. SortBlobs Property Sheet 6. Complete the remainder of the property sheet by specifying how many Blobs to report, and the sorting method. 7. Select OK accept your changes. 48 Chapter 8: Finding Features 8. The SortBlobs function inserts a Blobs structure in the spreadsheet (see Figure 8-8), plus several Vision Data Access functions that return data describing the sorted Blobs: GetRow Returns the row centroid (Row). GetCol Returns the column centroid (Col). GetAngle Returns the Blob angle (Angle). GetScore Returns the magnitude of the match (Score). Figure 8-8. SortBlobs Function Inserted in Spreadsheet Finding Edges Edges are places in the image where the brightness changes abruptly from dark-to-light or light-to-dark. Edges found by In-Sight are referred to as “line segments,” and can be straight or curved, or can form a complete circle. The In-Sight interface provides a variety of functions for locating straight and curved edges: FindLine Finds a single straight line segment. FindSegment Finds a pair of straight line segments. FindMultiLine Finds multiple straight line segments. FindCurve Finds an arc segment. FindCircle Finds a complete circular edge. 49 Getting Started with In-Sight Lesson: Finding Edges Using FindLine To insert a FindLine function into the spreadsheet: 1. In column A, select a cell in an empty row that also has an empty row immediately above. 2. Open the formula editor. 3. Under Vision Processing, select FindLine from the Edge subcategory to open the FindLine property sheet (see Figure 8-9). Figure 8-9. FindLine Property Sheet 4. Expand the Region group. Highlight the X parameter value and switch to Interactive Graphics mode. 50 Chapter 8: Finding Features 5. Position the region so that the Y axis is perpendicular to the edge to be located, then accept your changes. An example is shown in Figure 8-10. Figure 8-10. Defining a FindLine Region NOTE: The FindLine region box has two direction arrows, one initially pointing down and the other pointing right. The arrow pointing down is on the X axis, and the arrow pointing right is on the Y axis. Scanning for straight edges occurs in the direction indicated by the arrow on the region’s Y axis. 6. Adjust the remaining parameters as necessary. NOTE: When parameters in the FindLine property sheet refer to black-to-white or whiteto-black polarity, they are referring to brightness transitions occurring in the scan direction. 7. Select OK to accept your changes. 51 Getting Started with In-Sight The FindLine function inserts an Edges structure in the spreadsheet (see Figure 8-11), along with several Vision Data Access functions that return data about the edge segment found: GetRow GetCol GetScore Returns the starting and ending row coordinates (Row0 and Row1). Returns the starting and ending column coordinates (Col0 and Col1). Returns the magnitude of the edge peak (Score). NOTE: The reported score is positive when the FindLine region is oriented to scan from dark to bright features, and negative when scanning from bright to dark features. Figure 8-11. FindLine Function Inserted in Spreadsheet 52 Chapter 8: Finding Features Lesson: Finding Edges Using FindSegment The FindSegment function is similar to FindLine, but instead of finding and reporting a single straight edge, FindSegment locates a pair of edges and computes the distance between them. You configure the FindSegment function in the same way as the FindLine function. Figure 8-12 gives an example of the FindSegment property sheet. Figure 8-12. FindSegment Property Sheet 53 Getting Started with In-Sight The FindSegment function inserts an Edges structure in the spreadsheet (see Figure 8-13), along with two additional Vision Data Access functions: PairDistance Returns the distance between the two edge segments (Distance). GetScore Returns the average magnitude of the two edge peaks (Score). Figure 8-13. FindSegment Function Inserted in Spreadsheet Lesson: Finding Edges Using FindMultiLine The FindMultiLine function is also similar to FindLine, but instead locates multiple straight edges. Edges found by FindMultiLine can be sorted into edge pairs, and their statistics computed. The lessons that follow discuss functions you can use to pair edges and compute edge pair statistics. 54 Chapter 8: Finding Features You configure the FindMultiLine function in the same way as the FindLine function. Figure 8-14 gives an example of the FindMultiLine property sheet. Figure 8-14. FindMultiLine Property Sheet 55 Getting Started with In-Sight The FindMultiLine function inserts an Edges structure in the spreadsheet (see Figure 8-15), along with the Vision Data Access function GetNFound: GetNFound Returns the number of edges found. Figure 8-15. FindMultiLine Function Inserted in Spreadsheet NOTE: Unlike FindLine, FindMultiLine does not automatically place row and column coordinate access functions into the Edges structure for all straight edges found. If you need to access the coordinates of a specific edge or pair of edges, you can manually insert the GetRow and GetCol functions into the spreadsheet. Lesson: Finding Edges Using FindCurve To insert a FindCurve function into the spreadsheet: 1. In column A, select a cell in an empty row that also has an empty row immediately above. 2. Open the formula editor. 3. Under Vision Processing, select FindCurve from the Edge subcategory to open the FindCurve property sheet. 4. Expand the Region group. Highlight the X parameter value and switch to Interactive Graphics mode. 5. Cycle through the available Interactive Graphics modes, stopping on the Curved mode. 56 Chapter 8: Finding Features 6. Adjust the region so that its Y axis is concentric with the curved edge to be located (see Figure 8-16), and accept your changes. Figure 8-16. Defining a FindCurve Region NOTE: The FindCurve region box has two direction arrows, one initially pointing down and the other pointing right. The arrow pointing down is on the X axis, and the arrow pointing right is on the Y axis. Scanning for curved edges occurs in the direction indicated by the arrow on the region’s X axis. 7. Adjust the remaining parameter values as needed. NOTE: When parameters in the FindCurve property sheet refer to black-to-white or white-to-black polarity, they are referring to brightness transitions occurring in the scan direction. 8. Select OK to accept your changes. 57 Getting Started with In-Sight The FindCurve function inserts an Edges structure in the spreadsheet (see Figure 8-17), along with several Vision Data Access functions that return data about the curved edge that was found: GetRow Returns the center, starting, and ending row coordinates (CentRow, StartRow, and EndRow). GetCol Returns the center, starting, and ending column coordinates (CentCol, StartCol, and EndCol). GetRadius Returns the Radius. GetScore Returns the magnitude of the edge peak (Score). NOTE: The reported score is positive when the FindCurve region is oriented to scan from dark to bright features, and negative when scanning from bright to dark features. Figure 8-17. FindCurve Function Inserted in Spreadsheet 58 Chapter 8: Finding Features Lesson: Finding Edges Using FindCircle The FindCircle function is similar to FindCurve, but instead of finding and reporting an arc segment, it reports an edge along a complete 360-degree circle (see Figure 8-18). Figure 8-18. FindCircle Property Sheet 59 Getting Started with In-Sight You configure a FindCircle function in the same way as other edge finding functions, except that instead of defining a region with Curve and Angle, you define a Torus with an Inner Radius and Outer Radius (see Figure 8-19). Figure 8-19. Defining a FindCircle Region 60 Chapter 8: Finding Features The FindCircle function inserts an Edges structure in the spreadsheet (see Figure 8-20), along with several Vision Data Access functions that return data about the circular edge that was found: GetRow Returns the center row coordinate (CentRow). GetCol Returns the center column coordinate (CentCol). GetRadius Returns the radius (Radius). GetScore Returns the magnitude of the edge peak (Score). NOTE: Scanning for circular edges occurs from the center of the circle outward. When parameters in the FindCircle property sheet refer to black-to-white or white-toblack polarity, they are referring to brightness transitions occurring in the scan direction. Figure 8-20. FindCurve Function Inserted in Spreadsheet 61 Getting Started with In-Sight Finding Patterns In-Sight can locate objects and other image features in the field of view by “training” a model of a pattern, then searching subsequent images for matching patterns. The In-Sight FindPatterns function combines model training and pattern matching into a single function. Lesson: Finding Patterns Using FindPatterns To insert a FindPatterns function into the spreadsheet: 1. In column A, select a cell in an empty row that also has one empty row immediately above and below for each pattern you expect to report. For example, if you expect to find two patterns, you would insert FindPatterns into a cell with one empty row immediately above and two empty rows immediately below. 2. Open the formula editor. 3. Under Vision Processing, select FindPatterns from the PatFind subcategory to open the FindPatterns property sheet (see Figure 8-21). Figure 8-21. FindPatterns Property Sheet 4. Expand the Model Region group. Highlight the X parameter value and switch to Interactive Graphics mode. 62 Chapter 8: Finding Features 5. Position the region so that it completely encloses the model you intend to train, then accept your changes. An example is shown in Figure 8-22. Figure 8-22. Defining a Model Region 6. Expand the Find Region group. Highlight the X parameter value and switch to Interactive Graphics mode. 63 Getting Started with In-Sight 7. Position the region so that it completely encloses the section of the image containing the pattern to be located, then accept your changes. An example is shown in Figure 8-23. Figure 8-23. Defining a Find Region 8. Complete the remainder of the property sheet. NOTE: You can press the Run button to observe crosses positioned on pattern matches found in the image. 9. Select OK to accept your changes. 64 Chapter 8: Finding Features The FindPatterns function inserts a Patterns structure in the spreadsheet (see Figure 8-24), along with several Vision Data Access functions that return data about the pattern that was found: GetRow GetCol GetScale GetAngle GetScore Returns the row coordinate (Row). Returns the column coordinate (Col). Returns the pattern scale offset (Scale). Returns the pattern angle offset (Angle). Returns the magnitude of the match (Score). Figure 8-24. FindPatterns Function Inserted in Spreadsheet 65 Chapter 9: Using Features to Find Objects In this chapter, you’ll learn how to use the results of the features found in Chapter 8 to reliably find objects. Why Combine Features? When an object appears in the field of view, its position is never perfectly aligned in the expected location. In other words, there is always some degree of positional uncertainty. To compensate, you will sometimes need to create a fixture using one or more located features. You can then use this fixture to help track the object in the field of view, and to reliably position tools for subsequent inspections and measurements. You can create a fixture from any set of coordinates consisting of a row, column, and theta. However, individual features are often impractical sources for fixture coordinates. Consider the following: By the very nature of the edge algorithm, edge-finding routines such as FindLine can only work over a limited range of rotation. Not all Connected regions found by ExtractBlobs have well-defined orientations, and so most Blobs cannot by themselves return the data needed for a fixture. For example, you could not create a fixture from a hole, because it has no reliable orientation, and therefore it cannot provide the theta coordinate that is needed. The FindPatterns function has the fewest theoretical limitations, but can be limited by performance requirements. Searches for rotated or scaled patterns within large image regions demand significant computational resources, and require a geometrically stable grayscale pattern with a clearly recognizable orientation. Combining features helps overcome the limitations that all feature-locating functions have in their ability to report orientation. In-Sight’s flexible spreadsheet environment enables you to use any convenient combination of edge-, pattern-, and Blob-finding functions to establish the location and orientation of an object relative to a fixture. For convenience in combining the results of feature locating functions, In-Sight also supplies several standard geometry functions. The most important of these functions are the following: • • • PointToLine LineToLine PointToPointAngle The following lessons show how to use these functions, and the chapter’s final lesson shows how to create a fixture from combined feature results. 66 Chapter 9: Using Features to Find Objects Lesson: Using PointToLine As shown in Figure 9-1, the PointToLine function takes two inputs: a point, defined by (Row, Col), and a line segment, defined by (Row0,Col0,Row1,Col1) to create a structure called Dist (short for distance) that returns the coordinates, angle, and distance of a line segment that lies perpendicular to the input line segment, and passes through the input point. Input Line Segment Input Point Figure 9-1. PointToLine Function To insert a PointToLine function into the spreadsheet: 1. In column A, select a cell in an empty row that also has an empty row immediately above. 2. Open the formula editor. 67 Getting Started with In-Sight 3. Under Geometry, select PointToLine from the Measure subcategory to open the PointToLine property sheet (see Figure 9-2). Figure 9-2. PointToLine Property Sheet 4. Expand the Point parameter group. 5. Highlight the X parameter value, and switch to Cell Selection mode. 6. Select the spreadsheet cells that contain the row value and column value of the point you want, and accept your selection. 7. Expand the Line parameter group. 8. Highlight the X 0 parameter value, and switch to Cell Selection mode. 9. Select the spreadsheet cells that contains the row and column values for the starting and ending points of the line segment, and accept your selection. 10. Select OK to accept your changes. 68 Chapter 9: Using Features to Find Objects The PointToLine function automatically inserts a Dist structure in the spreadsheet (see Figure 9-3), along with several Vision Data Access functions that return data about the newly created line segment between the input point and the input line segment: GetRow Returns the starting and ending row coordinates (Row0 and Row1). GetCol Returns the starting and ending column coordinates (Column0 and Column1). GetAngle Returns the Angle between the input point and line segment. GetDistance Returns the Distance between the input point and the line segment. Figure 9-3. PointToLine Function Inserted in Spreadsheet 69 Getting Started with In-Sight Lesson: Using LineToLine The LineToLine function takes as its inputs a pair of line segments defined by (Row0, Col0, Row1, Col1). From these, it creates a Dist structure (see Figure 9-4). The starting and ending points of the Dist line segment are the points of intersection with the two input lines. Input Line Segment 0 Input Line Segment 1 Figure 9-4. LineToLine Function To insert a LineToLine function into the spreadsheet: 1. In column A, select a cell in an empty row that also has an empty row immediately above. 2. Open the formula editor. 70 Chapter 9: Using Features to Find Objects 3. Under Geometry, select LineToLine from the Measurements subcategory to open the LineToLine property sheet (see Figure 9-5). Figure 9-5. LineToLine Property Sheet 4. Expand the Line 0 parameter group. 5. Highlight the X 0 parameter value, and switch to Cell Selection mode. 6. Highlight the spreadsheet cells that contain the row and column values for the starting and ending points of the first line segment, and accept your selection. 7. Expand the Line 1 parameter group. 8. Highlight the X 1 parameter value, and switch to Cell Selection mode. 9. Select the spreadsheet cells that contain the row and column values for the starting and ending points of the first line segment, and accept your selection. 10. Select OK to accept your changes. 71 Getting Started with In-Sight The LineToLine function inserts a Dist structure in the spreadsheet (see Figure 9-6), along with several Vision Data Access functions that return data about newly created line segment: GetRow Returns the starting and ending row coordinates (Row0 and Row1). GetCol Returns the starting and ending column coordinates (Column0 and Column1). GetAngle Returns the Angle between the two input lines. GetDistance Returns the Distance between the two lines. NOTE: The GetDistance function returns a 0 if the two input lines intersect. If the lines are parallel, GetDistance returns a positive value and GetAngle returns a 0. Figure 9-6. LineToLine Function Inserted in Spreadsheet 72 Chapter 9: Using Features to Find Objects Lesson: Using PointToPointAngle One of the more common methods of combining results is to find two features of an object, then use the angle between them to define the object’s orientation. The PointToPointAngle function takes as its inputs two points defined by (Row0,Col0, Row1,Col1), and from these creates a Dist structure that returns the angle of a line segment that runs between the two input points (see Figure 9-7). Input Point 0 Input Point 1 Figure 9-7. PointToPointAngle Function To insert a PointToPointAngle function into the spreadsheet: 1. In column A, select a cell in an empty row that also has an empty row immediately above. 2. Open the formula editor. 73 Getting Started with In-Sight 3. Under Geometry, select PointToPointAngle from the Measurements subcategory to open the PointToPointAngle property sheet (see Figure 9-8). Figure 9-8. PointToPointAngle Property Sheet 4. Expand the Point 0 parameter group. 5. Highlight the X parameter value, and switch to Cell Selection mode. 6. Highlight the spreadsheet cells that contain the row value and an adjacent column value, and accept your selection. 7. Expand the Point 1 parameter group. 8. Highlight the X parameter value, and switch to Cell Selection mode. 9. Highlight the spreadsheet cells that contain the row value and an adjacent column value, and accept your selection. 10. Select OK in the formula editor, and then select OK again to accept your changes. 74 Chapter 9: Using Features to Find Objects The PointToPointAngle function inserts a single function into the spreadsheet (see Figure 9-9). PointToPointAngle Returns the angle between the two input points. NOTE: The GetAngle function simply returns the angle value to the spreadsheet. You may want to add a label for this value in an adjacent cell, as shown in Figure 9-9. Figure 9-9. PointToPointAngle Function Inserted in Spreadsheet Lesson: Creating a Fixture You can create a fixture (defined by row, column, and theta values) from the coordinate locations of one or more located features. Once you have defined a fixture, subsequent functions can refer to it to reliably position their regions within the field of view. Creating a Fixture The most common type of fixture uses the average row and column coordinates from two features, and the angle of rotation between them. To create a fixture: 1. Identify the coordinates in the spreadsheet for the two points you will use for the fixture, and (if necessary) determine the angle of rotation between those points using the GetAngle function. 2. Highlight an empty cell and open the formula editor. Enter a formula that calculates the average (mean) row value between the two points. 3. Select OK in the formula editor to accept your changes and return to the spreadsheet. 75 Getting Started with In-Sight 4. Highlight the empty cell adjacent to the row formula. Repeat step 2 to enter an average column value formula between the two points. 5. Select OK in the formula editor to accept your changes and return to the spreadsheet. 6. Highlight the cell adjacent to the column value formula and select Relative from the Enter menu to enter Cell Selection mode. 7. Select the cell that contains the PointToPointAngle formula between the two points. NOTE: It is generally a good idea to identify fixture coordinates in the spreadsheet by adding a text label to an adjacent empty cell. This makes the fixture coordinates easier to identify when referencing them from within other functions (see Figure 9-10). Figure 9-10. Fixture in the Spreadsheet 76 Chapter 9: Using Features to Find Objects Plotting the Fixture Once you have created a fixture, it is useful to plot its location on the image to make it easy to find. To plot a fixture: 1. Highlight an empty cell and open the formula editor. 2. Under Graphics, highlight PlotCross from the Image subcategory to open the PlotCross property sheet (see Figure 9-11). Figure 9-11. PlotCross Property Sheet 3. In the PlotCross property sheet, expand the Cross parameter group. 4. Highlight the Row value and enter the Cell Selection mode. 5. Highlight and select the cells containing the row, column, and angle coordinates of the fixture. 6. Configure the rest of the PlotCross property sheet. You can change the size and color of the cross, and assign a name. 7. Select OK to accept your changes and return to the spreadsheet. 77 Getting Started with In-Sight A cross then appears on top of the image at the fixture coordinate location (see Figure 9-12). Any function that refers to the fixture will position itself in the image relative to this location. Figure 9-12. PlotCross Function Inserted in Spreadsheet The following chapter includes an example of how to use a fixture by referencing it from within another function. 78 Chapter 10: Making Measurements This chapter will show you how to use In-Sight’s image measurement techniques. What is a Measurement? Machine vision inspections rely on measurements to yield decisions, where a measurement can be any useful data derived from the features located on an object. In the previous lesson, we laid the groundwork for making measurements by describing various techniques for locating objects in the field of view. Once you register an object in the image by its coordinates (row, column, and theta), then measurements can be made in specific regions that are fixtured relative to the native coordinate system of the object. NOTE: If the positional uncertainty of the features to measure is sufficiently small or if the intended inspection is very general, it may not be necessary to register measurements to an object coordinate system using a fixture. General measurement tasks might return a count of the number of objects in an image, the coordinates of a single object, or some grayscale statistic across the entire image. In each of these examples, creating a fixture is unnecessary. The In-Sight measurement capabilities are grouped into three categories: • • • Counting Pixels Counting Features Measuring Distance The following lessons discuss each category. Lesson: Counting Pixels The most common machine vision measurement is a count of the pixels within a region that fall above or below a specified grayscale threshold level. “Dark” pixels are below the threshold, and “bright” pixels are above the threshold. This simple counting technique is a member of the family of image measurements that derive from the grayscale Histogram. NOTE: Grayscale images contain up to 256 gray levels, where each pixel has a grayscale value between 0 and 255. The Histogram counts the number of pixels in a region for each gray level. To count the pixels in a region below a specified threshold level, simply sum the Histogram array from zero up to the threshold level. 79 Getting Started with In-Sight The In-Sight interface supplies a number of functions that allow you to count pixels and make other useful grayscale measurements. The most important of these functions are: ExtractHistogram HistThresh HistCount Extract a histogram array from an image region. Compute an adaptive threshold level. Sum a specified section of the histogram array. Using ExtractHistogram To insert the ExtractHistogram function into the spreadsheet: 1. Highlight an empty cell in column A. NOTE: The row you select plus one row above should be empty. 2. Open the formula editor. 3. Under Vision Processing, select ExtractHistogram from the Histogram subcategory to open the ExtractHistogram property sheet. 4. If you have a fixture that you want to use to position this histogram measurement, highlight the fixture parameter group and expand it. Highlight the row parameter value switch to Cell Selection mode. Select the cells containing the coordinates (row, column, and theta) that define the fixture. Accept your selection and return to the ExtractHistogram property sheet (see Figure 10-1). Figure 10-1. ExtractHistogram Property Sheet 80 Chapter 10: Making Measurements 5. Expand the Region group. Highlight the X parameter value and switch to Interactive Graphics mode. Position the region over the section of the image from which to extract the histogram (see Figure 10-2). Accept your changes to return to the ExtractHistogram property sheet. Figure 10-2. Defining an ExtractHistogram Region 6. Select OK in the property sheet to accept your changes. 81 Getting Started with In-Sight The ExtractHistogram function is now positioned relative to the fixture point. As the object’s location and orientation vary, the fixture tracks the object, and the ExtractHistogram function operates within the intended region, as shown in Figure 10-3. Figure 10-3. ExtractHistogram Function Inserted in Spreadsheet The ExtractHistogram function inserts a Hist structure in the spreadsheet. It also inserts several related functions that return data from the histogram. These include: HistThresh HistContrast HistCount HistMean The binary threshold (Thresh). “Bright” values are above the grayscale threshold; “dark” values are below the grayscale threshold. The average grayscale of the bright pixels minus the average grayscale of the dark pixels (Contrast). The count of pixels above and below the threshold (BrightCount and DarkCount, respectively). The Average grayscale value of all pixels in the histogram. NOTE: It is useful to examine the functions created by ExtractHist to help you better understand the use of histogram related functions. 82 Chapter 10: Making Measurements Using HistThresh As previously described, the ExtractHistogram function automatically inserts the HistThresh function into the spreadsheet. HistThresh sets a reference to the cell containing the Hist structure and the range to compute the threshold. The maximum range is 0 to 255. To change the threshold range: 1. Highlight an empty cell and open the formula editor. 2. Under Vision Processing, select HistThresh from the Histogram subcategory to open the HistThresh property sheet. 3. Use the formula editor to insert a cell reference to an existing Hist structure and set the last two arguments to 0 and 255, respectively. 4. Select OK. The spreadsheet will now contain a HistThresh function that returns a threshold level. NOTE: The threshold level returned by HistThresh is computed by finding the threshold level that produces the best match between the original grayscale image and a hypothetical binary image. This technique works quite well over a range of image conditions but is not suited for every application. Using HistCount This function takes as its input a reference to a cell containing an ExtractHistogram function and a range over which to count. To insert HistCount into the spreadsheet: 1. Highlight an empty cell and open the formula editor. 2. Under Vision Processing, select HistCount from the Histogram subcategory to open the HistThresh property sheet. 3. Use the formula editor to insert a cell reference to an existing histogram structure and set the last two arguments to specify the range. NOTE: The range to count is commonly set from zero to the threshold level or from the threshold level to 255. 4. Select OK. The spreadsheet will now contain a HistCount function returning a count of the number of pixels in the histogram array whose grayscale values fall between the specified level. 83 Getting Started with In-Sight Lesson: Counting Features Another common machine vision measurement is a count of features found in a specific region of the image. As described in Chapter 8: Finding Features, In-Sight finds features using the Blob, Edge, and Pattern functions. An additional function, GetNFound, returns the feature count. NOTE: For counting purposes, these functions are typically registered to the object being inspected using a fixture. This decreases the processing time necessary to find the features, and prevents potential confusion with unwanted features. TIP: When counting Edges and Patterns, be aware that the N2Find parameter in the property sheets of the FindMultiLine and FindPatterns functions determines the maximum number of features that can be reported. To count Blob, Edge, or Pattern features: 1. Highlight an empty cell and open the formula editor. 2. Highlight and expand the Edges, Blobs, or Patterns function subcategory under Vision Data Access. 3. Select the GetNFound function in the selected function subcategory. The formula editor will open again. Highlight the Absolute Cell Reference button and Cell Selection mode. 4. Select the cell that refers to the source Edges, Blobs, or Patterns structure. 5. Select OK to return to the spreadsheet. The GetNFound function will insert itself into the spreadsheet and return the number found for the selected feature. Lesson: Measuring Distances Relationships between image features can be an important measurement. Functions under the Geometry heading and Measure subcategory are useful for computing feature-to-feature angles and distances, including: PointToPoint PointToLine LineToLine PointToPointAngle PointToPointDistance The distance and angle established by two given points. The distance and angle of a line segment that lies perpendicular to a given line segment and intersects a given point. The point of intersection and the angle between two line segments. The angle established by two given points. The distance between two points. Refer to Combining Results from the previous lesson for more information. 84 Chapter 10: Making Measurements Using PairEdges Edge pairs consist of two parallel edges that typically define the boundaries of an object feature. In an array of multiple edges, it is also possible to have multiple edge pairs. For example, an Edges structure containing six edges can have up to three edge pairs: (0,1), (2,3), and (4,5). The PairEdges function inputs an array of edges and sorts them into pairs according to distance, polarity, and other characteristics. To identify edge pairs: 1. Highlight an empty cell and open the formula editor. 2. Under Vision Processing, select FindMultiLine from the Edges subcategory. Verify that at least two edge features are found. The example in Figure 10-4 shows four edges being located. NOTE: For this lesson, configure FindMultiLine so its region intersects some repeating pattern of edges. Make sure you set the N2Find parameter large enough to cover the maximum number of edges expected. Figure 10-4. FindMultiLine Function 3. Highlight an empty cell below the Edges structure created in step 1. Open the formula editor. NOTE: The row you select plus one row above should be empty. 85 Getting Started with In-Sight 4. Under Vision Processing, select PairEdges from the Edges subcategory and open the PairEdges property sheet (see Figure 10-5). Figure 10-5. PairEdges Property Sheet 5. Highlight the Edges parameter value and enter Cell Selection mode in the spreadsheet. Select the cell containing the FindMultiLine function and return to the PairEdges property sheet. 6. Specify one or more of the following parameters in the PairEdges property sheet: • The Number of Pairs to find • The polarity of the First and Second edges of each pair • The Min and Max distance between the two edges of each pair • The minimum and maximum number of Intermediate Edges that come between the two edges of each pair 7. Select OK to return to the spreadsheet. 86 Chapter 10: Making Measurements The spreadsheet will now contain the PairEdges function (see Figure 10-6), plus several functions that report statistics about the edge pairs found: NumPairs The number of edge pairs found (GetNFound). MinDist The shortest distance between the two edges in a pair (PairMinDistance). MaxDist The farthest distance between the two edges in a pair (PairMaxDistance). MeanDist The average distance between the two edges in a pair (PairMeanDist). SDevDist The standard deviation of the distance between two edges in a pair (PairSDevDistance). Figure 10-6. PairEdges Function Inserted in Spreadsheet 87 Chapter 11: Creating Decision Points In this chapter, you will learn several basic techniques for converting measurements into decisions. What is a Decision Point? The ultimate goal of any visual inspection is to make some type of decision about the object that is inspected: Are the object’s dimensions within tolerance? Does the object appear in the expected location? Is the object missing a feature? These are the types of inspection decisions that In-Sight can make. But first, it is necessary to convert measurements, such as those discussed in the previous chapter, into decision points. Decision points segment measurements into specific categories. A decision point can be any unambiguous inspection result, such as: • • • • • Yes/No Good/Bad Pass/Fail 1/0 Present/Absent A decision point might also take the form of a number containing an encoded inspection result for the purposes of classification, such as: • • • Defect type Part ID Quality level Converting Measurements into Decision Points Creating measurement-based decisions can be a simple or complex task. At the simplest level, making a decision from a measurement can be based on a simple threshold score that determines the pass or fail status of an object inspection. Alternatively, a more complex decision point can be based on a logical expression involving multiple measurements designed to select one of several possible quality levels. The In-Sight interface provides enormous flexibility to create virtually any type of decision point using standard spreadsheet operators and expressions. The following includes a description of some of those operators. 88 Chapter 11: Creating Decision Points Comparison Under the Mathematics heading, the Operators category contains a complete selection of comparison operators, including: > < = >= <= Greater than Less than Equal to Greater than or equal to Less than or equal to Logical Under the Mathematics heading, the Logic category contains a selection of logical operators, including: And Or Not Logically ANDs multiple input arguments Logically ORs multiple input arguments Logical inverse of the input argument Conditionals Under the Mathematics heading, the Lookup category contains a selection of logic and error handling functions that include: If Choose CountErr Returns one of two input arguments Returns one on N input arguments Counts #ERRs over a range of cells Decision Point Formula Examples The following examples assume that cell A1 contains a measurement. It could be a pixel count, a distance between two points, a blob feature, or some other type of measurement. Also, the examples assume that cells B1 and C1 contain the decision limits and that cell D1 will store the decision. D1 = A1>B1 In this example, we simply compare the contents of the cell A1 to the contents of the cell B1. If the value of A1 is greater than the value of B1 the function returns the value 1; otherwise it returns 0. D1 = And(A1>B1,A1<C1) In this example we use the And function to compare A1 to a range of values that is bounded by the contents of the cells B1 and C1. If the value of A1 is greater than the value of B1, and less than the value of C1, the function returns the value 1; otherwise, the function returns 0. D1 = If(And(A1>B1,A1<C1),”PASS”,”FAIL”) 89 Getting Started with In-Sight In this example, the text strings PASS and FAIL are substituted for the values 0 and 1 of the previous example. If the value of A1 is greater than the value of B1 and less than the value of C1, the function returns the string PASS; otherwise, the function returns FAIL. D1 = If(A1<B1,”FAIL”,If(A1<C1,”WARNING”,”PASS”)) This example demonstrates how to nest the If function to determine more than two categories. If A1 is less than B1, it returns FAIL; however, if A1 is less than C1, it returns WARNING, and if A1 is greater than or equal to C1 it returns PASS. D1 = Choose((A1>=B1)+(A1>=C1),”FAIL”,”WARNING”,”PASS”)) This example uses the Choose function to achieve the same result as in the previous example. If A1 is less than both B1 and C1, the first argument evaluates to 0 and FAIL is the output. If A1 is greater than B1 but less than C1, the first argument evaluates to 1 and WARNING is the output. If A1 is greater than or equal to both B1 and C1, the first argument evaluates to 2, and PASS is the output. D1 = IF(CountErr(A1),0,A1>B1) This example compares the contents of the cell A1 to the contents of cell B1. If the value of A1 is greater than the value of B1, and A1 is not #ERR, then the function returns 1; otherwise it returns 0. NOTE: This is an important example because it shows how to filter errors from the output. Normally, a function that inputs #ERR also outputs #ERR. The CountErr function blocks the propagation of #ERR throughout the spreadsheet by returning a count of all #ERRs within its input range. 90 Chapter 12: Communicating Results This chapter shows you how to configure In-Sight’s discrete and serial outputs to communicate inspection results to external devices. NOTE: The number of accessible outputs varies between the In-Sight 1000 and In-Sight 3000: System Output Channels In-Sight 1000 2 built-in on the camera In-Sight 3000 2 built-in on the processor 8 additional using optional I/O Expansion Module Using Discrete Output One of the easiest ways to communicate inspection results is to write discrete outputs. You can use the spreadsheet to assign the results of decisions, such as those discussed in the previous lesson, to individual points of discrete output. 91 Getting Started with In-Sight Lesson: Configuring Discrete Output Options The In-Sight interface provides a dialog with several controls to configure discrete output (see Figure 12-1). Figure 12-1. Discrete Output Dialog To configure discrete output options: 1. From anywhere in the spreadsheet, open the System menu. 2. Select the Settings menu. 3. Select Discrete Output to open the Discrete Output dialog. NOTE: The default Type for all discrete output bits is Programmed. You can choose a different output configuration for a bit from the Type list box; however, if you configure a discrete output bit to another Type, that bit can no longer be controlled from the spreadsheet using the WriteDiscrete function. 92 Chapter 12: Communicating Results 4. Select Details to open the Output Details dialog. This dialog contains three controls (see Figure 12-2): Pulse Length (ms) Delay Count Enable for pulsed output (Delay Count must be 0); disable for steady state. Duration of pulse. The number of acquisition or tracking pulses to delay the output. Figure 12-2. Output Details Dialog Discrete Output port settings are system-wide and are automatically saved when you press OK. Lesson: Writing Discrete Outputs Use the WriteDiscrete function to connect individual cell values to the output lines. To write discrete output data from the spreadsheet: 1. Highlight an empty cell and open the formula editor. 93 Getting Started with In-Sight 2. Under Input/Output, select WriteDiscrete from the Discrete subcategory to open the WriteDiscrete property sheet (see Figure 12-3). Figure 12-3. WriteDiscrete Property Sheet 3. Select the Start bit parameter and enter the value of the discrete output bit to use. 4. Select the Number of bits parameter enter the number of bits that will receive data. 5. Select the parameter value and enter Cell Selection mode. Highlight the cell containing a decision result integer to write to the selected bit(s). 6. Select OK to return to the spreadsheet. NOTE: Discrete output bits will not change their state unless Online is checked in the System menu. 94 Chapter 12: Communicating Results Using Serial Output Lesson: Configuring Serial Output Options The In-Sight interface provides a dialog with several additional controls to configure the serial output. To configure serial output options: 1. From anywhere in the spreadsheet, open the System menu. 2. Select Settings to open the Settings menu. 3. Select Serial Port 1 to open the Serial Port 1 dialog (see Figure 12-4). Figure 12-4. Serial Port 1 Dialog 4. Select the Mode list box and select Text. Configure the protocol in the Serial Port 1 dialog as required. 5. Select OK to accept your changes. NOTE: The In-Sight serial interface supports four modes of communication between the In-Sight processor and a remote device: 95 Getting Started with In-Sight Text Standard ASCII protocol for sending/receiving text strings. To define the input and output terminator characters, press the Details button to open the Text Mode Details dialog. Native Custom ASCII protocol for controlling In-Sight from any remote serial device. To define the input and output terminator characters, press the Details button to open the Native Mode Details dialog. DeviceNet Protocol for communicating with Allen-Bradley PLC (requires an optional, DeviceNet Interface Module from Cognex). To define the input and output data packets sizes, press the Details button to open the DeviceNet Details dialog. Motoman Protocol for communicating with Motoman MRC, MRC-II, and XRC robot controllers operating in DCI mode. Unused Closes the serial port so that no commands or data can be received/sent. Lesson: Writing Serial Outputs Another way to communicate inspection results is to write them directly to a serial port. You can use Stringf, under the Text function category, to convert a value, or a set of values, into text messages that are written to the serial port. Note 96 Refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM for more detailed information on the commands and functions available for serial mode. Chapter 12: Communicating Results The WriteSerial function transmits text strings. To write serial output data from the spreadsheet: 1. Highlight an empty cell and open the formula editor. 2. Under Input/Output, select WriteSerial from the Serial subcategory to open the WriteSerial property sheet (see Figure 12-5). Figure 12-5. WriteSerial Property Sheet 3. Use the property sheet to set the port number and to set a reference to the spreadsheet cell that contains the text string to be transmitted. 4. Select OK to accept your changes. NOTE: Serial transmission initiated by WriteSerial is suppressed when the system is offline. 97 Chapter 13: Making a Run-time Interface This chapter will show you how to construct a run-time user interface. What is a Custom View? The In-Sight spreadsheet is an excellent environment for configuring applications. You may wish, however, to present a more limited, application-specific interface to the operator on the production floor. Within In-Sight, this tailor-made interface is called the Custom View. The Custom View is essentially a dialog with user-definable features. While in the Custom View mode, access is restricted to the data displays and controls that you include in the view. Custom views can be password-protected to prevent unauthorized changes. Figure 13-1 shows an example Custom View for a simple application. Figure 13-1. Custom View 98 Chapter 13: Making a Run-time Interface The steps to creating a Custom View include: • • • Selecting the Graphics functions to include in the view and inserting them into a contiguous range of spreadsheet cells. Selecting the range of cells containing the Graphics functions and configuring the Custom View options. Setting the access level to use for this Custom View and defining passwords. The following lessons define these steps in more detail. Lesson: Understanding Graphics Functions The first step to creating a Custom View is to select the data displays and graphic controls to include in the view. You include Graphics functions in the Custom View to simplify the run-time user interface and to limit the display of data to only the most important information. Graphics functions for Custom View fall into two categories: Controls Displays Interactive graphics for adjusting job parameters and settings Graphics for displaying key status information NOTE: The Graphics function category includes an additional function subcategory called Image. These functions overlay points, lines, crosses, and text on top of the image, but they are independent of the Custom View mode. Graphical Controls Graphical controls allow operators to adjust application parameters without entering spreadsheet View. Control functions include: Button CheckBox Dialog EditFloat EditInt EditRegion EditString Link ListBox MessageBox Select Wizard A labeled push button control. A labeled check box control. A labeled dialog box control. An edit box control for entering floating-point values. An edit box control for entering integer values. An interactive region control button. An edit box control for entering text strings. A labeled link control. A drop-down list control. A "pop-up" message box containing a user-defined text string. Executes the Graphics Controls function contained in a spreadsheet cell, chosen from a variable list of indexed cell references. A Wizard control. 99 Getting Started with In-Sight To insert a control into the spreadsheet: 1. Highlight an empty cell and open the formula editor. 2. Under Graphics, select the desired function from the Controls subcategory to open the property sheet for the selected control. 3. Configure the control as necessary, and select OK to insert the control into the spreadsheet (see Figure 13-2). Figure 13-2. Graphics Control Functions NOTE: In spreadsheet mode, you can “link” controls to generate events or to change the behavior or properties of other functions. For example, you can create a button that will reset the values accumulated in other cells by having those cells reference the button. When the button is pressed it returns a ‘1’; any cells with formulas that depend on the state of the button will be affected. For a comprehensive review of controls, refer to the In-Sight Guide and Reference located on the CD-ROM. Graphical Displays You will want to show only the most useful information in Custom View. For instance, if your application finds a blob and you would like the custom view to display one of the blob’s row and column coordinates, simply include the cells containing the GetRow and GetCol function in the cells of the Custom View region. In addition to the standard formulas, you can use special display functions to format data for visual verification. These Graphics functions are contained in the Displays subcategory and include the following functions (see Figure 13-3): 100 Chapter 13: Making a Run-time Interface Chart A strip chart that can be inserted into the spreadsheet to graphically display the value of a cell over multiple events. ColorLabel A text cell with programmable foreground and background colors. MultiStatus Displays up to 16 status lights within a single cell, indicating bit values. Status A status light that displays in red, yellow, or green depending on the current value. Figure 13-3. Graphics Display Functions 101 Getting Started with In-Sight Lesson: Defining a Custom View Making a Custom View dialog is a matter of creating an interface in an unused region of the spreadsheet and then defining that region to be the Custom View. To configure the Custom View: 1. Choose an empty area of the spreadsheet to contain the displays and controls that will appear in the Custom View. Insert the desired Displays and Controls functions into this area of the spreadsheet, as described in the previous lesson (see Figure 13-4). Figure 13-4. Configuring a Custom View in the Spreadsheet 2. Open the Edit menu. 102 Chapter 13: Making a Run-time Interface 3. Select Custom View to open the Custom View dialog (see Figure 13-5). Figure 13-5. Custom View Dialog 4. Configure the Custom View dialog using one or more of the following selections: Position & Size Enters Interactive Graphics mode for repositioning and resizing the Custom View overlay. NOTE: The size of the Custom View overlay is limited to the total size of the cell range chosen using Select Cells. Select Cells Enters Cell Selection mode to select the cells to include in the Custom View. Center Centers the Custom View overlay. This overrides the location set by Position & Size. Size To Fit Sizes the Custom View overlay for the cell range chosen using Select Cells. Image Enables/disables the Image display, the image Graphics, and the spreadsheet Overlay. Graphics Enables/disables the display overlay graphics (generated by functions in the spreadsheet) on top of the image. Overlay Enables/disables the display of the Custom View overlay if When this checkbox is enabled, the enabled display elements will refresh only when the cell referenced by Absolute contains a non-zero value. When the value in the cell referenced by Absolute is zero, then the Image, 103 Getting Started with In-Sight Graphics, and Custom View Overlay in the display will not be refreshed, even if their respective checkboxes are turned ON. Absolute Creates the cell reference that controls the conditional screen refresh enabled by if. The cell reference specified by Absolute is enabled only when if is checked. 5. Select OK to accept your changes. To test your Custom View configuration, check Custom View mode in the Custom View dialog and select OK. An example of Custom View is shown in Figure 13-6. Figure 13-6. Custom View of the Spreadsheet 104 Chapter 14: Configuring for Startup This chapter shows you how to configure your system to start a job automatically on power-up. Lesson: Selecting the Startup Job Once you’ve configured the job for your application, you may want to install it as the default job to load on power-up. To load a job automatically on power-up: 1. Open the System menu. 2. Open the Settings menu, and select Startup to open the Startup dialog (see Figure 14-1). Figure 14-1. Startup Dialog 3. Select the job that you want to load automatically on power-up. 4. You can also configure the Online/Offline mode from the Startup dialog. Note When Online is selected, the selected job starts in the Online mode instead of the default Offline mode. When the system is Offline, the spreadsheet program will not respond to any external events, including discrete and serial inputs. 5. Select OK to accept your changes. In-Sight automatically saves all changes to the startup configuration. The next time you power up the In-Sight processor or open the In-Sight PC Host, the selected job will automatically be loaded. 105 Appendix A: The Profiler The Profiler dialog displays execution times and dependencies for all of the cells in the current job spreadsheet that contain formulas and data (and excluding cells containing only text). This information is most useful while trying to improve spreadsheet performance, because the functions that take the most time to execute can be easily identified for possible optimization. The Profiler dialog is also helpful when trying to identify the formulas and functions that are causing errors in a spreadsheet. NOTE: Execution times for identical jobs on an In-Sight 1000, In-Sight 3000, and In-Sight PC Host will vary according to the processing capabilities of the respective systems. NOTE: The Profiler dialog is not accessible in Online mode, or when the current user is logged in with a Protected or Locked level of Access. To open the Profiler: 1. Open the System menu. 2. Select Profiler to open the Profiler dialog (see Figure A-1). Figure A-1. In-Sight Profiler Note 106 Refer to the In-Sight Guide & Reference contained on your In-Sight CD-ROM for more detailed information on the In-Sight Profiler. Appendix B: Remote Job Selection In some applications, it is necessary to select a new job by remote control. In-Sight makes this possible by allowing you to configure discrete input and output lines for the purpose of job selection (In-Sight 3000 sensors only). Note You must have physical I/O connections to the In-Sight 3000 processor as described in Installing the In-Sight 3000 before following the procedures described below. Lesson: Initiating a Job Load To configure the discrete input port to support job selection: 1. Open the System menu. 2. Select Settings to open the Settings menu. 3. Select Discrete Input to open the Discrete Input dialog (see Figure B-1). Figure B-1. Discrete Input Dialog 4. Identify an input Line to configure. Lines 0 through 7 designate the inputs on the I/O Expansion Module (Cognex P/N CIO-2350-00), and lines 8 and 9 designate the built-in inputs on the In-Sight 3000 processor. 5. Select Job Load Switch from the Type list box. 6. Identify one or more unused bits to serve as the job identification number. Select Job ID Number from the Type list box. 107 Getting Started with In-Sight Note In order to use the Job ID Number feature, the job to be loaded must be saved with a numerical prefix (0-511). The Job ID Number is constructed by combining the job ID number bits in order from least significant to most significant. For example: two job ID number bits will allow you to select a job with a numeric prefix of 0 to 3; three job ID number bits allow job selection with a numeric prefix of 0 to 7; and four job ID number bits allow job selection with a numeric prefix of 0 to 15. 7. Select OK to accept your selection. The system is now configured to load the job given by the job ID number bits whenever the bit associated with the job load switch is pulsed. Lesson: Responding to a Job Load To configure the discrete output port to respond to a job load: 1. Open the System menu. 2. Select Settings to open the Settings menu. 3. Select Discrete Output to open the Discrete Output dialog (see Figure C-2). Figure C-2. Discrete Output Dialog 4. Identify an unused output Line to configure. 5. Select Job Load OK for Type. 108 Appendix B: Remote Job Selection 6. Select Details for the selected output line and open the Discrete Output Details dialog to change the length of the pulse, if needed (see Figure C-3). Figure C-3. Discrete Output Details Dialog 7. Select OK to accept your selection and close the Details dialog. 8. Select OK again to accept your selection. The system is now configured to signal that the job has been successfully loaded. 109 Appendix C: Sample Images The images printed below are included to assist you in following along with the lessons in this book. To use these images, setup the camera as described in Chapter 1: Acquiring a Working Image. If you are using a 16-mm lens, the lens should be positioned approximately 10- to 11-inches (250- to 275-millimeters) above the page. Note These images are included on the CD-ROM that ships with each In-Sight system (Image1A.bmp, Image1B.bmp, Image1C.bmp, Image2A.bmp, and Image2B.bmp). Figure C-1. Image1A.bmp 110 Appendix C: Sample Images Figure C-2. Image1B.bmp Figure C-3. Image1C.bmp 111 Getting Started with In-Sight Figure C-4. Image2A.bmp Figure C-5. Image2B.bmp 112 Index Index A Absolute Cell Reference............................................................................................................. 17 Acquiring an Image....................................................................................................................... 2 Acquiring Images ........................................................................................................................ 38 Acquisition Parameters............................................................................................................... 40 B Blocks ......................................................................................................................................... 25 C CE Compliance Statement ...........................................................................................................iv Cell References .......................................................................................................................... 17 Absolute .................................................................................................................................. 17 Relative ................................................................................................................................... 17 Cell Section Mode....................................................................................................................... 20 Clear ........................................................................................................................................... 27 Combining Features ................................................................................................................... 66 Communicating Results.............................................................................................................. 91 Connected Regions .................................................................................................................... 42 Context Sensitive Help ............................................................................................................... 19 Control Pad................................................................................................................................. 10 Action Buttons ......................................................................................................................... 11 Direction Buttons..................................................................................................................... 10 Shortcut Buttons...................................................................................................................... 11 Converting Measurements into Decision Points......................................................................... 88 Copy ........................................................................................................................................... 26 Creating Decision Points ............................................................................................................ 88 Custom View............................................................................................................................... 98 Cut .............................................................................................................................................. 26 D Decision Point Formula Examples.............................................................................................. 89 Decision Points ........................................................................................................................... 88 Dialogs Save & Load............................................................................................................................ 15 Save Job ................................................................................................................................. 16 Discrete Output........................................................................................................................... 91 113 Getting Started with In-Sight E Edges.......................................................................................................................................... 49 Editing Blocks ............................................................................................................................. 26 Clear........................................................................................................................................ 27 Copy........................................................................................................................................ 26 Cut........................................................................................................................................... 26 Paste ....................................................................................................................................... 27 Editing Formulas......................................................................................................................... 24 Entering Formulas ...................................................................................................................... 17 F Features...................................................................................................................................... 41 Finding Edges............................................................................................................................. 49 Finding Features......................................................................................................................... 41 Finding Patterns ......................................................................................................................... 62 Formula....................................................................................................................................... 17 Formula Bar ................................................................................................................................ 18 Formula Editor ............................................................................................................................ 18 Function List ............................................................................................................................... 19 G Graphical Controls...................................................................................................................... 99 Graphical Displays.................................................................................................................... 100 H Hide/Unhide Rows & Columns ................................................................................................... 27 I Inserting and Removing Rows ................................................................................................... 29 Interactive Graphics.................................................................................................................... 13 J Job .............................................................................................................................................. 15 Job Load ................................................................................................................................... 107 Initiating................................................................................................................................. 107 Responding........................................................................................................................... 108 K Keyboard .................................................................................................................................... 12 L Live Mode ................................................................................................................................... 38 Loading a Job ............................................................................................................................. 16 114 Index M Marking a Block .......................................................................................................................... 25 Measurements ............................................................................................................................ 79 Mouse ......................................................................................................................................... 13 Moving Around the Interface ........................................................................................................ 6 N Navigating..................................................................................................................................... 6 Navigating Menus ......................................................................................................................... 8 Navigation Control Pad ............................................................................................................................. 10 Keyboard................................................................................................................................. 12 Mouse ..................................................................................................................................... 13 O Onscreen Keypad ....................................................................................................................... 19 P Paste........................................................................................................................................... 27 Patterns ...................................................................................................................................... 62 Property Sheets .......................................................................................................................... 30 R Relative Cell Reference.............................................................................................................. 17 Remote Job Selection .............................................................................................................. 107 Run-time Interface ...................................................................................................................... 98 S Sample Images......................................................................................................................... 110 Saving & Loading Jobs............................................................................................................... 15 Saving a Job ............................................................................................................................... 15 Serial Output............................................................................................................................... 95 Single Acquire Mode .................................................................................................................. 38 Spreadsheet ................................................................................................................................. 6 Spreadsheet Update................................................................................................................... 38 Starting In-Sight ............................................................................................................................ 2 Startup Configuration................................................................................................................ 105 Startup Job ............................................................................................................................... 105 Structure ..................................................................................................................................... 31 T The Profiler ............................................................................................................................... 106 U Using Features to Find Objects .................................................................................................. 66 115 www.cognex.com/insight/ P/N 590-6368 March 2001