MVTec Software GmbH
 

Release Notes for HALCON 19.11 Progress

Release Notes for HALCON 19.11.0.2 Progress - Hotfix

Please find the Release Notes for HALCON 19.11.0.2 Progress on this page.

HALCON 19.11.0.2 Progress is a hotfix for HALCON 19.11 Progress and is only relevant for Windows users.

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

Contents

Major New Features of HALCON 19.11.0.0 Progress

Convenient Inspection with Anomaly Detection

The new anomaly detection feature significantly facilitates the automated surface inspection for, e.g., detection and segmentation of defects. With HALCON 19.11, you only need a low number of high quality images for training. The technology is able to localize deviations, i.e. defects of any type, on subsequent images. This means, defects of varying appearance can be detected without any previous knowledge or any preceding labeling efforts. The training of anomaly detection can be performed on a standard CPU.

More Transparency with the Grad-CAM Heatmap

Deep learning networks are often considered as a black box because users do not know what happens with the data during the inspection process. Therefore, it is very difficult to debug in case of misclassifications. HALCON's newly implemented Grad-CAM (Gradient-weighted Class Activation Mapping) supports you in analyzing, which parts of an image have a strong influence for the inference into a certain class. The so-called heatmap based on Grad-CAM is very fast compared to the formerly offered method.

Support of the ONNX Format

HALCON 19.11 is able to read data in ONNX format, allowing to use previously created 3rd party networks for classification and object detection within HALCON.

Speedup of the ECC 200 Data Code Reader

In HALCON 19.11, the code reader for ECC 200 codes has been significantly accelerated for multi-core systems. This affects especially codes that are difficult to detect and read. This speedup also increases the viability of embedded-based code readers by taking full advantage of existing hardware capacities.

Generic Box Finder for Pick-And-Place Applications

The generic box finder allows users to locate boxes of different sizes within a predefined range of height, width, and depth, removing the need to train a model.

Calibration of Telecentric Line Scan Cameras

HALCON has been extended with a new camera model: It provides the functionality to calibrate line scan cameras with telecentric lenses. Images acquired with such telecentric line scan cameras can now be rectified. Thus, measurements can be performed with high precision.

Compatibility

Licenses

HALCON 19.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 19.05 Progress, many extensions have been introduced. Thus, the HALCON 19.11.0.0 Progress libraries are not binary compatible with HALCON 19.05 Progress or earlier versions. However, HALCON 19.11.0.0 Progess is mostly source-code compatible to HALCON 19.05 Progress except for the changes listed below:
  • The define for the error code 7824 ("DL: Invalid instance type") has been renamed from H_ERR_DL_DETECTOR_INVALID_TYPE to H_ERR_DL_DETECTOR_INVALID_INSTANCE_TYPE. Applications using this define must be adapted. More information.
  • The minimum requirements for deep learning on NVIDIA GPUs have been changed. Now, an NVIDIA driver supporting CUDA 10.1 is required. cuBLAS has been split to two libraries, namely cuBLAS and cuBLASLt. The HALCON installer has been extended to install both libraries. Further, the cuDNN library shipping with HALCON has been updated to 7.6.1. More information.
  • Support for deep learning inference on 32-bit Windows has been removed. Further, the extra library hcpudnn.so/.dylib/.dll has been removed and is not needed anymore. More information.
  • HALCON's camera models for perspective line scan cameras now support the polynomial distortion model. As a result of this change, the camera model type string 'line_scan' has been replaced by 'line_scan_division'. The old camera type string 'line_scan' is still supported as input to provide backward compatibility. However, applications should be modified to use 'line_scan_division' instead of 'line_scan'. In particular, programs that test for 'line_scan' in a camera parameter tuple that has been output by HALCON must be rewritten to test for 'line_scan_division'. Furthermore, the procedure gen_cam_par_line_scan has been deprecated. It should be replaced by a call to the new procedure gen_cam_par_line_scan_division. More information.
  • As the pretrained deep learning models used in semantic segmentation have been changed, other training results than before must be expected. Although the new models perform better in all our tested application cases, if you have chosen very specific training parameters for the old models, you might need to optimize those parameters again for the new models. More information.
  • The operators open_file, close_file, fread_char, fread_string, fread_line, fnew_line, and fwrite_string moved from chapter File/Text to File/Access. Further, the corresponding HDevelop example programs moved from the directory hdevelop/File/Text to the directory hdevelop/File/Access. More information.
  • Amongst others, a fix for read_texture_inspection_model increases the texture inspection file version. Therefore, models written with HALCON 19.11 cannot be used with older HALCON versions. More information.
  • triangulate_object_model_3d with Method set to 'xyz_mapping' or 'greedy' now only returns points that are actually used in the output triangulation. Attributes attached to points get thinned out accordingly. The attributes 'lines' and 'polygons' are not copied to the output. To obtain the old behavior, e.g., to return all input points, set the GenParamName 'greedy_output_all_points' or 'xyz_mapping_output_all_points' to 'true'. Alternatively, you can use the old point indices, which are stored in the triangulated 3D object model as an extended attribute named 'original_point_indices' and which can be queried with get_object_model_3d_params. More information.
  • Previously, write_object_model_3d wrote all user added attributes as floats when choosing FileType 'ply'. This behavior has been changed such that all user added attributes are now written as doubles. More information.
  • Amongst others, a fix for write_texture_inspection_model increases the texture inspection file version. Therefore, models written with HALCON 19.11 cannot be used with older HALCON versions. More information.
  • As the surface-based matching has been extended to be able to calculate a view-based score during the matching and pose refinement step, the interface of the procedure dev_display_surface_matching_results has been extended by the new parameter VisibilityTrained to support the view-based score. More information.
  • Extending the functionality of the deep learning model led to changes in the signatures of the following private procedures:
    • dev_display_update_train_dl_model
    • prepare_image_lists
    During this process, parameters have been renamed, which can lead to incompatibilities when running the procedures by the HDevEngine. The following procedures are affected:
    • create_dl_preprocess_param,
    • create_dl_preprocess_param_from_model,
    as well as the following private procedures:
    • get_next_window, and
    • open_next_window.
    More information.
  • The interfaces of the procedures disp_menu_ext and inspect_normal_direction are extended by the parameter 'WindowScaling' to scale the text according to the user's setting. More information.

HALCON Applications

Please re-compile all C, C++, or .NET programs developed with HALCON 19.05 Progress. The incompatibility with HALCON 19.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 19.11.0.0 Progress, HALCON 19.05 Progress, and HALCON 13.0.x image acquisition interfaces are library compatible.

HALCON 19.11.0.0 Progress includes only a subset of available image acquisition interfaces. Image acquisition interfaces that are included are: BitFlow, DirectFile, DirectShow, Ensenso-NxLib, File, GenICamTL, GigEVision2, LinX, MILLite, MultiCam, O3D3xx, pylon, SaperaLT, SICK-3DCamera, SiliconSoftware, uEye, USB3Vision, and Video4Linux2. You can download additional interfaces from our web server.

Digital I/O Interfaces

In general, HALCON 19.11.0.0 Progress, HALCON 19.05 Progress, and HALCON 13.0.x digital I/O interfaces are library compatible.

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

Extension Packages

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

Further Compatibility Information

  • String literals in HDevelop scripts must not span multiple lines. Previously, the use of line continuation (backslash + newline) within a string literal was not treated as an error but led to corrupted strings with extra spaces. Now it is reported as an error and leads to invalid lines. Note that you can break long string literals by concatenating multiple string literals. More information.
  • The new revision 19.11.1 of the OPC_UA interface is not backwards compatible to older HALCON versions. The interface heavily uses HALCON Dictionaries, which for image acquisition and digital I/O interfaces are only available in HALCON 19.11. Further, the OpenSSL version required by the interface is not compatible with the one included in previous releases of HDevelop. More information.
  • The Linux installer script install-linux.sh now is run using bash. Any POSIX compatible shell with file globbing support can be used as alternative to bash. More information.

