MVTec Software GmbH
 

Release Notes for HALCON 20.11 Progress

This document provides the release notes for MVTec HALCON 20.11.0.0 Progress, as released in November 2020.

Contents

Major New Features of HALCON 20.11.0.0 Progress

Improvements for Shape-Based Matching

In HALCON 20.11, the core technology of shape-based matching has been improved especially for scenarios with low contrast and high noise. More parameters are now estimated automatically. This increases usability as well as the matching rate and robustness in low contrast and high noise situations.

DotCode Reader

In HALCON 20.11, the data code reader has been extended by the new code type DotCode. This type of 2D code is based on a matrix of points. Therefore, it can be printed very fast and is applicable especially for high speed applications, like in the pharma or tobacco industry.

Deep OCR

With Deep OCR in HALCON 20.11, MVTec introduces a holistic deep-learning-based approach for OCR. This new technology brings machine vision one step closer to human reading. Compared to existing algorithms, Deep OCR can localize characters much more robustly, even regardless of their orientation and font type. The ability to automatically group characters allows the identification of whole words. This strongly increases the recognition performance as, e.g., misinterpretation of characters with similar appearances can be avoided.

Improved Egde-Supported Surface-Based 3D-Matching

In HALCON 20.11, the core technology edge-supported surface-based 3D-matching is significantly faster for 3D scenes with many objects and edges. In addition to this speedup, the usability has been improved by removing the need of setting a viewpoint.

HALCON/Python

HALCON 20.11 introduces a new HALCON/Python interface. This enables developers who work with Python to easily access HALCON's powerful operator set.

HDevelop Facelift

For enhanced usability, HALCON’s integrated development environment HDevelop has been given a facelift. In HALCON 20.11, more options for individual configuration have been implemented, e.g., a new modern window docking concept. Moreover, themes are now available to improve visual ergonomics and to suit individual preferences.

Deep Learning Edge Extraction

Deep learning edge extraction is a new and unique method to robustly extract edges (e.g., object boundaries) that comes with two major use cases. Especially for scenarios where a variety of edges is visible in an image, MVTec's deep learning edge extraction can be trained with only few images to reliably extract the desired edges. Hence, the programming effort to extract specific kinds of edges is highly reduced with MVTec HALCON.
Besides, the pretrained network is innately able to robustly detect edges in low contrast and high noise situations. This makes it possible to extract edges that usual edge detection filters cannot detect.

Pruning for Deep Learning

With network pruning, users have the option to subsequently optimize a fully trained deep learning network in terms of storage requirements and speed. With this feature, it is possible to control the priority of the parameters speed, storage, and accuracy and thus modify the network according to application-specific requirements.

Compatibility

Licenses

HALCON 20.11.0.0 Progress requires a valid HALCON Progress license and does not run with licenses of HALCON 13 and earlier versions or HALCON Steady.

HALCON Library

Compared to HALCON 20.05 Progress, many extensions have been introduced. Thus, the HALCON 20.11.0.0 Progress libraries are not binary compatible with HALCON 20.05 Progress or earlier versions. However, HALCON 20.11.0.0 Progress is mostly source-code compatible to HALCON 20.05 Progress except for the changes listed below:
  • sort_region with SortMode 'character' previously took the larger one of two overlapping regions for the calculation of the overlap. This can cause an issue in case the two regions greatly differ in their sizes. Now, the smaller region is used to compute the overlap. Hence, in cases with overlapping regions that are very different in their sizes, this change can cause a different behavior of the operator.
    Also note that the extension of the parameter SortMode with a second optional value affects the compatibility as the operator signature changed for language interfaces. Affected interfaces are C, C++ and .NET. More information.
  • As edges_object_model_3d is now by default independent of a viewpoint, a 'viewpoint' contained in GenParamName is silently ignored. To obtain the old behavior, add 'estimate_viewpose' and 'false' to GenParamName and GenParamValue, respectively.
    To obtain the old behavior in case no manual viewpoint has been set, add ['estimate_viewpose', 'viewpoint'] and ['false', '0 0 0'] to GenParamName and GenParamValue, respectively. More information.
  • The default value for the new parameter 'max_num_samples' in the deep learning procedure determine_dl_model_detection_param has been set to 1500. For datasets with more than 1500 samples, this can lead to different detection parameters determined by the procedure. To reproduce the previous behavior, set 'max_num_samples' to '-1'. More information.
  • A set 'viewpoint' in GenParamName of find_surface_model, find_surface_model_image, refine_surface_model_pose, and refine_surface_model_pose_image has no effect anymore, except for the calculation of the view-based score if specified by 'use_view_based' set to 'true'. The procedure debug_find_surface_model has been adapted accordingly.
    If a surface-based model has been trained for use of edges, and the input point cloud of find_surface_model and find_surface_model_image contains a mapping, scene normals are automatically generated flipped inwards consistently w.r.t. the mapping. Normals contained in the input point cloud are not used anymore. Furthermore, the GenParamName 'scene_invert_normals' should not be needed anymore. Typically, 'scene_invert_normals' should be set to 'false' or be removed from GenParamName.
    In rare cases, edge-supported surface-based matching returns slightly different results.
    More information.
  • Using NVIDIA GPUs under Windows 7 is not supported anymore. More information.
  • Due to the change of the default value for the parameter 'rectif_interpolation' when using stereo models, identical results compared to previous HALCON versions can be obtained by calling set_stereo_model_param(StereoModel, 'rectif_interpolation', 'none') and set_stereo_model_image_pairs before reconstructing the surface using reconstruct_surface_stereo. More information.
  • The default encoding of 2D data codes has been changed from 'utf8' to 'latin1'. Programs that expect UTF-8 encoded messages must be adapted by setting the parameter 'string_encoding' to 'utf8' with set_data_code_2d_param. More information.
  • get_data_code_2d_results now returns the value '-1' for all result-specific parameters if 'CandidateHandle' is 'general'. Applications that expect another value or an empty tuple need to be adapted. More information.
  • In very rare cases, the results of the operators watersheds, watersheds_threshold, and watersheds_marker might have changed for basins at the boundary of the ROI that are one pixel large. More information.

