HALCON Progress Key Visual shows a person running at high speed

Release Notes for HALCON 13.0

This document provides the release notes for MVTec HALCON 13.0, as released in November 2016.

Contents

Major New Features of HALCON 13.0

Speedups

Shape-based matching is now significantly faster. For example, speedups of more than 300% can be achieved on machines with AVX2-compatible processors when searching in byte images with a small number of pyramid levels. This speedup also affects all related technologies, i.e., shape-based 3D matching, local and perspective deformable matching, as well as component-based matching.

Major Improvements in Identification Technologies

  • HALCON now contains a new OCR classifier based on deep learning technology, which can be used via a number of pretrained fonts. With these, it is possible to achieve higher reading rates than with all previous classification methods.
  • The automatic text reader is faster and now also supports reading of dot print characters.
  • The bar code reader has been improved to read bar codes even if large parts of the code are not visible or contain defects.
  • The QR code reader has been improved and is now much more robust against common challenges like blur or distortion.

Easy-to-use Texture Inspection

HALCON now offers an easy-to-use texture inspection, which is configured by simply passing some training images. The algorithm automatically adjusts the necessary parameters based on training images that show flawless texture. For this, the algorithm uses a Gaussian Mixture Model (GMM) classification on multiple levels of an image pyramid.

Enhancements of 3D Matching and 3D Reconstruction

  • Surface-based 3D matching has been improved to be more robust when dealing with flat surfaces. This improvement particularly supports applications like picking of boxes.
  • HALCON now also offers a new method to reconstruct 3D objects from multiple cameras with high quality. This new method uses the information of all camera views at once leading to more robust results than provided by common stereo reconstruction methods.

HDevEngine Debugging

HDevEngine applications can now be debugged directly within HDevelop by attaching it to the corresponding application process. This enables developers to inspect call stack and variable values while executing procedures step by step, making error tracking a lot easier. HDevelop can even be connected to an HDevEngine application running on a different computer for remote debugging.

Compatibility

Licenses

All HALCON 12.0 licenses or licenses of earlier versions must be replaced or upgraded. Please contact your local distributor.

Furthermore, please note the following compatibility issues related to licenses:

  • In compliance with the EULA, HALCON now only supports MAC based licenses bound to universally administered, permanent MAC addresses. Locally administered MAC addresses are rejected. In case of a license upgrade for a MAC based license it might be necessary to request a new license if the former hostid is not suitable anymore. Additionally, FLEXid dongles for HALCON 12 and earlier versions do not work with HALCON 13 as HALCON 13 exclusively uses HALCON CodeMeter dongles. HALCON 13 licenses will be downwards compatible to HALCON 12.0.3. More information.

HALCON Library

Compared to HALCON 12.0, many extensions have been introduced. Thus, the HALCON 13.0 libraries are not binary compatible with HALCON 12.0.x or earlier versions.

However, HALCON 13.0 is mostly source-code compatible to HALCON 12.0.x except for the changes listed below:

  • The signatures of the operators have been changed to use empty input tuples for the parameters AngleStart, AngleExtent, ScaleCMax, and ScaleRMax. Thus, .Net and C++ programs using these operators have to be recompiled. More information.
  • Previously, find_calib_object only returned the error 8402 ("No calibration table found") if the calibration plate with hexagonally arranged marks could not be found.
    Now, it can return the three additional errors 8397 ("Segmentation of the calibration marks failed"), 8398 ("Extraction of the mark contours failed"), and 8399 ("No finder pattern could be found"). This has to be considered in an optional try-catch-block around find_calib_object. More information.
  • The data code reader has been improved to make the XLD contours that surround successfully decoded data code symbols (as returned in the parameter SymbolXLDs of find_data_code_2d or by setting the parameter ResultNames of get_data_code_2d_results to 'candidate_xld') consistent for all supported data code types. In particular, they now surround also QR Codes. In former HALCON versions, the XLD contour connected the centers of the QR Code's finder patterns. Furthermore, for all supported data code types, the order of the XLD contour's points has been changed such that the orientation of the first contour segment represents the orientation of the data code symbol. More information.
  • Because the error name H_ERR_MLP_WRNUMCHAN has been renamed to H_ERR_WRNUMCHAN, all applications using H_ERR_MLP_WRNUMCHAN must be adapted accordingly.
    More information.
  • Due to an improvement with respect to the calculation of the overlap between the range of rotations, the operators may return different or additional results compared to previous HALCON versions. The reason is that the angle range may now be larger. To obtain the old behavior, the definition of the range of rotations in the respective find_* operator must be adapted. More information.
  • Because of changes made to speed up find_shape_model_3d, the scores returned by the 3D shape-based matching may differ in the order of 10^-5 to 10^-6 compared to previous HALCON versions. Also, the pose may differ by as much as 10^-4 compared to previous HALCON versions. This should have no effect on any application. More information.
  • Because of the changes applied to achieve an improved selection of punctuation marks, the results returned by find_text might differ from the results produced with earlier HALCON versions. More information.
  • Note that the interpretation of "pose_rel" has changed. To obtain the same effect as "pose_rel" in previous HALCON versions, "pose" must be used. The old options "pose1" and "pose2" are still available for backwards compatibility. However, "pose1" has the same effect as the new meaning of "pose_rel" and "pose2" has the same effect as "pose_caltabs". More information.
  • Because of the removal of the constants MIN_COLUMN, MAX_COLUMN, MIN_LINE, and MAX_LINE from the include file HConst.h, these constants cannot be used anymore. The constants MIN_COORD and MAX_COORD defined in IPType.h have to be used instead and define the minimum and maximum allowed coordinates. The actual values for MIN_COORD and MAX_COORD depend on the usage of HALCON XL or not. More information.
  • Because of the new possibility to get the region used to create an NCC model, the file format version for ncm (HALCON NCC Model) files has been changed. Therefore, NCC models written with HALCON 13 or higher cannot be read by older HALCON versions. More information.
  • Because of changes related to camera parameters, it might be necessary to adapt programs that were developed with HALCON 12 or earlier HALCON versions to work with HALCON 13. Additionally, in some cases, camera parameters that are written to file with HALCON 13 cannot be used by previous HALCON versions.
    Adaptations of programs that were developed with HALCON 12 are necessary,
    • if a program implements a direct access to the elements or the length of a camera parameter tuple that was returned by an HALCON operator, or
    • if camera parameters are written to file with HALCON 13 but should be used with a previous HALCON version.
    1. Adapting Programs with Direct Access to Elements of the Camera Parameter Tuple:
    If a program directly accesses the elements or the length of a camera parameter tuple that was returned by an HALCON operator, the program can be adapted by
    • removing the first element of the camera parameter tuple before the access or by
    • replacing the operations that directly access the elements or the length of camera parameter tuples by one of the new external procedures (recommended!).
    In the following example, the first element of the camera parameter tuple is accessed:
    read_cam_par ('campar.dat', CameraParam)
    Focus := CameraParam[0]
    
    Because the first element of the tuple CameraParam now contains a string indicating the camera type, the contents of Focus are now, e.g., 'area_scan_division' instead of the focal length.
    The simplest way to obtain the old behavior is to remove the first element of the camera parameter tuple, for example by calling
    CameraParam := remove(CameraParam, 0)
    
    directly after the operator that returns the variable CameraParam. The above code example would therefore look like this:
    read_cam_par ('campar.dat', CameraParam)
    CameraParam := remove(CameraParam, 0)
    Focus := CameraParam[0]
    
    This approach is safe as long as no camera types are used that are modified or introduced with HALCON 13 or with later HALCON versions, i.e., as long as regular perspective cameras without tilt are used.
    Alternatively, all operations that directly access the elements or the length of camera parameter tuples can be replaced by one of the new external procedures get_cam_par_data and set_cam_par_data that are available via the new procedure library general/camera_parameters.hdvp. In this case, the above code can be rewritten as follows:
    read_cam_par ('campar.dat', CameraParam)
    get_cam_par_data (CameraParam, 'focus', Focus)
    
    Although the adaptation of programs based on this approach may be more time-consuming, it is the more future-proof approach and therefore strongly recommended.
    2. Adapting the Camera Parameters Written with HALCON 13 to Use them with a Previous HALCON Version:
    If a camera model that is written with HALCON 13 should be used with a previous HALCON version, the first element of the camera parameter tuple must be removed as described above. For telecentric cameras, additionally the camera parameters must be modified accordingly as follows:
    • The focal length in the old format must be set to 0.
    • The parameter KappaO in the old format must be computed from the parameters Kappa and Magnification in the new format as follows: KappaO := Kappa*pow(Magnification,2).
    • The parameter K1O in the old format must be computed from the parameters K1 and Magnification in the new format as follows: K1O := K1*pow(Magnification,2).
    • The parameter K2O in the old format must be computed from the parameters K2 and Magnification in the new format as follows: K2O := K2*pow(Magnification,4).
    • The parameter K3O in the old format must be computed from the parameters K3 and Magnification in the new format as follows: K3O := K3*pow(Magnification,6).
    • The parameter P1O in the old format must be computed from the parameters P1 and Magnification in the new format as follows: P1O := P1*Magnification.
    • The parameter P2O in the old format must be computed from the parameters P2 and Magnification in the new format as follows: P2O := P2*Magnification.
    • The parameter SxO in the old format must be computed from the parameters Sx and Magnification in the new format as follows: SxO := Sx/Magnification.
    • The parameter SyO in the old format must be computed from the parameters Sy and Magnification in the new format as follows: SyO := Sy/Magnification.
    • All other camera parameters can be used unchanged.
      Note that this approach only works for perspective cameras without tilt, for telecentric cameras without tilt, and for bilateral telecentric cameras with tilt. Since perspective cameras with tilt contain a new parameter ImagePlaneDistance, they cannot be converted to the format of previous HALCON versions. Furthermore, the newly introduced camera models for image-side and object-side telecentric cameras with tilt cannot be converted to the format of previous HALCON versions.
    In the following cases, camera parameters that are written to file with HALCON 13 cannot be used by previous HALCON versions:
    • The file formats of serialize_cam_par, write_metrology_model and serialize_metrology_model, as well as write_cam_par have been adapted to the general extensions of the camera parameter tuple (new element of the tuple for the camera type). Files written with previous HALCON versions can still be read. Files written with HALCON 13 cannot be read by previous HALCON versions.
    • The file formats of 3D shape models, deformable models, and descriptor models have been changed to support the enhanced camera model for pinhole tilt cameras. If camera parameters that were calibrated with HALCON 13 are written to file, they cannot be read by previous HALCON versions.
    3. Further Issues concerning Compatibility
    Generally, the new camera model for pinhole tilt cameras and the modified camera model for telecentric cameras are backwards compatible:
    • The new camera model for pinhole tilt cameras is more general than the old model and can emulate the old model if the ImagePlaneDistance is set to the same value as Focus. If camera parameters that were written with previous HALCON versions are read by any operator that handles camera parameters (such as read_cam_par, read_calib_data, etc.), this is precisely what will be done automatically internally. Hence, HALCON is backwards compatible.
    • For the camera model for telecentric cameras, a parameter for the lens magnification has been added, the parameter for the focal length (which was always set to 0) has been removed, and the semantics of some parameters has changed. The old model for telecentric cameras is equivalent to the new model with a lens magnification of 1. Therefore, if camera parameters from previous HALCON versions are read, they are silently converted into the new format. Furthermore, if calibration data is read with read_calib_data, the optimization flags stored in the calibration data are adapted to be compatible with the new model. If the camera is then calibrated with calibrate_cameras, however, the magnification will be mostly modeled by Sx and Sy (because Sy is kept fixed) and only to a small part by the parameter Magnification. In such cases, however, the model will still be consistent if the calibration error is small.
    More information: [1][2][3][4][5][6]
  • read_image now scales the gray values of PNG images to the original bit depth. This affects PNG images, for which the original image depth was different than 8 bit or 16 bit. If images from such a source are used, subsequent absolute parameters such as thresholds have to be adapted or the image gray values have to be scaled to the previous value range with scale_image. More information.
  • Due to the extension of reconstruct_surface_stereo to handle mixed camera setups, the behavior of the error 8494 ("bounding box is behind basis line") may have changed in some cases. reconstruct_surface_stereo used to consider the behavior towards the rectified cameras. Now, the behavior towards the input cameras is considered. Moreover, the internal estimation of disparity_min/disparity_max in reconstruct_surface_stereo has been improved and adapted for stereo setups with perspective and telecentric cameras. This may change the behavior of reconstruct_surface_stereo in some cases, if the method 'binocular_ms' is used. More information: [1][2][3]
  • HALCON's multiview stereo surface reconstruction has been extended amongst others to enable the assignment of the color of the input images to the point cloud for both methods 'surface_pairwise' and 'surface_fusion'. Thus, now all input images must have the same number of channels. The number of channels has to be equal to one or three. Else, reconstruct_surface_stereo returns the error 3122 ("Number of channels in the input parameters are different") or the error 3359 ("Wrong number of image channels").
    If multi-channel images are used, the reconstruction is still performed using the first channel only. The remaining channels are solely used for the calculation of the color values.
    To reproduce the old behavior, perform
    gen_empty_obj (ImagesOneChannel)
    count_obj (Images, Number)
    for ImageIndex := 1 to Number by 1
        select_obj (Images, ObjectSelected, ImageIndex)
        access_channel (ObjectSelected, FirstChannel, 1)
        concat_obj (ImagesOneChannel, FirstChannel, ImagesOneChannel)
    endfor
    on the input images of reconstruct_surface_stereo. More information: [1][2][3][4]
  • As a consequence of a change concerning the parameter CameraType of set_calib_data_cam_param, the file format used by write_calib_data and serialize_calib_data had to be changed. The change is backwards compatible. Files written by HALCON 12 or earlier versions can still be read by HALCON 13. Files written by HALCON 13 cannot be read by HALCON 12 and earlier versions, however. More information.
  • As a consequence of a change concerning the handling of the parameter CameraType of set_camera_setup_cam_param, the file format used by write_camera_setup_model and serialize_camera_setup_model had to be changed. The change is backwards compatible. Files written by HALCON 12 or earlier versions can still be read by HALCON 13. Files written by HALCON 13 cannot be read by HALCON 12 and earlier versions, however. More information.
  • Due to the new visualization functionalities, the following compatibility issues have to be considered:
    • Applications that used set_font must be adapted.
    • Applications that assumed that dump_window_image returns single channel images must be adapted.
    • set_paint and dev_set_paint now only support the modes 'default', '3d_plot', and 'vector_field'. All other modes are now unsupported and have been removed from the documentation.
    • Window Ids returned by open_window have changed. The value must not be used directly.
    • get_part now returns floating point numbers. Depending on the subsequent operations a cast might be necessary.
    • get_os_window_handle is now unsupported for buffer windows. Use dump_window_image to access the contents of a buffer.
    More information: [1][2][3][4][5]
  • Because of an improvement of the accuracy of zoom_image_size and zoom_image_factor for Interpolation set to 'constant' and scaling factors smaller than 1.0 for byte images, the results of these operators differ slightly compared to those of previous HALCON versions.
    The improved accuracy also effects the operator text_line_orientation and can lead to slightly different results when compared with previous HALCON versions. More information.
  • To avoid conflicts with the header file windows.h, HALCON does not define the types INT and UINT anymore. Instead the new types HINT an HUINT can be used. For image acquisition interfaces, windows.h has been included in CIOFrameGrab.h. Extension Packages and I/O interfaces that are based on the templates included with earlier HALCON versions must be adapted accordingly.
    Furthermore, windows.h is not included in HALCON headers anymore. Applications requiring windows.h must be adapted by including windows.h. More information.

HALCON Applications

Please re-compile all C, C++, .NET, or COM programs developed with HALCON 12.0.x.

The incompatibility with HALCON 12.0.x or earlier versions mainly concerns the binaries, with only few changes in the language interfaces. If you encounter problems during recompiling your programs, please check the detailed description of changes below.

Image Acquisition Interfaces

If you have developed your own acquisition interfaces with HALCON 12.0.x, you can re-generate them with HALCON 13.0.

Digital I/O Interfaces

If you have developed your own digital I/O interfaces with HALCON 12.0.x, you can re-generate them with HALCON 13.0.

Extension Packages

Extension packages developed with HALCON 12.0, HALCON 12.0.1, or HALCON 12.0.2 can be used with HALCON 13.0 without further action. Extension packages developed with HALCON 12.0.x or earlier versions must be re-generated. Note that the old makefiles for HALCON/C++ must be adapted according to the sample makefile under extension_packages/halconuser.

  • Because of the removal of the constants MIN_COLUMN, MAX_COLUMN, MIN_LINE, and MAX_LINE from the include file HConst.h, these constants cannot be used anymore. The constants MIN_COORD and MAX_COORD defined in IPType.h have to be used instead and define the minimum and maximum allowed coordinates. The actual values for MIN_COORD and MAX_COORD depend on the usage of HALCON XL or not.

