Using HALCON for Windows

Using HALCON for Windows

MVTec HALCON is the comprehensive standard software for machine vision with an integrated development environment (HDevelop) that is used worldwide. It enables cost savings and improved time to market. HALCON’s flexible architecture facilitates rapid development of any kind of machine vision application. The following instructions describe how to configure Lucid Vision GigE cameras with HALCON for Windows.

HALCON is able to use CTI files. The procedure is described below.

System Specifications

  • Windows 10 Pro 64-bit, version 1709, build 16299.64
  • HALCON 13.0.1.1 (14.06.2017) 64-bit

Prerequisites

Installing the MVTec GigE Vision Streaming Filter Driver is recommended. To install the MVTec GigE Vision Streaming Filter Driver, you can run the GevStreamingFilter executable found in the %HALCONROOT%\misc folder. Verify the MVTec GigE Vision Streaming Filter Driver is installed in the Ethernet adapter’s properties window.

/wp-content/uploads/2018/01/halcon_windows_filter_driver.png

HDevelop

  1. Launch HDevelop to launch HALCON’s Integrated Development Environment (IDE). HDevelop can be launched from the Start Menu.

  2. Click Assistants -> Open New Image Acquisition to open an Image Acquisition window.

    /wp-content/uploads/2018/01/halcon_windows_hdevelop_open_new_image_acquisition.png

  3. Select GigEVision under the Image Acquisition Interface dropdown.

    /wp-content/uploads/2018/01/halcon_windows_hdevelop_new_image_acquisition.png

  4. Click on the Connection tab, select your camera, and click halcon_windows_hdevelop_button_connect.

    /wp-content/uploads/2018/01/halcon_windows_hdevelop_image_acquisition_connection.png

  5. Click halcon_windows_hdevelop_button_snap to grab a single frame.

  6. Click halcon_windows_hdevelop_button_live to continuously grab images.

  7. Click halcon_windows_hdevelop_button_detect to automatically detect valid parameters for the camera.

  8. Click halcon_windows_hdevelop_button_reset_all to reset parameters to default values.

  9. Click halcon_windows_hdevelop_button_disconnect to release control of the camera.

  10. Click the Parameters tab to change settings on the camera.

    /wp-content/uploads/2018/01/halcon_windows_hdevelop_image_acquisition_parameters.png

The Code Generation tab assists in creating code based on current settings or changes made to the camera in the Image Acquisition window. The following is an example scenario:

/wp-content/uploads/2018/01/halcon_windows_hdevelop_image_acquisition_code_generation.png
  • Connect to camera with DeviceUserID ‘Camera0001’

  • Set DeviceUserID = Camera0002

  • Set Width = 320

  • Set Height = 240

  • Start acquisition

  • Click Insert Code to generate the code in the Image Acquisition Program Window

    /wp-content/uploads/2018/01/halcon_windows_hdevelop_image_acquisition_program_window.png

HDevelop code can be exported to various programming languages by clicking File -> Export.

/wp-content/uploads/2018/01/halcon_windows_hdevelop_image_acquisition_program_window_export.png

Note

Additional HDevelop samples can be found by clicking File -> Browse HDevelop Examples Programs.

For more information on MVTec HALCON please visit http://www.mvtec.com/products/halcon/

Using HALCON for Windows with CTI files 

Applies to: Arena SDK version 1.0.44.7 or higher.

Background

MVTec HALCON is a comprehensive software suite for machine vision with an integrated development environment (HDevelop). 

Using CTI files allows MVTec Halcon and other “GenTL consumers” to use the CTI file to directly access the GenTL layer of the camera. 

However, the Arena SDK installation installs three different CTI files, each for a different transport protocol. 

  • UDP 
  • TCP 
  • RDMA 

HALCON cannot handle all three CTI files, but you can still use HALCON as a GenTL Consumer by following the procedure below. 

Procedure

To configure HALCON to use a particular CTI file in the Arena SDK: 

  1. In Windows Explorer, navigate to the x64Release folder in the Arena SDK installation. The default location is:
    C:\Program Files\LUCID Vision Labs\Arena SDK\x64Release. 
  2. Rename the file extensions to all of the CTI files except for the one you are going to use.  
  3. Start HALCON. 
  4. Click Assistants > Open New Image Acquisition. 
  5. In the Source tab, select Image Acquisition Interface, and select GeniCamTL. Click the Auto-detect Interfaces button.
  6. Under the Connection tab, you can now choose the Device dropdown. There is one entry in the dropdown for desired camera for the CTI file that you have. 
  7. To connect to the camera, click Connect under the Connection tab, and click the Live button to start streaming images. 

Multiple CTI files 

Strictly speaking, you can have up to two CTI files in the x64Release folder. If you do this, you will have two items display in the dropdown for each camera.  

  • One of these cameras will be named after the user-defined name.  
  • The other will use the serial number for the camera.  

You can tell these cameras apart is to go into the Parameters tab, and look up the tl_pathname tab.