HALCON Applications

Please re-compile all C, C++, or .NET programs developed with HALCON 20.05 Progress. The incompatibility with HALCON 20.05 Progress 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

In general, HALCON 20.11.0.0 Progress, HALCON 20.05 Progress, and HALCON 18.11.x image acquisition interfaces are library compatible.

HALCON 20.11.0.0 Progress includes only a subset of available manufacturer-independent image acquisition interfaces. Image acquisition interfaces that are included are: DirectFile, DirectShow, File, GenICamTL, GigEVision2, GStreamer, USB3Vision, and Video4Linux2. You can download additional proprietary interfaces from our web server.

Digital I/O Interfaces

In general, HALCON 20.11.0.0 Progress, HALCON 20.05 Progress, and HALCON 18.11.x digital I/O interfaces are library compatible.

HALCON 20.11.0.0 Progress includes only a subset of available manufacturer-independent digital I/O interfaces. Digital I/O interfaces that are included are: Linux-GPIO, OPC_UA, and Hilscher-cifX. You can download additional proprietary interfaces from our web server.

Extension Packages

Please re-generate your own extension packages developed with HALCON 20.05 Progress.

Note also the following compatibility issues:

  • Previously, in user-provided .def files of extension packages, parameters could be declared with default_type only, i.e., without declaring sem_type. This has been changed. sem_type is now a required field for all parameters. More information.

Discontinuation of the x86-win32 Platform Version for Windows

With HALCON 20.11, the x86-win32 platform version for Windows is discontinued. Switch any existing x86-win32 applications to the x64-win64 platform version for Windows to be able to use HALCON 20.11.

Supported Operating Systems

Windows

HALCON 20.11.0.0 Progress has been compiled for the x64-win64 platform version for Windows 7/8.1/10 or Windows Server 2008 R2/2012 R2/2016/2019 x64 Edition on Intel 64 or AMD 64 processors.

Linux

HALCON 20.11.0.0 Progress has been compiled for the following Linux platform versions:

  • x64 platform version for Linux x86_64, GLIBC_2.17, GLIBCXX_3.4.21, on Intel 64 or AMD 64 processors
  • armv7a platform version for Linux armv7a, Kernel with hidraw support, hard-float ABI, GLIBC_2.17, GLIBCXX_3.4.21 on Armv7-A processors with NEON support
  • aarch64 platform version for Linux aarch64, Kernel with hidraw support, GLIBC_2.17, GLIBCXX_3.4.21 on AArch64 processors

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

macOS

HALCON 20.11.0.0 Progress has been compiled for the x64 platform version of macOS 10.15 on Intel 64.

Detailed Description of Changes in HALCON 20.11.0.0 Progress

The changes in HALCON 20.11.0.0 Progress are described with respect to HALCON 20.05 Progress.

HDevelop

New Functionality

GUI
  • The HDevelop window modes MDI and SDI have been replaced by a new docking framework. This allows users to dock, float, and combine windows. Further, it better supports the usage of a second screen and to attach windows on the left or right of the desktop.
  • The GUI of HDevelop has been modernized in the following way:
    • HDevelop's icons have been updated.
    • HDevelop now supports a dark and a light theme. This can be set via menu > Edit Preferences > User Interface > Themes.
    • HDevelop now shows the MVTec logo in the status bar. Clicking the logo opens the HALCON product page of the MVTec website in a browser.
  • The GUI of HDevelop has been simplified, and several icons have been removed.
    In particular, the complexity of the output console's layout has been reduced.
  • The export buttons and corresponding icons have been removed from the toolbar. They are now available under "File → Export → Export..." and "File → Export → Export Library Project...".
  • The usability of the color selection of the program window and variable window has been improved. All color-related settings are now grouped under theming.
    Additionally, the program window and variable window react to the global theme change without changing user-defined colors.
    It is now also possible to reset single colors to their current, theme-specific, default setting or to reset all colors to the current default setting.
    To increase the usability, the color settings are versioned to avoid conflicts with older installations of HDevelop.
  • The loading times of the help have been improved.
  • The HDevelop graphics window now offers a new setting that controls how the visible image part is adapted when the window is resized. This facilitates the use of docked graphics windows where the window size can no longer be controlled exactly. The setting is located in the "Set image size" toolbar dropdown menu. It supports the following values:
    • Full Stretch (classic): The visible image part remains constant. The zoom levels are adapted to fully fit the previous view into the new window size.
    • Keep Aspect Ratio (default for interactively opened windows): The zoom level is changed using the same factor for both axes (preserving the previous aspect ratio). The visible image part may change in one axis as a result of the resize operation.
    • No Stretch: The zoom level remains fixed. Resizing the window will show a correspondingly larger or smaller portion of the image.
    In addition, this setting affects the automatic part reset that occurs in HDevelop when displaying an image with a new size (double clicking in the variable window or calling dev_display without explicitly calling dev_set_part). In Full Stretch mode, the part will be set to the full image size as before. In the other modes, the part is extended to fit the full image in a 1:1 aspect ratio with black bars on one side.
    The default setting for new graphics windows can be changed under Preferences > General Options.
    HDevelop windows opened from script (via dev_open_window) will be opened as floating windows using the classic "Full Stretch" mode for maximum backwards compatibility. In particular, note that graphics windows that are docked and/or use one of the newer modes may cause unexpected results for programs that rely on a fixed window size or a constant part. For example, get_part may routinely return negative coordinates for the upper left corner after displaying a new image, and dump_window_image may result in an image with unexpected size. For the latter use case, we recommended creating an off-screen "buffer" window instead (using the operator open_window).
  • In the HDevelop program window, the line number display has been improved. Previously, big font sizes or long programs could lead to truncated and thus not fully visible line numbers. Now the line number display adjusts according to the line count and font size.
  • It is now possible to use the mouse wheel to zoom in and out in the HDevelop graphics window. This can also be achieved via CTRL++ and CTRL+-.