Further Compatibility Information

  • HWindowControlWPF offers a property ImagePart to set the part on the HALCON window. The type of this property has been changed from System.Windows.Thickness to System.Windows.Rect. WPF applications that use the ImagePart property must be adapted accordingly. More information.
  • Due to a new reference platform and an increased default image size, the benchmark values of hbench are not comparable to values of previous HALCON hbench versions. More information.
  • Programs containing statements of the form
     a[]:=... 
    
    must be modified by either deleting the statement, or by rewriting the statements as
    a[[]]:=... 
    
    More information.
  • The new version of the HALCON Variable Inspect extension for Visual Studio supports only Visual Studio Version 2013 and 2015. Visual Studio Versions below 2013 are no longer supported. More information.
  • As a consequence of the introduction of the new class HCamPar (HALCON/C++ and HALCON/.NET) andHCamParX (HALCON/COM), the following operators are no longer contained in the class HMisc (HALCON/C++ and HALCON/.NET) or HMiscX (HALCON/COM), respectively:
    • ReadCamPar
    • WriteCamPar
    • SerializeCamPar
    • DeserializeCamPar
    • Project3dPoint
    • GetLineOfSight
    • ChangeRadialDistortionCamPar
    • ImagePointsToWorldPlane
    • IntersectLinesOfSight
    Applications that call the above operators from HMisc or HMiscX must be rewritten to call these operators from HCamPar or HCamParX (or HOperatorSet or HOperatorSetX). More information: [1][2][3]
  • The HALCON language interfaces do not support a hom_mat3d array signature for the parameter of the operator projective_trans_object_model_3d anymore. Use type HHomMat3D instead of HHomMat3DArray in case of object oriented HALCON/C++, or type HHomMat3D instead of HHomMat3D[] in case of object oriented HALCON/.NET. More information.

Legacy or No Longer Supported Functionality

Note that legacy functionality may be discontinued in a future major release. See the reference manual entries of legacy operators for details on how to replace them.

Planned Discontinuation of the HALCON/C++ (legacy) Language Interface

MVTec plans to discontinue the HALCON/C++ (legacy) language interface. The timeline for this discontinuation includes the following steps:

  • HALCON 13:

    • The HALCON/C++ (legacy) interface does not contain any new class. This means, the major part of the new functionality that is introduced with HALCON 13, is not available via the HALCON/C++ (legacy) interface.
    • Since HALCON 12.0.2, there are warnings when compiling HALCON/C++ (legacy) projects.
  • Next major HALCON version after HALCON 13:

    • The HALCON/C++ (legacy) interface will not be available.

Detailed Description of Changes in HALCON 13.0

The changes in HALCON 13.0 are described with respect to HALCON 12.0.2. The detailed description of changes in previous HALCON versions can be found in the release notes of the previous HALCON versions.

HDevelop

New Functionality

Assistants
  • The Calibration Assistant has been adapted to the changes related to camera parameters. Note that this change affects the compatibility. Read more.
  • The Image Acquisition Assistant's Parameters view now shows buttons for all parameters of '<parameter>_type' 'Command' independently from the setting of their '<parameter>_access'.
GUI
  • Some buttons for seldom used functionality were removed to provide more space and a clearer layout of the HDevelop user interface. In particular, these are the 'Abort Procedure Execution' and 'Set Visualization Parameters' buttons in the main tool bar as well as the 'Set Enter Execute Mode' and 'Set Auto Completion Mode' buttons in the Program Window. Note, however, that the corresponding functionality is still available through HDevelop's main menu or preferences.
  • HDevelop's appearance on high resolution screens has been improved.
  • During the execution of the operator train_class_gmm, HDevelop now informs the user about the progress of the training via the status bar. For this, a progress bar is displayed within the status bar, which is updated after every training cycle. Additionally, the current iteration, the maximum number of iterations, and the error of the last training cycle is printed into the status bar. It is furthermore possible to stop the operator after each iteration by either stopping (e.g., F9) or resetting (e.g., F2) the program execution.
IDE
  • Within the Program Window, the default behavior of the "Enter" key has been changed from "OK (Enter and Execute)" to "Enter".
  • When the Graphics Window was in the Move mode and the Ctrl key has been pressed to display the exact coordinates of the cursor and the gray value of the image at this position, it was difficult to exactly determine the pixel to which the position and gray value belonged to, because the cursor was a hand. To make it clearer to which pixel the displayed information belongs, in this case, the cursor is now an arrow.
  • HDevelop now supports breakpoints on variables. These breakpoints are set from the context menu of the Variable Window or the Program Window, respectively. Breakpoints on variables stop the program execution when the value of a marked variable changes. The HDevelop User's Guide has been extended accordingly.
  • The dialog-based editor mode has been removed from HDevelop. There is now only a single editing mode for the Program Window, which supports both full text editing as well as editing via the Operator Window. Regardless of how a program line was created, it is now treated as text and will preserve its indent level unless explicitly reformatted using the auto indent action. Additionally, the behavior of hidden or minimized Operator Windows has been changed such that a hidden or minimized window becomes visible when selecting a line in the full text editor using Ctrl+DoubleClick.
Code Export
Miscellaneous
  • On macOS, HALCON binaries and C++ libraries now are linked against the new standard C++ library 'libc++'.
  • The visualization of HALCON has been overhauled. In this context, HDevelop has been adapted to the new visualization functionalities. It needs the new shared library hcanvas.dll/libhcanvas.so that must be located in the same folder as the halcon.dll. Note that this change affects the compatibility. Read more.

Bug Fixes

Assistants
  • While HDevelop's Calibration Assistant internally converted color images to gray images, the generated code for the calibration procedure did not. Therefore, the necessary poses couldn't be determined from the calibration images, when the generated code was executed. This problem has been fixed. Now, the Calibration Assistant also generates the code to convert color images to gray images.
  • In the Matching Assistant, the advanced model parameter 'ignore_local_polarity' was ignored when generating code for the operator create_shape_model. This problem has been fixed.
  • Although HDevelop's Measure Assistant generates a variable that holds the minimum edge amplitude, the generated code did not use it. Instead, a constant value was used for the measuring. This problem has been fixed. Now, the variable is used.
  • The OCR Training File Browser displayed a wrong name in the status bar, when the training file is associated to an OCR assistant. This problem has been fixed.
  • HDevelop's OCR Assistant did not properly escape special characters (i.e., preceded them by a backslash) in some string parameters of generated code. As a consequence, some generated code lines were invalid due to a malformed string when they contained, e.g., a backslash as character. This problem has been fixed.
GUI
  • In the HDevelop Help Window, the names of solution guides and other documentation components were translated although these documents are available only in English. This problem has been fixed.
  • On macOS, some tooltips for keyboard shortcuts incorrectly mentioned "ctrl" instead of "cmd". This problem has been fixed.
  • Resetting an HDevelop program (by pressing F2) did not close the Visualize Object Model 3D window, although the displayed 3D models were cleared. If, in the following, e.g., the view of the Visualize Object Model 3D window was changed, or the window was updated in some other way with at least one of the displayed models still being invalid, HDevelop raised an error. This problem has been fixed. Now resetting the program automatically closes the Visualize Object Model 3D window.
  • The file extension drop-down menu for opening a classifier in the OCR Training File Browser contained some redundant entries. This problem has been fixed.
  • On macOS, the top and bottom parts of drop down lists were kept blank, such that the content wasn't always exactly readable . This problem has been fixed.
  • Some entries of the Contents tab of the HDevelop Help Window were not highlighted correctly when they had been selected. This problem has been fixed.
IDE
  • On macOS, HDevelop lost the focus when a Variable Inspect window was closed. This problem has been fixed.
  • The HDevelop operator dev_clear_obj did not clear iconic variables correctly in JIT-compiled procedures. This problem has been fixed.
  • Within the Global tab of the Variable Window, the values of global variables weren't always correctly updated. This problem has been fixed.
  • Using the procedure interface dialog to rename HDevelop procedure parameters in rare cases crashed HDevelop. This problem has been fixed.
  • HDevelop's auto completion in the free text editor showed unexpected behavior:
    • When you first started typing, a list box with all variables, functions, operators, and procedures that contain this string appeared.
    • When you closed this list box with Esc and pressed Ctrl+Space, the list box with all variables,functions, operators, and procedures that contain this string appeared again.
    • When you closed this list box with Esc and pressed the Tab key, only those variables, functions, operators, and procedures that start with the string were listed.
    This problem has been fixed. The behavior has been changed such that now the Tab key behaves like Ctrl+Space and lists all variables, functions, operators, and procedures that contain the string.
HDevelop Language
  • On Windows 64-bit systems, HDevelop sometimes crashed when trying to execute assign_at in JIT-compiled code. This problem has been fixed.
  • HDevelop allowed the vector methods .clear and .remove on non vector expressions. This problem has been fixed.
  • The HDevelop syntax allowed empty index brackets on the left side of assignment statements. For example,
    a[]:=[]
    
    was allowed in previous versions of HDevelop. Although syntactically valid, an assignment statement of this form does not have any effect. Moreover, they were not exported correctly to other languages. This problem has been fixed. In order to prevent accidental programming errors, statements of this form are no longer allowed. Note that this change affects the compatibility. Read more.
Procedures
  • If a new external procedure was created with HDevelop, and, by doing so, an existing and already loaded external procedure was overwritten, the new procedure was not loaded but the old one remained in memory. This problem has been fixed.
  • The release notes of HALCON 12.0.2 contained an incorrect note. It stated that HDevelop procedures that were available via an import statement were usable only within the procedure in which they were imported and that this problem has been fixed. This note has been corrected. Actually, before HALCON 12.0.2 HDevelop procedures that were available via an import statement were usable within the whole program and after the fix they are usable only within the procedure in which they were imported.
  • The modification state of HDevelop procedures referencing another HDevelop procedure was not updated when the referenced procedure was renamed. This problem has been fixed.
  • The procedure visualize_object_model_3d could have caused a deadlock if OpenGL was not available. This problem has been fixed.
  • The semantic type of input parameters of HDevelop procedures has been ignored. This problem has been fixed.
Code Export
  • HDevelop exported increment expressions incorrectly to C++ if the right operand of the addition was a vector access expression. This problem has been fixed.
  • HDevelop exported iconic vector element assignments incorrectly to .NET if the left side of the assignment was a vector element access expression of a 1-dimensional vector and the right side of the assignment was an iconic variable. This problem has been fixed.
  • Exporting HDevelop programs with hdevelop -convert did not work when the program file was specified with a relative path and the program contained import statements relative to the program. At least, the import procedures could not be resolved and, as a consequence, were not exported, but HDevelop might even have crashed. This problem has been fixed.
  • HDevelop crashed when trying to export continue statements to Visual Basic .NET if the program line before the continue statement was deactivated, a comment, or invalid. This problem has been fixed.
  • HDevelop's command line export sometimes exported procedure libraries incorrectly, and, as a consequence, output parameters of private procedures might have stayed undeclared. This problem has been fixed.
  • HDevelop in many cases exported vector .length() expressions incorrectly to C++. This problem has been fixed.
  • HDevelop exported dev_open_window calls as HALCON open_window calls with parameter "Mode" set to "". This problem has been fixed. Now, in the exported code "Mode" is set to "visible", which is the default value for that parameter.
  • C and C++ code exported from HDevelop erroneously called the HALCON operator set_system before XInitThreads, which could have caused problems as the first operator call already opens an X connection. This problem has been fixed. Now, in exported code XInitThreads is called before any HALCON operator.
  • HDevelop exported the .clear() operation incorrectly. This problem has been fixed.
  • When exporting procedures to ASCII format, HDevelop omitted the names of all vector parameters. This problem has been fixed.
  • HDevelop's Visual Basic export indented some lines incorrectly. This problem has been fixed.
Miscellaneous
  • On Windows systems, top-level HALCON graphic and text windows were not opened in a special window thread during JIT-compiled execution, which may have led to hangups when, e.g., displaying objects in the regarding window during regular execution. This problem has been fixed by activating the HALCON system parameter 'use_window_thread' by default in HDevelop. The HDevelop User's Guide has been extended by a corresponding paragraph.
  • HDevelop sometimes crashed if an error occurred during JIT-compiled execution of HDevelop operators. This problem has been fixed. Note that in such cases, the exception thrown by the HDevelop operator might have differed from the exception thrown if the code was executed without JIT-compilation.
  • Assigning tuple element values in vector element access expressions could have led to a crash in JIT-compiled code. Furthermore, if the regarding vector was global, its value was never set correctly, even if the operation did not crash. These problems have been fixed.
  • HDevelop procedures that generate an empty tuple sometimes did not behave as expected when executed JIT-compiled. Instead of generating an empty tuple, a tuple with one element was created. This problem has been fixed.
  • The execution of JIT-compiled procedures led to a memory leak if a switch statement had an expression as argument. This problem has been fixed.
  • HDevelop behaved inconsistently when executing procedures containing get_mbutton or get_mbutton_sub_pix JIT-compiled. Now, procedures containing get_mbutton or get_mbutton_sub_pix are excluded from JIT-compiled procedure execution.
  • On Linux systems, HDevelop sometimes crashed when the execution of long running operators was cancelled (by moving the program counter or editing the program). This problem has been fixed.
  • HDevelop programs involving try-catch blocks sometimes caused HDevelop to freeze. This problem has been fixed.
  • Calling dev_clear_obj on an iconic vector element incorrectly cleared the whole vector. Furthermore, HDevelop exported clear_obj and dev_clear_obj incorrectly if the argument was a vector access expression. These problems have been fixed.
  • Some operators that have a recommended alternative in HDevelop (dev_*) did not have a warning in HDevelop referring to the recommended HDevelop operator. This problem has been fixed. Now, warnings are also shown for set_rgb, set_gray, and set_hsi that recommend to use dev_set_color instead.
  • HDevelop operators with control output parameters, e.g., dev_get_preferences, leaked memory when they were executed JIT-compiled. This problem has been fixed.
  • Occasionally, the error 5175 ("negative width of area (or 0)") was shown while zooming or moving the image in the Graphics Window. This problem has been fixed.
  • Stopping JIT-compiled procedure execution via user interaction, e.g. by pressing F9, created a memory leak in case the procedure contained local variables. This problem has been fixed.
  • When trying to execute a procedure JIT-compiled in parallel, the same JIT-compiler information or warning appeared multiple times in the output console. This problem has been fixed.
  • On macOS, HDevelop's auto completion erroneously 'completed' code lines like 'for Index := 1 t ' or the already complete code line 'a := 1' when pressing the Tab key or the Enter key. This problem has been fixed.
  • The line profile showed unexpected behavior. In particular, the y-size for the line profile was based on the current profile, so that the axis scaling changed when moving the ROI around. This problem has been fixed. Now, the size for the line is based on the current image.

HDevelop Example Programs