Planned Discontinuation of the x86-win32 Platform Version for Windows

MVTec plans to discontinue the x86-win32 platform version for Windows. Presumably, this will happen for HALCON 20.11. We recommend that you start switching your applications to the x64-win64 platform version for Windows.

Supported Operating Systems

Windows

HALCON 19.11.0.0 Progress has been compiled for the following Windows platform versions:

  • x86-win32 platform version for Windows 7/8.1/10 or Windows Server 2008 R2/2012 R2/2016/2019 on Intel Pentium 4 or AMD Athlon 64 with SSE2
  • 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

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 19.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 19.11.0.0 Progress has been compiled for the x64 platform version of macOS 10.14/10.15 on Intel 64.

Detailed Description of Changes in HALCON 19.11.0.0 Progress

The changes in HALCON 19.11.0.0 Progress are described with respect to HALCON 19.05 Progess.

HDevelop

New Functionality

Assistants
  • A new reference manual chapter entry 'Calibration' was added. It gathers data applicable to different calibration setups. Among them are calibration recommendations, which are now centralized for improved readability. This allowed to prune other documentation parts and enhance their focus. As part of this work, the recommended values have been reviewed.
    The HDevelop example program 'hdevelop/Calibration/Multi-View/check_calib_image_quality.hdev' as well as the HDevelop Calibration Assistant have been updated and are in line with the current recommendations. As a consequence, the score for the image coverage by a single plate has been removed.
  • HALCON has been extended by a new camera model for line scan cameras with telecentric lenses:
    • 'line_scan_telecentric_division'
    • 'line_scan_telecentric_polynomial'.
    New HDevelop procedures to generate camera parameter tuples for each camera type have been added:
    • gen_cam_par_line_scan_telecentric_division
    • gen_cam_par_line_scan_telecentric_polynomial.
    The new HDevelop example program hdevelop/Calibration/Multi-View/line_scan_telecentric_calibration.hdev shows how to use the new functionality.
    The HDevelop Calibration Assistant has been extended accordingly.
Code Export
  • Code exported from HDevelop added a call to the Xlib function XInitThreads on Linux systems, which has been unnecessary since HALCON 13.0. This has been adapted accordingly.
  • Within the HDevelop User's Guide, the chapter about Code Export has been improved. Further, the section about the Library Project Export now also provides a link to the tutorial video.
GUI
  • The Qt version used by HDevelop has been upgraded to Qt 5.12.5. A known problem is that on macOS, HDevelop does not use the macOS style buttons for closing, minimizing, and maximizing in the title bars.
  • HDevelop's Start Dialog has been extended with a direct link to the complete collection of MVTec's video tutorials.
  • Procedures that have a non-empty warning section in their general documentation now get displayed in HDevelop in the same manner as operators with a non-empty warning slot already do. In particular:
    • Calls to such a procedure get marked with a warning sign in the program listing.
    • The procedures get marked with a warning sign in the Program Window's procedure selection box.
    • The warning text is prominently displayed in the Operator Window.
  • Since HDevelop has been updated to Qt 5.12.5 and now uses the QtWebEngine, it is required that the linux system provides the correct version of the libdbus-1.so3 library. Otherwise an error like below may be displayed:
    "hdevelop: relocation error: ../libQt5DBusMVTec.so.5: symbol dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not defined in file libdbus-1.so.3 with link time reference"
  • High DPI displays are now much better supported. HDevelop adapts appropriately to the Windows screen settings "Scale and layout".
  • The Handle Inspect window in HDevelop no longer shows internal data containers, which are only used to structure the presented data in a tree, as modified. Instead, only the data contained by them is shown as modified if it was changed in the last step or run operation.
IDE
  • HDevelop's Variable Inspection widget now highlights the variables which have been written to during the last execution step. This can be switched on and off via the Preferences Dialog under UserInterface > Program Window > Highlight Modified Variables.
Procedures
  • The procedure documentation has been improved. Now, the procedure reference shows the status (private, public, private protected, public protected) of the procedure.
Miscellaneous
  • If a user searches for "MVTec" in the Windows taskbar, now HDevelop is listed.

Bug Fixes

Assistants
  • The Repair Edges tool of the HDevelop Matching Assistant did not work. This problem has been fixed.
GUI
  • For HDevelop on macOS, window redrawing was not correct in any case. This problem has been fixed. Now, it has been improved and the Graphics Window is no longer the topmost window.
  • Opening a HALCON window larger than the allowed width and height limits (2^15=32768) and a too large window size (e.g., 30000x30000 width/height) could have led to a crash of HDevelop. This problem has been fixed.
  • The execution of draw operators corrupted HDevelop's Graphics Window when the window was rather big (i.e., when at least one dimension exceeded a size of about 4000 pixels). This problem has been fixed.
  • open_window can open child windows within previously opened HALCON windows. Due to changes in the internal HDevelop window management, this may no longer work reliably in HDevelop programs if the parent window is an HDevelop Graphics Window. If nested windows are needed the top-level container window should be opened as a native HALCON window as well (using the operator open_window).
  • In HDevelop, close_window did not work in legacy handle mode. This problem has been fixed.
  • HDevelop's Matrix Inspect window sometimes had layout issues. This problem has been fixed.
Help
  • German umlauts were not displayed properly in the table of contents of the operator reference manual within the HDevelop Help. This problem has been fixed.
  • On Windows systems, using environment variable values of more than 128 characters could have caused problems in some situations. For example, HDevelop Help did not show the help for extension package operators if HALCONEXTENSIONS exceeded the limit. Further, such variables did not work in import paths using %VAR% syntax. This problem has been fixed.
IDE
  • HDevelop sometimes reacted slowly when several variables contained large tuples. This problem has been fixed.
  • Invalidating the code line at the current program counter position (e.g., by edit operations) caused a crash if that line was the last line before an "else" or "catch" statement. This problem has been fixed.
Language
  • HDevelop corrupted string literals if they spanned two or more lines of code. This case is now detected as an invalid line. Instead, use the + operator to concatenate multiple strings and place line breaks in between if desired. For example, use
    string_complete := 'string_part1' + \
    'string_part2'

    Note that this change affects the compatibility. Read more.
Miscellaneous
  • If the maximum number of subthreads has been set to a value greater or equal to 64 via the Preferences dialog (Menu > Edit > Preferences > General Options) and more than 64 par_start<> statements were called, HDevEngine and HDevelop hung. This problem has been fixed.
  • A for loop around a piece of HDevelop code did not work if this code snippet led to a "procedures call stack" greater or equal than 64 entries. The stack size may have been increased with par_start <> statements or by recursion. This problem has been fixed.
  • Dropping an item on HDevelop while holding the Shift key removed the item from the source directory. This problem has been fixed.

HDevelop Example Programs