Procedures
  • HDevelop's procedure documentation now supports Markdown syntax. This offers improved text formatting and enables the addition of tables, images, and more. Please refer to the HDevelop User's Guide for more information.
Miscellaneous
  • The Qt version used by HDevelop has been upgraded to Qt 5.15.1.

Bug Fixes

Assistants
  • The Calibration Assistant wrongly indicated an error when trying to modify calibration parameters if no images were loaded. This problem has been fixed.
  • Using planar deformable matching with calibration in the HDevelop Matching Assistant could lead to failures, even though the model was actually found correctly and code generated from the assistant would work fine. This problem has been fixed. In addition, the assistant now visualizes the transformed model contour properly for this scenario.
Code Export
  • For C, Visual Basic .NET, and C#, HDevelop exported the comparison of two objects '( obj1 != obj2)' as test_equal_obj, without the necessary negation. This problem has been fixed.
  • Using the HDevWindowStack member functions of the C++ language interface before calling the first HALCON operator led to a crash. This problem has been fixed.
GUI
  • The x-axis in plot-based windows (e.g., function inspect with operator dev_inspect_ctrl) sometimes was drawn over the active window above it. This problem has been fixed.
  • The HDevelop graphics window had an unlimited update frequency. This could lead to a slow down if too many update requests where queued. This problem has been fixed. Now, the update frequency of the HDevelop graphics window is limited to 60 Hz.
  • Several GUI translations had unfortunate linebreaks, making it hard to read the displayed text. This problem has been fixed.
  • If a program containing procedures was loaded while the preferences dialog was open, the 'Procedure Use' table of the dialog was not correctly filled. This problem has been fixed.
  • In the operator window, the scrollbar of the combo box of some parameters was missing. This problem has been fixed.
  • For big numbers, variable inspection may have corrupted the input. This problem has been fixed.
  • Minimizing the line profile dialog caused it to stop updating after ROI changes. This problem has been fixed.
  • In the Move mode of HDevelop's graphics window, moving an image outside of the graphics window while pressing the CTRL key (i.e., displaying the pixel info) caused the displayed image to jump and change its display size. This problem has been fixed.
  • When opening the 'Invalid Lines' tab of the Quick Navigation window, HDevelop crashed in rare cases. This problem has been fixed.
  • Most of the provided examples open the windows at position 0,0. In the old MDI mode, the reference point was HDevelop or the MDI area, which was located below the toolbar of HDevelop.
    With docking, the windows are now opened floating, just like in the old SDI mode. In this case, the point of origin is that of the desktop.
    If HDevelop is now used in fullscreen mode, the windows would cover the menu and the toolbar. To avoid this, you can add an offset to the coordinates of the windows. By default, this offset is set to a value of 100,0. It can be changed via Preferences > General Options.
  • The size of the start dialog could exceed the desktop geometry. This problem has been fixed.
Help
  • The generated procedure documentation in HDevelop was truncated if a file extension was specified for a filename parameter. This problem has been fixed.
IDE
  • If the variable window was closed then the automatic display of changed iconic variables in the graphics window did not work. This problem has been fixed.
  • HDevelop was not able to load ROIs of the type 'Arbitrary Region' from file. This problem has been fixed.
Procedures
  • Setting the File Extensions slot of a procedure's parameter documentation prevented HDevelop from generating the proper reference documentation. This problem has been fixed.
  • When setting directories over GenParam dicts, tuples of strings were not processed correctly when reading deep learning data sets.
    This affects the following procedures:
    • read_dl_dataset_anomaly
    • read_dl_dataset_segmentation
    This problem has been fixed.
  • Pressing CTRL+ALT+ENTER to open a procedure in HDevelop did not work. This problem has been fixed.
Miscellaneous
  • During startup, HDevelop checks if a new HALCON version is available. The check did not consider the system architecture. This problem has been fixed.
  • If, at the moment of a program reset, variable inspection windows were hidden, they were not cleared after the reset. This problem has been fixed.
  • The use of certain characters could cause erratic behavior in the editor including extra or missing line breaks and corrupted program contents after reloading. This problem has been fixed.
    Specifically, this fix addresses combining characters where multiple Unicode code points form a single grapheme ("character"). These are common in some languages such as Thai but can also occur in other languages, e.g., the Japanese Halfwidth Katakana Voiced Sound Mark "゙" or even just accents like é (which are typically represented by their own "precomposed" Unicode code point instead).

HDevelop Example Programs

New HDevelop Example Programs
  • hdevelop/Applications/Data-Codes/dotcode_optimized_settings.hdev
  • hdevelop/Applications/Data-Codes/dotcode_simple.hdev
  • hdevelop/Applications/General/correct_vignetting.hdev
  • hdevelop/Deep-Learning/Classification/prune_dl_model_classification_workflow.hdev
  • hdevelop/Deep-Learning/DeepLearningTool/import_model_from_dlt.hdev
  • hdevelop/Deep-Learning/Segmentation/segment_edges_deep_learning.hdev
  • hdevelop/Deep-Learning/Segmentation/segment_edges_deep_learning_with_retraining.hdev
  • hdevelop/Image/Acquisition/genicamtl_basler_blaze_objectmodel3d.hdev
  • hdevelop/Image/Acquisition/genicamtl_parameter_persistence.hdev
  • hdevelop/Image/Acquisition/gigevision2_parameter_persistence.hdev
  • hdevelop/Image/Acquisition/gstreamer_parameter_persistence.hdev
  • hdevelop/Image/Acquisition/usb3vision_information.hdev
  • hdevelop/Image/Acquisition/usb3vision_parameter_persistence.hdev
  • hdevelop/Matching/Shape-Based/adapt_shape_model_high_noise.hdev
  • hdevelop/Matching/Shape-Based/set_shape_model_model_cache.hdev
  • hdevelop/OCR/Deep-OCR/deep_ocr_workflow.hdev
New Functionality
  • HALCON now provides an example that demonstrates how to import a model trained with the Deep Learning Tool (DLT) into HALCON. This example is called hdevelop/Deep-Learning/DeepLearningTool/import_model_from_dlt.hdev.
  • The new HDevelop example program hdevelop/Applications/General/correct_vignetting.hdev shows how to perform a vignetting correction on different sample images.