New, Improved, or Deleted HDevelop Example Programs
  • HALCON's multiview stereo surface reconstruction now supports the new method 'surface_fusion' in addition to the existing method 'surface_pairwise'. The new HDevelop example program
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_pairwise_workflow.hdev
    shows the recommended workflow necessary for pairwise reconstruction.
    The new HDevelop example programs
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_fusion.hdev
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_fusion_workflow.hdev
    show the usage of parameters and some results of the new method 'surface_fusion'.
    They use the new images
    • engine_part_cam_[0-2]_[01-05]
    from the subdirectory images/3d_machine_vision/multi_view.
    They also use the new camera setup model
    • hdevelop/3D-Reconstruction/Multi-View/cam_setup_model.csm.
    Note that this change affects the compatibility. Read more.
  • After various operators were set legacy, the following HDevelop example programs have been removed:
    • hdevelop/Applications/Position-Recognition-2D/adapt_pattern.hdev
    • hdevelop/Applications/Position-Recognition-2D/pattern.hdev
    • hdevelop/Applications/Position-Recognition-2D/pm_illu.hdev
    • hdevelop/Applications/Position-Recognition-2D/pm_illu_rectify.hdev
    • hdevelop/Applications/Position-Recognition-2D/pm_illu_rot.hdev
    • hdevelop/Matching/Gray-Value-Based/best_match.hdev
    • hdevelop/Matching/Gray-Value-Based/best_match_mg.hdev
    • hdevelop/Matching/Gray-Value-Based/best_match_rot_mg.hdev
    • hdevelop/Matching/Gray-Value-Based/best_match_rot_mg_clip1.hdev
    • hdevelop/Matching/Gray-Value-Based/best_match_rot_mg_clip2.hdev
    • hdevelop/Matching/Gray-Value-Based/create_template_rot.hdev
    • hdevelop/Matching/Gray-Value-Based/fast_match_mg.hdev
    • hdevelop/Matching/Gray-Value-Based/set_offset_template.hdev
    • hdevelop/Matching/Gray-Value-Based/set_reference_template.hdev
    • hdevelop/Matching/Gray-Value-Based/write_template.hdev
    • hdevelop/Regions/Transformations/hamming_change_region.hdev
    • hdevelop/Regions/Transformations/interjacent.hdev
    • hdevelop/Tools/Function/match_function_trans_plot.hdev
    • hdevelop/Segmentation/Classification/class_ndim_box.hdev
    • hdevelop/Segmentation/Region-Growing/expand_line.hdev
    The following HDevelop example programs have been adapted accordingly:
    • hdevelop/Transformations/2D-Transformations/vector_angle_to_rigid.hdev
    • hdevelop/Filters/Misc/symmetry.hdev
    • hdevelop/Image/Acquisition/dahengcam.hdev
    • hdevelop/Image/Acquisition/matrixvisionacquire.hdev
    • hdevelop/Image/Acquisition/pylon.hdev
    • hdevelop/Regions/Transformations/remove_noise_region.hdev
  • The visualization of HALCON has been overhauled. In this context, HALCON has been extended by the following new HDevelop example programs:
    • the new HDevelop example program hdevelop/Develop/dev_disp_text.hdev has been added to show the effect of the generic parameters of dev_disp_text
    • the new HDevelop example program hdevelop/Graphics/Parameters/advanced_visualization_settings.hdev shows how to use transparency, achieve a flicker-free visualization with flush_buffer, and improve the visualization quality of images and regionss.
    The following examples have been adapted:
    • The HDevelop example program hdevelop/Filters/Geometric-Transformations/projective_trans_image_reduced.hdev has been adapted to use the new operator flush_buffer instead of an additional buffer window.
    • The HDevelop example program hdevelop/Inspection/Bead-Inspection/apply_bead_inspection_model.hdev has been adapted to use flush_buffer.
    • The HDevelop example program hdevelop/Transformations/Poses/explain_poses.hdev has been adapted to work with the 3 channel image returned by dump_window_image.
    • The HDevelop example program hdevelop/Applications/Measuring-2D/extract_clips_xl.hdev has been adapted to work with floating point precise parts.
    • The HDevelop example program hdevelop/Applications/OCR/generate_system_font.hdev has been adapted to the new font handling.
    • The example cpp/qt/Matching has been rewritten to use the new full featured buffer window internally. Further, this example has been extended with basic manipulation of the window contents by mouse interactions.
    • The example cpp/mfc/MatchingExtWin has been slightly adapted, since set_window_dc is no longer necessary in this example.
    The following examples have been removed:
    • the HDevelop example program hdevelop/Develop/dev_set_paint.hdev has been removed,
    • the example c/source/example7 has been removed, and example8 and example_extern8 have been renamed to example7 and example_extern7.
    Note that this change affects the compatibility. Read more.
  • Surface-based matching has been extended to be able to also consider 3D edges during the matching step and 3D edges and 2D image edges during the matching and refinement steps. For this, HALCON has been extended with the new operators The new HDevelop example programs
    • hdevelop/3D-Matching/Surface-Based/find_surface_model_with_edges_simple.hdev and
    • hdevelop/3D-Matching/Surface-Based/find_surface_model_with_edges.hdev
    demonstrate the new functionality. They use the new images
    • boxes/cardboard_boxes_xyz_*.tif and
    • boxes/cardboard_boxes_*.png.
  • select_points_object_model_3d now allows to filter 3D object models by the local point density. For this, select_points_object_model_3d and get_object_model_3d_params have been extended with the new filtering attributes num_neighbors, num_neighbors_fast, and neighbor_distance.
    The new HDevelop example program
    • hdevelop/3D-Object-Model/Segmentation/select_points_object_model_3d_by_density.hdev
    demonstrates the new functionality.
  • The new HDevelop example program
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_mixed_camera_types.hdev
    shows how to calibrate a stereo setup with mixed cameras (perspective and telecentric) and performs a stereo reconstruction.
    The new HDevelop example program uses the new images
    • circuit_board_calib_cam_[0-2]_[01-08]
    • circuit_board_cam_[0-2]
    Note that this change affects the compatibility. Read more.
  • reconstruct_surface_stereo now supports to calculate the disparities based on the multigrid method and based on the multi-scanline method, i.e., corresponding to the operators binocular_disparity_mg and binocular_disparity_ms.
    The new HDevelop example program
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_disparity_method.hdev
    demonstrates the new functionality and compares the results of the provided disparity methods.
  • HALCON has been extended with an operator find_ncc_models that finds multiple NCC models in one call. Additionally, HALCON has been extended with an operator get_ncc_model_region that returns the region used to create an NCC model. get_ncc_model_region only works for models created with HALCON 13 or higher. The new procedure
    • dev_display_ncc_matching_results
    can be used to display the matching results. The new HDevelop example program
    • hdevelop/Applications/Completeness-Check/check_cable_labels.hdev
    shows the new functionality. It uses the new images
    • label/cable_labels_[01-05].
    Note that this change affects the compatibility. Read more.
  • HALCON has been extended with an external procedure check_hand_eye_calibration_input_poses.hdvp that checks the input poses of the hand-eye calibration. The procedure is able to identify errors in the input poses and to verify that the correct calibration model was chosen by the user. Both types of errors, which often occur in practice, result in large calibration errors. With the new procedure, these errors, which otherwise would be hard to identify, can now be detected easily.
    The new HDevelop example program
    • hdevelop/Calibration/Hand-Eye/check_hand_eye_calibration_input_poses.hdev
      shows how to use the new procedure.
    Furthermore, the following existing HDevelop example programs have been adapted to use the new procedure:
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_moving_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_stationary_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_stationary_3d_sensor.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration_poses.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration_poses.hdev
  • The HDevelop example program
    • hdevelop/Control/align_measurements_multithreading.hdev
    has been removed from the file set as it demonstrated a parallelization strategy that is not recommended. Data parallelization is already performed by the automatic operator parallelization (AOP) and an additional manual implementation of data parallelization in most cases does not lead to any further runtime enhancement. Actually, in this specific case, the parallelized application was even slower than the sequential application would have been. For cases in which a manual implementation of data parallelization might be reasonable, a suitable example is still provided by the HDevelop example program
    • hdevelop/System/Parallelization/simulate_aop.hdev.
  • read_image is now faster for Windows Bitmap (BMP) images. The speedup is up to 400%.
    The new HDevelop example program
    • hdevelop/File/Images/read_image_benchmark.hdev
    compares the reading times for different image types.
  • HALCON has been extended with an operator bilateral_filter that performs a joint bilateral image filtering. The bilateral filter can be used for many tasks including edge-preserving smoothing, enhancing details, and removing small structures.
    The HDevelop example program
    • hdevelop/Filters/Smoothing/anisotropic_diffusion.hdev
    has been replaced by the new HDevelop example program
    • hdevelop/Filters/Smoothing/compare_edge_preserving_smoothing.hdev
    to show the usage of the new operator.
  • HALCON has been extended with an operator guided_filter that performs a guided image filtering. The guided filter can be used for many tasks including edge-preserving smoothing, enhancing details, and removing of small structures.
    The new HDevelop example programs
    • hdevelop/Filters/Smoothing/compare_edge_preserving_smoothing.hdev
    • hdevelop/Filters/Enhancement/enhance_details.hdev
    • hdevelop/Applications/Texture-Inspection/remove_texture_guided_filter.hdev
    show the usage of the new operator.
  • The bar code reader can now read (non-stacked) codes with defects that lead to incomplete scanlines. This is done by merging the scanlines, if no single valid scanline could be found. Merged scanlines return the status ID 1006 with the status message "Used for merging." Also the merged scanline can be retrieved with the get_bar_code_object parameter 'scanlines_merged_edges'. This new feature can be disabled for performance reasons by setting the set_bar_code_param parameter 'merge_scanlines' to 'false'.
    The following new HDevelop example program shows the decoding of defect bar codes:
    • hdevelop/Identification/Bar-Code/defect_ean13.hdev
    Additionally, the following HDevelop example programs have been adapted to show the new functionality:
    • hdevelop/Identification/Bar-Code/barcode_param_meas_param_estimation.hdev
    • hdevelop/Identification/Bar-Code/barcode_status.hdev
    • hdevelop/Identification/Bar-Code/inspect_scanlines.hdev
  • The QR code reader and the Micro QR code reader have been improved. The robustness in case of blur, overexposure, print growth, low contrast, and noise has been increased. Furthermore, the QR code reader has been improved to read symbols with non uniform column and row widths.
    The new HDevelop example program
    • hdevelop/Identification/Data-Code/qrcode_with_common_problems.hdev
    creates and reads QR codes with the above mentioned problems. It uses the new image qr_generated.png from the subdirectory images/datacode/qrcode.
    The HDevelop example program
    • hdevelop/Identification/Data-Code/micro_qr_strict_quiet_zone.hdev
    has been adapted accordingly.
  • HALCON has been extended with operators that can be used to detect texture defects using a texture inspection model. The new HDevelop example programs
    • hdevelop/Inspection/Texture-Inspection/apply_texture_inspection_model.hdev
    • hdevelop/Inspection/Texture-Inspection/apply_texture_inspection_model_simple.hdev
    show how to use the new operators. They use the new images
    • isolation_foam/isolation_foam[01-06].png and
    • carpet/carpet_[01-07].png.
  • HALCON has been extended with the procedure
    • dev_display_ncc_matching_results
    to provide an easy way to quickly visualize the results of correlation based matching.
    The HDevelop example programs
    • hdevelop/Matching/Correlation-Based/find_ncc_model_defocused.hdev
    • hdevelop/Matching/Correlation-Based/find_ncc_model_defocused_precision.hdev
    • hdevelop/Matching/Correlation-Based/find_ncc_model_exposure.hdev
    have been adapted accordingly.
  • HALCON has been extended with deep-learning-based OCR classification. The new HDevelop example programs
    • hdevelop/OCR/Convolutional-Neural-Networks/compare_ocr_pretrained_mlp_cnn.hdev
    • hdevelop/Applications/OCR/engraved_cnn.hdev
    • hdevelop/Applications/OCR/ocr_yogurt_auto.hdev
    • hdevelop/OCR/Convolutional-Neural-Networks/label_word_process_cnn.hdev
    • hdevelop/OCR/Convolutional-Neural-Networks/letters_cnn.hdev
    use the new CNN-based classifiers.
    The existing HDevelop example programs
    • hdevelop/Applications/OCR/bottle.hdev
    • hdevelop/Applications/OCR/find_text_bottle_label.hdev
    • hdevelop/Applications/OCR/ocr_lot_number.hdev
    have been adapted to use the new classifiers.
  • The automatic text reader has been extended to segment and read dot printed characters. The following new text model parameters can be used to control the extraction of dot print text and are set via set_text_model_param:
    • 'dot_print'
    • 'dot_print_tight_char_spacing'
    • 'dot_print_min_char_gap'
    • 'dot_print_max_dot_gap'
    The new HDevelop example program
    • hdevelop/OCR/Segmentation/find_text_dot_print.hdev
    shows how to use the automatic text reader for dot print text and demonstrates the usage of the dot print specific parameters.
    It uses the new images
    • ocr/dot_print_[01-11].png.
    The HDevelop example program
    • hdevelop/Applications/OCR/ocr_lot_number.hdev
    has been adapted to use the new functionality.
    For an easier differentiation between text model parameters for text models of mode 'auto' and those of mode 'manual', all parameters for text models of mode 'manual' have been extended by the prefix 'manual_' . Example programs using 'manual' text models have been adapted accordingly. For backwards compatibility, the parameter names without prefix can still be used.
  • HALCON has been extended with an operator segment_image_mser that segments Maximally Stable Extremal Regions from grayscale images.
    The new HDevelop example program
    • hdevelop/Segmentation/MSER/segment_image_mser.hdev
    shows how to use the new operator.
    The new HDevelop example program
    • hdevelop/Applications/Completeness-Check/segment_plants.hdev
    shows a corresponding application example.
    It uses the new images
    • plants/plants_[01-06].png.
  • HALCON has been extended with new HDevelop example programs that demonstrate the parallelization concept 'pipelining':
    • hdevelop/System/Multithreading/pipeline_multiple_threads_per_stage.hdev and
    • hdevelop/System/Multithreading/pipeline_one_thread_per_stage.hdev
  • The new HDevelop example program
    • hdevelop/Transformations/Dual-Quaternions/explain_dual_quaternions.hdev
    visualizes the functionality of dual quaternions.
    Furthermore, the new external procedure
    • check_hand_eye_calibration_input_poses.hdvp
    in the directory procedures/general uses the new operators to check the input poses of the hand-eye calibration. The new HDevelop example program
    • hdevelop/Calibration/Hand-Eye/check_hand_eye_calibration_input_poses.hdev
    shows how to use the new procedure.
    The following existing HDevelop example programs have been adapted to use the new procedure:
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_moving_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_stationary_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_stationary_3d_sensor.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration_poses.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration_poses.hdev
Bug Fixes
  • The Data Matrix ECC 200 code reader sometimes used a slightly wrong code region for decoding and print quality inspection. While this had no impact on the general decoding performance, for print quality inspection this could have led to significantly varying quality grades for relatively similar images. This problem has been fixed. Note that the problem concerned mainly images of codes with module sizes smaller than 10px, which is not in accordance with ISO/IEC 15415.
    The HDevelop example program
    • hdevelop/Identification/Data-Code/ecc200_contrast_tolerance.hdev
    has been adapted accordingly, and the image
    • datacode/ecc200/ecc200_contrast_variations_04.png
    has been removed.
  • The HDevelop example program
    • hdevelop/Applications/OCR/bottle.hdev
    did not work correctly, if the trained classifier from the example program
    • hdevelop/Applications/OCR/bottlet.hdev
    was used. This problem has been fixed. The example bottlet.hdev has been adapted accordingly.
  • The HDevelop example program
    • hdevelop/Applications/Object-Recognition-2D/detect_brochure_pages.hdev
    did not find all instances of the models properly due to suboptimal parameter values. This problem has been fixed.
  • In the HDevelop example program
    • hdevelop/Applications/Object-Recognition-2D/pm_multiple_models.hdev
    in one image some objects were not found. This problem has been fixed.
  • The HDevelop example program
    • hdevelop/Applications/Position-Recognition-2D/pm_world_plane.hdev
    used the initial pose instead of the optimized camera pose for the position recognition. This problem has been fixed.
  • The HDevelop example program
    • hdevelop/Applications/Position-Recognition-3D/locate_car_door.hdev
    returned a wrong match for one of the example images because of suboptimal parameter settings. This problem has been fixed.
  • The HDevelop example program
    • hdevelop/Applications/Print-Inspection/inspect_bottle_label_360_degree.hdev
    did not support an arbitrary order of the cameras. If the cameras were defined in the opposite order than originally defined in the example program, the definition of the area to be rectified was broken. This problem has been fixed.
  • Within the reference manual entry of photometric_stereo the description of the slant angle (Slants) was erroneous. It stated that the slant angle is the angle between the object plane, which lies orthogonal to the optical axis of the camera, and the direction of the illumination. Instead, the slant angle is the angle between the optical axis of the camera and the direction of the illumination. Additionally, according to the erroneous reference manual entry, the HDevelop example program
    • hdevelop/Applications/Surface_inspection/determine_tilt_slant_photometric_stereo.hdev
    used the wrong slant angles. These problems have been fixed. Furthermore, the reference manual entry of photometric_stereo has been extended with images to visualize the parameters Slants and Tilts.
  • deviation_image returned slightly incorrect results for int2 and uint2 images due to rounding problems. In addition, it returned slightly incorrect results for real images. var_threshold, which uses deviation_image internally, returned slightly incorrect results as well. These problems have been fixed.
    The HDevelop example programs
    • hdevelop/Applications/Surface_inspection/inspect_leather_photometric_stereo.hdev and
    • hdevelop/explore_halcon.hdev
    have been modified to cope with the slightly different output of var_threshold.
  • The HDevelop example program
    • hdevelop/Calibration/Hand-Eye/pick_and_place_scara_stationary_cam.hdev
    has been simplified by removing the unnecessary variables MapUpperLeftX and MapUpperLeftY.
  • In the HDevelop example program
    • hdevelop/Calibration/Hand-Eye/pick_and_place_scara_stationary_cam.hdev
    it is possible to switch off the image rectification by setting the parameter RectifyImages at the top of the program to false. In this case, the model region did not fit the model image, which resulted in an incomplete model. Furthermore, in this case the program later tried to read the variable MPInCamPoseMapping, which was not instantiated. This caused a program exception. These problems have been fixed.
  • Within the HDevelop example program
    • hdevelop/Segmentation/Classification/novelty_detection_mlp.hdev
    the visualization of the classification results was slightly misleading and highlighted too many errors. This problem has been fixed.
  • In the HDevelop example program
    • hdevelop/Segmentation/Topography/watersheds_threshold.hdev,.
    one of the used threshold values had not been adapted according to the slightly different results of the preceding filtering step after gauss_image had been replaced by gauss_filter in HALCON 12. This problem has been fixed.
  • The HDevelop example program
    • solution_guide/3d_vision/mosaicking.hdev
    did use some parameters that were not well explained in the comments. This problem has been fixed. Additionally, the names of some parameters and the visualization have been improved.

HDevEngine

Functionality

  • On macOS, HALCON binaries and C++ libraries now are linked against the new standard C++ library 'libc++'.
  • It is now possible to attach HDevelop to compiled HDevEngine applications for debugging purposes. The HDevEngine application must explicitely allow this behavior. Remote debugging is also supported, even for applications running on embedded devices. Debugging is not currently supported for subthreads in HDevelop code (created with par_start), JIT-compiled procedures, HDevEngine/COM applications, and execution of HDevelop programs (as opposed to execution of HDevelop procedures). Debugging of multi-threaded applications is supported (multiple application threads calling HDevelop procedures).