New HDevelop Example Programs
  • hdevelop/3D-Matching/3D-Box/find_box_3d.hdev
  • hdevelop/3D-Matching/Surface-Based/find_surface_model_view_based_score.hdev
  • hdevelop/3D-Object-Model/Segmentation/reduce_object_model_3d_to_visible_parts.hdev
  • hdevelop/3D-Object-Model/Transformations/triangulate_object_model_3d_xyz_mapping.hdev
  • hdevelop/Applications/General/sony_polarsens_polarization_angle_degree.hdev
  • hdevelop/Calibration/Multi-View/line_scan_telecentric_calibration.hdev
  • hdevelop/Deep-Learning/AnomalyDetection/dl_anomaly_detection_workflow.hdev
  • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_1_preprocess.hdev
  • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_2_train.hdev
  • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_3_evaluate.hdev
  • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_4_infer.hdev
  • hdevelop/Deep-Learning/Classification/dl_classification_workflow.hdev
  • hdevelop/Deep-Learning/Classification/show_feature_maps_for_dl_classification.hdev
  • hdevelop/File/Access/fread_bytes.hdev
  • hdevelop/File/Images/read_write_image_metadata.hdev
  • hdevelop/Image/Acquisition/genicamtl_zivid_one_objectmodel3d.hdev
  • hdevelop/Segmentation/Topography/watersheds_marker.hdev
  • hdevelop/System/IO-Devices/opc_ua_enumeration.hdev
  • hdevelop/System/IO-Devices/opc_ua_monitor_connection.hdev
  • hdevelop/System/IO-Devices/opc_ua_option_set.hdev
  • hdevelop/System/IO-Devices/opc_ua_structure.hdev
  • hdevelop/System/IO-Devices/opc_ua_union.hdev
Selected New Functionality
  • The new HDevelop example program hdevelop/Applications/General/sony_polarsens_polarization_angle_degree.hdev shows how to extract the four polarization images from a RAW image, and how to calculate the direction and degree of polarization for each pixel.
Bug Fixes
  • The example in the reference manual entries of open_io_device and query_io_interface contained a misspelled variable. This problem has been fixed.
  • In some places of the HDevelop example program explore_halcon.hdev, set_system ('flush_graphic', ...) was used, although this is no longer recommended. Instead, the operators set_window_param and flush_buffer should be used. This problem has been fixed.

HDevEngine

Bug Fixes

  • If the maximum number of subthreads has been set to a value greater or equal to 64 via the Preferences dialog (Menu > Edit > Preferences > General Options) and more than 64 par_start<> statements were called, HDevEngine and HDevelop hung. This problem has been fixed.
  • The method HDevProgram::GetLocalProcedureNames returned all used procedures instead of only local ones. This problem has been fixed.
  • In rare cases, JIT compiled procedures could have crashed if they called dev_clear_obj. This problem has been fixed.

HALCON Library

Speedup

  • The operators binocular_disparity_ms and binocular_distance_ms have been extended and now offer a coarse-to-fine optimization strategy. The coarse-to-fine strategy requires significantly less memory for large images and large disparity ranges. For example, for an image pair with size 3460x2309 and a disparity range of 800, speedups of over 1000% can be expected. However, the generated disparity images are less accurate for the coarse-to-fine strategy than for the default approach. Especially in case of sharp disparity jumps, the discontinuities are preserved less accurately. Furthermore, it is now possible to pass an empty tuple for MinDisparity and MaxDisparity. The respective values are then computed automatically from the passed input images. Moreover, the operators are now interruptible, i.e. they can be canceled in HDevelop. The HDevelop example program hdevelop/3D-Reconstruction/Binocular-Stereo/binocular_disparity_ms.hdev has been extended to highlight the new functionality.
  • find_data_code_2d has been accelerated for Data Matrix ECC200 codes on multi-core systems. It now supports the parallel execution of multiple parameter sets. Thus, a significant speedup can be expected if one or several of the generic parameters 'polarity', 'contrast_tolerance', or 'finder_pattern_tolerance' are set to 'any', or if the values for 'module_gap_min' and 'module_gap_max' differ. This applies in particular if 'default_parameters' is set to 'enhanced_recognition' or 'maximum_recognition' with create_data_code_2d_model or set_data_code_2d_param. Compared to HALCON 19.05 a speedup of
    • 30 to 70% with enhanced settings, and
    • 60 to 240% with maximum settings
    for 2 to 8 threads can be achieved. Please note, that the memory consumption increases with the number of parallel running threads. The number of threads can be controlled with the corresponding set_system parameters. In addition, it is possible to disable the Data Matrix ECC 200 specific parallelization by setting the new generic parameter 'specific_parallelization' of find_data_code_2d to 'disable'. Per default, 'specific_parallelization' is set to 'enable'.
  • The x86 CPU inference for deep learning has been rewritten. The extra library hcpudnn.so/.dylib/.dll has been removed and is not needed anymore. Furthermore, support for 32-bit Windows has been removed. The new inference is faster in some cases; especially object detection is faster by up to 400% in some cases. Note that this change affects the compatibility. Read more.
  • gray_erosion_rect, gray_dilation_rect, gray_opening_rect, gray_closing_rect, gray_erosion_shape, gray_dilation_shape, gray_opening, and gray_closing_shape with parameter 'MaskShape' set to 'rectangle' are now faster for 'uint2' images on Intel compatible processors that support SSE2 or AVX2, depending on the image size and mask dimensions.
    In particular, the following speedups can be expected for a 1600x1200 image compared to the previously available SSE2 implementation:
    MaskHeight x
    MaskWidth
    Morphological
    operation
    Speedup
    without
    Parallelization
    and with SSE2
    (Windows/Linux)
    Speedup
    without
    Parallelization
    and with AVX2
    (Windows/Linux)
    Speedup
    with 8/2-Thread
    Parallelization
    and with SSE2
    (Windows/Linux)
    Speedup
    with 8/2-Thread
    Parallelization
    and with AVX2
    (Windows/Linux)
    3x3 erosion/dilation 10%/5% 85%/100% 150%/80% 160%/160%
    5x5 erosion/dilation 5%/5% 160%/195% 115%/50% 190%/275%
    7x7 erosion/dilation 15%/12% 205%/230% 100%/45% 265%/290%
    9x9 erosion/dilation 10%/7% 185%/203% 85%/30% 200%/270%
    11x11 erosion/dilation 3%/ -5% 120%/125% 25%/15% 85%/135%
    13x13 erosion/dilation 5%/ 0% 145%/160% 60%/15% 140%/160%
    1x3 erosion/dilation 100%/145% 105%/150% 100%/145% 105%/150%
    3x1 erosion/dilation 90%/170% 105%/140% 90%/170% 105%/140%
    1x11 erosion/dilation 3%/30% 5%/40% 3%/30% 5%/40%
    11x1 erosion/dilation -5%/3% -5%/3% -5%/3% -5%/3%
    3x5 erosion/dilation 60%/75% 65%/75% 60%/75% 65%/75%
    5x3 erosion/dilation 60%/70% 65%/90% 60%/70% 65%/90%
               
               
    3x3 opening/closing -5%/0% 50%/85% 80%/70% 80%/110%
    5x5 opening/closing -4%/0% 120%/185% 90%/45% 120%/190%
    7x7 opening/closing 5%/5% 165%/220% 80%/30% 150%/255%
    9x9 opening/closing 4%/5% 155%/200% 70%/35% 180%/250%
    11x11 opening/closing -5%/ -5% 105%/130% 15%/10% 70%135%
    13x13 opening/closing -4%/0% 130%/160% 40%/15% 105%/175%
    1x3 opening/closing 80%/100% 75%/100% 80%/100% 75%/100%
    3x1 opening/closing 80%/90% 75%/70% 80%/90% 75%/70%
    Note that, previously, values outside the domain have been calculated in the unparallelized case that led to well defined pixel values outside the actual image domain. Now, the image only contains pixel values in the actual domain. Please note that the new SSE2 implementation for filter masks 1xN (e.g., 1x3, 1x5, ...) and for filter masks 3xN (e.g., 3x3, 3x5, ...) can be slightly slower than the old SSE2 implementation.
  • The performance of the operators watersheds and watersheds_threshold has been improved for images of type 'real'. watersheds is now up to 35% faster, watersheds_threshold is up to 33% faster.
  • The pretrained deep learning models used in semantic segmentation have been significantly improved:
    • dl/pretrained_dl_segmentation_compact.hdl
    • dl/pretrained_dl_segmentation_enhanced.hdl
    Inference speed is improved by 30-45% on GPUs, 90-190% on CPUs, and 90% on ArmĀ®. Additionally, the training is faster and leads to improved results in all our tested application cases. Furthermore, please note that the minimal allowed input image size of the "enhanced" network has been lowered from 81 to 47 pixels in width and height. Note that this change affects the compatibility. Read more.