Bug Fixes
  • In the following examples, the random seed was not working for the first run:
    • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_2_train.hdev
    • hdevelop/Deep-Learning/Detection/detect_pills_deep_learning_2_train.hdev
    • hdevelop/Deep-Learning/Segmentation/segment_pill_defects_deep_learning_2_train.hdev
    This problem has been fixed.

HDevEngine

Functionality

  • The code formatting of the HDevEngineCpp.h header file has been changed.

Bug Fixes

  • The internal JIT compiler holds a cache that was not freed at program end which led to a falsely reported memory leak. This problem has been fixed.
  • JIT-compiled code could leak memory when accessing vector values in an expression. This problem has been fixed.
  • In rare cases, when editing a JIT-compiled procedure and an exception was thrown from a different JIT-compiled procedure that called the edited JIT-compiled procedure, HDevelop could crash or return an invalid exception. This problem has been fixed.

HALCON Library

Speedup

  • get_object_model_3d_params now returns pure tuples for some parameters, such as coordinates, normals, and mappings, which can speed up subsequent processing of such attributes by up to 260%.
  • The operator reconstruct_surface_stereo now takes the image domain into account.
  • The speed of the operators watersheds, watersheds_threshold, and watersheds_marker has been significantly improved if a reduced domain is used.
    Now, depending on the size of the image and the reduced domain, it is up to 2300 % faster. Note that this change affects the compatibility. Read more.

New Functionality

3D
  • The operator set_stereo_model_param now supports the parameters 'min_disparity' and 'max_disparity'.
  • The operator reconstruct_surface_stereo now takes the image domain into account.
  • edges_object_model_3d is now by default independent of a viewpoint and the position of the input point cloud in space. The new GenParamName 'estimate_viewpose' can be set to 'false' to still set a manual viewpoint. Note that this change affects the compatibility. Read more.
  • In edge-supported surface-based matching, usability has been improved for the following operators: find_surface_model, find_surface_model_image, refine_surface_model_pose, and refine_surface_model_pose_image. In particular:
    • They are now independent of a viewpoint. GenParamName can still contain 'viewpoint' but it only affects the calculation of the view-based score if 'use_view_based' is set to 'true'.
    • They are now independent of the position of the input point cloud in space, i. e., independent of gray values and coordinate frames in the XYZ images. However, note that HALCON assumes right-handed coordinate systems.
    • They automatically generate scene normals flipped inwards consistently w.r.t. the mapping (only relevant for the find_* operators).
    Furthermore, find_surface_model, find_surface_model_image, refine_surface_model_pose, and refine_surface_model_pose_image have been sped up. Especially for the edge-supported surface-based matching, a significant speedup can be expected when multiple small objects are scattered within a large scene. For the standard surface-based matching, a performance improvement can be expected when the scene exhibits a large number of points. Note that this change affects the compatibility. Read more.
  • get_object_model_3d_params now returns pure tuples for some parameters, such as coordinates, normals, and mappings, which can speed up subsequent processing of such attributes by up to 260%.
  • In the stereo model, the default value for the parameter 'rectif_interpolation' has been changed from 'none' to 'bilinear'. Note that this change affects the compatibility. Read more.
Bar Code
  • HALCON now supports the GS1 application identifier 395x.
Calibration
  • The reference manual entry of create_caltab did not give sufficient information about the distribution of finder patterns on a calibration plate. The reference has been adapted accordingly.
Data Code
  • The data code reader now supports DotCode symbols. Furthermore, the GS1 DotCode symbology was introduced to the data code model.
    The new HDevelop example programs
    • hdevelop/Applications/Data-Codes/dotcode_default_settings.hdev and
    • hdevelop/Applications/Data-Codes/dotcode_optimized_settings.hdev
    show how to use the new functionality. They use the new images dotcode_* from the subdirectory images/datacode/dotcode/.
    The following HDevelop example programs have been adapted accordingly:
    • hdevelop/explore_halcon.hdev
    • hdevelop/Identification/Data-Code/2d_data_codes_default_settings.hdev
    • hdevelop/Identification/Data-Code/gs1_data_codes.hdev
    The latter uses the new images gs1dotcode_* from the subdirectory images/datacode/gs1dotcode/.
    Further, the Solution Guide on 2D Data Codes has been extended with information about the DotCode reader.
    For DotCode symbols, the parameter 'candidate_selection' of set_data_code_2d_params was extended by the value 'all'. Additionally, the parameters 'symbology_ident_separated', 'decoded_string_separated', 'structured_append_separated', 'reader_programming_separated', 'decoded_data_separated', and 'segment_num' were added to get_data_code_2d_results such that DotCode symbols with separated message segments are supported. Furthermore, the parameter 'max_allowed_error_correction' was added to set_data_code_2d_param as well as to get_data_code_2d_param.
    The custom HPeek demo has been extended by the DotCode reader. You can download this demo on our customer area for free and evaluate the performance on your hardware.
  • The reference manual entry of create_data_code_2d_model contained an incomplete list of parameters that have different default values depending on the chosen recognition approach. This problem has been fixed.
  • HALCON now supports the GS1 application identifier 395x.
  • The ECC 200 code reader now supports the Data Matrix Rectangular Extension, which adds new symbol sizes.
    According to ISO/IEC DIS 21471:2019, these are: 
    • 8 x [48, 64, 80, 96, 120, 144]
    • 12 x [64, 88]
    • 16 x 64
    • 20 x [36, 44, 64]
    • 22 x 48
    • 24 x [48, 64]
    • 26 x [40, 48, 64]