Bug Fixes

  • The execution of JIT-compiled procedures led to a memory leak if a switch statement had an expression as argument. This problem has been fixed.
  • HDevelop behaved inconsistently when executing procedures containing get_mbutton or get_mbutton_sub_pix JIT-compiled. Now, procedures containing get_mbutton or get_mbutton_sub_pix are excluded from JIT-compiled procedure execution.
  • HDevEngine crashed when trying to execute dev_get_system JIT-compiled. This problem has been fixed.
  • Calling the GetAllProcedureNames method on an HDevEngine object after unloading all procedures using the UnloadAllProcedures method led to a crash. This problem has been fixed.
  • The HDevelop operator dev_clear_obj did not clear iconic variables correctly in JIT-compiled procedures. This problem has been fixed.
  • Raising exceptions from subthreads (created with par_start) in HDevEngine could have caused resource leaks and possibly slowed down the application over time. This problem has been fixed.
  • HDevelop operators with control output parameters, e.g., dev_get_preferences, leaked memory when they were executed JIT-compiled. This problem has been fixed.
  • Stopping JIT-compiled procedure execution via user interaction, e.g. by pressing F9, created a memory leak in case the procedure contained local variables. This problem has been fixed.
  • Passing a two- or more-dimensional HObjectVector to a procedure call via SetInputIconicParamVector caused a hard SEHException in native code. This problem has been fixed.
  • The HDevelop language interfaces converted all input to procedures to mixed tuples. This caused some procedures to behave differently when called from a language interface than when called from HDevelop. This problem has been fixed.

HALCON Library

Speedup

  • The operators are now faster. The speedup depends on the image size and can only be observed if 'use_texture_info' is set to 'true'. For example, for images of size 960x640 pixels and default settings, speedups of around 50% are possible.
  • With standard HALCON, area_center is now faster by up to 90% on processors that support the AVX2 instruction set and smallest_rectangle1 is now faster by up to 60% on processors that support the SSE2 and AVX2 instruction sets.
  • The operators are now faster on processors that support the AVX instruction set. The following speedups can be expected:
    operator Speedup with AVX
    area_center_xld up to 50%
    elliptic_axis_xld up to 30%
    eccentricity_xld up to 30%
    compactness_xld up to 20%
  • binocular_disparity and binocular_distance are now faster with Method='ncc'. The speedup on processors that support the AVX2 instruction set is up to 100%.
  • Shape-based matching is faster for small angle or scale ranges, i.e., if the specified angle or scale extent is smaller than half the step size on the highest pyramid level. The speedup in a typical example is 30%. In order to profit from the speedup, models have to be recreated with create_shape_model, create_scaled_shape_model, create_aniso_shape_model, or one of the variants for multiple models.
  • dyn_threshold is now faster. In particular, the following speedups can be expected on machines with x86 or x64 processors that support the required version of the SSE instruction set:
    Image Type Mode Available Instruction Set Speedup
    byte 'light' or 'dark' SSE2 up to 400%
      'equal' or 'not_equal' SSE3 up to 275%
    uint2 'light' or 'dark' SSE41 up to 255%
      'equal' or 'not_equal' SSE41 up to 150%
  • HALCON's FFT and RFT operators are now faster on Intel processors that support the AVX2 instruction set. The speedup can be more than 15% if the optimization of the runtime is performed using optimize_fft_speed or optimize_rft_speed with Mode = 'patient'.
  • The operators are now significantly faster on processors that support the SSE2 or AVX instruction sets.
    The following speedups can be expected for byte and uint2 images:
    Number of pyramid levels Image Type Available Instruction Set Speedup
    3 byte SSE2 30%
        AVX 30%
      uint2 SSE2 30%
        AVX 20%
    5 byte SSE2 5%
        AVX 5%
      uint2 SSE2 5%
        AVX 5%
  • The operators for finding shape models for shape-based matching are now significantly faster on processors that support the SSE2 or AVX2 instruction sets. The speedup depends on the configuration of the shape-based matching (in particular, on the number of pyramid levels, the sub-pixel refinement, and the input image type).
    The following speedups can be expected for the following exemplary configurations:
    Number of pyramid levels Image Type Available Instruction Set Speedup
    <3 byte, uint2 SSE2 150%
        AVX2 300%
    ≥4 byte SSE2 40%
        AVX2 70%
      uint2 SSE2 100%
        AVX2 100%
    As a consequence of this speedup, the speed of the operator find_component_model also has improved significantly.
  • find_shape_model_3d is now significantly faster on processors that support the SSE2 or AVX2 instruction sets. The speedup depends on the configuration of the 3D shape-based matching (in particular, on the type of the input image, the number of pyramid levels, the metric, and the greediness). For example, for uint2 images, 4 pyramid levels, the metric 'ignore_part_polarity', and greediness set to 0.0, speedups of more than 300% can be achieved for processors supporting the AVX2 instruction set and more than 200% for processors supporting the SSE2 instruction set. For 5 pyramid levels, the metric 'ignore_local_polarity', and greediness set to 0.8, speedups of more than 30% are possible for byte images and speedups of more than 70% are possible for uint2 images (both for processors supporting either the AVX2 or the SSE2 instruction set). Note that this change affects the compatibility. Read more.
  • find_surface_model is now faster by up to 15% if parallelization is enabled.
  • find_text is faster by up to 160%.
  • Shape-based matching and correlation-based matching are now faster for the case that a huge number of candidates (e.g., 5000 or more) has to be processed.
  • gen_region_points and gen_region_runs are now faster by up to 25% and parallelized on internal data level (for at least 1024 input points/chords). gen_region_polygon is now faster by up to 25% and parallelized on internal data level.
  • The operators are now faster by up to 175% for very large input XLDs. Additionally, project_object_model_3d is now faster by up to 40% when projecting without OpenGL and hidden surface removal enabled.
  • mean_image is now faster. In particular, the following speedups can be expected:
    Image Type Filter Size Available Instruction Set Speedup
    byte 3x3 SSE2 up to 80%
        SSSE3 up to 130%
        AVX2 up to 240%
      5x5 SSE2 up to 120%
        SSSE3 up to 180%
        AVX2 up to 320%
    int2 all supported - up to 200%
    uint2 all supported - up to 200%
  • read_image is now faster for Windows Bitmap (BMP) images. The speedup is up to 400%.
    The new HDevelop example program
    • hdevelop/File/Images/read_image_benchmark.hdev
    compares the reading times for different image types.
  • reconstruct_surface_stereo is now parallelized on internal data level which results in a speedup of up to 250% on a quad core machine with hyperthreading. Note that the speedup may vary significantly between different data sets.
  • scale_image is now faster on processors that support the AVX2 instruction set. The speedup is up to 250% for byte images and up to 30% for uint2 images.
  • smooth_object_model_3d and surface_normals_object_model_3d are now faster. The speedup is up to 100%.
  • sobel_amp for FilterType='sum_abs' is now faster on processors that support the AVX2 instruction set. For byte images, the speedup is up to 100%. For uint2 images, the speedup is up to 150%.
    sobel_amp for FilterType='sum_sqrt' is now faster on processors that support the AVX2 instruction set. For byte images, the speedup is up to 25%. For uint2 images, the speedup is up to 500%.
  • sobel_dir with FilterType = 'sum_sqrt' is now faster on processors that support the SSE2 or AVX2 instruction sets. The speedup with SSE2 is up to 55%, with AVX2 it is up to 270%. Furthermore, the OCR classification with the feature 'gradient8_dir' is now faster as well, as it internally uses the functionality of sobel_dir. With AVX2, the respective speedup is up to 60%.
  • threshold is now faster:
    • On x86 and x64 processors that support the SSE2 instruction, the speedup is up to 150% for byte images and up to 100% for uint2 images.
    • On x86 and x64 processors that support the AVX instruction set, the speedup is up to 150% for real images.
    • On x86 and x64 processors that support the AVX2 instruction set, the speedup is up to 180% for byte images.
  • union1 is now faster for more than two input regions. The speedup depends on the number and size of the input regions and is up to 300% for a tuple of 100 large regions.
  • zoom_image_size and zoom_image_factor are now faster for Interpolation = 'constant' and scaling factors smaller than 1.0 for byte images. The speedup depends on the scaling factor and is up to 100% for a factor of 0.4 and up to 300% for a factor of 0.1.
    Furthermore, zoom_image_size and zoom_image_factor are now more accurate in this case. The results are comparable to those obtained in previous HALCON versions when set_system ('int_zooming', 'false') was set. Note that this change affects the compatibility. Read more.
  • The HALCON library has been accelerated on average by about 14% on Windows, 18% on Linux, and 11% on macOS on processors that support the AVX and AVX2 instruction sets. Important operators that achieve a notable speedup are listed in separate release notes. Please note that some operators may exhibit a small performance regression.

New Functionality

3D
  • HALCON's multiview stereo surface reconstruction now supports the new method 'surface_fusion'. In contrast to the already provided method 'surface_pairwise', the new method fuses the output of all used camera pairs into one optimal surface. The main advantages of this method are inherent noise reduction, outlier suppression, hole filling and nearly even subsampling of the point cloud. This comes at the cost of an increased runtime. Also, the resulting point cloud can be triangulated fast and in a high quality.
    Furthermore, it is possible to assign the color of the input images to the point cloud for both methods 'surface_pairwise' and 'surface_fusion'.
    The operators have been adapted accordingly.
    HALCON has further been extended with the operator get_stereo_model_object_model_3d, which allows to retrieve the 3D object model that was reconstructed using pairwise reconstruction as an intermediate result of the new method 'surface_fusion'.
    The new HDevelop example program
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_pairwise_workflow.hdev
    shows the recommended workflow that is necessary for a pairwise reconstruction.
    The new HDevelop example programs
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_fusion.hdev
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_fusion_workflow.hdev
    show the usage of the parameters and some results of the new method 'surface_fusion'.
    They use the new images
    • engine_part_cam_[0-2]_[01-05]
    from the subdirectory images/3d_machine_vision/multi_view.
    They also use the new camera setup model
    • hdevelop/3D-Reconstruction/Multi-View/cam_setup_model.csm.
    The documentation related to multiview stereo reconstruction, in particular the
    Solution Guide on 3D Vision and the affected reference manual entries have been adapted accordingly. Note that this change affects the compatibility. Read more.
  • The operators have been adapted to handle mixed camera setups with perspective and telecentric cameras. Additionally, the method to resolve ambiguities in purely telecentric camera setups has been improved.
    The new HDevelop example program
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_mixed_camera_types.hdev
    shows the process of calibrating a mixed stereo setup and performing a stereo reconstruction.
    The new HDevelop example program uses the new images
    • circuit_board_calib_cam_[0-2]_[01-08]
    • circuit_board_cam_[0-2]
    The documentation has been adapted in accordance with the changes of the involved operators. Note that this change affects the compatibility. Read more.
  • binocular_disparity and binocular_distance are now faster with Method='ncc'. The speedup on processors that support the AVX2 instruction set is up to 100%.
  • create_surface_model has been enhanced for the case that the model is sampled uniformly. In particular, it now takes the normal vectors of the 3D input data into account instead of only their distance. In areas with a high curvature more points are sampled, such that the point pairs are distributed more evenly in point pair feature space. Furthermore, if a very thin structure is modeled with two surfaces with opposing normals, points from both surfaces are now sampled, instead of only points of one of the two surfaces.
  • create_surface_model and create_deformable_surface_model now return an error if the passed 3D object model contains no normal vectors, no mesh, and no 2D-mapping, since in that case, the normal orientation cannot be computed reliably.
  • HALCON has been extended with a set of operators to deal with dual quaternions and to use them for transformations in three dimensional space. In comparison to transformation matrices with 12 elements, dual quaternions with 8 elements are a more compact representation for 3D rigid transformations. Similar to transformation matrices, dual quaternions can be combined easily to concatenate multiple transformations. Furthermore, they allow a smooth interpolation between two 3D rigid transformations and an efficient transformation of 3D lines. In detail, HALCON has been extended with the following operators: The new HDevelop example program
    • hdevelop/Transformations/Dual-Quaternions/explain_dual_quaternions.hdev
    visualizes the functionality of dual quaternions.
    Furthermore, the new external procedure
    • check_hand_eye_calibration_input_poses.hdvp
    in the directory procedures/general uses the new operators to check the input poses of the hand-eye calibration. The new HDevelop example program
    • hdevelop/Calibration/Hand-Eye/check_hand_eye_calibration_input_poses.hdev
    shows how to use the new procedure.
    The following existing HDevelop example programs have been adapted to use the new procedure:
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_moving_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_stationary_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_stationary_3d_sensor.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration_poses.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration_poses.hdev
  • Surface-based matching has been extended to be able to also consider 3D edges during the matching step and 3D edges and 2D image edges during the matching and refinement steps. For this, HALCON has been extended with the new operators The new HDevelop example programs
    • hdevelop/3D-Matching/Surface-Based/find_surface_model_with_edges_simple.hdev and
    • hdevelop/3D-Matching/Surface-Based/find_surface_model_with_edges.hdev
    demonstrate the new functionality. They use the new images
    • boxes/cardboard_boxes_xyz_*.tif and
    • boxes/cardboard_boxes_*.png.
  • prepare_object_model_3d and distance_object_model_3d now internally triangulate 3D objects with generic, non-triangle polygon faces.
  • reconstruct_surface_stereo is now parallelized on internal data level which results in a speedup of up to 250% on a quad core machine with hyperthreading. Note that the speedup may vary significantly between different data sets.
  • reconstruct_surface_stereo now supports to calculate the disparities based on the multigrid method and based on the multi-scanline method, i.e., corresponding to the operators binocular_disparity_mg and binocular_disparity_ms.
    The new HDevelop example program
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_disparity_method.hdev
    demonstrates the new functionality and compares the results of the provided disparity methods.
  • rel_pose_to_fundamental_matrix now supports telecentric cameras. In particular, two telecentric cameras and a combination of a pinhole and a telecentric camera are now supported.
  • select_points_object_model_3d now allows to filter 3D object models by the local point density. For this, select_points_object_model_3d and get_object_model_3d_params have been extended with the new filtering attributes num_neighbors, num_neighbors_fast, and neighbor_distance.
    The new HDevelop example program
    • hdevelop/3D-Object-Model/Segmentation/select_points_object_model_3d_by_density.hdev
    demonstrates the new functionality.
  • set_camera_setup_cam_param now ignores the parameter CameraType since it contained only redundant information that is also contained in the first element of the parameter CameraParam. Likewise, if ParamName is set to 'params', set_camera_setup_param no longer checks whether the type of the camera parameters that are passed in ParamValue matches the camera type specified with set_camera_setup_cam_param. Note that this change affects the compatibility. Read more.
  • smooth_object_model_3d and surface_normals_object_model_3d are now faster. The speedup is up to 100%.
  • vector_to_pose has been extended to support telecentric cameras.
  • write_object_model_3d is now able to write object models in the .ply binary format. Furthermore, it has been extended to write point-based extended attributes, such as color information.
  • HALCON now exports functions that allow extension packages and image acquisition interfaces to create and manage 3D object models.
Bar Code
  • The bar code reader can now read (non-stacked) codes with defects that lead to incomplete scanlines. This is done by merging the scanlines, if no single valid scanline could be found. Merged scanlines return the status ID 1006 with the status message "Used for merging." Also the merged scanline can be retrieved with the get_bar_code_object parameter 'scanlines_merged_edges'. This new feature can be disabled for performance reasons by setting the set_bar_code_param parameter 'merge_scanlines' to 'false'.
    The following new HDevelop example program shows the decoding of defect bar codes:
    • hdevelop/Identification/Bar-Code/defect_ean13.hdev
    Additionally, the following HDevelop example programs have been adapted to show the new functionality:
    • hdevelop/Identification/Bar-Code/barcode_param_meas_param_estimation.hdev
    • hdevelop/Identification/Bar-Code/barcode_status.hdev
    • hdevelop/Identification/Bar-Code/inspect_scanlines.hdev