New Functionality

3D
  • The operators binocular_disparity_ms and binocular_distance_ms have been extended and now offer a coarse-to-fine optimization strategy. The coarse-to-fine strategy requires significantly less memory for large images and large disparity ranges. For example, for an image pair with size 3460x2309 and a disparity range of 800, speedups of over 1000% can be expected. However, the generated disparity images are less accurate for the coarse-to-fine strategy than for the default approach. Especially in case of sharp disparity jumps, the discontinuities are preserved less accurately. Furthermore, it is now possible to pass an empty tuple for MinDisparity and MaxDisparity. The respective values are then computed automatically from the passed input images. Moreover, the operators are now interruptible, i.e. they can be canceled in HDevelop. The HDevelop example program hdevelop/3D-Reconstruction/Binocular-Stereo/binocular_disparity_ms.hdev has been extended to highlight the new functionality.
  • The usability of copy_object_model_3d has been improved. Now, the attribute names are similar to the get/set-operators for 3D object models. The old attribute names continue to work but are legacy from now on.
  • Surface-based matching has been extended to be able to calculate a view-based score during the matching and pose refinement step. For this, HALCON has been extended such that the operator create_surface_model can be used to prepare the model for view-based score calculation. Additionally, the operators find_surface_model, find_surface_model_image, refine_surface_model_pose, and refine_surface_model_pose_image now accept an additional value for their MinScore argument. This value can be used to set a minimum score for the view-based overlap. Further, the value of this score can be obtained using the operator get_surface_matching_result. The visualization of the corresponding surface matching result handles in the Handle Inspect window has been adapted accordingly. The new HDevelop example program hdevelop/3D-Matching/Surface-Based/find_surface_model_view_based_score.hdev shows how to use the new functionality. The procedure debug_surface_based_matching has been extended to check the visibility of the scene based on the current viewpoint. The HDevelop example program hdevelop/3D-Matching/Surface-Based/debug_find_surface_model.hdev has been extended accordingly. Note that this change affects the compatibility. Read more.
  • HALCON has been extended with the operator find_box_3d, which enables the detection, localization, and length measurement of boxes of various sizes in 3D data.
    The new HDevelop example program hdevelop/3D-Matching/3D-Box/find_box_3d.hdev demonstrates the new functionality.
    The new procedure debug_find_box_3d has been added, which allows debugging the parameters for the 3D box finder. The procedure is included in the existing library procedures/general/debug_find_surface_model.hdpl.
  • The reference manual entry of find_surface_model was pruned by removing the description of the GenParamName 'score_type'. The default behavior of 'score_type' is sufficient for the use of the operator. Nevertheless, the parameter remains functioning to maintain backwards compatibility.
  • The usability of find_surface_model and its derivations find_surface_model_image and find_deformable_surface_model has been improved. Now, the normals of the object model 3d scene can be inverted with the new generic parameter 'scene_invert_normals'.
  • object_model_3d_to_xyz has been extended by the new type 'cartesian_faces', which transforms the triangles of one or more 3D object model(s) into three densely filled coordinate images X, Y, and Z.
    The new HDevelop example program hdevelop/3D-Object-Model/Segmentation/reduce_object_model_3d_to_visible_parts.hdev shows how to use the new type to reduce a 3D object model to the triangles visible for a virtual camera.
  • reduce_object_model_3d_by_view previously required to pass the string 'xyz_mapping' as camera parameters to use the mapping for point selection. Now, an empty tuple can be passed as camera parameters as well.
  • HALCON has been extended with the operators remove_object_model_3d_attrib and remove_object_model_3d_attrib_mod. They provide the functionality to remove standard or extended (user-defined) attributes to reduce memory consumption of 3D object models.
    The HDevelop example program hdevelop/3D-Object-Model/Creation/set_object_model_3d_attrib.hdev has been extended to show how to use the new operators.
  • triangulate_object_model_3d with Method set to 'xyz_mapping' or 'greedy' now only returnes points which are actually used in the output triangulation. Note that this change affects the compatibility. Read more.
  • triangulate_object_model_3d with Method set to 'xyz_mapping' has been improved. Now, the operator provides new parameters to apply a post-processing step that removes triangles whose normals differ strongly from a specified direction.
    The new HDevelop example program hdevelop/3D-Object-Model/Transformations/triangulate_object_model_3d_xyz_mapping.hdev shows how to obtain a mesh from a 2D mapping contained in a 3D object model. Note that this change affects the compatibility. Read more.
  • The Solution Guide on 3D Vision has been extended with information about the benefits of using 2D mappings when handling 3D objects.
  • The procedure debug_find_surface_model has been improved. Now, the menu text is scaled and positioned according to the user setting 'WindowScaling'. Additionally, the menu colors have been changed. Note that this change affects the compatibility. Read more.
Bar Code
  • The accuracy of the bar code orientation returned by get_bar_code_result with the parameter 'orientation' has been improved. Now, the orientation perpendicular to the bars is returned instead of the orientation of the scanlines. In addition, for non-stacked codes and codes without composite component, the improved orientation is applied to create a more accurate symbol region. If the orientation of the bars cannot be reliably determined, e.g., for distorted codes, the orientation of the scanlines is still returned with get_bar_code_result and used for the symbol region.
Calibration
  • HALCON has been extended by a new camera model for line scan cameras with telecentric lenses:
    • 'line_scan_telecentric_division'
    • 'line_scan_telecentric_polynomial'.
    New HDevelop procedures to generate camera parameter tuples for each camera type have been added:
    • gen_cam_par_line_scan_telecentric_division
    • gen_cam_par_line_scan_telecentric_polynomial.
    The new HDevelop example program hdevelop/Calibration/Multi-View/line_scan_telecentric_calibration.hdev shows how to use the new functionality.
    The HDevelop Calibration Assistant has been extended accordingly.
  • HALCON's camera models for perspective line scan cameras now support the polynomial distortion model. Consequently, there are two perspective line scan camera models in HALCON:
    • 'line_scan_division'
    • 'line_scan_polynomial'.
    New HDevelop procedures to generate camera parameter tuples for each camera type have been added:
    • gen_cam_par_line_scan_division
    • gen_cam_par_line_scan_polynomial.
    The HDevelop Calibration Assistant has been extended accordingly. Note that this change affects the compatibility. Read more.
Data Code
  • find_data_code_2d has been accelerated for Data Matrix ECC200 codes on multi-core systems. It now supports the parallel execution of multiple parameter sets. Thus, a significant speedup can be expected if one or several of the generic parameters 'polarity', 'contrast_tolerance', or 'finder_pattern_tolerance' are set to 'any', or if the values for 'module_gap_min' and 'module_gap_max' differ. This applies in particular if 'default_parameters' is set to 'enhanced_recognition' or 'maximum_recognition' with create_data_code_2d_model or set_data_code_2d_param. Compared to HALCON 19.05 a speedup of
    • 30 to 70% with enhanced settings, and
    • 60 to 240% with maximum settings
    for 2 to 8 threads can be achieved. Please note, that the memory consumption increases with the number of parallel running threads. The number of threads can be controlled with the corresponding set_system parameters. In addition, it is possible to disable the Data Matrix ECC 200 specific parallelization by setting the new generic parameter 'specific_parallelization' of find_data_code_2d to 'disable'. Per default, 'specific_parallelization' is set to 'enable'.