Deep Learning
  • The operators set_dl_model_param and get_dl_model_param were extended with the parameter 'input_dimensions', which allows users to change the dimensions of any input layer of the network. This parameter works for any type of network, except for detection.
  • HALCON now supports the pruning of deep learning-based classification models. Pruning allows you to remove kernels of convolutional layers, making the classifier smaller and (with exception of CPUs on x64 systems) faster.
    For this purpose, HALCON comes with a set of new operators: as well as a new procedure:
    • prune_dl_model
    The method is demonstrated in the workflow example
    hdevelop/Deep-Learning/Classification/prune_dl_model_classification_workflow.hdev.
  • The DL serialization during training has been improved. Now, a new serialization type 'current' is available that overwrites the serialized model with the current model after each epoch of the training. This allows resuming long trainings from the current state if they have been stopped for some reason.
  • HALCON has been extended with a pretrained deep learning classification model called pretrained_dl_model_mobilenet_v2.hdl.
  • The deep learning procedure determine_dl_model_detection_param now has the option to define 'max_num_samples'. This can be used to speedup the procedure for large datasets by restricting the number of samples that is used to determine the model parameters. Additionally, the procedure is now faster. Note that this change affects the compatibility. Read more.
  • The NVIDIA CUDA Basic Linear Algebra Subroutine library (cuBLAS) and NVIDIA CUDA Deep Neural Network library (cuDNN) have been updated to the latest versions. To support also the latest NVIDIA graphics cards, HALCON now ships and supports these libraries for the two CUDA versions 10.2 and 11.1. The libraries can be found in the cuda10_2 and cuda11_1 subdirectories of the thirdparty library directory.
    Depending on the installed CUDA versions, the respective libraries are loaded.
    The following versions of the NVIDIA libraries are shipped for CUDA 10.2:
    • NVIDIA CUDA Basic Linear Algebra Subroutine library (cuBLAS) from the CUDA 10.2 Toolkit version 10.2.2.214
    • NVIDIA CUDA Deep Neural Network library (cuDNN) version 8.0.4
    The following versions are shipped for CUDA 11.1:
    • NVIDIA CUDA Basic Linear Algebra Subroutine library (cuBLAS) from the CUDA 11.1 Toolkit version 11.2.1.74
    • NVIDIA CUDA Deep Neural Network library (cuDNN) version 8.0.4
    Note that this change affects the compatibility. Read more.
  • read_dl_model now supports reading in ONNX models containing the following operations:
    • ArgMax
    • Clip
    • ReduceMax
    • Resize
    • Sigmoid
    For information about limitations, have a look at the operator reference of the operator read_dl_model.
  • HALCON has been extended with an operator set to query and handle deep-learning capable hardware devices. The new operators are: The HALCON deep learning examples have been extended to show how to use the new operators. The operator get_dl_model_param and set_dl_model_param have been extended to use the hardware devices that are provided by query_available_dl_devices.
    The procedure set_dl_model_param_max_gpu has been extended to use the new operator query_available_dl_devices.
  • HALCON now provides a new pretrained deep learning model for edge extraction
    pretrained_dl_edge_extractor.hdl.
    This segmentation model is specially trained for the two-class segmentation problem with one class for edges and one for background. The pretrained model is capable of extracting edges in images and, moreover, can be retrained to find specific edges. Note that the retraining of this model is currently only supported on GPU.
    The new functionality is demonstrated in two new examples:
    • hdevelop/Deep-Learning/Segmentation/segment_edges_deep_learning.hdev shows how to extract general edges and uses the images from the subdirectory images/crosses.
    • hdevelop/Deep-Learning/Segmentation/segment_edges_deep_learning_with_retraining.hdev demonstrates how the model can be retrained to detect specific edges. It uses the new images fabrics_01.png to fabrics_20.png from the subdirectory images/fabrics and the new images fabrics_01_gt.png to fabrics_10_gt.png from the subdirectory images/labels/fabrics.
    The operator reference for read_dl_model has been extended with details on the new pretrained model. A section for this new functionality has also been added to the chapter "Edge Extraction (Pixel-Precise)" in Solution Guide I - Basics.

Graphics
  • HALCON now only attempts to load and initialize OpenGL support when a HALCON operator is called that uses OpenGL functionality.
Image
  • HALCON has been extended with an operator crop_rectangle2 that cuts out arbitrarily oriented rectangular parts from the input image.
Matching
  • Shape-based matching now supports model adaptation to handle images with high noise. The new operator adapt_shape_model_high_noise can be used to estimate the lowest pyramid level suitable for a sample search image. The operator get_shape_model_params has been extended to return both the highest pyramid level and the estimated lowest level when adapt_shape_model_high_noise is called.
    The Solution Guide on Matching has been extended by information on the usage of the new operator.
    The new HDevelop example program hdevelop/Matching/Shape-based/adapt_shape_model_high_noise.hdev shows how to use the new functionality.
  • set_shape_model_param now supports the parameter 'model_cache'. This parameter controls the use of an internal cache of the find operations of the shape-based matching. Setting 'model_cache' to 'false' reduces the temporary memory consumption. This functionality is shown in the example program hdevelop/Matching/Shape-Based/set_shape_model_param_model_cache.hdev.
Miscellaneous
OCR
  • HALCON has been extended with Deep OCR. This method makes it possible to find and read arbitrarily oriented text easily and robustly without setting complex parameters.
    The operators for Deep OCR are: The HDevelop example program hdevelop/OCR/Deep-OCR/deep_ocr_workflow.hdev has been added to show how to use Deep OCR in HALCON in a few lines. The example uses the new images airplane_ticket_01, blister_package_01, bottle_label_09, chip_01, cropped_text_image_01, cropped_text_image_02, cropped_text_image_03, cropped_text_image_04, cropped_text_image_05, cropped_text_image_06, cropped_text_image_07, cropped_text_image_08, cropped_text_image_09, cropped_text_image_10, dot_print_12, industrial_text_01, industrial_text_02, keys_01, metal_print_01, and street_sign_01 from the subdirectory images/ocr.
    The new procedure dev_display_deep_ocr_results can be used to visualize the results of Deep OCR.
    HALCON has been extended with pretrained Deep OCR models for text detection and recognition, which can be found in the directory %HALCONROOT%/dl: pretrained_deep_ocr_detection.hdl and pretrained_deep_ocr_recognition.hdl.
    The reference manual has been extended with a chapter describing how to use the new OCR functionality ("OCR" > "Deep OCR").
    This functionality has special system requirements. Among others, third-party libraries have to be installed with a separate installer. Please refer to the Installation Guide for more information.