Calibration
  • The operators have been adapted to handle mixed camera setups with perspective and telecentric cameras. Additionally, the method to resolve ambiguities in purely telecentric camera setups has been improved.
    The new HDevelop example program
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_mixed_camera_types.hdev
    shows the process of calibrating a mixed stereo setup and performing a stereo reconstruction.
    The new HDevelop example program uses the new images
    • circuit_board_calib_cam_[0-2]_[01-08]
    • circuit_board_cam_[0-2]
    The documentation has been adapted in accordance with the changes of the involved operators. Note that this change affects the compatibility. Read more.
  • The consistency of the results returned by calibrate_cameras and camera_calibration for the z-translation of telecentric cameras has been enhanced. Now, if only one camera is calibrated, the z-translation of the camera pose is always set to zero. If more than one camera is calibrated, the z-translation is changed to ease the visualization of the calibration results.
  • In case that find_calib_object could not find the calibration plate with hexagonally arranged marks, only the error 8402 ("no calibration table found") was returned. To provide more specific information, three new error messages are available:
    • 8397 ("Segmentation of the calibration marks failed")
    • 8398 ("Extraction of the mark contours failed")
    • 8399 ("No finder pattern could be found")
    Note that these additional error messages have to be considered if you work with an optional try-catch-block around find_calib_object. Note that this change affects the compatibility. Read more.
  • set_calib_data_cam_param now ignores the parameter CameraType since it contained only redundant information that is also contained in the first element of the parameter CameraParam. Note that this change affects the compatibility. Read more.
  • set_camera_setup_cam_param now ignores the parameter CameraType since it contained only redundant information that is also contained in the first element of the parameter CameraParam. Likewise, if ParamName is set to 'params', set_camera_setup_param no longer checks whether the type of the camera parameters that are passed in ParamValue matches the camera type specified with set_camera_setup_cam_param. Note that this change affects the compatibility. Read more.
  • vector_to_pose has been extended to support telecentric cameras.
  • HALCON has been extended with several improvements related to camera parameters. In particular, new camera models are available, camera parameters have been changed, the camera parameter file format has been changed, and a new procedure library that contains procedures for different tasks related to camera parameters has been introduced. The Calibration Assistant and the according documentation within the HDevelop User's Guide as well as the affected reference manual entries and the Solution Guide on 3D Vision have been adapted accordingly.
    1. New Camera Models
    The new camera models are able to model
    • object-side telecentric tilt lenses (lenses that perform a parallel projection on the object side, but a perspective projection on the image side, and for which the sensor is not perpendicular to the optical axis of the lens) and
    • image-side telecentric tilt lenses (lenses that perform a perspective projection on the object side, but a parallel projection on the image side, and for which the sensor is not perpendicular to the optical axis of the lens).
    All operators that handle camera parameters, in particular, the operators for camera calibration, have been extended to support the new camera models. The new camera models are referred to as 'area_scan_tilt_image_side_telecentric_division', 'area_scan_tilt_image_side_telecentric_polynomial', 'area_scan_tilt_object_side_telecentric_division', and 'area_scan_tilt_object_side_telecentric_polynomial'. The existing camera models 'area_scan_telecentric_tilt_division' and 'area_scan_telecentric_tilt_polynomial' are now referred to as 'area_scan_tilt_bilateral_telecentric_division' and 'area_scan_tilt_bilateral_telecentric_polynomial' for consistency with the new camera models.
    2. Changed Camera Parameters:
    The camera parameters have been extended in many ways:
    • They are now able to handle different camera models that have the same number of parameters. To facilitate this, the camera parameter tuple has been extended for all camera models. It now contains the camera type at its first position.
    • HALCON's camera model for pinhole tilt cameras (referred to as 'area_scan_tilt_division' or 'area_scan_tilt_polynomial') now has the image plane distance as a parameter (like the new model for object-side telecentric tilt lenses: 'area_scan_tilt_object_side_telecentric_division' and 'area_scan_tilt_object_side_telecentric_polynomial'). The problem with the old model for pinhole tilt lenses was that it could not model tilt lenses correctly for which the ray angles on the image side differ from the ray angles on the object side. If such lenses were tilted around the vertical or horizontal axis, a wrong tilt angle could have been estimated, while the model was consistent, i.e., returned small RMS errors. If they were tilted in any other direction, the camera geometry could not be modeled correctly, and large RMS errors may have resulted.
    • The camera model for telecentric cameras in HALCON has been modified to be more user-friendly. In particular, the physical parameters lens magnification (the ratio of the image size to the object size) and sensor element size are now modeled as explicit parameters. In previous HALCON versions, they were combined in the sensor element size. As a consequence of this change, the camera parameter tuple for telecentric cameras ('area_scan_telecentric_division', 'area_scan_telecentric_polynomial', 'area_scan_tilt_bilateral_telecentric_division', 'area_scan_tilt_bilateral_telecentric_polynomial', 'area_scan_tilt_object_side_telecentric_division', and 'area_scan_tilt_object_side_telecentric_polynomial') now contains the lens magnification as the second parameter of the camera tuple, i.e., the element that directly follows the camera type string in the new camera parameter tuple format. The lens magnification replaces the now redundant focal length of 0, which was used in previous HALCON versions to indicate that the camera is telecentric. As a consequence of this change, all camera models now behave identically with respect to the camera parameter Sy: this camera parameter cannot be determined for all camera types and is consequently kept fixed during the optimization.
    3. New Camera Parameter File Format
    The operators write_cam_par and read_cam_par have been rewritten to use a binary file format.
    4. New Procedure Library
    To facilitate the easy creation of the corresponding camera parameter tuples without having to remember the position of the individual camera parameters within the camera parameter tuple, the following procedure library is now part of the HALCON installation:
    • general/camera_parameters.hdvp
    The procedure library is located in the directory %HALCONROOT%/procedures, which is added to HDevelop's external procedure path list by default. The library contains procedures to generate camera parameter tuples for all supported camera types, to set the value of a specified camera parameter in a camera parameter tuple, to get the value of a specified parameter from a camera parameter tuple, and to get the names of the parameters in a camera parameter tuple. Note that this change affects the compatibility. Read more.
  • HALCON has been extended with an external procedure check_hand_eye_calibration_input_poses.hdvp that checks the input poses of the hand-eye calibration. The procedure is able to identify errors in the input poses and to verify that the correct calibration model was chosen by the user. Both types of errors, which often occur in practice, result in large calibration errors. With the new procedure, these errors, which otherwise would be hard to identify, can now be detected easily.
    The new HDevelop example program
    • hdevelop/Calibration/Hand-Eye/check_hand_eye_calibration_input_poses.hdev
      shows how to use the new procedure.
    Furthermore, the following existing HDevelop example programs have been adapted to use the new procedure:
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_moving_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_stationary_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_stationary_3d_sensor.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration_poses.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration_poses.hdev
Classification
  • The operators are now faster. The speedup depends on the image size and can only be observed if 'use_texture_info' is set to 'true'. For example, for images of size 960x640 pixels and default settings, speedups of around 50% are possible.
  • During the execution of the operator train_class_gmm, HDevelop now informs the user about the progress of the training via the status bar. For this, a progress bar is displayed within the status bar, which is updated after every training cycle. Additionally, the current iteration, the maximum number of iterations, and the error of the last training cycle is printed into the status bar. It is furthermore possible to stop the operator after each iteration by either stopping (e.g., F9) or resetting (e.g., F2) the program execution.
Data Code
  • The robustness of find_data_code_2d for Data Matrix ECC 200 codes has been enhanced such that fewer small false positive codes are found, which was the case only in very rare cases. Now, Data Matrix ECC 200 symbols of size 10x10, 12x12, and 8x18 are checked for a valid finder pattern and quiet zone.
  • The Data Matrix ECC 200 code reader has been improved for the case of a severely damaged or non-existing finder pattern and clock pattern.
  • The QR code reader and the Micro QR code reader have been improved. The robustness in case of blur, overexposure, print growth, low contrast, and noise has been increased. Furthermore, the QR code reader has been improved to read symbols with non uniform column and row widths.
    The new HDevelop example program
    • hdevelop/Identification/Data-Code/qrcode_with_common_problems.hdev
    creates and reads QR codes with the above mentioned problems. It uses the new image qr_generated.png from the subdirectory images/datacode/qrcode.
    The HDevelop example program
    • hdevelop/Identification/Data-Code/micro_qr_strict_quiet_zone.hdev
    has been adapted accordingly.
  • get_data_code_2d_results provides the new parameter 'orientation' to return the orientation of a successfully decoded symbol. Furthermore, the XLD contours that surround successfully decoded data code symbols (as returned in the parameter SymbolXLDs of find_data_code_2d or by setting the parameter ResultNames of get_data_code_2d_results to 'candidate_xld') now reflect the orientation of the decoded symbol. More precisely, the orientation of the first segment of each such XLD contour represents the symbol's orientation. Note that this change affects the compatibility. Read more.
  • The bar code and data code readers have been extended by a mechanism to dynamically abort the decoding process. set_bar_code_param and set_data_code_2d_param now offer the parameter 'abort', which aborts a find_bar_code or find_data_code_2d operator running parallel in another thread. Similar to the timeout mechanism, the results obtained so far can still be retrieved. The parameter 'timeout_occurred' of get_bar_code_result and get_data_code_2d_results has been replaced with the parameter 'aborted', which additionally allows to determine if the operator timed out or was aborted manually.
File
  • For read_image, the default image has been changed to the new image
    • printer_chip/printer_chip_01.
  • read_image is now faster for Windows Bitmap (BMP) images. The speedup is up to 400%.
    The new HDevelop example program
    • hdevelop/File/Images/read_image_benchmark.hdev
    compares the reading times for different image types.
Filter
  • For the operators the parameter names for the iconic output images have been adapted to better match the operator names. For example, ImageAffinTrans is now called ImageAffineTrans.
  • The operators now support an interpolation mode 'bicubic' that only performs bicubic interpolation (i.e., no smoothing if the size of the image is reduced). The new bicubic interpolation formula provides improved interpolation results compared to previous HALCON versions.
    The technical note 'Gray Value Interpolation' has been adapted to show the results of the interpolation mode 'bicubic'.
    The following operators have been adapted to use the same bicubic interpolation formula as the affine image transformations:
  • HALCON has been extended with an operator bilateral_filter that performs a joint bilateral image filtering. The bilateral filter can be used for many tasks including edge-preserving smoothing, enhancing details, and removing small structures.
    The HDevelop example program
    • hdevelop/Filters/Smoothing/anisotropic_diffusion.hdev
    has been replaced by the new HDevelop example program
    • hdevelop/Filters/Smoothing/compare_edge_preserving_smoothing.hdev
    to show the usage of the new operator.
  • edges_image now uses less temporary memory when using Canny filtering with automatic operator parallelization turned on.
  • HALCON's FFT and RFT operators are now faster on Intel processors that support the AVX2 instruction set. The speedup can be more than 15% if the optimization of the runtime is performed using optimize_fft_speed or optimize_rft_speed with Mode = 'patient'.
  • HALCON has been extended with an operator guided_filter that performs a guided image filtering. The guided filter can be used for many tasks including edge-preserving smoothing, enhancing details, and removing of small structures.
    The new HDevelop example programs
    • hdevelop/Filters/Smoothing/compare_edge_preserving_smoothing.hdev
    • hdevelop/Filters/Enhancement/enhance_details.hdev
    • hdevelop/Applications/Texture-Inspection/remove_texture_guided_filter.hdev
    show the usage of the new operator.
  • mean_image is now faster. In particular, the following speedups can be expected:
    Image Type Filter Size Available Instruction Set Speedup
    byte 3x3 SSE2 up to 80%
        SSSE3 up to 130%
        AVX2 up to 240%
      5x5 SSE2 up to 120%
        SSSE3 up to 180%
        AVX2 up to 320%
    int2 all supported - up to 200%
    uint2 all supported - up to 200%
  • scale_image is now faster on processors that support the AVX2 instruction set. The speedup is up to 250% for byte images and up to 30% for uint2 images.
  • sobel_amp for FilterType='sum_abs' is now faster on processors that support the AVX2 instruction set. For byte images, the speedup is up to 100%. For uint2 images, the speedup is up to 150%.
    sobel_amp for FilterType='sum_sqrt' is now faster on processors that support the AVX2 instruction set. For byte images, the speedup is up to 25%. For uint2 images, the speedup is up to 500%.
  • sobel_dir with FilterType = 'sum_sqrt' is now faster on processors that support the SSE2 or AVX2 instruction sets. The speedup with SSE2 is up to 55%, with AVX2 it is up to 270%. Furthermore, the OCR classification with the feature 'gradient8_dir' is now faster as well, as it internally uses the functionality of sobel_dir. With AVX2, the respective speedup is up to 60%.
  • zoom_image_size and zoom_image_factor are now faster for Interpolation = 'constant' and scaling factors smaller than 1.0 for byte images. The speedup depends on the scaling factor and is up to 100% for a factor of 0.4 and up to 300% for a factor of 0.1.
    Furthermore, zoom_image_size and zoom_image_factor are now more accurate in this case. The results are comparable to those obtained in previous HALCON versions when set_system ('int_zooming', 'false') was set. Note that this change affects the compatibility. Read more.
Graphics
  • HALCON has been extended with the operators convert_coordinates_window_to_image and convert_coordinates_image_to_window that provide a convenient way to convert pixel coordinates between image and window coordinate systems.
    The HDevelop procedure disp_message has been adapted to use the new operator convert_coordinates_image_to_window.
  • The visualization of HALCON has been overhauled.
    The new shared library hcanvas.dll/libhcanvas.so now accompanies HALCON and must be located in the same folder as the halcon.dll. If this new shared library is missing, it is still possible to use the old legacy visualization and all image processing routines in HALCON, but not in HDevelop, as it has been adapted to the new visualization. In particular, the HDevelop's Graphics Window does not work without this shared library.
    HALCON has been extended by the following operators:
    • disp_text contains and extends the functionality of the procedure disp_message. disp_message has been adapted to use the new operator.
    • dev_disp_text (internal HDevelop operator) simplifies the use of disp_text in HDevelop and integrates it
      into the stack of the HDevelop's Graphics Window. The HDevEngine class HDevOperatorImpl and its counterparts in HDevEngine .NET and HDevEngine COM
      have been extended with a method DevDispText for this new internal operator.
    • send_mouse_up_event, send_mouse_down_event, send_mouse_drag_event, and send_mouse_double_click_event integrate a buffer window into the event loop of a graphics framework.
    • set_content_update_callback registers a callback with a buffer window that is called as soon as the contents of this buffer change.
    • flush_buffer provides a recommended alternative to the set_system parameter 'flush_graphics', which can be used on all supported platforms, is thread safe, and easier to use.
    • set_rgba and get_rgba handle colors with an Alpha value != 255.
    set_window_param and get_window_param have been extended with the following new window parameters:
    • 'anti_aliasing' to enable/disable the anti aliasing of contours,
    • 'flush' to enable/deactivate the automatic flushing of the window contents,
    • 'graphics_stack' to enable/disable the graphics stack of a window,
    • 'graphics_stack_max_element_num' and 'graphics_stack_max_memory_size' to configure the size of a graphics stack, and
    • 'region_quality' to enable a more accurate way of rendering regions (at the cost of performance).
    Additionally, the behaviors of the following operators have been adapted:
    • the font handling in set_font is now consistent on all platforms.
    • get_font_extents and get_string_extents now return floating point precise values.
    • set_part accepts floating point precise parts, get_part returns them.
    • set_color and various other operators accept hexadecimal quadruples for colors with Alpha values != 255,
    • set_paint and dev_set_paint now only support the modes 'default', '3d_plot', and 'vector_field'. All other modes are now unsupported and have been removed from the documentation,
    • the set_window_param parameters interactive_plot and save_depth_buffer have been removed,
    • dump_window_image always returns three channel images, and
    • the set_system parameter graphics_stack_size has no effect. Instead, the respective parameters of set_window_param must be used.
    • the behavior of windows opened with new_extern_window changed. It is no longer possible to set HALCON window parameters in the same way as the color with windows functions (e.g. CreatePen and SelectObject). Further, it is no longer necessary to set the device context with set_window_dc.
    The reference manual entry of get_tposition has been adapted. It now clearly states that the position it returns is given in the image coordinate system.
    The new window controls HSmartWindowControl and HSmartWindowControlWPF have been added. They provide the same functionality, though there are some differences related to the technical constraints imposed by WPF and Windows Forms, respectively.
    Note the following issues related to the new window controls:
    • draw_* operators and get_mbutton/mposition(_subpix) are not supported with the new window control. Drawing objects have to be used instead.
    • Per default, the new controls allow the user to drag and zoom the window contents in a similar fashion as in the HDevelop Graphics Window. The user can switch off and on this behavior from the Designer by setting the properties HAutomaticMove and HAutomaticScale to false or true, respectively.
    • The property HNaturalZooming can be used to change the zooming direction. Per default, the window contents are zoomed in if the mouse wheel is moved up.
    • The property HResetPart can be used to change the behavior on a double-click. Per default, the contents of the HALCON window are rescaled to fill up the window control on double-click.
    • When using the property HKeepAspectRatio, the window contents are rescaled by keeping the aspect ratio. The aspect ratio is determined by the initial value of ImagePart.
    • When using the new HWindowControl within a Windows Form, the user needs to explicitly set the mouse wheel event to call the method HWindowMouseWheel if he wishes the new HWindowControl to handle the scaling of the window contents.
    • Even though the old and new controls may be employed together in the same application, this practice is not recommended as the new controls overcome many limitations of the old ones. We recommend to build new applications based on the new controls.
    • All .NET examples except the templates for the HDevelop export have been adapted to use the new controls.
    HALCON has been extended by the following new HDevelop example programs:
    • the new HDevelop example program hdevelop/Develop/dev_disp_text.hdev has been added to show the effect of the generic parameters of dev_disp_text
    • the new HDevelop example program hdevelop/Graphics/Parameters/advanced_visualization_settings.hdev shows how to use transparency, achieve a flicker-free visualization with flush_buffer, and improve the visualization quality of images and regions with the new parameters
    The following examples have been adapted:
    • The HDevelop example program hdevelop/Filters/Geometric-Transformations/projective_trans_image_reduced.hdev has been adapted to use the new operator flush_buffer instead of an additional buffer window.
    • The HDevelop example program hdevelop/Inspection/Bead-Inspection/apply_bead_inspection_model.hdev has been adapted to use flush_buffer.
    • The HDevelop example program hdevelop/Transformations/Poses/explain_poses.hdev has been adapted to work with the 3 channel image returned by dump_window_image.
    • The HDevelop example program hdevelop/Applications/Measuring-2D/extract_clips_xl.hdev has been adapted to work with floating point precise parts.
    • The HDevelop example program hdevelop/Applications/OCR/generate_system_font.hdev has been adapted to the new font handling.
    • The example cpp/qt/Matching has been rewritten to use the new full featured buffer window internally. Further, this example has been extended with basic manipulation of the window contents by mouse interactions.
    • The example cpp/mfc/MatchingExtWin has been slightly adapted, since set_window_dc is no longer necessary in this example.
    The following examples have been removed:
    • the HDevelop example program hdevelop/Develop/dev_set_paint.hdev has been removed,
    • the example c/source/example7 has been removed, and example8 and example_extern8 have been renamed to example7 and example_extern7.
    The following procedures have been adapted:
    • disp_message, disp_continue_message, and disp_end_of_program_message now use disp_text internally.
    • set_display_font has been adapted to the new behavior of set_font.
    • plot_tuple now uses dev_disp_text internally.
    The following operators are not supported with the new visualization: Note that this change affects the compatibility. Read more.