Deep Learning
  • When preprocessing the images to train a deep learning model, the new parameter 'normalization_type' replaces the parameter 'contrast_normalization'. For this, the deep learning procedure library dl_preprocessing has been adapted and extended to replace the legacy parameter 'contrast_normalization' keys with the relaunched keys for the new parameter 'normalization_type'.
  • The procedure train_dl_model has been extended with a new option to display the evaluation measure for the training split.
  • The procedure augment_dl_samples provides two new augmentation types available for deep learning detection and segmentation models. They enable to augment the images with a global or local brightness variation.
  • HALCON has been extended with a deep learning procedure determine_dl_model_detection_param. The procedure automatically generates model parameters for deep learning object detection (parameters related to reference anchor boxes) by analyzing the dataset used for training the model. Using the generated parameters, the detection performance as well as the model runtime can be improved.
  • The minimum requirements for deep learning on NVIDIA GPUs have been changed. Now, an NVIDIA driver supporting CUDA 10.1 is required. cuBLAS has been split to two libraries, namely cuBLAS and cuBLASLt. The HALCON installer has been extended to install both libraries. Further, the cuDNN library shipping with HALCON has been updated to 7.6.1. Note that this change affects the compatibility. Read more.
  • The x86 CPU inference for deep learning has been rewritten. The extra library hcpudnn.so/.dylib/.dll has been removed and is not needed anymore. Furthermore, support for 32-bit Windows has been removed. The new inference is faster in some cases; especially object detection is faster by up to 400% in some cases. Note that this change affects the compatibility. Read more.
  • HALCON has been extended with the operator gen_dl_model_heatmap, which returns an improved heatmap that is based on Grad-CAM (Gradient-weighted Class Activation Mapping). The operator is much faster than the procedure gen_dl_model_classification_heatmap. To display the heatmap, the procedure dev_display_dl_data has been extended. So far, the operator is only supported for runtime 'gpu'. A workflow using the new operator is shown in the HDevelop example program hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_4_infer.hdev.
  • get_dl_model_param has been extended with the parameter 'summary' that returns information on the network architecture. This can be used to select 'backbone_docking_layer' for classifiers read from an ONNX model, such that they can be used as backbone for object detection.
  • get_system and set_system now support the parameters 'calib_dir', 'dl_dir', 'filter_dir', and 'ocr_dir' to get and set the default search path for camera parameters, deep learning models, filter parameters, and OCR classifiers, respectively.
  • HALCON now can read classification networks written in the ONNX format (see https://onnx.ai/) using read_dl_model. The read network is internally converted to a HALCON model and can be used as any other classification model. During the format conversion, some transformations may be applied automatically in order to improve the efficiency. These transformations as well as the existing restrictions are documented in the operator reference.
  • HALCON has been extended with deep learning-based anomaly detection. This method makes it possible to learn the distribution of common features on a set of images. Features deviating from the learned distribution can thus be detected, which enables finding anomalies on new images. The new operator train_dl_model_anomaly_dataset has been added to train a deep learning model for anomaly detection. For all other purposes besides creation, the general purpose dl_model operator set is used. The HDevelop example program hdevelop/Deep-Learning/AnomalyDetection/dl_anomaly_detection_workflow.hdev has been added to show how to use deep learning-based anomaly detection in HALCON in a few lines. The example uses the new images in images/bottles and the annotations in images/labels/bottles. HALCON has been extended with two initial deep learning-based models for anomaly detection, which can be found in the directory %HALCONROOT%/dl: initial_dl_anomaly_medium.hdl and initial_dl_anomaly_large.hdl. The reference manual has been extended with a chapter on anomaly detection to describe how to use the new deep learning functionality ("Deep Learning" > "Anomaly Detection"). The procedure read_dl_dataset_anomaly can be used to read the images and possible ground truth annotation. Please note that this functionality has special system requirements. Among others, third-party libraries have to be installed with a separate installer. This installer also contains the images and pretrained model for the examples. Please refer to the Installation Guide for more information. Note that this change affects the compatibility. Read more.
  • For deep-learning-based classification models it is now possible to extract the feature maps of a selected layer. The new HDevelop example program hdevelop/Deep-Learning/Classification/show_feature_maps_for_dl_classification.hdev shows how this feature can be applied.
  • The deep learning-based classification has been refactored. Now, classification is done using the same operators and workflow as the deep learning methods object detection and semantic segmentation. For this, the existing deep learning model procedures have been extended. The following HDevelop example programs have been added to show how to use deep learning-based classification in HALCON with the model approach:
    • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_1_preprocess.hdev
    • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_2_train.hdev
    • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_3_evaluate.hdev
    • hdevelop/Deep-Learning/Classification/classify_pill_defects_deep_learning_4_infer.hdev
    Additionally, the new HDevelop example program
    • hdevelop/Deep-Learning/Classification/dl_classification_workflow.hdev
    concisely shows the overall workflow reduced to its main parts. The reference manual has been adapted and extended to describe how to use the functionality. The new procedure read_dl_dataset_classification can be used to read annotation data.
    Note that the operator set and procedures using the previous workflow have been set to legacy and the corresponding examples have been removed.
  • HALCON has been extended with a procedure dev_close_window_dict that can be used to close window handles contained in a dictionary.
  • The procedure set_dl_model_param_max_gpu_batch_size has been extended to support models of type 'classification'.
  • In HDevelop, the deep learning object detection example hdevelop/Deep-Learning/Detection/detect_pills_deep_learning_1_prepare.hdev has been extended. It now shows the usage of the new procedure determine_dl_model_detection_param, which generates model parameters by analyzing the dataset.
  • The deep learning evaluation procedures have been extended to support the model type Anomaly Detection.
  • HALCON has been extended with a pretrained deep learning classification model called pretrained_dl_model_alexnet.hdl.
  • The pretrained deep learning models used in semantic segmentation have been significantly improved:
    • dl/pretrained_dl_segmentation_compact.hdl
    • dl/pretrained_dl_segmentation_enhanced.hdl
    Inference speed is improved by 30-45% on GPUs, 90-190% on CPUs, and 90% on ArmĀ®. Additionally, the training is faster and leads to improved results in all our tested application cases. Furthermore, please note that the minimal allowed input image size of the "enhanced" network has been lowered from 81 to 47 pixels in width and height. Note that this change affects the compatibility. Read more.
File
  • HALCON has been extended with the operators fread_bytes and fwrite_bytes, which read bytes from and write bytes to binary files, respectively.
    The new HDevelop example program hdevelop/File/Access/fread_bytes.hdev shows the usage of the new operators by copying a file bytewise. Note that this change affects the compatibility. Read more.
  • HALCON has been extended with the possibility to read and write image metadata. For this purpose, the new operators write_image_metadata and read_image_metadata have been added.
    Currently, this feature is restricted to TIFF images and the tags mentioned in the reference manual entry of read_image_metadata.
    The workflow is shown in the new HDevelop example program hdevelop/File/Images/read_write_image_metadata.hdev.
Miscellaneous
  • For get_spy and set_spy, the parameters 'button_click', 'button_notify', 'button_window', 'halt', 'input_gray_window', 'input_region_window', 'input_xld_window', and 'timeout' have been removed and are no longer supported.
Morphology
  • gray_erosion_rect, gray_dilation_rect, gray_opening_rect, gray_closing_rect, gray_erosion_shape, gray_dilation_shape, gray_opening, and gray_closing_shape with parameter 'MaskShape' set to 'rectangle' are now faster for 'uint2' images on Intel compatible processors that support SSE2 or AVX2, depending on the image size and mask dimensions.
    In particular, the following speedups can be expected for a 1600x1200 image compared to the previously available SSE2 implementation:
    MaskHeight x
    MaskWidth
    Morphological
    operation
    Speedup
    without
    Parallelization
    and with SSE2
    (Windows/Linux)
    Speedup
    without
    Parallelization
    and with AVX2
    (Windows/Linux)
    Speedup
    with 8/2-Thread
    Parallelization
    and with SSE2
    (Windows/Linux)
    Speedup
    with 8/2-Thread
    Parallelization
    and with AVX2
    (Windows/Linux)
    3x3 erosion/dilation 10%/5% 85%/100% 150%/80% 160%/160%
    5x5 erosion/dilation 5%/5% 160%/195% 115%/50% 190%/275%
    7x7 erosion/dilation 15%/12% 205%/230% 100%/45% 265%/290%
    9x9 erosion/dilation 10%/7% 185%/203% 85%/30% 200%/270%
    11x11 erosion/dilation 3%/ -5% 120%/125% 25%/15% 85%/135%
    13x13 erosion/dilation 5%/ 0% 145%/160% 60%/15% 140%/160%
    1x3 erosion/dilation 100%/145% 105%/150% 100%/145% 105%/150%
    3x1 erosion/dilation 90%/170% 105%/140% 90%/170% 105%/140%
    1x11 erosion/dilation 3%/30% 5%/40% 3%/30% 5%/40%
    11x1 erosion/dilation -5%/3% -5%/3% -5%/3% -5%/3%
    3x5 erosion/dilation 60%/75% 65%/75% 60%/75% 65%/75%
    5x3 erosion/dilation 60%/70% 65%/90% 60%/70% 65%/90%
               
               
    3x3 opening/closing -5%/0% 50%/85% 80%/70% 80%/110%
    5x5 opening/closing -4%/0% 120%/185% 90%/45% 120%/190%
    7x7 opening/closing 5%/5% 165%/220% 80%/30% 150%/255%
    9x9 opening/closing 4%/5% 155%/200% 70%/35% 180%/250%
    11x11 opening/closing -5%/ -5% 105%/130% 15%/10% 70%135%
    13x13 opening/closing -4%/0% 130%/160% 40%/15% 105%/175%
    1x3 opening/closing 80%/100% 75%/100% 80%/100% 75%/100%
    3x1 opening/closing 80%/90% 75%/70% 80%/90% 75%/70%
    Note that, previously, values outside the domain have been calculated in the unparallelized case that led to well defined pixel values outside the actual image domain. Now, the image only contains pixel values in the actual domain. Please note that the new SSE2 implementation for filter masks 1xN (e.g., 1x3, 1x5, ...) and for filter masks 3xN (e.g., 3x3, 3x5, ...) can be slightly slower than the old SSE2 implementation.
Parallelization
  • The HALCON library now properly synchronizes the initialization when called from multiple threads, so it is no longer necessary to call the first HALCON operator exclusively.
Segmentation
  • The usability of the operator regiongrowing has been improved. Now, its parameters Row and Column have been renamed to RasterHeight and RasterWidth in order to better point out their meaning.
  • The performance of the operators watersheds and watersheds_threshold has been improved for images of type 'real'. watersheds is now up to 35% faster, watersheds_threshold is up to 33% faster.
  • HALCON has been extended with a new operator watersheds_marker to perform marker-based watershed image segmentation.
    The new HDevelop example program hdevelop/Segmentation/Topography/watersheds_marker.hdev demonstrates the new functionality.
System
  • get_system and set_system now support the parameters 'calib_dir', 'dl_dir', 'filter_dir', and 'ocr_dir' to get and set the default search path for camera parameters, deep learning models, filter parameters, and OCR classifiers, respectively.
  • During initialization HALCON attempts to open a hidden OpenGL window to determine the supported OpenGL capabilities. On systems with broken OpenGL drivers this can lead to HALCON crashing on startup. The environment variable HALCON_NO_OPENGL can now be set to 1 to tell HALCON to disable OpenGL support, avoiding the crash.
XLD
  • HALCON has been extended with an operator rectangularity_xld that computes the rectangularity scores for XLD contours and polygons.
    select_shape_xld has been extended by the new type 'rectangularity', which selects XLD contours based on their rectangularity score.
    The HDevelop example program hdevelop/XLD/Features/select_shape_xld.hdev has been extended to show how to use the new parameter.

Bug Fixes

3D
  • connection_object_model_3d did not work with objects that had both triangles and polygons inside the model. This problem has been fixed.
  • find_surface_model, find_surface_model_image, refine_surface_model_pose, and refine_surface_model_pose_image allowed setting 'use_3d_edges' to 'true', even if the 3D surface model was not trained for edge-supported matching. This problem has been fixed. Now, the error 9504 ("3D surface model not trained for edge-supported matching") is returned.
  • find_surface_model, find_surface_model_image, refine_surface_model_pose, and refine_surface_model_pose_image returned a too high Score when the model was trained using 3D edges, but their use was disabled by the generic parameter 'use_3d_edges'. This problem has been fixed.
  • The auxiliary procedure debug_find_surface_model did not always show the correct result scores in the result inspection if the edge-supported surface-based matching was used and multiple results were visualized. This problem has been fixed.
  • moments_object_model_3d sometimes returned incorrect values for MomentsToCalculate set to 'principal_axes' if several models have been passed over as a tuple. This problem has been fixed.
  • object_model_3d_to_xyz with Type 'cartesian' sometimes did not show the projected coordinate values in the correctly rounded pixels. This problem has been fixed.
  • object_model_3d_to_xyz with Type 'cartesian' sometimes showed incorrect points in the output images, as well as points behind the camera given by CamParam and Pose. This problem has been fixed.
  • In rare cases, reduce_object_model_3d_by_view could have caused memory corruption or crashed when using the 'xyz_mapping' mode. This problem has been fixed.
  • In rare situations, smallest_bounding_box_object_model_3d produced different results on different platforms (macOS, Windows, Linux). This problem has been fixed. The results are now more similar on all platforms.
  • In rare cases, triangulate_object_model_3d could have crashed if method was set to 'greedy' and 'greedy_mesh_erosion' was turned on. This problem has been fixed.
  • triangulate_object_model_3d with Method set to 'xyz_mapping' or 'greedy' did not remove attributes that were attached to an old triangulation. triangulate_object_model_3d with Method set to 'polygon_triangulation' raised an unrelated error in case that the input already contained triangles. triangulate_object_model_3d with Method set to 'polygon_triangulation' froze in case that it contained an attribute named '&original_indices'. These problems have been fixed. Now, triangulate_object_model_3d with Method set to 'polygon_triangulation' replaces triangles.
Bar Code
  • HALCON now supports all GS1 application identifiers specified in the latest version of the "GS1 General Specifications" (July 2019).
Calibration
  • find_calib_object could have found the same finder pattern twice in a low resolution image. This problem has been fixed. Now, the error 8395 ("Same finder pattern found multiple times") is returned.
Data Code
  • In very rare cases, find_data_code_2d returned wrong QR code results if ECI mode was used for decoding. This problem has been fixed.
  • In rare cases, memory leaked when calling find_data_code_2d for the data code model QR Code. This problem has been fixed.
  • In rare cases, find_data_code_2d missed decodable PDF417 symbols due to an inconsistent erasure treatment. This problem has been fixed.
  • In very rare cases, find_data_code_2d crashed for PDF417. This problem has been fixed.
  • In very rare cases, find_data_code_2d returned an incorrectly decoded data string for Data Matrix ECC 200 codes. This problem has been fixed.
  • In rare cases, find_data_code_2d threw the error 6006 ("Tmp-memory management: could not find memory element") for Micro QR codes if small timeout values were set. This problem has been fixed.
  • In rare cases, a memory leak could have occurred in find_data_code_2d for PDF417 codes if small timeout values were set. This problem has been fixed.
  • In very rare cases, find_data_code_2d decoded the left/right indicators of PDF417 codes erroneously. This could have led to crashes. This problem has been fixed.
  • In some cases, get_data_code_2d_results returned a 'pass_num' value that was one too high. This problem has been fixed.
  • In some cases, get_data_code_2d_results returned further candidates although the expected result number, defined by 'stop_after_result_num', has already been reached. This problem has been fixed.
  • In very rare cases, get_data_code_2d_results returned too bad grades for quality_isoiec15415 for Data Matrix ECC 200 codes. This problem has been fixed.
  • When using the operator read_data_code_2d_model to read model files created with an older HALCON version, attributes not contained in the model may not have been initialized properly to default values. This problem has been fixed.
  • HALCON now supports all GS1 application identifiers specified in the latest version of the "GS1 General Specifications" (July 2019).
Deep Learning
  • The operator apply_dl_model computed unnecessary results for segmentation models based on pretrained_dl_segmentation_enhanced.hdl. This problem has been fixed.
  • In very rare cases, apply_dl_model ran into an infinite loop for models of type detection with instance_type='rectangle2' when the trained weights were corrupt. This problem has been fixed. Now, an error is raised.
  • apply_dl_model, read_dl_model, set_dl_model_param, and write_dl_model have not been part of the Deep Learning Inference module. This problem has been fixed.
  • The pretrained classifier pretrained_dl_classifier_resnet50.hdl had wrong default classes and a too high default batch size. This problem has been fixed.
  • The define for the error 7824 ("DL: Invalid instance type") has been renamed from H_ERR_DL_DETECTOR_INVALID_TYPE to H_ERR_DL_DETECTOR_INVALID_INSTANCE_TYPE . Note that this change affects the compatibility. Read more.
  • The option 'ignore_missing_labels' in the deep learning procedure gen_dl_samples did not work correctly for the detection workflow (with and without oriented bounding boxes). This problem has been fixed.
  • In rare cases, handles visualized in the Handle Inspect window were not properly cleaned, even if all references to the handle were destroyed. This included resetting the program with F2, in which case the handles and their corresponding memory were not freed. This problem has been fixed.
  • The procedure create_dl_train_param failed if a deep learning model of type 'detection' created in HALCON 18.11 was passed over to the procedure. This problem has been fixed.
  • The procedure dev_display_dl_data failed if the number of items to visualize was greater than the number of items in the corresponding split of the dataset. The procedure train_dl_model is also affected because it uses the procedure. This problem has been fixed.
  • The procedure read_dl_dataset_segmentation failed on Windows if some of the input paths contained "\\" separators (e.g. "my\\path\\toimages"). This problem has been fixed.
  • read_dl_model crashed when models from a newer HALCON version were read. This problem has been fixed.
  • set_dl_model_param does not longer allow to set the parameter 'class_ids_no_orientation' for deep learning detection models because this could too easily be done incorrectly. Instead, set 'class_ids_no_orientation' when creating the model with create_dl_model_detection.
  • train_dl_classifier_batch returned a temporary memory error if the image size of the input images was incorrect. This problem has been fixed.
  • In the procedure split_dl_dataset, 'SplitRatiosInvSortIndices' was declared too late and thus the procedure was crashing in specific cases. This problem has been fixed.
  • The procedure dev_display_detection_evaluation_pie_charts sometimes used an unexpected font. This problem has been fixed.
  • The following procedures have been moved to a common procedure library called dl_dataset.hdpl:
    • find_dl_samples.hdvp
    • gen_dl_samples.hdvp
    • gen_dl_samples_from_images.hdvp
    • read_dl_dataset_anomaly.hdvp
    • read_dl_dataset_classification.hdvp
    • read_dl_dataset_from_coco.hdvp
    • read_dl_dataset_segmentation.hdvp
    • read_dl_samples.hdvp
    • split_dl_dataset.hdvp
    • write_dl_samples.hdvp
Feature
  • select_gray selected only pixels greater than 0 when using 'min' for the Min argument. This problem has been fixed.
File
Filter
  • affine_trans_image and affine_trans_region could have crashed in rare cases, if the interpolation method 'nearest_neighbor' was used together with the system parameter 'int_zooming' set to 'false'. This problem has been fixed.
  • convol_image created empty images on asymmetric separable filters. This problem has been fixed.
  • find_text returned non-deterministic results in the rare case when using the manual OCR mode to recognize imprinted characters in uint2 images. This problem has been fixed.
Graphics
  • draw_rectangle1 did not behave as expected when clicking in the surrounding area of the middle point between the center and the right side of the rectangle. This problem has been fixed.
  • get_disp_object_model_3d_info sometimes did not raise an error when information was not stored with the window, and 'opengl_compatibility_mode_enable' was set to 'true' via set_system. Instead, the depth information of a prior valid call was returned. This problem has been fixed.
  • get_drawing_object_params returned integers instead of floating point numbers for the drawing objects line and rectangle1. Further, create_drawing_object_line and create_drawing_object_rectangle1 rounded real number input to the nearest integers. These problems have been fixed.
  • set_window_param did not ensure to run in the GUI thread for non-buffer windows. This could have resulted in undefined behavior in rare cases. This problem has been fixed.
  • unproject_coordinates caused a crash in rare cases. This problem has been fixed.
Inspection
Matching
Miscellaneous
  • In rare cases, projective_trans_image, projective_trans_image_size, and gen_projective_mosaic could have crashed or resulted in undefined behavior. In particular, this could have occurred in situations where the projective transformation was singular, or due to internal rounding errors. This problem has been fixed. In addition, an error is returned in case of singular matrices.
OCR
  • Calling get_text_model_param for 'text_line_structure' caused a buffer overrun. This problem has been fixed.
  • get_text_model_param did not return the last digit for a 'text_line_structure' with one single block. This problem has been fixed.
  • The previously allowed overlapping area for sort_region with SortMode 'character' was too large, so that characters in a slightly tilted row or column sometimes were erroneously sorted into two rows or columns. This problem has been fixed. Now, the maximum allowed overlap between two adjacent rows or columns is 15% of the larger one of two overlapping characters.
Region
  • distance_pr and distance_sr did not return an error if the input region was empty. This problem has been fixed.
  • intersection failed if both regions had 65536 run lengths. This problem has been fixed.
System
  • On Windows systems, using environment variable values of more than 128 characters could have caused problems in some situations. For example, HDevelop Help did not show the help for extension package operators if HALCONEXTENSIONS exceeded the limit. Further, such variables did not work in import paths using %VAR% syntax. This problem has been fixed.
  • Negative float values were incorrectly rejected by the operator send_data. This problem has been fixed.
XLD
  • In rare circumstances, distance_contours_xld could have crashed in HALCON XL. This problem has been fixed.
  • elliptic_axis_xld returned incorrect results for squares with phi=0. This problem has been fixed.
  • For a large number of input contours, gen_grid_rectification_map crashed on Windows. This problem has been fixed.

HALCON/C

Bug Fixes

  • Triggering error 4056 ("Object-ID is NULL (0)") by calling a HALCON operator from the C or C++ language interfaces with an invalid object could have also invalidated a handle created by the immediately preceding operator. This problem has been fixed.

HALCON/C++

Bug Fixes

  • Triggering error 4056 ("Object-ID is NULL (0)") by calling a HALCON operator from the C or C++ language interfaces with an invalid object could have also invalidated a handle created by the immediately preceding operator. This problem has been fixed.
  • On Linux and macOS systems, the vtable of the HSerializeItem class of the C++ language interface was not exported. This problem has been fixed.

HALCON/.NET

Bug Fixes

  • HSmartWindowControlWPF has had a memory leak when the control was added and removed dynamically. This problem has been fixed.
  • Within the HALCON/.NET SetFullImagePart method and the dev_display implementation within the hrun program, the Height/Width arguments for the set_part operator were exchanged. This problem has been fixed.

Language Interface Example Programs

Bug Fixes

  • The C language interface created for a HALCON extension package did not properly initialize output parameters, which could have led to crashes. This problem has been fixed.

HALCON Variable Inspect

Functionality

  • The HALCON Variable Inspect Extension for Visual Studio can now be used with student licenses.

Extension Packages

Functionality

  • The extension package example "halconuser" now contains examples of how to define custom handle types and how to create and use the handles of such a custom type. This covers the previous extension package example "userhandle", which has been removed from the Linux installation.

HBench

Bug Fixes

  • The memory benchmarks generated by the program hbench with option -mem produced incorrect results for HALCONARCH=aarch64-linux or armv7a-linux. 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.

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 information of the third-party libraries used in the Image Acquisition and Digital I/O Interfaces has been removed from the files third_party_copyrights.html and third_party_licenses.txt and moved to the corresponding file third_party_{interface_name}.txt, also located under %HALCONROOT%. This single file contains the third-party library version, copyright and license agreement.
  • The OPC_UA interface has been updated to revision 19.11.1. For this revision the handling of complex datatypes has been rewritten to use HALCON Dictionaries instead of Tuples. This allows for a better treatment of complex datatypes, and also allows reading and writing to nested datatypes.
    The following HDevelop example programs have been added to show the behavior of the new revision:
    • hdevelop/System/IO-Devices/opc_ua_enumeration.hdev
    • hdevelop/System/IO-Devices/opc_ua_optionset.hdev
    • hdevelop/System/IO-Devices/opc_ua_structure.hdev
    • hdevelop/System/IO-Devices/opc_ua_union.hdev
    These example programs replace the following examples that have been removed:
    • hdevelop/System/IO-Devices/opc_ua_read_struct.hdev
    • hdevelop/System/IO-Devices/opc_ua_read_write_complex_data_types.hdev
    Note that this change affects the compatibility. Read more.

Documentation

User Guides

  • Within the HDevelop User's Guide, the chapter about Code Export has been improved. Further, the section about the Library Project Export now also provides a link to the tutorial video.

Solution Guides

  • Within the Solution Guide Basics, the chapter about deflectometry has been improved to mention reflectors as possible source and to describe possible setups in more detail.
  • The Solution Guide on 3D Vision has been extended with information about the benefits of using 2D mappings when handling 3D objects.

Reference Manual

  • The reference manual entry of elliptic_axis_xld contained a wrong operator link. This problem has been fixed.
  • The reference manual entry of find_planar_uncalib_deformable_model mentioned a wrong value as parameter restriction. This problem has been fixed.
  • The reference manual entry of find_surface_model was pruned by removing the description of the GenParamName 'score_type'. The default behavior of 'score_type' is sufficient for the use of the operator. Nevertheless, the parameter remains functioning to maintain backwards compatibility.
  • A new reference manual chapter entry 'Calibration' was added. It gathers data applicable to different calibration setups. Among them are calibration recommendations, which are now centralized for improved readability. This allowed to prune other documentation parts and enhance their focus. As part of this work, the recommended values have been reviewed.
    The HDevelop example program 'hdevelop/Calibration/Multi-View/check_calib_image_quality.hdev' as well as the HDevelop Calibration Assistant have been updated and are in line with the current recommendations. As a consequence, the score for the image coverage by a single plate has been removed.
  • The reference manual entry for get_bar_code_result has been modified to simplify the structure and make possible values better visible.
  • The reference manual entry of get_calib_data_observ_contours has been improved. Now, the involved parameters and finder patterns are described more clearly.
  • Within the reference manual entry of get_points_ellipse the description of the parameter 'angle' was misleading. This problem has been fixed.
  • The example in the reference manual entries of open_io_device and query_io_interface contained a misspelled variable. This problem has been fixed.
  • The reference manual did not mention possible consequences of changing the encoding. This problem has been fixed. The reference manual entry of set_system has been extended accordingly.
  • The reference manual entries of trans_to_rgb and trans_from_rgb have been improved by a statement about possible slight value differences due to internal precision.
  • The reference manual entry for tuple_split has been improved. Now, its behavior regarding the different input tuple sizes is more obvious.
  • The reference manual entry of union_straight_contours_xld did not mention that differing contour attributes prevented the union computation. This information has been added.

Release Documents

  • The file name for the release notes has been adapted to show also the HALCON version for which the release notes are valid. In particular, for HALCON 19.11.0.0, the release notes are stored as release_notes_19_11_0_0.html instead of release_notes.html.

Miscellaneous

  • The information of the third-party libraries used in the Image Acquisition and Digital I/O Interfaces has been removed from the files third_party_copyrights.html and third_party_licenses.txt and moved to the corresponding file third_party_{interface_name}.txt, also located under %HALCONROOT%. This single file contains the third-party library version, copyright and license agreement.
  • Within the documentation, some links within different manuals were outdated or broken. This problem has been fixed. In particular, the outdated links were updated and the links pointing to no longer existing webpages were removed from the respective manuals.

Installation

  • The minimum requirements for deep learning on NVIDIA GPUs have been changed. Now, an NVIDIA driver supporting CUDA 10.1 is required. cuBLAS has been split to two libraries, namely cuBLAS and cuBLASLt. The HALCON installer has been extended to install both libraries. Further, the cuDNN library shipping with HALCON has been updated to 7.6.1. Note that this change affects the compatibility. Read more.
  • If a user searches for "MVTec" in the Windows taskbar, now HDevelop is listed.
  • The Deep Learning AddOn Installer for Windows has been split into two separate installers because of the size of the additional pretrained deep learning networks that are delivered with HALCON 19.11. The new installers are called
    • halcon-19.11.0.0-windows-deep-learning-core.exe
    • halcon-19.11.0.0-windows-deep-learning-data.exe
    The installer with the suffix "core" contains the NVIDIA Libraries for Windows 7 and Windows 10 as well as the pretrained deep learning networks. It contains everything that is required for building and running your own deep learning application. If you want to use deep learning, you always need this installer.
    The installer with the suffix "data" contains the data (images and pretrained deep learning networks) that are used by the deep learning example programs. Install it if you want to run the deep learning example programs that are part of the HALCON installation.
  • The ia_integration and io_integration examples, as well as the Image Acquisition Interface Programmer's Manual have been removed from the fileset. From now on, these files are available for download from our website: https://www.mvtec.com/products/interfaces/.
  • If HALCON was installed using the script install-linux.sh, then the binary hrunxl was missing from the installation. This problem has been fixed.
  • The Linux installer script install-linux.sh failed to install all files on certain Debian armhf-based platforms due to lack of support for file globbing in the armhf version of the default shell "dash". This problem has been fixed. Now, install-linux.sh is run using bash. Note that this change affects the compatibility. Read more.

Errata Release Notes

  • The following release note was missing in HALCON 19.05 Progress:
    The C# example MultiThreadingMessageQueues was provided as a Visual Studio 2005 solution even though the source code was not compatible with .NET 2.0. This problem has been fixed. It is now provided as a Visual Studio 2010 solution.
  • Within the release notes of HALCON 19.05, the information regarding the supported operating systems were not up to date. Please refer to the Installation Guide for the correct information.
    Additionally, the Installation Guide for HALCON 19.05 stated an outdated GLIBC library requirement for Linux on armv7a. This problem has been fixed.

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