Region
  • sort_region with 'SortMode' set to 'character' has been extended by a second, optional parameter for 'SortMode'. Now, a tuple consisting of 'character' and a numeric value can be passed to 'SortMode'. This optional parameter specifies the percentage of overlap that adjacent rows or columns can have to be considered as different rows or columns. Previously, this percentage had a fixed value of 15.
    Through the configurable percentage, the 'character' mode is more flexible at handling different amount of overlapping between rows and columns. The operator reference has been adapted with details on this new, optional parameter. Note that this change affects the compatibility. Read more.
Segmentation
  • The speed of the operators watersheds, watersheds_threshold, and watersheds_marker has been significantly improved if a reduced domain is used.
    Now, depending on the size of the image and the reduced domain, it is up to 2300 % faster. Note that this change affects the compatibility. Read more.

Bug Fixes

3D
Bar Code
Classification
  • In very rare cases, learn_sampset_box crashed due to an invalid memory access. This problem has been fixed.
Data Code
  • In very rare cases, local_max_sub_pix and local_min_sub_pix crashed. This problem has been fixed.
  • The default encoding of 2D data codes has been UTF-8 ('utf8'). To be in accordance with the coresponding standards, the default encoding is now ISO-8859-1 ('latin1'). Note that this change affects the compatibility. Read more.
  • In some cases, get_data_code_2d_results returned inconsistent values if a result-specific parameter name was passed in 'ResultNames' but 'CandidateHandle' was set to 'general'. This problem has been fixed. Now, get_data_code_2d_results returns the value '-1' in those cases. Note that this change affects the compatibility. Read more.
  • For mirrored Data Matrix ECC200 codes with a square shape, get_data_code_2d_objects returned wrong results for 'module_1_rois' and 'module_0_rois' in some cases. Additionally, get_data_code_2d_results returned wrong results for 'bin_module_data' for the same cases. These problems have been fixed.
  • In very rare cases, find_data_code_2d showed non-deterministic behavior if the ECC200 code was located very close to the image borders. This problem has been fixed.
  • get_data_code_2d_objects returned wrong results for 'module_1_rois' and 'module_0_rois' in case of mirrored QR codes. This problem has been fixed.
  • When find_data_code_2d was called in training mode for data codes with modules greater than 100 pixel, the parameters 'module_size_min' and 'module_size_max' in some cases were set to values greater than 100, thus exceeding the maximum value that can be set for them with set_data_code_2d_param. This problem has been fixed.
  • For Data Matrix ECC 200 symbols, get_data_code_2d_results in some cases returned wrongly calculated grades for fixed pattern damage with the parameters 'quality_aimdpm_1_2006' or 'quality_isoiec_tr_29158'. This problem has been fixed.
Deep Learning
  • The parameter 'freeze_backbone_level' was not visible in DLModelHandle. This problem has been fixed.
  • For deep learning backbones with many skip connections, create_dl_model_detection was running very long. This problem has been fixed.
  • If the system parameter 'cudnn_deterministic' was specified as 'true' and the model parameter 'optimize_for_inference' was also 'true', the training of this deep learning model did not use the corresponding deterministic cuDNN backward algorithm for convolution layers as required. Hence, the training of such a model was most likely not deterministic on a GPU. This problem has been fixed.
  • In the following examples, the random seed was not working for the first run:
    • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_2_train.hdev
    • hdevelop/Deep-Learning/Detection/detect_pills_deep_learning_2_train.hdev
    • hdevelop/Deep-Learning/Segmentation/segment_pill_defects_deep_learning_2_train.hdev
    This problem has been fixed.
  • When setting directories over GenParam dicts, tuples of strings were not processed correctly when reading deep learning data sets.
    This affects the following procedures:
    • read_dl_dataset_anomaly
    • read_dl_dataset_segmentation
    This problem has been fixed.
  • Serializing and deserializing a classifier as a handle was leading to a crash. This problem has been fixed.
  • In the example hdevelop/Deep-Learning/AnomalyDetection/dl_anomaly_detection_workflow.hdev, the operator write_dl_model was set too early. This problem has been fixed.
  • In the deep learning training procedures, the handling of the evaluation measures was not always correct. The selected measure was not displayed correctly during the training process. This problem has been fixed.
  • Setting the deep learning measure 'soap' during a detection training with oriented boxes did not work correctly. This problem has been fixed.
  • On 32-bit ARM platforms, apply_dl_model and train_dl_model could lead to a crash if the input dictionary did not contain the necessary inputs for the given deep learning model handle. This problem has been fixed.
  • read_dl_model read the momentum value of batch normalization layers in ONNX models incorrectly. This problem has been fixed.
  • The error message of the augmentation parameter 'rotate_range' in the deep learning procedure augment_dl_samples returned a wrong exception. This problem has been fixed.
  • set_dl_model_param has been extended to set the parameters 'bbox_heads_weight' and 'class_heads_weights' for models of type 'detection'.
  • In the deep learning procedure restore_dl_train_info_for_resuming, the output parameter 'StartEpochNumber' was not initialized correctly. This could lead to problems when exporting the code to another language. This problem has been fixed.
  • evaluate_dl_model did not calculate the confusion matrix, precision, and recall for anomaly detection correctly in case only OK or only NOK samples are used. This issue has been fixed. Further, dev_display_anomaly_detection_evaluation has been adapted to display pie charts for both cases correctly.
  • The procedure dev_display_dl_data threw an exception when displaying segmentation ground truth, results, or both in case of non-trivial class IDs. This problem has been fixed.
  • read_dl_model sometimes did not respect the order of inputs for layers with multiple inputs when an ONNX model was read in. This problem has been fixed.
  • Setting the color in the deep learning procedure dev_display_classification_evaluation did not work. This problem has been fixed.
  • get_dl_model_param 'layer_names' retrieved wrongly 'unnamed' layers for the deep-learning models pretrained_dl_segmentation_compact.hdl and pretrained_dl_segmentation_enhanced.hdl. This problem has been fixed.
  • The first classification threshold returned by the procedure compute_dl_anomaly_thresholds was set to the maximum anomaly score of 'ok' images in the test split, which caused all images with the same score to be classified wrongly. This issue has been fixed. Now, the threshold is set to a slightly greater value to ensure the correct classification of all 'ok' images in the test split.