Inspection
Image
  • HALCON has been extended with the operator interleave_channels, which creates interleaved images from multi-channel images.
Matching
  • The parameters AngleStart, AngleExtent, ScaleCMax, and ScaleRMax are not used by the operators Instead, these parameters have to be set while searching for the models. The operators now use empty input tuples for these parameters. The according reference manual entries and the Solution Guide on Matching have been adapted accordingly. Additionally, the documentation regarding the parameters ScaleCMin and ScaleRMin has been improved. Note that this change affects the compatibility. Read more.
  • Shape-based matching is faster for small angle or scale ranges, i.e., if the specified angle or scale extent is smaller than half the step size on the highest pyramid level. The speedup in a typical example is 30%. In order to profit from the speedup, models have to be recreated with create_shape_model, create_scaled_shape_model, create_aniso_shape_model, or one of the variants for multiple models.
  • create_surface_model has been enhanced for the case that the model is sampled uniformly. In particular, it now takes the normal vectors of the 3D input data into account instead of only their distance. In areas with a high curvature more points are sampled, such that the point pairs are distributed more evenly in point pair feature space. Furthermore, if a very thin structure is modeled with two surfaces with opposing normals, points from both surfaces are now sampled, instead of only points of one of the two surfaces.
  • Surface-based matching has been extended to be able to also consider 3D edges during the matching step and 3D edges and 2D image edges during the matching and refinement steps. For this, HALCON has been extended with the new operators The new HDevelop example programs
    • hdevelop/3D-Matching/Surface-Based/find_surface_model_with_edges_simple.hdev and
    • hdevelop/3D-Matching/Surface-Based/find_surface_model_with_edges.hdev
    demonstrate the new functionality. They use the new images
    • boxes/cardboard_boxes_xyz_*.tif and
    • boxes/cardboard_boxes_*.png.
  • The operators are now significantly faster on processors that support the SSE2 or AVX instruction sets.
    The following speedups can be expected for byte and uint2 images:
    Number of pyramid levels Image Type Available Instruction Set Speedup
    3 byte SSE2 30%
        AVX 30%
      uint2 SSE2 30%
        AVX 20%
    5 byte SSE2 5%
        AVX 5%
      uint2 SSE2 5%
        AVX 5%
  • HALCON has been extended with an operator find_ncc_models that finds multiple NCC models in one call. Additionally, HALCON has been extended with an operator get_ncc_model_region that returns the region used to create an NCC model. get_ncc_model_region only works for models created with HALCON 13 or higher. The new procedure
    • dev_display_ncc_matching_results
    can be used to display the matching results. The new HDevelop example program
    • hdevelop/Applications/Completeness-Check/check_cable_labels.hdev
    shows the new functionality. It uses the new images
    • label/cable_labels_[01-05].
    Note that this change affects the compatibility. Read more.
  • The operators for finding shape models for shape-based matching are now significantly faster on processors that support the SSE2 or AVX2 instruction sets. The speedup depends on the configuration of the shape-based matching (in particular, on the number of pyramid levels, the sub-pixel refinement, and the input image type).
    The following speedups can be expected for the following exemplary configurations:
    Number of pyramid levels Image Type Available Instruction Set Speedup
    <3 byte, uint2 SSE2 150%
        AVX2 300%
    ≥4 byte SSE2 40%
        AVX2 70%
      uint2 SSE2 100%
        AVX2 100%
    As a consequence of this speedup, the speed of the operator find_component_model also has improved significantly.
  • The operators have been improved with respect to the calculation of the overlap between the range of rotations defined during the creation of the shape model and the range of rotations defined in the respective find operator. Previously, the wrap around at 360 degrees was not taken into account. Now, the overlap of the rotation ranges is calculated by taking into account this wrap around at 360 degrees. If necessary, the angle range is split into two unconnected ranges. Note that this change affects the compatibility. Read more.
  • find_shape_model_3d is now significantly faster on processors that support the SSE2 or AVX2 instruction sets. The speedup depends on the configuration of the 3D shape-based matching (in particular, on the type of the input image, the number of pyramid levels, the metric, and the greediness). For example, for uint2 images, 4 pyramid levels, the metric 'ignore_part_polarity', and greediness set to 0.0, speedups of more than 300% can be achieved for processors supporting the AVX2 instruction set and more than 200% for processors supporting the SSE2 instruction set. For 5 pyramid levels, the metric 'ignore_local_polarity', and greediness set to 0.8, speedups of more than 30% are possible for byte images and speedups of more than 70% are possible for uint2 images (both for processors supporting either the AVX2 or the SSE2 instruction set). Note that this change affects the compatibility. Read more.
  • find_surface_model is now faster by up to 15% if parallelization is enabled.
  • Shape-based matching and correlation-based matching are now faster for the case that a huge number of candidates (e.g., 5000 or more) has to be processed.
  • HALCON has been extended with the procedure
    • dev_display_ncc_matching_results
    to provide an easy way to quickly visualize the results of correlation based matching.
    The HDevelop example programs
    • hdevelop/Matching/Correlation-Based/find_ncc_model_defocused.hdev
    • hdevelop/Matching/Correlation-Based/find_ncc_model_defocused_precision.hdev
    • hdevelop/Matching/Correlation-Based/find_ncc_model_exposure.hdev
    have been adapted accordingly.
Memory
  • The default size of the image cache capacity that can be queried with the 'image_size_capacity' parameter of the operator get_system is increased to 16MB.
  • The temporary memory cache has been extended with two new operating modes 'shared' and 'aggregate', which attempt to reduce the memory consumption of the temporary cache.
Miscellaneous
OCR
  • The reference manual entries of the OCR operators for the creation of a classifier now state which features are not scale-invariant. These features should only be used if the size of the samples does not change between training and testing.
  • The reference manual entries of now clearly describe the meaning of the classification result '\x1A', which stands for the rejection class.
  • find_text is faster by up to 160%.
  • HALCON has been extended with deep-learning-based OCR classification. With deep learning, the features for classification can be learned directly in a Convolutional Neural Network (CNN). Thus, it is also called CNN-based OCR. In general, those learned representations lead to improved classification results.
    HALCON now provides multiple pretrained CNN-based OCR classifiers which have been trained on a large sophisticated training data set. The new classifiers support robust recognition of dot-print, industrial, and document font-types in a single classifier. That means, there is no need to choose a specific classifier for each application type individually. Hence, the new classifiers are named 'Universal'. Note that the new OCR classifiers support also fonts with a rejection class, so that they can be used in combination with the automatic text reader (find_text). The following pretrained classifiers (for different symbol sets) are available:
    • Universal_Rej.occ
    • Universal_NoRej.occ
    • Universal_0-9_Rej.occ
    • Universal_0-9_NoRej.occ
    • Universal_0-9+_Rej.occ
    • Universal_0-9+_NoRej.occ
    • Universal_0-9A-Z_Rej.occ
    • Universal_0-9A-Z_NoRej.occ
    • Universal_0-9A-Z+_Rej.occ
    • Universal_0-9A-Z+_NoRej.occ
    • Universal_A-Z+_Rej.occ
    • Universal_A-Z+_NoRej.occ
    An optimized AVX and SSE implementation of the underlying CNN provides fast recognition speed. However, in HALCON 13, the CNN-based OCR classifiers are slower than the traditional MLP-based classifiers with hand-crafted features.
    Please note that the new classifiers only require a bounding box segmentation around the character which is to be classified. There is no need to precisely segment the contours of the character because all trained features are based on the image pixels and not the segmented region. As long as the character is fully contained in the bounding box the recognition is robust even if parts of the character are missing.
    To use the new classifiers, HALCON has been enhanced with the new operators: The new HDevelop example programs
    • hdevelop/OCR/Convolutional-Neural-Networks/compare_ocr_pretrained_mlp_cnn.hdev
    • hdevelop/Applications/OCR/engraved_cnn.hdev
    • hdevelop/Applications/OCR/ocr_yogurt_auto.hdev
    • hdevelop/OCR/Convolutional-Neural-Networks/label_word_process_cnn.hdev
    • hdevelop/OCR/Convolutional-Neural-Networks/letters_cnn.hdev
    use the new CNN-based classifiers.
    The existing HDevelop example programs
    • hdevelop/Applications/OCR/bottle.hdev
    • hdevelop/Applications/OCR/find_text_bottle_label.hdev
    • hdevelop/Applications/OCR/ocr_lot_number.hdev
    have been adapted to use the new classifiers.
  • set_text_model_param, get_text_result, and get_text_object have been extended with additional parameters:
    • set_text_model_param has been extended with the parameter 'num_classes', that specifies the number of stored classes for each classified character.
    • get_text_result now supports the output of more than one classification result of a segmented character, including characters that are classified as rejection class. To this aim, use ['class', n] to get the classification results with (n+1)-highest confidence for all characters in all segmented text lines or ['class_line', LineIndex, n] for all characters in the line with index LineIndex. ['class_element', Index] returns all stored classification results for the character at position Index. The corresponding confidences can be returned using ['confidence', n], ['confidence_line', LineIndex, n], or ['confidence_element', Index]. The number of stored classification results for each character can be queried by 'num_classes'. The polarity of a character at position Index can be returned using ['polarity_element', Index].
    • get_text_object now supports the output of a segmented character at position Index, using ['element', Index].
  • The automatic text reader has been extended to segment and read dot printed characters. The following new text model parameters can be used to control the extraction of dot print text and are set via set_text_model_param:
    • 'dot_print'
    • 'dot_print_tight_char_spacing'
    • 'dot_print_min_char_gap'
    • 'dot_print_max_dot_gap'
    The new HDevelop example program
    • hdevelop/OCR/Segmentation/find_text_dot_print.hdev
    shows how to use the automatic text reader for dot print text and demonstrates the usage of the dot print specific parameters.
    It uses the new images
    • ocr/dot_print_[01-11].png.
    The HDevelop example program
    • hdevelop/Applications/OCR/ocr_lot_number.hdev
    has been adapted to use the new functionality.
    For an easier differentiation between text model parameters for text models of mode 'auto' and those of mode 'manual', all parameters for text models of mode 'manual' have been extended by the prefix 'manual_' . Example programs using 'manual' text models have been adapted accordingly. For backwards compatibility, the parameter names without prefix can still be used.
  • All pre-trained MLP fonts have been retrained to only use scale invariant features.
Parallelization
Region
  • gen_region_points and gen_region_runs are now faster by up to 25% and parallelized on internal data level (for at least 1024 input points/chords). gen_region_polygon is now faster by up to 25% and parallelized on internal data level.
  • union1 is now faster for more than two input regions. The speedup depends on the number and size of the input regions and is up to 300% for a tuple of 100 large regions.
Segmentation
  • dyn_threshold is now faster. In particular, the following speedups can be expected on machines with x86 or x64 processors that support the required version of the SSE instruction set:
    Image Type Mode Available Instruction Set Speedup
    byte 'light' or 'dark' SSE2 up to 400%
      'equal' or 'not_equal' SSE3 up to 275%
    uint2 'light' or 'dark' SSE41 up to 255%
      'equal' or 'not_equal' SSE41 up to 150%
  • HALCON has been extended with an operator segment_image_mser that segments Maximally Stable Extremal Regions from grayscale images.
    The new HDevelop example program
    • hdevelop/Segmentation/MSER/segment_image_mser.hdev
    shows how to use the new operator.
    The new HDevelop example program
    • hdevelop/Applications/Completeness-Check/segment_plants.hdev
    shows a corresponding application example.
    It uses the new images
    • plants/plants_[01-06].png.
  • threshold is now faster:
    • On x86 and x64 processors that support the SSE2 instruction, the speedup is up to 150% for byte images and up to 100% for uint2 images.
    • On x86 and x64 processors that support the AVX instruction set, the speedup is up to 150% for real images.
    • On x86 and x64 processors that support the AVX2 instruction set, the speedup is up to 180% for byte images.
System
  • The usability of has been improved. In particular, these operators now accept empty tuples in addition to empty strings as default parameters.
  • The error messages of LAPACK now are logged as HALCON low level errors. Thus, they are not printed to the standard output anymore.
XLD

Bug Fixes

3D
Bar Code
  • get_bar_code_object and get_bar_code_result returned the misleading error message error 8727 ("Feature or operation available only in 'persistent' mode") with respect to the generic parameters that require the model to be in 'persistence' mode if they were called without a previous call to find_bar_code or decode_bar_code_rectangle2. This problem has been fixed. Now, the error 8729 ("Neither find_bar_code nor decode_bar_code_rectangle2 have been called in persistent mode on this model") is returned, which indicates that the operators find_bar_code or decode_bar_code_rectangle2 must be called first. Please note that only the error message and the error number have been changed.
  • get_bar_code_result returned a wrong value for the 'Minimal Reflectance' print quality grade due to ISO15416. This problem has been fixed.
  • get_bar_code_result in some cases returned the status 'unknown decoding status.' (0) when 'stop_after_result_num' was set to the number of expected bar codes. This problem has been fixed. Note that this problem had no effect on the bar code reading.
  • query_bar_code_params returned wrong results if Properties was set to 'all'. Furthermore, this could have led to an undefined behavior. This problem has been fixed.
Calibration
  • binocular_calibration sometimes falsely caused LAPACK error messages in the console output when excluding all internal camera parameters of a camera. This problem has been fixed.
  • calibrate_cameras returned incorrect covariances and standard deviations if cameras with the polynomial distortion model were calibrated. This problem has been fixed.
  • The hand-eye-calibration for articulated robots (calibrate_hand_eye and hand_eye_calibration) in very rare cases returned large errors and incorrect poses. This problem has been fixed.
  • camera_calibration might have frozen in case of inconsistent input data. This problem has been fixed. Other functionality that processes poses might have been affected as well in case of very large rotation values.
  • create_caltab created incorrect postscript files if the number of rows was even or if the number of marks per row was 3. This problem has been fixed.
  • find_calib_object crashed in rare cases if the finder pattern had been identified erroneously. This problem has been fixed.
  • find_calib_object in rare cases did not find the calibration plate.This problem has been fixed.
  • fit_ellipse_contour_xld in rare cases might have frozen for degenerate input data. Other operators that fit ellipses might have been affected as well, e.g., segment_contours_xld, find_calib_object, calibrate_cameras, or apply_metrology_model. This problem has been fixed.
  • get_camera_setup_param did not support the parameters 'reference_camera' and 'coord_transf_pose'. This problem has been fixed.
  • Within the reference manual entry of binocluar_calibration, the meaning and description of the options "pose_rel", "pose1", and "pose2" of EstimateParams was confusing and did not adequately describe the operation of the operator. In HALCON 12, these options had the following meaning:
    • "pose_rel": Optimize all poses (the relative pose of the cameras and the poses of the calibration tables).
    • "pose1": Optimize the relative pose of the cameras.
    • "pose2": Optimize the poses of the calibration tables relative to camera 1 and camera 2.
    These options have been replaced by the following options:
    • "pose_rel": Optimize the relative pose of the cameras.
    • "pose_caltabs": Optimize the poses of the calibration tables relative to camera 1 and camera 2.
    • "pose": Optimize all poses (the relative pose of the cameras and the poses of calibration tables).
    Note that this change affects the compatibility. Read more.
