Download HexSight 5.0 Quick Start Guide - Downloads
Transcript
HexSight™ Quick Start Guide Copyright Copyright (c) 1998-2015 by LMI Technologies Disclaimer LMI Technologies shall not be responsible for any errors that may appear in this document and shall not be liable for any damages arising out of or related to this document or the information contained in it, even if LMI Technologies has been advised of the possibility of such damages. Trademark Information HexSight is a trademark of LMI Technologies The following are trademarks or registered trademarks of the associated company: .NET, ActiveX, COM, C++, C#, DirectShow, DirectX, MFC, Notepad, Visual Basic, Visual C++, Visual Studio, Windows, Windows XP, Windows Vista, HTML Help: Microsoft Corporation Acrobat Reader, PDF: Adobe Systems Incorporated DCAM, IIDC: 1394 Trade Association, Institute of Electrical and Electronics Engineers FireWire: Apple Computer, Inc. GenICam: European Machine Vision Association GigE Vision: Automated Imaging Association GretagMacbeth, ColorChecker: X-Rite, Inc. Pentium, MMX: Intel Corporation Gocator: LMI Technologies Table Of Contents Table Of Contents ...................................................................................1 What is HexSight? ...................................................................................1 System Requirements ..............................................................................2 Device Support .......................................................................................3 Installing HexSight Software ....................................................................4 Before Installing HexSight ....................................................................4 Installing HexSight ..............................................................................4 Enabling Gocator’s HexSight License ......................................................5 32-bit installation of HexSight ...............................................................5 64-bit installation of HexSight ...............................................................5 Uninstalling HexSight ...........................................................................5 Installing Devices ....................................................................................6 Basic HexSight Terminology .....................................................................7 What is a HexSight Application? ................................................................9 Creating a HexSight Application .............................................................. 10 Adding a Component to the Toolbox ........................................................ 11 Referencing a Control ........................................................................ 11 HexSight Toolkit ................................................................................... 12 Acquisition Tools ............................................................................... 12 Locator Tools .................................................................................... 12 Image Processing Tools ...................................................................... 12 Inspection Tools ................................................................................ 13 Output Tools ..................................................................................... 13 Symbology Tools ............................................................................... 13 Color Support and Functionality in HexSight ............................................. 14 Project Examples Provided with HexSight ................................................. 15 Demonstration Mode ............................................................................. 18 Opening and Running in Demo Mode .................................................... 18 Demo Mode Limitations ...................................................................... 18 Using the Demo Mode with the Tutorial ................................................ 18 Getting Help ......................................................................................... 20 Online Help ...................................................................................... 20 Technical Support ............................................................................. 20 What is HexSight? HexSight is a comprehensive library of machine vision tools, available as ActiveX controls, C++ DLL libraries, or a .NET DLL assembly. At the heart of HexSight, the unique and powerful Locator tool provides accurate and robust object recognition through geometric object location. The Locator finds the contours of parts in the image, and quickly identifies each part's position and orientation. This information can be sent to a robot or machine controller to guide part handling. In addition, HexSight provides integrated calibration and a complete set of inspection tools. HexSight tools can be model-based to leverage the Locator’s results by automatically transposing tools on parts regardless of their scale or rotation. HexSight Quick Start Guide 1 System Requirements To run HexSight on your computer, the following hardware and software are required. Software Requirements • Operating system: Windows XP with Service Pack 3, Windows Vista (x86 or x64) or Windows 7 (x86 or x64). • • Hardware Requirements • Processor: Pentium II or higher • Hard Drive space: From 100 MB to 500 MB depending on selected components • Memory (RAM): 128 MB • Display: Minimum resolution: 1024 x 768 pixels. Colors: 65,536 Visual Studio .NET (2003 or higher), or other ActiveX-compliant environments. • Ethernet port for GigE Vision devices DirectX 8.0 or later is required for IEEE • Firewire port for DCAM cameras 1394 (FireWire) or USB cameras • Carnegie Mellon University (CMU) DCAM driver is required for IEEE 1394 (FireWire) DCAM cameras • Adobe Acrobat Reader 5.0 or higher and Internet Explorer 5.0 or higher are recommended to respectively access PDF format documentation and online HexSight Help. 2 HexSight Quick Start Guide Device Support Devices The following devices are supported: • IEEE 1394 (Firewire) and USB cameras with a DirectShow driver. • IEEE 1394 (Firewire) cameras using the DCAM protocol. • GigE Vision™ cameras • LMI Technologies Gocator™ sensors HexSight Quick Start Guide 3 Installing HexSight Software HexSight is available on LMI’s website for download: http://www.lmi3d.com Any changes made to parameters in an application will be lost once you close the application. 6. Before Installing HexSight 1. Ensure that your system meets the minimum system requirements specified in the previous section. 2. Ensure that you have Administrator privileges on your PC. You must installing HexSight. 7. 1. 4. you must first uninstall this version before installing the new one. See To acquire live images in HexSight If you are using a DirectShow device, we strongly recommend that Uninstalling HexSight. 2. 3. 4. Please refer to the documentation provided with the device to ensure that you follow the appropriate If you are using HexSight in 5. Read the Licence agreement and Chose and installation folder and click Next. 6. Select a start menu folder and click Install. demonstration (Demo) mode and/or you do not have a dongle or Gocator When the welcome window is then click I Agree. procedure 5. Execute the HexSight installer file. displayed, choose Next. you install the original driver for the device before installing HexSight. If you have an older version of HexSight installed on your system, necessary system registry sections. you will need a compatible device. Close any other open applications. Installing HexSight have permission to write to the 3. Visual Studio 2003 or higher should be installed on your PC before 7. HexSight will now install. When the with firmware 4.0 and above, you installation is complete, click Close will only be able to run existing to exit the installation program. applications, such as the example applications and the tutorial example provided with HexSight. 4 HexSight Quick Start Guide Enabling Gocator’s HexSight License Files (x86) (e.g. C:\Program Files (x86)\Common Files\HexSight 5.0\Controls). As of version 5.0.1, any Gocator sensor can act as a dongle to unlock a HexSight 2. Copy GoSdk.dll and kApi.dll from Professional license. This however the bin\win64 directory of the requires that a Gocator with firmware 4.0 Gocator SDK package, into the and above be reachable from the running Controls directory of the HexSight system. installation directory (e.g. C:\Program Files\HexSight GoSdk.dll and kApi.dll are needed to 5.0\Controls). interface to HexSight. GoSdk.dll and kApi.dll are included in the Gocator SDK 3. Reboot the PC. package (14400x.x.x.x_SOFTWARE_GO_SDK) of each Gocator firmware release. Before running HexSight, follow these steps. 32-bit installation of HexSight 1. Uninstalling HexSight 1. change a program. On a 32-bit installation of HexSight, copy GoSdk.dll and kApi.dll from the bin\win32 directory of the Gocator 2. directory (e.g. C:\Program Remove. 3. Reboot the PC. 64-bit installation of HexSight 1. Click Uninstall to confirm the removal. Files\HexSight 5.0\Controls). 2. Find HexSight 5.0 in the list of programs, select it and then click SDK package, into the Controls directory of the HexSight installation In the Control Panel of your computer, select Uninstall or 4. When the removal is completed, close the Uninstall or change a program window. On a 64-bit installation of HexSight, copy GoSdk.dll and kApi.dll from the bin\win32 directory of the Gocator SDK package, into the Controls directory of HexSight, in the Common Files folder under Program HexSight Quick Start Guide 5 Installing Devices IEEE 1394 Device - DirectShow Device Image tools). Other tools can use the Any IEEE 1394 camera (FireWire) with a ImageProcessing tool to obtain greyscale conversion method in the DirectShow driver is supported. All images. For more information, please see DirectShow standard parameters are the Acquisition Device chapter of the accessible programmatically. No specific HexSight User’s Manual. installation procedure is required. IEEE 1394 Device - DCAM Device Any IEEE 1394 camera (FireWire) using the DCAM standard is supported. It allows for a greater control over the device than with simply the DirectShow driver, but requires the installation of the CMU DCAM Driver. GigE Vision™ Cameras HexSight supports all GigE Vision™ cameras. The drivers are installed automatically when you add your camera to your application. For more information, please see the Acquisition Device chapter of the HexSight User’s Manual. Gocator™ Sensors Gocator™ sensors running Gocator firmware 4.0 and above are natively supported in HexSght. The 3D information is captured directly in HexSight for additional vision inspection capabilities. Initially, only a limited number of tools are able to process the heightmaps (Locator, 6 HexSight Quick Start Guide Basic HexSight Terminology Configuration: A configuration is a set of of an object. For example: The Locator HexSight tool instances and the tool can easily disambiguate between very configured properties of each tool. similar objects. Configuration files are saved to the HexSight CFG format. In the Acquisition Device, a Configuration is a set of parameters for a given input source. Database: A collection of Views, which can contain any number of database objects: Scenes, Images and Entities. The runtime database acts as a database exchange container for the HexSight processes. View folder Image object Scene object Entity object Entity: An object that is created and used by HexSight Finder tools. Basic entities are Points, Lines and Arcs. These entities can be saved to proprietary file formats and accessed through the Class Library. Image: A matrix of pixels that represents the 2D appearance of an object. An image is a raster (bitmap) graphic, as opposed to a Scene, which is a vector description. Input: Data used by the process algorithm to compute a result, which can be an Image, a Scene, or a set of numeric values. Instance: A representation or an occurrence. For example: each occurrence of a specific object is an instance. Instantiate: To actualize an abstract representation by defining a particular configuration of the process, giving it a GUI representation of a runtime database Disambiguate: Applied to object location, disambiguation means to resolve the ambiguity between many possible solutions by using one or more distinguishing characteristics or features HexSight Quick Start Guide name, and including it in the process list. For example, if you add a Caliper tool to an application, you are instantiating a HexSight HSCaliper process. Model: A Model is a representation of an object, based on the geometry of its contours. An object Model is the reference 7 used to identify and locate instances of View: A collection of Scenes, Images and objects of the same type. Entities. By analogy, one could say that a Model-Based: Model-based refers to positioning a HexSight tool on a model of View is a folder that can contain Scenes, Images or Entities. a given object. Each time an instance of this object is found, the model-based tool is applied on the correct position on the found object. Output: Data generated by the process algorithm, e.g. an Image, a Scene, an Entity or a set of numeric values. Model-Based Tools on Found Parts Properties: The characteristics of an object. Scene: A vectorized description of an object’s contours, as opposed to an Image, which is made up of pixels. 8 HexSight Quick Start Guide What is a HexSight Application? A HexSight application is composed of a sequence of processes, which can also be visualized as tools or modules, each having its own function or purpose. Each of the processes exchange data through the runtime database. A typical HexSight application contains at least the following two processes: the Acquisition Device tool and the Locator tool. These processes perform the following basic operations: 1. The Acquisition Device acquires an image of the work surface. Acquired images can be calibrated within the Acquisition Device interface. 2. The Locator tool generates a vectorized Contour Scene from the Images provided by the Acquisition Device. The Locator finds and locates, in the Contour Scene, all occurrences of objects of defined in the Model database. Models are created and edited in the Locator interface. Inspection tools such as the Caliper can be added to these two basic processes depending on the task to be performed. HexSight Quick Start Guide 9 Creating a HexSight Application A typical HexSight application is created by placing a HexSight Application control instantiate and configure the sequence of processes. on a blank Visual Studio form. The steps The Process Manager interface contains required to complete such a task are: 1. Select the HexSight Application control icon in the Visual Studio two lists: • toolbox and place this control on a blank form. If the icon is not Available Processes, which lists all HexSight process types and • Instantiated Processes, which available in the toolbox, see Adding contains the names of the processes a Component to the Toolbox for used in the current application. more details. Click here to access the Process Manager Opening the Process Manager Tools (process instances) used by the current application Available HexSight processes Process Manager Window 2. Drag a square with the mouse on the form and release the left mouse button to place the HexSight Application Control. 3. Right-click the HexSight Application Control in the form and select ActiveX - Edit to display the Process Manager window. The Process Manager is used to 10 HexSight Quick Start Guide Adding a Component to the Toolbox To modify the content of a HexSight application, you must add a HexSight Application control to a Windows form. This enables you to access the Process Manager and the Explorer interfaces in design mode or in runtime. You should also add at least one HexSight Display control to the form. This will allow Referencing a Control To create HexSight objects programmatically, all HexSight control types used in the user’s program must be referenced. This is accomplished the following way: 1. you to visualize results in runtime mode. To add a control to the toolbox: 1. 2. Reference... 2. From the toolbox context menu, select: Choose Items. From the Microsoft Visual Studio menu bar, select Project > Add Select the COM tab, and enable the required HexSight controls. 3. Click OK. The controls are added to Select the COM Components tab and project's references and can now be scroll down to find HSApplication accessed programmatically. Control. Enable its check box and click OK. The HexSight Application Control appears as a lens shutter Note: A HexSight control cannot be declared as a component and as a reference at the same time. icon in the toolbox. Note: In a Visual Basic program, a variable cannot be declared as a given HexSight control type, if it is declared as a component. Nevertheless, any object created by pasting a control (selected as a component) on a Visual Basic form can be accessed programmatically using the name of the object. The following HexSight control types should be used as components: • Application control • Display control HexSight Quick Start Guide 11 HexSight Toolkit HexSight provides comprehensive set of Builder: The Builder creates geometric vision tools for object finding, inspection, entities such as points, lines or arcs from image processing and more. user-defined parameters or by combining Acquisition Tools Acquisition Device: The Acquisition other geometric entities. Image Processing Tools Device acquires images from a frame Image Processing Tool: The Image grabber or from a database of images. Processing Tool processes images by Locator Tools Locator: The Locator tool finds and locates objects that are defined by applying arithmetic, assignment, logical, filtering, morphological or histogram operators. Users can define custom filtering operators. models. Models are created using the Image Sharpness Tool: The Image integrated Editor and saved to database Sharpness Tool computes the sharpness files. The Locator provides the scale factor, of preponderant edges in a user-defined orientation, and position for each located region of interest. object. Image Histogram Tool: The Image Arc Finder: The Arc Finder finds and Histogram tool computes greylevel locates circular features on objects and statistics within a user-defined region of returns the coordinates of the center of interest. the arc, the start and end angles, and the radius. Sampling Tool: The sampling tool is Line Finder: The Line Finder finds and output it as a separate Image. The locates linear features on objects and sampling tool can be configured to returns the line angle and point operate as model-based. It can be used coordinates. by a HexSight application to apply a Point Finder: The Point Finder finds and locates point features on objects and used to extract a section of an image and custom processing on a region of interest on an object. returns the angle as well as the coordinates of the found point. 12 HexSight Quick Start Guide Inspection Tools Output Tools Edge Locator: The Edge Locator finds Evaluator Tool: The Evaluator Tool and locates an edge or a set of edges that converts results from other tools to a meet user-defined criteria. Pass/Fail decision by using threshold Arc Edge Locator: The Arc Edge Locator finds and locates an edge or a set of edges on an arc or circular-shaped area. Caliper: The Caliper finds and locates one or more edge pairs and measures distances between the two edges within comparison and/or mathematical operations. Output Tool: The Output Tool schedules an event on a digital IO of a LMI Gocator™ device, based on a Pass result from the Evaluator Tool. each pair. Symbology Tools Arc Caliper: The Arc Caliper finds and Barcode Reader: The Barcode Reader locates one or more edge pairs on an arc or circular-shaped area and measures distances between the two edges within each pair. Pattern Locator: The Pattern Locator finds and locates instances of a pattern occurring within an Image. Pattern images are provided by the HexSight Locator control. Blob Analyzer: The Blob Analyzer finds and locates blobs within a defined area on reads and extracts information from 1D symbologies commonly known as bar codes. Data Matrix Reader: The Data Matrix Reader reads and extracts information from 2D symbologies commonly known as data matrixes. OCR Fixed Font: The OCR Fixed Font tool recognizes and reads OCR-A, OCR-B, or SEMI font character strings. an Image and returns various results for each blob. ColorFinder: The Color Finder searches and analyzes images to find areas of color that match user-defined filters. HexSight Quick Start Guide 13 Color Support and Functionality in HexSight HexSight provides support for acquiring • The Edge Locator, Arc Edge Locator, and using color images. The color license Caliper, and Arc Caliper tools use color adds color capabilities to various HexSight information to extract edges. tools and processes. • Finder tools use color information to Color Image Acquisition extract edges for finding geometric The Acquire Image tool accepts and entities (arc, lines, points.) outputs color images provided by supported color cameras. The Arc Finder, Line Finder, and Point • The Blob Analyzer can use Hue, Saturation, and Luminance values to Color Calibration define blobs. In applications where accurate color is required, color calibration ensures that the Color Finder Tool input images contain accurate color The Color Finder tool can identify the information. The built-in Color Calibration presence or absence of defined colors, and Wizard steps you through color calibration analyze the predominance of colors in and requires a standard GretagMacbeth images. For example, it can be used to ColorChecker target. differentiate similarly shaped objects of different colors. Color Locator The Locator can be configured to differentiate between object based on their color. In the model-building process, a custom color shading area can be defined for each object. This shading area allows the Locator to use color information when locating objects. Color Processing with Inspection Tools Most inspection and finder tools can process images on the basis of color. 14 HexSight Quick Start Guide Project Examples Provided with HexSight The HexSight Development package Bracket Inspection provides complete examples of machine This application identifies, locates and vision applications. These examples show inspects four different models of flat how to implement specific features such brackets. The Blob Analyzer tool finds the as automated calibration and model center of mass of each hole on the teaching. bracket. Parts are rejected if the position Examples of application projects are of any of its holes are not within tolerance provided for the Microsoft Visual Studio 2003 (or higher) development environment. ranges. Calibration Demo This application shows how to use the Board Location calibration objects: This application identifies and locates a HSCalibrationXYScaleInterface, printed circuit board (PCB). The application demonstrates how to create a model in which one big feature is used to locate the object and a second smaller feature is required to correctly identify the HSCalibrationPerspectiveInterface, and HSCalibrationDistortionInterface, to implement automated calibration programmatically, without showing the interactive user interface. orientation of the object. A Sampling tool samples the image from a model-based region on the located boards. This Contour Detection sampled image is used as an input to a This application shows how to access the second Locator tool which then checks for the presence of a small label printed on the PCB. Board Location Model-Based calibrated and uncalibrated contour data extracted from an image by the Locator. The application also shows how to use properties of the extracted contour data, such as perimeter and area, to manually This application is similar to the Board detect circular shapes in the image. This Location example. However, this example can be used, for example, to detect dots uses a Model-Based Locator, instead of a during a custom calibration procedure Sampling tool, to identify subfeatures on using a non-standard target. the object. HexSight Quick Start Guide 15 Contour Draw Demo Pad Inspection This application shows how to manually This application identifies and locates draw the detected contours (model and brake pads on the work surface and instance) into a standard Visual Studio performs two measurements on each graphics object by directly accessing the located pad. This application provides an contour data generated by the Locator example of how the Caliper tool can be through the HsScene object. used to perform linear measurements. Image Processing Part Sort This application shows how the Image This application provides the type, Processing tool can be used to apply position and orientation of 4 different operations to an image, such as noise parts that are randomly placed on the filtering, before the image is output to the work surface. Multiple parts can be Locator tool. identified and located at the same time. These parts do not have to be of the same Locator Demo type. In addition to multi-model This demo provides a ready-built capabilities, this application also illustrates application, useful for testing HexSight with your own images. This demo also contains configurations to illustrate Model how to configure the Locator tool for robustness to occlusions. Optimization and the Shading consistency Pulley Location feature. This application identifies and locates a pulley on the work surface. The Locator Finder Demo identifies the four possible rotational This demo provides an example of the use symmetries. An Edge Locator tool locates of HexSight Finder Tools: Arc Finder, Line the pulley’s keyway to identify the correct Finder, Point Finder and Builder. orientation. An Arc Edge Locator is used to measure the angular position of the four Model Demo This application shows how to use the HSModelEditorInterface object to implement automated model teaching programmatically, without showing the interactive user interface. 16 spokes of the pulley, with respect to its keyway. Regulator Inspection This application sorts and inspects electronic parts. The Pattern Locator tool HexSight Quick Start Guide is used to disambiguate the two models of specific areas of the image. By adding T0220 regulators that are used. Distances filters corresponding to particular colors, between the legs of each regulator are you can easily say if a colored area is measured using the Edge Locator tool and within the acceptable tolerance defined. part is rejected if the distance between two legs is not within tolerance ranges. OEMLocatorGeneric This application shows typical Locator integration for OEM projects using ActiveX layer. OEMLocatorDLL This application shows typical Locator integration for OEM projects using DLL layer only. Since DLL layer do not expose any Graphical User Interface, this example also shows how to display HexSight images and Locator results. It also includes an implementation of a custom model edition window using programmatic calls to the DLL interface. Color Locator Demo This demo shows the potential of the Locator in regards with Color detection. Not only can the Locator detect edges that may be invisible when converted to greyscale, but it can also differentiate the instance based on the color of the model. Color Target Inspection This application demonstrates the use of the ColorFinder tool to inspect the color of HexSight Quick Start Guide 17 Demonstration Mode The HexSight Demonstration Mode is provided for the purpose of evaluating our software. This mode is automatically enabled when you run HexSight without the hardware protection key that is provided with the purchase of a HexSight Demo Mode Limitations In the Demo Mode, the application development capabilities of the HexSight environment are deactivated. • This demonstration mode has some You can load and run the examples that are installed with HexSight. software package. • You cannot operate in design mode i.e. features removed, yet will allow you to you cannot build an application by evaluate the functionality and power of selecting and instantiating tools. HexSight. • You can however open an existing Opening and Running in Demo Mode 1. When you first open HexSight in • Since you cannot run in design mode you cannot fully do the tutorial. You appears, advising you that the can however open the Tutorial files hardware protection key was not that are installed with HexSight. in the demonstration mode. The application then pauses for approximately 10 seconds. After this delay, the application resumes once 3. application. demo mode, a pop-up window found and that the software will run 2. You cannot save a configuration file. Using the Demo Mode with the Tutorial Even though you cannot use the demo mode to build an application as explained you click OK. and illustrated through the tutorials, you This reminder pop-up window will with HexSight, either in the Examples or appear again at random intervals the Tutorial folders. during execution; simply click OK and continue your evaluation. can run any of the applications provided To best familiarize yourself with the functionalities of HexSight, we recommend that you start out with the tutorial application, as follows: 18 HexSight Quick Start Guide 1. Open the final application provided for the tutorials. The VB.NET, Visual C++, and C# tutorial files are located in the Tutorials folder, under the HexSight installation folder. For example, the C# tutorial files are located in: Tutorial/C#/HookInspection/ Part6 2. To run the application, in the Hook Inspection interface, click the Inspect button to launch a first execution. Hook Inspection Tutorial HexSight Quick Start Guide 19 Getting Help Online Help E-mail Queries There are four ways to access the HTML Send your technical questions by e-mail, Online Help: 1. Click on a HexSight control icon, either in the Visual Basic toolbox or on one of the forms of the application, then press F1. 2. Place the cursor of the Visual Basic Editor in the middle of a string that corresponds to a HexSight control type, property, method or event, then press F1. This will work if the directly to our technical support team at [email protected]. Your e-mail queries will be directed to the appropriately qualified personnel and promptly answered. Telephone You can contact the HexSight technical support between 9:00 A.M. and 5:00 P.M. PST at +1 604 636 1011. icon of the control appears on the toolbox or if the control is referenced. 3. From the Process Manager (Application Control interface), click the Help command button. 4. In any property window of a HexSight tool, place the cursor on an object and press F1. Technical Support We provide technical support for our customers via our web page as well as by telephone. 20 HexSight Quick Start Guide