Feature
  • The procedure calculate_features used the fixed gray value range of '0, 255' for FeatureName 'edge_density_histogram'. This problem has been fixed. Now, the histogram is adapted to the gray value range of the edge image instead.
File
  • Attempting to read a TIFF file with a color map and an alpha channel returned an internal error. This problem has been fixed. Now, the error 5556 ("TIFF: Image format not supported by HALCON") is returned.
  • In rare cases, read_image read only one color channel of bitmap RGB image files (BMP). This problem has been fixed.
  • read_image leaked memory for 'jpegxr' images containing an alpha channel. This problem has been fixed.
Filter
  • In rare cases, lines_gauss returned different results when executed in parallel on AVX2- and AVX512f/dq/bw-compatible processors. This problem has been fixed.
  • In rare cases, lines_gauss extracted the wrong line width when an input image with reduced domain has been used. This problem has been fixed.
  • The operator threshold internally truncates the input parameters 'MinGray' and 'MaxGray' from double precision to single precision floating point values. Previously, this happened unnoticed. Now, if the truncated value deviates from the initial input value, a message is printed to console, e.g.: "MinGray parameter outside of numerical precision. Input value 1e-50 truncated to 0 with difference 1e-50"
Graphics
  • draw_rectangle1 and draw_rectangle1_mod did not work correctly when one edge of the rectangle was dragged over the opposite edge. This problem has been fixed.
  • If any interpolation mode but 'nearest_neighbor' was chosen with set_part_style, the visualization displayed garbage data outside the image when setting the window part such that the image did not completely fill the window. This problem has been fixed.
  • When using specific corner-case parameters with legacy pixmap windows, a crash could occur. This problem has been fixed.
  • drag_region1, drag_region2, and drag_region3 could not be canceled correctly using the HDevelop stop button when running in windows opened with open_window. This problem has been fixed.
  • In very rare cases, draw_rectangle2 returned the error 3513 ("Internal error: number of chords too big for num_max") if the current image part was very small. This problem has been fixed.
  • In very rare cases, dev_display and disp_obj crashed if the region or image domain to be displayed had to be scaled down to fit the window and contained a large number of runlengths. This problem has been fixed.
  • get_os_window_handle could return truncated handles on 64-bit systems. This problem has been fixed.
Inspection
Images
  • read_image read a SubIFD in a TIFF image as another channel of the main image, even if the dimensions were different. This problem has been fixed.
Matching
Measure
Miscellaneous
  • When using a license bound to a dongle, HDevelop could periodically fail to communicate with the dongle and complain about a licensing error in response. This problem has been fixed.
OCR
  • In some cases, the result of find_text with text models of mode 'auto' was dependent on the internal image width and height of the system or the current thread. This problem has been fixed.
Region
  • gen_region_points, gen_region_runs, and gen_rectangle1 did not raise an error if coordinates were too small or too big for MAX_FORMAT. This problem has been fixed. Now, they return the errors 3040 ("Row value of a coordinate > 2^15-1"), 3041 ("Row value of a coordinate < -2^15"), 3042 ("Column value of a coordinate > 2^15-1"), or 3043 ("Column value of a coordinate < -2^15"), respectively.
Segmentation
System
  • Under certain conditions, timeouts for socket operations were ignored. This problem has been fixed.
  • Under certain language settings on Windows systems, socket-related extended error messages were not encoded correctly and unreadable. This problem has been fixed.
XLD
  • read_contour_xld_dxf and read_polygon_xld_dxf did not properly treat the orientation of the arbitrary axis for the DXF 2D entities POLYLINE and ARC. This caused wrong position and/or orientation of XLDs when an arbitrary axis was specified. This problem has been fixed.
  • DxfStatus messages of read_contour_xld_dxf and read_polygon_xld_dxf were not returned completely in some cases. This problem has been fixed.
  • In rare cases, union_cotangential_contours_xld returned suboptimal results when the parameter 'FitLength' was set to 'auto'. This problem has been fixed.

Procedures

Bug Fixes

  • The procedure calculate_features used the fixed gray value range of '0, 255' for FeatureName 'edge_density_histogram'. This problem has been fixed. Now, the histogram is adapted to the gray value range of the edge image instead.
  • The procedure visualize_object_model_3d did not always visualize labels that were passed as numbers instead of strings. This problem has been fixed.
  • The error message of the augmentation parameter 'rotate_range' in the deep learning procedure augment_dl_samples returned a wrong exception. This problem has been fixed.
  • In the deep learning procedure restore_dl_train_info_for_resuming, the output parameter 'StartEpochNumber' was not initialized correctly. This could lead to problems when exporting the code to another language. This problem has been fixed.

HALCON/C++

Functionality

Bug Fixes

  • The ToLArr, ToDArr, and ToSArr HTuple member functions in the HALCON C++ language interface could leak memory in case an exception was thrown. This problem has been fixed.
  • Accessing the string value of a tuple element with .C() threw an exception when the tuple was a mixed tuple. This problem has been fixed.

HALCON/.NET

Functionality

Bug Fixes

  • On 64-bit systems, certain window messages could lead to arithmetic overflow when using HWindowControlWPF. This problem has been fixed.

HALCON/PYTHON

Functionality

  • HALCON provides the new language interface HALCON/Python, which supports both the HALCON library and HDevEngine. This language interface can be imported into a Python program via the pip package management system. The usage of the interface is described in Part IV  "Programming With HALCON/Python" of the Programmer's Guide. Additionally, the new example programs examples/python/consoleapp, examples/python/matching (HALCON Library) and examples/hdevengine/python/exec_procedures (HDevEngine) show the usage of the HALCON/Python interface.

Extension Packages