Classification
Compute Device
Data Code
  • clear_data_code_2d_model for QR Codes in very rare cases had a small memory leak when the operator was run in multiple instances in parallel. This problem has been fixed.
  • clear_data_code_2d_model for Data Matrix ECC 200 codes had a small memory leak. This problem has been fixed.
  • find_data_code_2d in very rare cases had undefined behavior for Micro QR and Aztec codes. This problem has been fixed.
  • find_data_code_2d in rare cases crashed for Data Matrix ECC 200 symbols, if a candidate was bigger than the image. This problem has been fixed.
  • find_data_code_2d in very rare cases might have crashed. This problem has been fixed.
  • In some cases, the timeout in find_data_code_2d was not very precise for Data Matrix ECC 200 codes and for QR codes. This problem has been fixed.
  • find_data_code_2d might not have found all Data Matrix ECC 200 codes in an image if the codes were very close to another. This problem has been fixed.
  • find_data_code_2d contained a memory leak for QR codes if the parameter 'persistence' was set to 1, the number of candidates was larger than 1, and the 'model_type' was not explicitly set to 1 or 2. This problem has been fixed.
  • find_data_code_2d had a memory leak for PDF417, MicroQR, and QR codes. The memory leak occurred only in the case of successive calls to find_data_code_2d on images with increasing image or domain sizes. This problem has been fixed.
  • The resolution of the timeouts in find_data_code_2d for Data Matrix ECC 200 codes has been improved.
  • find_data_code_2d in very rare cases determined inconsistent model parameters for PDF417 codes during the training. This problem has been fixed.
  • The Data Matrix ECC 200 code reader could have crashed in very rare cases if the image contained a damaged code. This problem has been fixed.
  • The Data Matrix ECC 200 code reader sometimes used a slightly wrong code region for decoding and print quality inspection. While this had no impact on the general decoding performance, for print quality inspection this could have led to significantly varying quality grades for relatively similar images. This problem has been fixed. Note that the problem concerned mainly images of codes with module sizes smaller than 10px, which is not in accordance with ISO/IEC 15415.
    The HDevelop example program
    • hdevelop/Identification/Data-Code/ecc200_contrast_tolerance.hdev
    has been adapted accordingly, and the image
    • datacode/ecc200/ecc200_contrast_variations_04.png
    has been removed.
  • The Data Matrix ECC 200 code reader with 'finder_pattern_tolerance'='high' falsely discarded candidates in certain cases of quiet zone violation. This problem has been fixed.
  • The operators that belong to the 2D data code reader and to the 2D metrology model could have crashed when running out of memory. This problem has been fixed. Now, they return the error 6001 ("Not enough memory available") instead.
  • The Aztec code reader in very rare cases accessed invalid memory locations. This problem has been fixed.
  • The Aztec code reader could have crashed if the width or height of the image was 1. This problem has been fixed.
  • The Aztec code reader may have crashed in very rare cases. This problem has been fixed.
  • For Micro QR codes, get_data_code_2d_results sometimes falsely returned 0.0 for the Unused Error Correction for ISO/IEC 15415 or AIMDPM-1-2006. This problem has been fixed.
  • get_data_code_2d_results might have not returned 'timeout_occurred' == true although a timeout was thrown for Data Matrix ECC 200, PDF417, and QR Codes. This problem has been fixed.
  • get_data_code_2d_results for QR and Micro QR Codes in some cases might have returned an incorrect print growth quality. This problem has been fixed.
  • For Micro QR codes, get_data_code_2d_results always returned 'undefined' for the 'error_correction_level'. This problem has been fixed. Now, the operator returns 'N', 'L', 'M', or 'Q' for the 'error_correction_level' if a symbol is found.
  • For Micro QR codes, the operator get_data_code_2d_results (..., 'status', ...) returned 'symbol format information decoded' instead of 'error correction failed' if the error correction failed. This problem has been fixed.
  • get_data_code_2d_results in very rare cases returned incorrect print quality inspection grades when the code was dot printed or the code border had strong defects. This problem has been fixed.
  • get_data_code_2d_results crashed while retrieving the 'decoded_string' for QR codes if the 'filename_encoding' was set to 'utf8' via set_system. This problem has been fixed.
Feature
  • moments_region_2nd_rel_invar calculated the output parameter PHI2 incorrectly. This led also to a wrong formular in the corresponding reference manual entry. These problems have been fixed.
File
  • When reading GIF images, a global buffer overflow could have occurred in read_image. This problem has been fixed.
  • read_image did not scale the gray values of PNG images with an sBit correctly. This affected PNG images, for which the original image had a bit depth other than 8 bit or 16 bit. This problem has been fixed. Note that this change affects the compatibility. Read more.
Filter
  • binary_threshold in rare cases returned the error 6006 ("Tmp-memory management: could not find memory element") for uint2 images. This problem has been fixed.
  • deviation_image returned slightly incorrect results for int2 and uint2 images due to rounding problems. In addition, it returned slightly incorrect results for real images. var_threshold, which uses deviation_image internally, returned slightly incorrect results as well. These problems have been fixed.
    The HDevelop example programs
    • hdevelop/Applications/Surface_inspection/inspect_leather_photometric_stereo.hdev and
    • hdevelop/explore_halcon.hdev
    have been modified to cope with the slightly different output of var_threshold.
  • edges_color in rare cases returned the error 6001 ("Not enough memory available") if the number of run lengths of the input image's domain was less than the number of threads. This problem has been fixed.
  • The results of edges_sub_pix with the filters 'shen' and 'mshen' were not correct. This problem has been fixed.
  • inpainting_texture sometimes did not handle pixels at the image border. This problem has been fixed.
  • var_threshold crashed if the domain of the input image was an empty region. This problem has been fixed.
Graphics
  • disp_object_model_3d and display_scene_3d did not work on Linux with 16 bit color depth. This problem has been fixed.
  • For draw_ellipse in rare cases the ellipse could not be modified. This problem has been fixed.
  • The procedure visualize_object_model_3d could have caused a deadlock if OpenGL was not available. This problem has been fixed.
  • The interaction with a drawing object of type ellipse_sector may have led to a crash if the markers that define the sector were moved. This problem has been fixed.
  • open_window and set_window_extents didn't correctly set the window dimensions on Linux systems with the Openbox window manager. This problem has been fixed.
  • read_char did not read non-ASCII characters if the locale was set to an UTF8 locale, e.g., en_US.UTF-8, under Linux and macOS. This problem has been fixed.
  • Some operators that have a recommended alternative in HDevelop (dev_*) did not have a warning in HDevelop referring to the recommended HDevelop operator. This problem has been fixed. Now, warnings are also shown for set_rgb, set_gray, and set_hsi that recommend to use dev_set_color instead.
  • set_scene_3d_instance_pose crashed with invalid instance indices. set_scene_3d_instance_param did not work correctly if instances have been removed before. These problems have been fixed.
  • set_window_extents and get_window_extents did not work correctly with buffer windows. This problem has been fixed.
  • Drawing objects of type ellipse_sector could not be rotated by using the arrow markers. This problem has been fixed.
Image
  • elliptic_axis_gray returned undefined values for Ra, Rb, and Phi if the gray value area of the region was zero. This problem has been fixed. Now, in this case zero is returned for the ellipse parameters.
  • read_image could not read bitmap images version 4 and 5 with unused but corrupt bitfield header. This problem has been fixed.
  • read_image had a memory leak if the image to be read was a corrupt PNG image. This problem has been fixed.
  • set_grayval sometimes failed when setting the gray values of an image that contained channels with mixed types. Additionally, the operator would raise an unexpected exception if called with empty tuples for rows, columns, and gray values. These problems have been fixed. set_grayval now returns no error if called with empty tuples for rows, columns, and gray values. Additionally, an explicit error is returned when setting a single gray value for multiple pixels on an image with multiple channels that require a different number of gray values.
Matching
  • The error name for the error code 3359 ("Wrong number of image channels"), which is returned if create_ncc_model or determine_ncc_model_params are called with multichannel images, has been renamed from H_ERR_MLP_WRNUMCHAN to H_ERR_WRNUMCHAN.
    Note that this change affects the compatibility. Read more.
  • Using a byte image as input to create_scaled_shape_model could have led to a buffer overrun in rare cases. This problem has been fixed.
  • create_uncalib_descriptor_model and create_calib_descriptor_model sometimes erroneously threw the error 8977 ("Too few feature points can be found"), although enough feature points were present. This problem has been fixed.
  • determine_shape_model_params in rare cases returned the error 9260 ("Number of points too small") when the parameter ScaleMin has been set to a value smaller than 1.0. This problem has been fixed.
  • find_shape_model_3d in rare cases returned non-intuitive score values if the generic parameter 'recompute_score' was set to 'true' or if the parameter 'lowest_model_level' > 1. For example, in some cases, a score value of almost 1.0 was returned even if a significant part of the model was not visible in the image. This problem has been fixed. Note that because of this fix, the execution time of find_shape_model_3d might slightly increase compared to previous versions if 'fast_pose_refinement' is set to 'false' in create_shape_model_3d.
  • find_surface_model returned the first match multiple times if it was executed using only a single thread and multiple matches were requested. This problem has been fixed. Now, multiple matches are returned in this case.
  • The automatic parameter estimation of shape based matching in rare cases estimated a value for 'min_contrast' that was higher than the estimated value for 'contrast'. This problem has been fixed.
  • write_shape_model did not write the properties 'border_shape_models' and 'timeout'. This problem has been fixed.
Measure
  • The operators that belong to the 2D data code reader and to the 2D metrology model could have crashed when running out of memory. This problem has been fixed. Now, they return the error 6001 ("Not enough memory available") instead.
  • serialize_metrology_model and write_metrology_model did not handle metrology models correctly if metrology objects have been deleted from these models. deserialize_metrology_model and read_metrology_model crashed if such models were read. This problem has been fixed.
Memory
  • Turning off the temporary memory cache did not flush the temporary memory caches of all threads in the thread pool. This problem has been fixed.
Miscellaneous
  • edges_sub_pix and edges_color_sub_pix with the parameter Filter set to 'sobel_fast' in rare cases returned XLDs with duplicate points. This problem has been fixed.
  • For get_operator_info, the value 'parameter' of the parameter Slot was missing in the list of values. This led to the problem that this value was not proposed by HDevelop's auto completion. This problem has been fixed.
  • reconstruct_surface_stereo determined normal vectors even if their calculation was instable. This problem has been fixed. Now, in these cases, the returned normal vectors are set to the zero vector.
  • set_window_extents did not check possible errors when retrieving the dimensions of the bounding rectangle of the specified window. This problem has been fixed, Now, the error 5154 ("Wrong values for image area") is returned in case of a failure.
  • HALCON didn't respect the system's locale setting when converting strings to floating point numbers. This problem has been fixed.
  • With macOS 10.11, Apple changed the way the AppKit display cycle works, severely impacting the performance of the HALCON visualization. This negative impact has been mostly mitigated.
  • HALCON no longer defines the constants MIN_COLUMN, MAX_COLUMN, MIN_LINE, and MAX_LINE in HConst.h. Note that this change affects the compatibility. Read more.
Morphology
  • gray_tophat could have crashed when using very large structuring elements. This problem has been fixed.
OCR
  • find_text in rare cases returned characters from one text line as punctuation marks in another text line if they lay very close to its baseline. This problem has been fixed. Now, find_text selects punctuation marks more robustly. Note that this change affects the compatibility. Read more.
Parallelization
  • optimize_aop in rare cases might have crashed if model was set to 'mlp'. This problem has been fixed.
  • The HALCON library did not detect the process affinity correctly on a platform with more than 32 logical processors when the affinity of the process was set. This problem has been fixed.
  • Raising exceptions from subthreads (created with par_start) in HDevEngine could have caused resource leaks and possibly slowed down the application over time. This problem has been fixed.
Region
  • affine_trans_region might have crashed for large input regions. This problem has been fixed.
  • select_shape did not select the whole value range when using 'min' or 'max' on 64-bit systems. This problem has been fixed.
System
  • HALCON crashed if the monitoring mode of HALCON Spy was specified via the environment variable HALCONSPY. This problem has been fixed.
  • When the number of AOP threads was set thread-specifically with set_system ('tsp_thread_num', ...) and then, this number was decreased, the resulting value was incorrect. The resulting value was the requested value plus one. This problem has been fixed.
  • set_system did not allow to set the maximum size of memory blocks to be cached ('alloctmp_max_blocksize') to values larger than 16MB. This limitation has been removed.
  • Most operators taking a handle as input parameter did not support MIX_PAR tuples. This problem has been fixed.
XLD
  • gen_rectangle2_contour_xld in rare cases returned the error 3266 ("No points found for at least one side of the rectangle") for contours that should fit a rectangle. This problem has been fixed.

Procedures

Functionality

  • Motivated by the changes related to camera parameters, HALCON has been extended with a new procedure library
    • general/camera_parameters.hdvp.
    The procedure library is located in the directory %HALCONROOT%/procedures, which is added to HDevelop's external procedure path list by default. The library contains procedures to generate camera parameter tuples for all supported camera types, to set the value of a specified camera parameter in a camera parameter tuple, to get the value of a specified parameter from a camera parameter tuple, and to get the names of the parameters in a camera parameter tuple. Note that this change affects the compatibility. Read more.
  • HALCON has been extended with an external procedure check_hand_eye_calibration_input_poses.hdvp that checks the input poses of the hand-eye calibration. The procedure is able to identify errors in the input poses and to verify that the correct calibration model was chosen by the user. Both types of errors, which often occur in practice, result in large calibration errors. With the new procedure, these errors, which otherwise would be hard to identify, can now be detected easily.
    The new HDevelop example program
    • hdevelop/Calibration/Hand-Eye/check_hand_eye_calibration_input_poses.hdev
      shows how to use the new procedure.
    Furthermore, the following existing HDevelop example programs have been adapted to use the new procedure:
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_moving_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_scara_stationary_cam.hdev
    • hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_stationary_3d_sensor.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration.hdev
    • solution_guide/3d_vision/handeye_movingcam_calibration_poses.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration.hdev
    • solution_guide/3d_vision/handeye_stationarycam_calibration_poses.hdev
  • HALCON has been extended with the new procedure library reconstruction_3d.hdpl. This procedure library contains three new procedures:
    • estimate_bounding_box_3d_reconstruction can be used to estimate bounding box parameters for a stereo setup.
    • gen_camera_setup_object_model_3d and gen_bounding_box_object_model_3d can be used for visualization of a stereo setup.
    These procedure are, e.g., used in the HDevelop example programs
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_pairwise_workflow.hdev
    • hdevelop/3D-Reconstruction/Multi-View/reconstruct_surface_stereo_fusion_workflow.hdev
  • The visualization of HALCON has been overhauled. In this context, the following procedures have been adapted:
    • disp_message, disp_continue_message, and disp_end_of_program_message now use disp_text internally.
    • set_display_font has been adapted to the new behavior of set_font.
    • plot_tuple now uses dev_disp_text internally.
    Note that this change affects the compatibility. Read more.
  • HALCON has been extended with the operators convert_coordinates_window_to_image and convert_coordinates_image_to_window that provide a convenient way to convert pixel coordinates between image and window coordinate systems.
    The HDevelop procedure disp_message has been adapted to use the new operator convert_coordinates_image_to_window.
  • HALCON has been extended with the procedure
    • dev_display_ncc_matching_results
    to provide an easy way to quickly visualize the results of correlation based matching.
    The HDevelop example programs
    • hdevelop/Matching/Correlation-Based/find_ncc_model_defocused.hdev
    • hdevelop/Matching/Correlation-Based/find_ncc_model_defocused_precision.hdev
    • hdevelop/Matching/Correlation-Based/find_ncc_model_exposure.hdev
    have been adapted accordingly.

Bug Fixes

  • disp_message positioned the displayed text erroneously if image coordinates were used and the internal conversion to window coordinates led to Row and Column values that could have been rounded to the value -1. This problem has been fixed. Now, in such a case, the Row and Column values for the used text position are 0.

HALCON/C

Functionality

HALCON/C++

Functionality

Bug Fixes

  • The members Width and Height of HImage of the HALCON/C++ language interface were missing the const qualifier. This problem has been fixed.
  • HALCON/C++ might have crashed if a single string value was assigned to multiple indices of an HTuple instance. This problem has been fixed.
  • The HALCON/C++ language interface had a memory leak if NULL was passed as pointer to a HalconCpp::HTuple. This problem has been fixed.
  • The HALCON/C++ language interface in very rare cases had a memory leak when an exception was thrown. This problem has been fixed.
  • The class HComputeDevice did not provide a method for the deactivate_compute_device operator in the language interfaces HALCON/C++ and HALCON/.NET. This problem has been fixed.
  • In HALCON/C++ and HALCON/.NET indexing an empty tuple with an empty index raised an exception. This problem has been fixed.

HALCON/C++ (legacy)

Functionality

HALCON/.NET

Functionality