Functionality

  • Declaring a parameter in user-provided .def files in extension packages now requires the declaration of sem_type. Note that default_type remains conceptually optional. Note that this change affects the compatibility. Read more.
  • The Extension Package Programmer's Guide did not give a description on the 'multiinstance' slot used for the parameter description in .def files. The reference manual entry of get_param_info did not mention this information either. The description has been added accordingly.

HBench

Bug Fixes

  • The hbench memory benchmarks could crash on Linux machines in low memory situations. This problem has been fixed.

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.

Image Acquisition Example Programs

  • The HDevelop example program hdevelop/Image/Acquisition/genicamtl_basler_tof_objectmodel3d.hdev has been replaced with the new example program genicamtl_basler_blaze_objectmodel3d.hdev.
  • It is now possible to write and load persistence files for individual GenTL Producer modules or the GenTL Consumer if the device has already been opened. This was so far only possible for the remote device. The persistence file to be written or loaded is selected with the parameter 'settings_selector'.
    The following HDevelop examples have been added to demonstrate writing parameter values to files and restoring parameter values from files:
    • hdevelop/Image/Acquisition/gstreamer_parameter_persistence.hdev
    • hdevelop/Image/Acquisition/gigevision2_parameter_persistence.hdev
    • hdevelop/Image/Acquisition/genicamtl_parameter_persistence.hdev
    • hdevelop/Image/Acquisition/usb3vision_parameter_persistence.hdev
  • The example hdevelop/Image/Acquisition/usb3vision_information.hdev has been added to gather information about the system and the camera configuration for USB3Vision devices.

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.

Documentation

User Guides

  • The index of the HDevelop User's Guide has been improved. Wrong and duplicate entries have been removed.
  • The Extension Package Programmer's Guide did not give a description on the 'multiinstance' slot used for the parameter description in .def files. The reference manual entry of get_param_info did not mention this information either. The description has been added accordingly.

Solution Guides

  • The reference manual entry of evaluate_class_gmm did not clearly describe the meaning of the parameter 'KSigmaProb'. The reference has been adapted accordingly.
  • The Solution Guide II-D Classification contained an ambiguous phrase about the necessity of training from scratch. The corresponding sentence has been clarified.

Reference Manual

  • The reference manual entry of create_caltab did not give sufficient information about the distribution of finder patterns on a calibration plate. The reference has been adapted accordingly.
  • The reference manual entry of create_data_code_2d_model contained an incomplete list of parameters that have different default values depending on the chosen recognition approach. This problem has been fixed.
  • The reference manual entry for the operators create_dict and set_dict_object was ambiguous regarding how objects are copied into dictionaries. This problem has been fixed.
  • The reference manual entry of derivate_gauss only mentioned the SSE2 optimization, but not further implementations. This problem has been fixed. Now, also optimizations for instructions of type AVX and AVX512f are mentioned.
  • The reference manual entry of evaluate_class_gmm did not clearly describe the meaning of the parameter 'KSigmaProb'. The reference has been adapted accordingly.
  • The reference manual entry of expand_domain_gray has been extended to better describe how to set the parameter 'ExpansionRange', in particular for the combination with 'mean_image' on images of type 'real'.
  • The reference manual entries of gen_region_histo and disp_distribution falsely referred to disp_image for a description of its control parameters 'Row', 'Column', and 'Scale'. This problem has been fixed.
  • For certain parameter slots, the notation used in the .def files differed from the one used by the operator get_param_info and returned by the operator query_param_info. This has been fixed. Now, the operators get_param_info and query_param_info use the notation used in the .def file entries, while get_param_info still accepts the legacy notation.
  • The operator reference entry for get_param_info and the Extension Package Programmers Manual mention semtypes but forgot the type 'serial'. This problem has been fixed.
  • The operator reference manual of read_dl_model now explains the meaning of the four dimensions when reading in an ONNX model.
  • The reference manual entry of rectangle1_domain stated that the old image domain would be ignored, which is not the case. The reference has been adapted accordingly.
  • The reference manual entry of set_data_code_2d_param did not mention an upper limit for the generic parameter 'contrast_min'. This problem has been fixed.
  • The reference manual still mentioned an outdated option of using set_paint with 'histogram'. This problem has been fixed.
  • The operator reference entry of set_surface_model_param did not clearly state how the parameter 'pose_restriction_max_angle_diff' is defined. The corresponding formula has been improved.
  • The operator reference of set_system now mentions that the value of the parameter 'thread_num' is automatically increased if the sum of thread-specific threads set in 'tsp_thread_num' exceeds 'thread_num'.
  • The reference manual entry of train_dl_model_batch now mentions which loss values are returned and that they are returned for different levels in case of training a deep learning-based model of type object detection.
  • The reference documentation of the 'Format' parameter of the operator tuple_string has been revised.
  • The documentation of the operator uncalibrated_photometric_stereo has been improved.
  • The reference manual entry of write_dl_model did not mention that the runtime-specific parameters 'runtime' and 'runtime_init' are not written. This problem has been fixed.
  • The reference manual entries of zoom_image_factor and zoom_image_size did not state that slightly different results can occur for different image types. This problem has been fixed.

Installation

  • The HALCON Student Edition now uses version 7.10a of the CodeMeter Runtime.
  • The Linux runtime installer unnecessarily contained the Qt libraries. This problem has been fixed.
  • The Ensenso-NxLib interface is no longer part of the HALCON installation.
  • In addition to the default offline installer, HALCON can now be installed using the MVTec Software Manager (SOM). This online installer is a package manager that downloads the required packages before installing them.
  • On macOS, the installer of the HALCON Student Edition did not update previously installed versions of CodeMeter Runtime. This problem has been fixed.
  • All proprietary image acquisition and digital I/O interfaces have been removed from the HALCON installer. All interfaces can still be downloaded from our web server.

Licensing

  • The HALCON Student Edition now uses version 7.10a of the CodeMeter Runtime.
  • When using a license bound to a dongle, HDevelop could periodically fail to communicate with the dongle and complain about a licensing error in response. This problem has been fixed.

Follow this link to read about the changes of previous HALCON versions.