Bug Fixes

  • HWindowControlWPF offers a property ImagePart to set the part on the HALCON window. The type of this property was System.Windows.Thickness, which was confusing. Therefore, the type has been changed to System.Windows.Rect.
    Additionally, the ImagePart property of HWindowControlWPF and HWindowControl was not updated when the displayed image part was changed directly on the window. To fix this problem, the get method of the ImagePart property has been changed.
    Furthermore, HWindowControl did not update the stored image part before reopening a window due to a change in the parent. This problem has been fixed as well. Note that this change affects the compatibility. Read more.
  • A NULL pointer exception was generated if a HWindowControlWPF window was located inside a TabControl with multiple pages and this was not the default tab page. This problem has been fixed.
  • set_window_extents did not check possible errors when retrieving the dimensions of the bounding rectangle of the specified window. This problem has been fixed, Now, the error 5154 ("Wrong values for image area") is returned in case of a failure.
  • Raising user defined exceptions did not work correctly in the HALCON/.NET language interface when the exception tuple did not contain a string at index 1. This problem has been fixed.
  • The class HComputeDevice did not provide a method for the deactivate_compute_device operator in the language interfaces HALCON/C++ and HALCON/.NET. This problem has been fixed.
  • The HALCON/.NET language interface ignored the 'filename_encoding' parameter of set_system to pass utf8 encoded character strings. This problem has been fixed.
  • In HALCON/C++ and HALCON/.NET indexing an empty tuple with an empty index raised an exception. This problem has been fixed.
  • C# code that was generated by the HDevelop automatic code export using multiple threads crashed when running in a 32-bit Windows runtime environment. This problem has been fixed.

HALCON/COM

Functionality

  • disparity_image_to_xyz is now also a member of class HImage in HALCON/COM.
  • HALCON/COM has been extended with a class HCamParX that groups all functionality relating to internal camera parameters, but does not encapsulate internal camera parameters. Note that this change affects the compatibility. Read more.

Language Interface Example Programs

Bug Fixes

  • In the C# example DrawingObjectsWPF, the reference to System.Drawing could not be resolved if the .NET Framework 3.5 was not available. This problem has been fixed. An explicit reference to System.Drawing has been added to the example project.
  • In the C# example DrawingObjectsWPF, an exception of type System.AccessViolationException was thrown when attaching a drawing object through the pop up menu that appears on a right mouse click within the HSmartWindowControl, respectively the HWindowControl. This problem has been fixed.

HALCON Variable Inspect extension for Visual Studio

Functionality

  • The usability of the installation of the HALCON Variable Inspect extension for Visual Studio has been improved. The installation had to be made manually. Now, you only have to select the corresponding checkbox in the HALCON installer.
  • The HALCON Variable Inspect extension for Visual Studio has been overhauled. The following main improvements have been made:
    • A new watch list has been added, which enables to select only the desired variables for the inspection.
      • Local and global variables can be added to and removed from the watch list.
      • Variables can be added to the watch list via drag&drop.
    • A new mode for visualizing objects has been added, allowing to visualize only the last selected HALCON object.
    • Data can be retrieved in the background.
    • It is now possible to switch between a horizontal or vertical layout.
    • The sorting of the variables is now possible by clicking on a heading.
    The Programmer's Guide has been adapted accordingly.
    Note that the HALCON Variable Inspect extension for Visual Studio supports only Visual Studio Version 2013 and 2015. Visual Studio versions below 2013 are no longer supported.
    Additionally, native 64-bit data types, e.g., int8 images, are not supported.
    Furthermore, HALCON Variable Inspect is based on 32-bit HALCON XL, thus it has the same restrictions. Note that this change affects the compatibility. Read more.

Bug Fixes

  • The HALCON Variable Inspect extension for Visual Studio could not display large images, because the reading failed, even if enough memory was available. This problem has been fixed.
  • The HALCON Variable Inspect extension for Visual Studio did not correctly scale real images in gray values. This problem has been fixed

Extension Packages

Functionality

  • The entry page of the HALCON Operator Reference has been renamed from table_of_contents.html to index.html. This change also applies to the documentation of extension packages. The documentation has been adapted accordingly.
  • HALCON now exports functions that allow extension packages and image acquisition interfaces to create and manage 3D object models.
  • The reference manual now provides overview information for selected chapters. The corresponding technical mechanism is available also for extension packages.

Bug Fixes

  • The HALCON compiler hcomp crashed when the slot 'default_value' of a parameter in the operator description of a def-file was defined in an invalid way. This problem has been fixed.
  • Extension packages with parallelization methods but no iconic input parameters crashed. This problem has been fixed. Now, hcomp throws an error for invalid parallelization methods.
  • HALCON no longer defines the constants MIN_COLUMN, MAX_COLUMN, MIN_LINE, and MAX_LINE in HConst.h. Note that this change affects the compatibility. Read more.

hbench

Functionality

  • The hbench reference values relate to new reference platforms, in particular to the cpu platform 'Intel Atom x5 Z8350' and the gpu platform 'NVIDIA GeForce GTX 970', respectively. Additionally, the default image size has been scaled up to 1280x1024 pixels. Because of this, the benchmark values of hbench are not comparable to values of previous HALCON hbench versions. Note that this change affects the compatibility. Read more.

Image Acquisition Interfaces

The latest information about new interface revisions and newly supported image acquisition devices can be found on MVTec's web server. Please refer to the release notes within the documentation of the individual image acquisition interfaces for information about improvements, bugfixes, or whether a new revision of the corresponding device driver is required.

New, Modified, or Removed Image Acquisition Interfaces

  • The following image acquisition interface is now legacy:
    • 1394IIDC
    The following image acquisition interfaces are no longer supported:
    • 1394IIDC-2
    • Argos3D-P1xx
    • INSPECTA
    • p3i2
    • PcEyeCL
    • OpenNI
    • SwissRanger
    Accordingly, the corresponding HDevelop example programs have been removed.

Miscellaneous

  • The revision numbers of HALCON's image acquisition and digital I/O interfaces follow a new format consisting of three digits: <HALCON major number>.<HALCON minor number>.<interface revision number>.
  • The Image Acquisition Assistant's Parameters view now shows buttons for all parameters of '<parameter>_type' 'Command' independently from the setting of their '<parameter>_access'.

Image Acquisition Example Programs

New Image Acquisition Example Programs

The following HDevelop example programs have been added:

  • hdevelop/Image/Acquisition/bitflow_change_size.hdev
  • hdevelop/Image/Acquisition/bitflow_cl_serial_usage.hdev
  • hdevelop/Image/Acquisition/bitflow_cont_async_oneshot.hdev
  • hdevelop/Image/Acquisition/bitflow_cxp_register_poke_peek.hdev
  • hdevelop/Image/Acquisition/bitflow_open_by_switch_connector.hdev
  • hdevelop/Image/Acquisition/bitflow_register_poke_peek.hdev
  • hdevelop/Image/Acquisition/bitflow_simple_sw_trigger.hdev
  • hdevelop/Image/Acquisition/bitflow_version.hdev
  • hdevelop/Image/Acquisition/gigevision_wenglor_wecat3d_objectmodel3d.hdev
Removed Image Acquisition Example Programs

The following HDevelop example programs have been removed:

  • hdevelop/Image/Acquisition/1394iidc.hdev
  • hdevelop/Image/Acquisition/1394iidc2.hdev
  • hdevelop/Image/Acquisition/1394iidc2_2cameras.hdev
  • hdevelop/Image/Acquisition/1394iidc2_camera_types.hdev
  • hdevelop/Image/Acquisition/1394iidc2_crop.hdev
  • hdevelop/Image/Acquisition/1394iidc2_parameters.hdev
  • hdevelop/Image/Acquisition/1394iidc2_register_access.hdev
  • hdevelop/Image/Acquisition/1394iidc2_simple.hdev
  • hdevelop/Image/Acquisition/1394iidc_2cameras.hdev
  • hdevelop/Image/Acquisition/1394iidc_camera_types.hdev
  • hdevelop/Image/Acquisition/1394iidc_crop.hdev
  • hdevelop/Image/Acquisition/1394iidc_format7.hdev
  • hdevelop/Image/Acquisition/1394iidc_parameters.hdev
  • hdevelop/Image/Acquisition/1394iidc_simple.hdev
  • hdevelop/Image/Acquisition/1394iidc_software_trigger.hdev
  • hdevelop/Image/Acquisition/argos3d-p1xx_objectmodel3d.hdev
  • hdevelop/Image/Acquisition/argos3d-p1xx_simple.hdev
  • hdevelop/Image/Acquisition/bitflow_2simultaneous.hdev
  • hdevelop/Image/Acquisition/inspecta.hdev
  • hdevelop/Image/Acquisition/inspecta_2parallel.hdev
  • hdevelop/Image/Acquisition/inspecta_2ports.hdev
  • hdevelop/Image/Acquisition/inspecta_parameters.hdev
  • hdevelop/Image/Acquisition/inspecta_simple.hdev
  • hdevelop/Image/Acquisition/linx_2simultaneous.hdev
  • hdevelop/Image/Acquisition/millite_1394_parameters.hdev
  • hdevelop/Image/Acquisition/millite_2ports.hdev
  • hdevelop/Image/Acquisition/openni_2cameras.hdev
  • hdevelop/Image/Acquisition/openni_create_camera_calibration.hdev
  • hdevelop/Image/Acquisition/openni_parameters.hdev
  • hdevelop/Image/Acquisition/openni_simple.hdev
  • hdevelop/Image/Acquisition/openni_surface_based_3d_matching.hdev
  • hdevelop/Image/Acquisition/p3i2.hdev
  • hdevelop/Image/Acquisition/p3i2_crop.hdev
  • hdevelop/Image/Acquisition/p3i2_parameters.hdev
  • hdevelop/Image/Acquisition/p3i2_simple.hdev
  • hdevelop/Image/Acquisition/pceyecl.hdev
  • hdevelop/Image/Acquisition/pceyecl_crop.hdev
  • hdevelop/Image/Acquisition/pceyecl_parameters.hdev
  • hdevelop/Image/Acquisition/pceyecl_simple.hdev
  • hdevelop/Image/Acquisition/swissranger_objectmodel3d.hdev
  • hdevelop/Image/Acquisition/swissranger_parameters.hdev
  • hdevelop/Image/Acquisition/swissranger_simple.hdev

Digital I/O Interfaces

The latest information about new interface revisions and newly supported digital I/O interfaces can be found on MVTec's web server. Please refer to the release notes within the documentation of the individual digital I/O interfaces for information about improvements, bugfixes, or whether a new revision of the corresponding device driver is required.

Miscellaneous

  • The revision numbers of HALCON's image acquisition and digital I/O interfaces follow a new format consisting of three digits: <HALCON major number>.<HALCON minor number>.<interface revision number>.

Documentation

Programmer's Manuals

  • The Programmer's Guide contains important information about program design issues for parallel programming, e.g., the information, that before calling HALCON operators in parallel in a multithreaded program, you have to call one operator exclusively to allow HALCON to initialize its internal data structures. The section containing this information has been renamed from 'Style Guide' to 'Program Design Issues for Parallelization' to make the importance of the section's content more obvious and to enhance the search for the corresponding information.
  • The HALCON Variable Inspect extension for Visual Studio has been overhauled. The following main improvements have been made:
    • A new watch list has been added, which enables to select only the desired variables for the inspection.
      • Local and global variables can be added to and removed from the watch list.
      • Variables can be added to the watch list via drag&drop.
    • A new mode for visualizing objects has been added, allowing to visualize only the last selected HALCON object.
    • Data can be retrieved in the background.
    • It is now possible to switch between a horizontal or vertical layout.
    • The sorting of the variables is now possible by clicking on a heading.
    The Programmer's Guide has been adapted accordingly.
    Note that the HALCON Variable Inspect extension for Visual Studio supports only Visual Studio Version 2013 and 2015. Visual Studio versions below 2013 are no longer supported.
    Additionally, native 64-bit data types, e.g., int8 images, are not supported.
    Furthermore, HALCON Variable Inspect is based on 32-bit HALCON XL, thus it has the same restrictions. Note that this change affects the compatibility. Read more.

Reference Manual

Solution Guides

  • The Solution Guide on 3D Vision has been adapted to the changes related to camera parameters. Note that this change affects the compatibility. Read more.
  • The documentation of compute devices within the Solution Guide Basics stated that a compute device can only be used in a single thread. Actually, a compute device can be used in different threads if for each thread the compute device is opened anew so that different compute device handles are used. However, the different threads using the same compute device must not try to access the same image object. This problem has been fixed. The documentation has been extended accordingly.
  • The parameters AngleStart, AngleExtent, ScaleCMax, and ScaleRMax are not used by the operators Instead, these parameters have to be set while searching for the models. The operators now use empty input tuples for these parameters. The according reference manual entries and the Solution Guide on Matching have been adapted accordingly. Additionally, the documentation regarding the parameters ScaleCMin and ScaleRMin has been improved. Note that this change affects the compatibility. Read more.
  • The Solution Guide on 3D Vision has been adapted to the improved multiview stereo surface reconstruction. Note that this change affects the compatibility. Read more.

User Guides

  • The documentation of the Calibration Assistant within the HDevelop User's Guide has been adapted to the changes related to camera parameters. Note that this change affects the compatibility. Read more.
  • The HDevelop User's Guide has been extended by information concerning the different behavior of HDevelop and exported code when accessing uninitialized elements of a tuple or a vector.
  • The HALCON runtime installer features a silent installation mode, which has previously been described on the download page. The corresponding information has since been moved to the Installation Guide.
  • Floating licenses are no longer supported. The Installation Guide has been adapted accordingly.
  • The HDevelop User's Guide has been extended by a section "Unset Output Parameters in Procedures", which contains a warning that HDevelop and exported code can behave differently regarding the values of uninitialized output parameters of procedures.
  • HALCON has been extended with a technical note "Parallel Programming (HDevelop)" that describes the most common parallelization concepts, guides you through the relevant information in the different manuals, and provides a short glossary to explain terms often used when dealing with parallelization.

Supported Operating Systems

Windows

HALCON 13.0 has been compiled for the following Windows platform versions:

  • x86sse2-win32 platform version for Windows 7/8/10 or Windows Server 2008 R2/2012 on x86 processors with SSE2 extension, i.e., Intel Pentium 4 / AMD Athlon 64 or higher
  • x64-win64 platform version for Windows 7/8/10 or Windows Server 2008 R2/2012 x64 Edition on Intel 64 or AMD64 processors

The setup process checks whether it is running on a 32- or 64-bit system and provides a suitable list of platform versions that can be installed.

During the installation, the environment variable HALCONARCH is set to x86sse2-win32 or x64-win64 to indicate the installed platform version. Please note that if you want to switch to another platform version, you must first install it. Then, you must adapt the environment variable HALCONARCH (see the Installation Guide for more information).

Linux

HALCON 13.0 has been compiled for the following Linux platform versions:

  • x64-linux platform version for Linux x86_64, Kernel 3.6 or higher, libc.so.6 (GLIBC_2.17 or higher), libstdc++.so.6 (GLIBCXX_3.4.15 or higher), on Intel 64 or AMD64 processors

Please refer to the Installation Guide for detailed system requirements corresponding to the different Application Binary Interfaces.

The installation script checks whether it is running on a 32- or 64-bit system and provides a suitable list of platform versions that can be installed.

macOS

HALCON 13.0 has been compiled for macOS in the following platform versions:

  • x64-macosx platform version for OS X 10.10 or higher on Intel 64.

Miscellaneous

Installation

  • The usability of the installation of the HALCON Variable Inspect extension for Visual Studio has been improved. The installation had to be made manually. Now, you only have to select the corresponding checkbox in the HALCON installer.
  • The entry page of the HALCON Operator Reference has been renamed from table_of_contents.html to index.html. This change also applies to the documentation of extension packages. The documentation has been adapted accordingly.
  • The following image acquisition interface is now legacy:
    • 1394IIDC
    The following image acquisition interfaces are no longer supported:
    • 1394IIDC-2
    • Argos3D-P1xx
    • INSPECTA
    • p3i2
    • PcEyeCL
    • OpenNI
    • SwissRanger
    Accordingly, the corresponding HDevelop example programs have been removed.
  • The HALCON Installer for Windows has been updated and now installs the Visual C++ Redistributable Packages für Visual Studio 2013.

Licensing

  • Floating licenses are no longer supported. The Installation Guide has been adapted accordingly.
  • The HALCON licensing has been improved. It is no longer necessary to install special drivers for dongle based licensing. Now, HALCON exclusively uses HALCON CodeMeter dongles for dongle based licensing. Thus, FLEXid dongles are no longer supported. Additionally, in compliance with the EULA, HALCON now only supports MAC based licenses bound to universally administered, permanent MAC addresses. Locally administered MAC addresses are rejected.
    A new tool called 'hhostid' is available to display all supported hostids and replaces the former 'lmhostid'. Please note that especially in case of a license upgrade it might be necessary to request a new license if the used hostid is not suitable anymore. Note that this change affects the compatibility. Read more.

Various

  • The legacy HALCON Codelets have been removed from HALCON.
  • The HALCON language interfaces supported a hom_mat3d array signature for the parameter of the operator projective_trans_object_model_3d, although projective_trans_object_model_3d does not support transformations for multiple projective transformation matrices. This problem has been fixed. Now, the HALCON language interfaces do not support a hom_mat3d array signature for the parameter of the operator projective_trans_object_model_3d anymore. Note that this change affects the compatibility. Read more.