![HALCON Progress Key Visual shows a person running at high speed](/fileadmin/_processed_/8/7/csm_mvtec-halcon-is-fast-and-robust_bc70b8a7db.jpg)
Release Notes for HALCON 20.05 Progress
This document provides the release notes for MVTec HALCON 20.05.0.0 Progress, as released in May 2020.
Contents
- Major New Features of HALCON 20.05.0.0 Progress
- Reading very small codes with the Subpixel Bar Code Reader
- More flexibility with Deep Learning Training on CPU
- More accurate and robust matching results with Surface-Based 3D Matching
- More robust Generic Box Finder for Pick-and-Place Applications
- CPU Support for Grad-CAM-based Heatmap
- Significant Improvements for Anomaly Detection
- New language interface available
- Compatibility
- Supported Operating Systems
- Detailed Description of Changes in HALCON 20.05.0.0 Progress
- Release Notes of Previous HALCON Versions
Major New Features of HALCON 20.05.0.0 Progress
Reading very small codes with the Subpixel Bar Code Reader
The bar code reader in HALCON 20.05 has been improved by an advanced decoding algorithm, which increases the decoding rate when reading codes with very thin bars. Thanks to this, it is now possible to even read codes with bars smaller than one pixel.
More flexibility with Deep Learning Training on CPU
With HALCON 20.05, training for all deep learning technologies can be performed on the CPU. By removing the need for a dedicated GPU, standard industrial PCs (that could not house powerful GPUs) can now be used for training as well. This greatly increases customers' flexibility regarding the implementation of deep learning, because training can now be performed directly on the production line, making it possible to adjust the application to changing environmental conditions “on the fly”.
More accurate and robust matching results with Surface-Based 3D Matching
Especially in the assembly industry, workpieces must be located robustly and accurately to allow for further processing. Often, properties like small holes are the only unique feature to find the correct orientation of the object. HALCON's surface-based 3D matching can now make use of these features to increase accuracy and robustness of the matching result.
More robust Generic Box Finder for Pick-and-Place Applications
The generic box finder, which was released with HALCON 19.11, allows users to locate boxes of different sizes within a predefined range of height, width, and depth, removing the need to train a model. With HALCON 20.05, it was improved in terms of robustness, performance, speed, and usability. Now, it is much easier to find a wide range of different sizes of various boxes in a robust way.
CPU Support for Grad-CAM-based Heatmap
The Grad-CAM-based heatmap (Gradient-weighted Class Activation Mapping) supports you in analyzing which parts of an image influence the classification decision. In HALCON 20.05, the heatmap calculation can also be performed on the CPU. Since this can be done without significant speed drops, customers are now able to analyze their deep learning network's class prediction directly.
Significant Improvements for Anomaly Detection
The anomaly detection significantly facilitates the automated surface inspection by only requiring a low number of high quality “good” images for training. With HALCON 20.05, training a network for anomaly detection is now up to 10 times faster. Combined with an also faster inference, this opens up entirely new possibilities for trying deep learning on new and existing applications: Training a new network can now mostly be done in a matter of seconds, allowing users to perform many iterations to fine-tune their application without sacrificing a lot of precious time. Trained networks now also require less memory and disk space, which makes HALCON's anomaly detection more viable for the use on embedded devices.
New language interface available
HALCON 20.05 now supports .NET Core.
Compatibility
Licenses
HALCON 20.05.0.0 Progress requires a valid HALCON Progress license and does not run with licenses of HALCON 13 and earlier versions or HALCON Steady.Furthermore, please note the following compatibility issues related to licenses:
- The following licensing issues are known:
- After starting applications based on HALCON 20.05 (or later), the dongle
must be removed and inserted again before starting applications based on
HALCON 19.11 (or earlier).
This problem can be avoided by installing the CodeMeter Runtime from
WIBU SYSTEMS AG.
The CodeMeter Runtime is not shipped with HALCON and must be downloaded from
https://www.wibu.com in the download area. - On Arm platforms (aarch64 architecture) with GLIBC 2.21, it is no longer
possible to run both 64-bit and 32-bit HALCON processes in parallel because
they might block each other.
- After starting applications based on HALCON 20.05 (or later), the dongle
HALCON Library
Compared to HALCON 19.11 Progress, many extensions have been introduced. Thus, the HALCON 20.05.0.0 Progress libraries are not binary compatible with HALCON 19.11 Progress or earlier versions. However, HALCON 20.05.0.0 Progress is mostly source-code compatible to HALCON 19.11 Progress except for the changes listed below:- Since find_box_3d is now independent of a viewpoint and the position of the input point cloud in space, the procedure debug_find_box_3d has been adapted accordingly. Furthermore, an error is raised in case that the input GenParam contains a key 'viewpoint'. The returned GrippingPose is set according to the XYZ-mapping.
If the input point cloud of find_box_3d contains normals, they are not used anymore. More information. - In rare cases, find_shape_model (as well as the scaled and aniso variants) might return different results. More information.
- Because of a bug fix regarding the calculation of the mean average precision (mean_ap) measure during the evaluation of deep-learning-based object detection, the deep-learning-based object detection evaluation results might be different. To obtain the same results for 'mean_ap' as before, the evaluation parameter 'interpolate_pr_curves' can be set to false (default: true). More information.
- Due to changes to the calculation of the anomaly score histogram in evaluate_dl_model (in order to solve a display issue), the following parameter keys have become obsolete and hence unavailable for the procedure's generic parameter dictionary GenParam:
- 'anomaly_num_bins'
- 'anomaly_min_value'
- 'anomaly_max_value'
- For deep-learning-based object detection models, get_dl_model_param now returns a tuple of values that is as long as the number of classes for the parameter "class_weights" in any case. More information.
- reconstruct_surface_stereo now uses the default values for the parameters 'binocular_mg_initial_guess' and 'binocular_mg_initial_level' if no values have been set with set_stereo_model_param. This might lead to slightly different reconstruction results, since previously both parameters have been estimated based on the set bounding box. More information.
- The default value for the texture inspection model parameter 'gmm_preprocessing' has been changed from 'none' to 'normalization'. When using gray scale images, identical results compared to previous HALCON versions can be obtained by calling set_texture_inspection_model_param(TextureInspectionModel, 'gmm_preprocessing', 'none') before executing train_texture_inspection_model(). More information.
- In previous versions, train_dl_model_batch expected the parameter 'DLSampleBatch' as single dictionary in the C++ and .NET interface. While the operator now expects a tuple of dictionaries, with the new signature it is still possible to use a single dictionary for 'DLSampleBatch'. More information.
- For HALCON 20.05 and newer, only NVIDIA Cards with compute capability 3.5 are supported. More information.
HALCON Applications
Please re-compile all C, C++, or .NET programs developed with HALCON 19.11 Progress. The incompatibility with HALCON 19.11 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.05.0.0 Progress, HALCON 19.11 Progress, and HALCON 13.0.x image acquisition interfaces are library compatible.
HALCON 20.05.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, GStreamer, 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 20.05.0.0 Progress, HALCON 19.11 Progress, and HALCON 13.0.x digital I/O interfaces are library compatible.
HALCON 20.05.0.0 Progress includes only a subset of available digital I/O interfaces. Digital I/O interfaces that are included are: Linux-GPIO, 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.11 Progress.Further Compatibility Information
- The legacy include file "HSync.h" has been removed from the fileset. Therefore, the legacy macro definitions for CRITICAL_SECTIONS that were not used by HALCON for several versions are not available anymore. More information.
- When exporting a program or library as source code for HALCON/.NET, private procedures will now be exported with the "private" access modifier. If your application relies on calling such a procedure you may need to configure it as "Public" explicitely. 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 20.05.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 20.05.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.05.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 20.05.0.0 Progress
The changes in HALCON 20.05.0.0 Progress are described with respect to HALCON 19.11 Progress.
HDevelop
New Functionality
Code Export
- When exporting a program or library as source code for HALCON/.NET, private procedures will now be exported with the "private" access modifier. Note that this change affects the compatibility. Read more.
GUI
- The About dialog has been improved. Previously, the license status was not displayed. Now, the used license and, if applicable, the expiration date are displayed.
- The status bar of HDevelop now contains a new symbol (a bell), which signals whether an update of the currently used version is available.
The update check is done during the start of HDevelop. - HDevelop now logs internal errors, which can be viewed in the output console of HDevelop.
- 3D object models can now be visualized directly from within handle inspect windows. This allows visualizing 3D object models that are, e.g., inside a dictionary.
Furthermore, corresponding information can now also be visualized for 2D data codes, barcodes, and serialized items. - The Start Dialog has been enhanced by a new Tip of the Day.
IDE
- The usability of the profiler has been improved. Now it is possible to show the last execution time in HDevelop.
- HDevelop's autocompletion can now also provide suggestions for empty lines of code. In this case, the possible successors of the previous HALCON operator are suggested.
Further, the autocompletion now provides suggestions for a completely empty program, too. In that case, a list of typical first operators (like open_window or read_image) is offered.
Language
- HALCON has been extended with functions to calculate the Gaussian error function. In particular, the operators tuple_erf and tuple_erfc and the corresponding HDevelop language functions erf and erfc have been implemented.
- HALCON has been extended with functions to calculate the hypotenuse and the cube root. In particular, the new operator tuple_hypot and the corresponding HDevelop language function hypot calculate the hypotenuse sqrt(x*x+y*y) without undue overflow or underflow during the intermediate steps of the calculation. Furthermore, the new operator tuple_cbrt and the corresponding HDevelop language function cbrt calculate the cube root.
- HALCON has been extended with tuple operators for the inverse hyperbolic functions tuple_asinh, tuple_acosh, and tuple_atanh and the corresponding HDevelop language functions asinh, acosh, and atanh.
- HALCON has been extended with the following tuple operators: tuple_exp10 (base 10 exponentiation), tuple_exp2 (base 2 exponentiation), and tuple_log2 (base 2 logarithm).
- HALCON has been extended with the tuple operators tuple_tgamma and tuple_lgamma and their counterparts tgamma and lgamma in HDevelop. They calculate the gamma function and the logarithm of the absolute value of the gamma function, respectively.
Bug Fixes
Code Export
- The HDevelop template export to C# or VB.Net with containing dev_open_window or open_window operators created "Dispose" methods to WindowHandle variables that were not initialized. This problem has been fixed.
- Within the file dialog, when exporting to C, the pre-selected file extension was wrong. This problem has been fixed.
GUI
- On Linux systems, using file selection dialogs in HDevelop sometimes caused warning messages to be printed on the console. This problem has been fixed.
- Scaling of HDevelop on screens with fractional scaling settings was not always correct. This problem has been fixed.
- The icon that indicates the run state of programs, which is located in the status bar of HDevelop, sometimes had a wrong scaling and was off centered. This problem has been fixed.
- The layout of the HDevelop Variable Window did not always correctly adapt to a changed "Parameter and Value" font size. This problem has been fixed.
- HDevelop's Variable Window and some tables did not adapt correctly to changes of the "Values and Parameters" font size. In particular, the height of the table rows did not increase if a bigger font size had required such behavior. As a consequence, the displayed values might have become unreadable. This problem has been fixed.
- The first column in the handle inspect did not always resize to its contents. This problem has been fixed.
- The font size of some elements in the Preferences dialog did not adapt properly to changes of the font size. This problem has been fixed.
- String variables and expressions containing percent signs and numbers (e.g., '%1') could have shown corrupt tool tips in the Program and Variable Window. This problem has been fixed.
- Editing a selected ROI in the ROI editor led to a freeze of HDevelop. This problem has been fixed.
- Setting a breakpoint on a variable visually changes the background of it to red in the Variable Window when the breakpoint is hit. That color was not reset. This problem has been fixed.
Help
- The HDevelop help did not list the file with the third party copyrights. This problem has been fixed.
IDE
- In the handle inspect windows, floating-point values were not always shown with a decimal point, making it difficult to distinguish them from integer values. This problem has been fixed. Floating-point values are now always shown with a decimal point in the handle inspect window.
Procedures
- The JIT-compiled execution of procedures was unnecessarily prevented in some rare cases. This problem has been fixed.
- In a dialog box, some translations were missing. This problem has been fixed.
Miscellaneous
- Passing command line parameters with arbitrary unicode characters (not included in the character set of the OS locale) did not work under Windows. In particular, this prevented opening of program files with special characters from, e.g., the Windows Explorer. This problem has been fixed.
HDevelop Example Programs
New HDevelop Example Programs
- hdevelop/3D-Matching/Surface-Based/find_surface_model_self_similar_poses.hdev
- hdevelop/3D-Object-Model/Segmentation/remove_background_for_3d_object_localization.hdev
- hdevelop/3D-Object-Model/Segmentation/remove_bin_for_3d_object_localization.hdev
- hdevelop/Calibration/Multi-View/calibrate_cameras_telecentric_line_scan_stereo.hdev
- hdevelop/Identification/Bar-Code/barcode_small_elements_robustness.hdev
- hdevelop/Image/Acquisition/genicamtl_information.hdev
- hdevelop/Image/Acquisition/gigevision2_sick_ranger3_objectmodel3d.hdev
- hdevelop/Image/Acquisition/gstreamer_2pipelines.hdev
- hdevelop/Image/Acquisition/gstreamer_acquisition_events.hdev
- hdevelop/Image/Acquisition/gstreamer_nvidia_arguscamera_simple.hdev
- hdevelop/Image/Acquisition/gstreamer_simple.hdev
- hdevelop/Inspection/Texture-Inspection/apply_texture_inspection_model_color.hdev
- hdevelop/System/IO-Devices/linux-gpio_digital_read.hdev
- hdevelop/System/IO-Devices/linux-gpio_digital_write.hdev
- hdevelop/System/IO-Devices/linux-gpio_list_channels.hdev
- hdevelop/System/IO-Devices/opc_ua_methods.hdev
- hdevelop/System/Sockets/generic_socket_TLS_echo_server.hdev
HDevEngine
Functionality
- The just-in-time compiler of the HDevEngine is now able to compile procedures that call dev_clear_obj on a global variable.
- The C# and VB HDevEngine examples for executing programs and procedures now use a background thread for execution. This provides a better experience when these examples are adapted to execute own code that makes use of interactive drawing objects.
- JIT compilation of procedures is now supported with the standard Arm architectures aarch64-linux and armv7a-linux.
The size of the HDevEngine for Arm architectures increased to approximately 30 MB.
HALCON Library
Speedup
- For some special cases, add_image used an MMX implementation that wrote results outside the actual region. This problem has been fixed.
As a consequence of the fix, add_image is now up to 50% faster for images of type 'byte', 'uint2', and 'int2' for Mult = 1.0 and Add = 0.0.
For Mult = 0.5 and Add = 0.0 a performance improvement of up to 200% can be expected for images of type 'byte', up to 250% for 'int2' images, and up to 120% for 'uint2' images. - The following operators have been sped up and parallelized internally when operating on many points:
affine_trans_pixel, affine_trans_point_2d, affine_trans_point_3d, projective_trans_pixel, projective_trans_point_2d, projective_trans_point_3d, projective_trans_hom_point_3d, project_hom_point_hom_mat3d, project_3d_point, project_point_hom_mat3d, rigid_trans_object_model_3d, affine_trans_object_model_3d, projective_trans_object_model_3d, and get_line_of_sight. - compare_variation_model and compare_ext_variation_model for all supported image object types ('byte', 'int2', and 'uint2') have been optimized to use the Arm Neon instruction set extension. On a Cortex A73 processor, the operator is now 220% faster for 'byte' images.
- compare_variation_model and compare_ext_variation_model are now faster for all supported image types ('byte', 'int2', and 'uint2') on Intel compatible processors that support AVX2. In particular, the following speedups can be expected compared to the standard C implementation:
Image Type Operator Mode Available Instruction Set Speedup byte compare_variation_model - AVX2 up to 475% int2 - up to 625% uint2 - up to 550% byte compare_ext_variation_model 'absolute' up to 400% int2 up to 550% uint2 up to 500% byte 'light', 'dark' up to 700% int2 up to 250% uint2 up to 250% byte 'light_dark' up to 675% int2 up to 550% uint2 up to 380% - derivate_gauss for all image types are now supported on computers that support the AVX512F instruction set. For 'byte' images, the operator is 30% faster than the implementation in AVX2.
- The SIMD implementations for dyn_threshold returned wrong results in some cases if the values for the parameter 'Offset' exceeded the maximum for the used datatype (i.e., >= 256 for 'byte' and >= 65536 for 'uint2' images). This problem has been fixed.
Due to a revised implementation, dyn_threshold is now faster if the parameter 'Offset' is set to values smaller than zero for 'light' and 'dark'. In particular, the performance improvement is up to 20% for 'byte' images and 50% for 'uint2' images. - There is a significant speedup for the following deep learning procedures, especially for long input or output tuples:
- find_dl_samples
- split_dl_dataset
- gen_dl_samples
- list_files is now faster on Unix systems by a factor of at least 2.
- mirror_image with 'byte' images, Mode='col', and image widths that are a multiple of 4 is now faster on Intel x86 compatible machines. The speedup is up to 270%.
Furthermore, mirror_image is now faster with 'byte' images, Mode='col' on Intel compatible processors that support AVX2 or SSSE3. In particular, the speedup is up to 450%. - projective_trans_image crashed in rare cases if the interpolation was set to 'nearest_neighbor'. This problem has been fixed.
The fix led to a speedup of projective_trans_image and projective_trans_image_size. The acceleration for all supported image types is up to 8% for processors that support AVX2 and up to 20% if AVX2 is not supported. The acceleration is only valid if 'int_zooming' is set to 'true', which is the default. - The operator read_object_model_3d is now able to read binary PLY files that contain previously unsupported elements and properties. If possible, such items are converted into extended attributes while reading. Additionally, reading PLY files is now up to 380% faster when reading PLY ASCII files and up to 72% faster when reading binary PLY files that contain faces.
- set_dl_model_param has been extended to set the parameter 'fuse_bn_relu'.
If this parameter is set to 'true', each of the batch normalization and activation layers in a deep learning network will be fused. Currently, only ReLU activation is supported. As a consequence, the runtime for the inference and for a training step can be reduced. This function has been adapted for the following delivered networks:- initial_dl_anomaly_medium.hdl: Speedup up to 12 % for inference and up to 15 % for a training step.
- initial_dl_anomaly_large.hdl: Speedup up to 13 % for inference and up to 1 % for a training step.
- pretrained_dl_classifier_resnet50.hdl: Speedup up to 15 % for inference and up to 8 % for a training step.
- pretrained_dl_segmentation_compact.hdl: Speedup up to 15 % for inference and up to 7 % for a training step.
- pretrained_dl_segmentation_enhanced.hdl: Speedup up to 19 % for inference and up to 14 % for a training step.
Note that this change affects the compatibility. Read more. - threshold and dyn_threshold have been optimized for the Arm Neon instruction set extension for 'byte' and 'uint2' image types, for both 32 and 64 bit Arm systems. For the threshold operator, operations on float images have been optimized as well. On Cortex A73 processors, for 'byte' images threshold operations are up to 200% faster, while dyn_threshold operations are up to 180-250% faster, depending on the mode.
- train_class_gmm is now significantly faster when training a classifier with a single class. Furthermore, train_class_gmm is now also parallelized on an internal data level when training a classifier with a single class.
The achievable speedup depends on the number of available threads and the selected covariance matrix type.
The following speedups can be expected for classifiers with high-dimensional training data (n=25) and a large amount of training data (>100.000) with the following exemplary configurations:As a result, train_texture_inspection_model is now also significantly faster when executed either in parallel or with a single thread.Number threads Speedup for covariance 'diag' Speedup for covariance 'full' 1 139% 306% 2 261% 535% 4 341% 957% 8 375% 1530% 16 463% 2346% - train_dl_model_anomaly_dataset has been improved and is now faster. A speedup up to 900% and 1500% can be expected for CPU and GPU training, respectively.
- The thirdparty Arm Compute Library (ACL) has been updated from version 18.11 to 19.08. The BatchNorm layer was included. As a result, the delivered deep learning segmentation networks and detection networks can be accelerated by up to 5 %.
- Reading big datasets was rather slow. This problem has been fixed.
- The inference speed of the anomaly detection models initial_dl_anomaly_medium.hdl and initial_dl_anomaly_large.hdl has been improved by up to 50% on GPUs and up to 30% on CPUs.
New Functionality
3D
- The operators for surface-based matching have been improved to better handle objects with self-similarities, i.e., objects that look similar under different poses. When activating the parameter 'train_self_similar_poses' in the operator create_surface_model, the model will automatically be analyzed for such poses, and they will be better resolved when calling find_surface_model, find_surface_model_image, refine_surface_model_pose, or refine_surface_model_pose_image.
- disparity_image_to_xyz is now more accurate for telecentric cameras.
- find_box_3d has been improved to yield more robust and intuitive results. Furthermore, find_box_3d is now independent of a viewpoint and the position of the input point cloud in space, i. e., independent of grayvalues and coordinate frames in the XYZ-images. The returned GrippingPose is set according to the XYZ-mapping. For certain scenes and configurations, find_box_3d is faster than in previous HALCON versions. Note that this change affects the compatibility. Read more.
- The handle inspect window can now show the content of 3D scenes (semantic type scene_3d).
The operators get_handle_param, get_handle_tuple, and get_handle_object have been extended accordingly. - prepare_object_model_3d has been extended with the new Purpose 'gen_xyz_mapping', that computes XYZ-mapping for 3D object models containing ordered point clouds. Also, prepare_object_model_3d now returns an error if a generic parameter that is not valid for the Purpose is set.
- The operator read_object_model_3d is now able to read binary PLY files that contain previously unsupported elements and properties. If possible, such items are converted into extended attributes while reading. Additionally, reading PLY files is now up to 380% faster when reading PLY ASCII files and up to 72% faster when reading binary PLY files that contain faces.
- The documentation has been extended by a new technical note "Surface-Based Matching". It contains information about different methods, troubleshooting, and further useful information regarding surface-based matching.
- HALCON now supports multi-view and binocular stereo when using line-scan cameras with telecentric lenses.
The new HDevelop example program hdevelop/Calibration/Multi-View/calibrate_cameras_telecentric_line_scan_stereo.hdev shows how to use the new functionality. - The new HDevelop example programs
- hdevelop/3D-Object-Model/Segmentation/remove_background_for_3d_object_localization.hdev and
- hdevelop/3D-Object-Model/Segmentation/remove_bin_for_3d_object_localization.hdev
Bar Code
- The handle inspect window can now show information about the results and candidates of barcodes (semantic type barcode).
The operators get_handle_param, get_handle_tuple, and get_handle_object have been extended accordingly. - The bar code reader now decodes codes with very small (<1.3 pixel) element sizes more robustly and is even able to read codes with element sizes smaller than one pixel. To do so, an additional decoding algorithm is performed, which is specialized for small elements and works for (non-stacked) codes without occlusions. For this algorithm, it is beneficial to slightly rotate the camera sensor with respect to the bar code. To activate the feature, the parameter 'small_elements_robustness' has to be set to 'true' and additionally 'element_size_min' has to be set to a value smaller than 2.0 (via set_bar_code_param). Per default, 'small_elements_robustness' is set to 'true'. To get information about the decoding status of bar codes with very small element sizes, the operator get_bar_code_result has been extended with the parameter 'status_small_elements_robustness'.
The new HDevelop example program hdevelop/Identification/Bar-Code/barcode_small_elements_robustness.hdev shows the decoding of bar codes with very small element sizes.
Additionally, the HDevelop example program hdevelop/explore_halcon.hdev has been adapted to show the new functionality.
The custom HPeek demo has been extended by the sub-pixel barcode reader feature example. You can download this demo on our customer area for free and evaluate the performance on your hardware.
Calibration
- The following operators have been sped up and parallelized internally when operating on many points:
affine_trans_pixel, affine_trans_point_2d, affine_trans_point_3d, projective_trans_pixel, projective_trans_point_2d, projective_trans_point_3d, projective_trans_hom_point_3d, project_hom_point_hom_mat3d, project_3d_point, project_point_hom_mat3d, rigid_trans_object_model_3d, affine_trans_object_model_3d, projective_trans_object_model_3d, and get_line_of_sight. - HALCON now supports multi-view and binocular stereo when using line-scan cameras with telecentric lenses.
The new HDevelop example program hdevelop/Calibration/Multi-View/calibrate_cameras_telecentric_line_scan_stereo.hdev shows how to use the new functionality.
Classification
- train_class_gmm is now significantly faster when training a classifier with a single class. Furthermore, train_class_gmm is now also parallelized on an internal data level when training a classifier with a single class.
The achievable speedup depends on the number of available threads and the selected covariance matrix type.
The following speedups can be expected for classifiers with high-dimensional training data (n=25) and a large amount of training data (>100.000) with the following exemplary configurations:As a result, train_texture_inspection_model is now also significantly faster when executed either in parallel or with a single thread.Number threads Speedup for covariance 'diag' Speedup for covariance 'full' 1 139% 306% 2 261% 535% 4 341% 957% 8 375% 1530% 16 463% 2346%
Data Code
- The handle inspect window can now show information about the results and candidates of 2D data codes (semantic type datacode_2d).
The operators get_handle_param, get_handle_tuple, and get_handle_object have been extended accordingly.
Deep Learning
- The deep learning procedure dev_display_dl_data has been improved to display the results of anomaly detection. Now, the anomaly class and region in DLResult returned by threshold_dl_anomaly_results are displayed in case no thresholds are passed via GenParam.
- HALCON now supports to set StartEpochs to 'resume' for the deep learning training procedure train_dl_model when resuming a training. With this option, the last available serialized model is automatically determined to start the resumed training.
- There is a significant speedup for the following deep learning procedures, especially for long input or output tuples:
- find_dl_samples
- split_dl_dataset
- gen_dl_samples
- HALCON now supports the new parameter 'freeze_backbone_level' for deep learning object detection models.
- Deep-learning-based models for classification, detection, and segmentation can now be trained also on CPU for supported x64 platforms. Restrictions are documented in the Installation Guide and the Operator Reference.
- The deep learning training visualization procedures can now also take the number of iterations as argument for the plotted loss values and not only the number of epochs.
- The standard HDevelop example hdevelop/Deep-Learning/AnomalyDetection/dl_anomaly_detection_workflow.hdev has been extended by showing the new evaluation measures for image level classification. The documentation, some parameter values, as well as the structure of the example have also been improved.
- For deep-learning-based models of type classification, detection, and segmentation it is now possible to optimize the trained model concerning memory consumption and free all memory not used for inference. This significantly reduces the size of the model.
- The procedure read_dl_dataset_segmentation has been improved. Now, further options are allowed for possible annotation files matches.
- The custom HPeek demo has been extended by the deep learning anomaly detection example for embedded GPU. You can download this demo on our customer area for free and evaluate the performance on your hardware.
- The deep-learning-based training of classification models now supports setting weights for each class to handle unbalanced training data sets. To this aim, the delivered classification models pretrained_dl_classifier_alexnet.hdl and pretrained_dl_classifier_resnet50.hdl have been slightly changed. Note that this change affects the compatibility. Read more.
- The visualization of the deep learning training information (after the training) has been improved for models of type classification, detection, and segmentation. Now this can be done using the procedure dev_display_dl_model_train_info. Further, additional information is written in the training info dictionaries.
- gen_dl_model_heatmap is now also executable on CPU for supported x64 platforms. Restrictions are documented in the Installation Guide and the Operator Reference.
- read_dl_model now supports reading ONNX models with convolutions that use different values for width and height dimensions for 'kernel_shape', 'stride', and 'dilation'.
- read_dl_model now supports reading ONNX models with arbitrary padding values given in the 'pads' field of the 'Conv', 'AveragePool', and 'MaxPool' operations.
- set_dl_model_param has been extended to set the parameter 'fuse_bn_relu'.
If this parameter is set to 'true', each of the batch normalization and activation layers in a deep learning network will be fused. Currently, only ReLU activation is supported. As a consequence, the runtime for the inference and for a training step can be reduced. This function has been adapted for the following delivered networks:- initial_dl_anomaly_medium.hdl: Speedup up to 12 % for inference and up to 15 % for a training step.
- initial_dl_anomaly_large.hdl: Speedup up to 13 % for inference and up to 1 % for a training step.
- pretrained_dl_classifier_resnet50.hdl: Speedup up to 15 % for inference and up to 8 % for a training step.
- pretrained_dl_segmentation_compact.hdl: Speedup up to 15 % for inference and up to 7 % for a training step.
- pretrained_dl_segmentation_enhanced.hdl: Speedup up to 19 % for inference and up to 14 % for a training step.
- train_dl_model_anomaly_dataset has been improved and is now faster. A speedup up to 900% and 1500% can be expected for CPU and GPU training, respectively.
- The thirdparty Arm Compute Library (ACL) has been updated from version 18.11 to 19.08. The BatchNorm layer was included. As a result, the delivered deep learning segmentation networks and detection networks can be accelerated by up to 5 %.
- HALCON now supports newer versions of the two ONNX primitives Gemm and Resize, which were updated with the new release of ONNX 1.6.
- The memory consumption of the anomaly detection deep learning models 'initial_dl_anomaly_medium.hdl' and 'initial_dl_anomaly_large.hdl' has been reduced to around 70% in respect to the previous version. The size on the disk of those models has also been significantly reduced by around half.
- The inference speed of the anomaly detection models initial_dl_anomaly_medium.hdl and initial_dl_anomaly_large.hdl has been improved by up to 50% on GPUs and up to 30% on CPUs.
- The third-party Deep Neural Network Library (DNNL) has been updated from version 1.1 to 1.2.
- HALCON now ships cuDNN version 7.6.3.
- The procedure determine_dl_model_detection_param has been improved. Now, the clustering of anchor_angles takes the jump discontinuity at 180° into account. If the generic parameter 'ignore_direction' is set to 'true' the jump discontinuity at 90° is considered correctly. If at least one 'class_ids_no_orientation' is set, it is more likely that an anchor_angle of 0.0 is returned. In summary, the returned anchor_angles are representing the underlying distribution of angles in the given dataset better.
- The deep learning procedure preprocess_dl_dataset has been improved. Now, subsequent redundant checks of the preprocessing parameters are avoided.
File
- The handle inspect window can now show the content of serialized items (semantic type serialized_item).
The operators get_handle_param, get_handle_tuple, and get_handle_object have been extended accordingly. - list_files is now faster on Unix systems by a factor of at least 2.
Filter
- mirror_image with 'byte' images, Mode='col', and image widths that are a multiple of 4 is now faster on Intel x86 compatible machines. The speedup is up to 270%.
Furthermore, mirror_image is now faster with 'byte' images, Mode='col' on Intel compatible processors that support AVX2 or SSSE3. In particular, the speedup is up to 450%.
Graphics
- HALCON has been extended with two additional colormaps, namely jet and inverse jet.
Inspection
- The texture inspection model has been extended to support multichannel images. This enables a better detection of colored texture defects. The new HDevelop example program hdevelop/Inspection/Texture-Inspection/apply_texture_inspection_model_color.hdev shows the usage of the new feature. It uses the new images leather/good/leather_good_[01-02].png and
leather/defect/leather_defect_[01-06].png. Note that this change affects the compatibility. Read more.
Matching
- The operators for surface-based matching have been improved to better handle objects with self-similarities, i.e., objects that look similar under different poses. When activating the parameter 'train_self_similar_poses' in the operator create_surface_model, the model will automatically be analyzed for such poses, and they will be better resolved when calling find_surface_model, find_surface_model_image, refine_surface_model_pose, or refine_surface_model_pose_image.
OCR
- HALCON has been extended with two additional colormaps, namely jet and inverse jet.
- HALCON now ships cuDNN version 7.6.3.
Parallelization
- The legacy include file "HSync.h" has been removed from the fileset. Therefore, the legacy macro definitions for CRITICAL_SECTIONS that were not used by HALCON for several versions are not available anymore. Note that this change affects the compatibility. Read more.
Segmentation
- threshold and dyn_threshold have been optimized for the Arm Neon instruction set extension for 'byte' and 'uint2' image types, for both 32 and 64 bit Arm systems. For the threshold operator, operations on float images have been optimized as well. On Cortex A73 processors, for 'byte' images threshold operations are up to 200% faster, while dyn_threshold operations are up to 180-250% faster, depending on the mode.
- The threshold operator has been improved. Now, it supports the parameter values 'min' and 'max' for the lower and upper gray value, respectively.
System
- HALCON sockets support Transport Layer Security (TLS) for data transmission. Therefore, additional "tls_*" parameters have been added to the operators open_socket_connect and open_socket_accept.
To show how TLS encryption is used, the example program example/hdevelop/System/Sockets/generic_socket_TLS_echo_server.hdev has been added.
Tuple
- HALCON has been extended with tuple operators for the inverse hyperbolic functions tuple_asinh, tuple_acosh, and tuple_atanh and the corresponding HDevelop language functions asinh, acosh, and atanh.
- HALCON has been extended with functions to calculate the Gaussian error function. In particular, the operators tuple_erf and tuple_erfc and the corresponding HDevelop language functions erf and erfc have been implemented.
- HALCON has been extended with the following tuple operators: tuple_exp10 (base 10 exponentiation), tuple_exp2 (base 2 exponentiation), and tuple_log2 (base 2 logarithm).
- HALCON has been extended with functions to calculate the hypotenuse and the cube root. In particular, the new operator tuple_hypot and the corresponding HDevelop language function hypot calculate the hypotenuse sqrt(x*x+y*y) without undue overflow or underflow during the intermediate steps of the calculation. Furthermore, the new operator tuple_cbrt and the corresponding HDevelop language function cbrt calculate the cube root.
- HALCON has been extended with the tuple operators tuple_tgamma and tuple_lgamma and their counterparts tgamma and lgamma in HDevelop. They calculate the gamma function and the logarithm of the absolute value of the gamma function, respectively.
Bug Fixes
3D
- Passing a parameter of wrong type to binocular_disparity_mg did not raise a proper error. This problem has been fixed.
- find_deformable_surface_model in rare cases raised a memory error or crashed. This problem has been fixed.
- When using fit_primitives_object_model_3d to fit cylinders or spheres, the condition min_radius > max_radius was not detected as error. This problem has been fixed.
- The debug procedure debug_find_surface_model returned an error if 'scene_normal_computation' was set to 'mls' and no normals or XYZ-mappings were available for the 3D scene. This problem has been fixed.
- In rare cases, reconstruct_surface_stereo did not use the set values for the parameters 'binocular_mg_initial_guess' and 'binocular_mg_initial_level'. This problem has been fixed. Note that this change affects the compatibility. Read more.
- select_points_object_model_3d did not preserve empty mappings of 3D points to 2D image coordinates. This problem has been fixed.
- triangulate_object_model_3d might have crashed when Method was set to 'greedy' and the generic parameter 'greedy_mesh_erosion' was set to a value bigger than zero. This problem has been fixed.
- The automatic value check in debug_find_box_3d threw an exception and skipped several tests when no boxes were found during matching. This problem has been fixed.
Bar Code
- In some cases, find_bar_code failed to find barcode candidates in 'uint2' images. This problem has been fixed.
- In some cases, find_bar_code returned the error 6006 ("Tmp-memory management: could not find memory element") for 'uint2' images if the 'quiet_zone' check was activated. This problem has been fixed.
- In rare cases, find_bar_code was slower with automatic operator parallelization than without. This problem has been fixed.
- find_bar_code and decode_bar_code_rectangle2 could have led to a crash if 'GS1 DataBar Truncated' or 'GS1 DataBar Stacked' were part of the requested code types. This problem has been fixed.
- get_bar_code_result returned unspecified quality grades, e.g., for 'quality_isoiec15416', in case of 2/5 Industrial and PharmaCode. This problem has been fixed.
- When calling get_bar_code_result, timeouts could have occurred for some values of ResultName. This problem has been fixed.
Calibration
- The following operators could have leaked memory when passing invalid parameter types or points that could not be transformed: projective_trans_point_3d, project_hom_point_hom_mat3d, project_3d_point, and project_point_hom_mat3d. This problem has been fixed.
- The example program hdevelop/Calibration/Multi-View/check_calib_image_quality.hdev sometimes could not read the description file of the calibration plate. This problem has been fixed.
Classification
- Passing a parameter of wrong type to select_feature_set_trainf_svm_protected, select_feature_set_trainf_svm, or select_feature_set_trainf_knn was not properly detected. This problem has been fixed.
Data Code
- In rare cases, find_data_code_2d returned the error 3513 ("Internal error: number of chords too big for num_max") for Data Matrix ECC 200 codes. This problem has been fixed.
- For PDF417 codes with error correction level 0, the Reed-Solomon error correction has not been performed. This problem has been fixed.
- In rare cases, get_data_code_2d_results crashed when attempting to read the parameter 'quality_semi_t10_labels' of a result that was not successfully decoded. This problem has been fixed.
- The Data Matrix ECC 200 reader could not read codes of size 144x144. This problem has been fixed.
Deep Learning
- apply_dl_model could not be interrupted after setting a timeout via set_operator_timeout. This problem has been fixed.
- apply_dl_model and set_dl_model_param did not use the number of threads set with set_system via the parameter 'thread_num' but instead used all available threads in case of parameter 'runtime' set to 'cpu'. This problem has been fixed.
- Using NVIDIA JetPack 4.2 for deep learning on embedded boards led to inconsistent results of apply_dl_model. Using JetPack 4.3 this problem is fixed. The minimum requirements have been increased to CUDA 10.0 and cuDNN 7.6.3.
- For model_type 'detection' and instance_type 'rectangle2' the procedure dev_display_dl_data swapped the position of labeled class ID and predicted class ID compared to the visualization in case of instance_type 'rectangle1' when using KeysForDisplay 'bbox_both'. This problem has been fixed.
- In some cases, create_dl_model_detection did not support the direct usage of ONNX models files for the parameter 'Backbone'. This problem has been fixed. In particular, create_dl_model_detection threw the unspecific error code 7811 ("DL: Backbone unusable for FPN creation") when no or invalid backbone docking layers have been set. Now, the more specific error code 7823 ("DL: Invalid docking layer") is thrown.
- create_dl_model_detection froze weights of all layers until level 2 even if the number of channels of the image has changed to a value unequal to 1 or 3, which causes reinitialization of the weight of the first convolution layer. This problem has been fixed. Now, the weights are not frozen when weights need to be reinitialized due to the set image dimensions.
- Creating a detection model with create_dl_model_detection did not check if the chosen docking layer is suitable for the backbone. This problem has been fixed.
- Although do_ocr_multi_class_cnn does not use CUDA functionality, do_ocr_multi_class_cnn failed if the OCRHandle had been deserialized before and the CUDA version of the used system was smaller than the one requested by the HALCON deep learning system requirements. This problem has been fixed.
- During the calculation of the mean average precision (mean_ap) measure during the evaluation of deep-learning-based object detection, precision-recall curves have not been interpolated as intended. This problem has been fixed. A new evaluation parameter for object detection, 'interpolate_pr_curves', has been added (default: true). Due to the correct interpolation, the evaluation will in most cases output higher 'mean_ap' values. Note that this change affects the compatibility. Read more.
- preprocess_dl_samples could not handle samples labeled for object detection with instance_type='rectangle2' if the tuples with the bounding box coordinates were empty. This problem has been fixed.
- There was a limitation when setting the input dimensions for a deep learning-based model for model type 'classification'. Now it is possible to set the input dimensions to any conceivable small values bigger than zero.
- The library procedure preprocess_dl_model_images did not always produce the same output for all supported image types depending on the normalization type. This problem has been fixed.
- The HDevelop procedure split_dl_dataset used for deep learning returned an error in case of a set model type. This problem has been fixed.
- Inference on a CPU for segmentation models returned incorrect results in some cases. This also affected anomaly detection models when either the 'image_height' or the 'image_width' is exactly 32. This problem has been fixed.
- When training a deep learning model with the serialization strategy 'epochs', the given 'basename' parameter for the model file name was ignored and the default name used instead. Furthermore, in some cases, the model was not serialized at the correct iteration. These problems have been fixed.
- Deep learning preprocessing of samples for detection with instance_type="rectangle2" in rare cases caused bounding boxes that are out of the allowed range. This could have led to problems when training the network with the incorrectly preprocessed samples. This problem has been fixed.
- The deep learning procedure determine_dl_model_detection_param in some cases did not handle angles for object detection of instance type 'rectangle2' correctly. This problem has been fixed. Additionally, for the procedure the generic parameter GenParam has been extended by accepting the parameters 'class_ids_no_orientation' and 'ignore_direction', which correspond to the object detection model parameters of the same name.
- dev_display_dl_data did not always use the correct contour style if KeysForDisplay contained 'bbox_result' or 'bbox_both'. This problem has been fixed.
- When reading a deep learning model from ONNX format and setting the model type, the number of classes has not been adapted if the model includes loss layers. This problem has been fixed.
- read_dl_model read the shape of pooling layers in ONNX models with different values for width and height dimensions in 'kernel_shape' or 'stride' incorrectly. This problem has been fixed.
- read_dl_model could have crashed for ONNX models holding input graph nodes with unsupported shape dimensions, i.e., other than 4. This problem has been fixed. A proper error message is displayed now.
- set_dl_model_param could have crashed when setting the model type to 'classification' for a generic model after the model runtime was already set. This problem has been fixed.
- In some cases the intermediate classification threshold returned by the procedure compute_dl_anomaly_thresholds was not between the other two returned thresholds. This problem has been fixed.
- train_dl_model_anomaly_dataset took into account data from previous calls, if it has been called more than once with the same model, which could have led to erroneous results. This problem has been fixed.
- train_dl_model_anomaly_dataset did not handle input images with empty domains correctly and threw an error in these cases. This problem has been fixed. Now, input training images with empty domains are ignored. However, if all input images have empty domains, the operator will still return with an error.
- The operator train_dl_model_batch expected a single dictionary for its parameter 'DLSampleBatch', which was especially confusing in the .NET signature. This problem has been fixed. Now, the operator expects a tuple of dictionaries, one for each sample of the batch.
Note that this fix violates the binary compatibility as the operator signature changed. Affected interfaces are C++ and .NET. Note that this change affects the compatibility. Read more. - train_dl_model_batch returned the misleading error code 9000 ("Function not implemented on this machine") when called with an anomaly detection model. This problem has been fixed. Now, the error code 7912 ("DL: Operator does not support the model type") is returned.
- Reading big datasets was rather slow. This problem has been fixed.
- The HDevelop example programs classify_pill_defects_deep_learning_2_train.hdev and segment_pill_defect_deep_learning_2_train.hdev had a statement about the recommended batch size, which was not always optimal. This problem has been fixed.
- Deep learning classification models that have been created with HALCON 17.12 Progress and read with HALCON 19.05 Progress or later returned incorrect classification results during inference. This problem has been fixed.
- In all read_dl_dataset procedures parallelization of some loops was introduced to speedup reading of big deep learning datasets.
- The calculation of the score histogram from deep learning anomaly detection was not exact. This caused issues when it was displayed together with the classification thresholds. This problem has been fixed. Now, the histogram is calculated and displayed in a more accurate way. Note that this change affects the compatibility. Read more.
- Under certain circumstances, when using CPU based deep learning functionality on Arm based platforms, in conjunction with other HALCON operators using AOP, a crash may have occurred. This problem has been fixed.
- train_dl_model did not resume trainings correctly when StartEpoch was set to a value > 0.0. This problem has been fixed. Now, the previous trainig results are displayed and the previously best model achieved is not overwritten.
File
- Reading big datasets was rather slow. This problem has been fixed.
Filter
- In very rare cases, median_rect crashed or threw one of the errors 6002 ("Memory partition on heap has been overwritten") or 6006 ("Tmp-memory management: could not find memory element"). This problem has been fixed.
- projective_trans_image crashed in rare cases if the interpolation was set to 'nearest_neighbor'. This problem has been fixed.
The fix led to a speedup of projective_trans_image and projective_trans_image_size. The acceleration for all supported image types is up to 8% for processors that support AVX2 and up to 20% if AVX2 is not supported. The acceleration is only valid if 'int_zooming' is set to 'true', which is the default. - The procedure scale_image_range also scaled constant images. This problem has been fixed.
Graphics
- In rare circumstances, HDevelop crashed when closing the father window before its children. This problem has been fixed.
- disp_obj and disp_xld did not show concatenated contours containing only one point if the number of colors was less than the number of contours. This problem has been fixed.
- disp_text did not show the correct specified color for all parts of a string if multiple fonts are used within a string. This problem has been fixed.
- For set_scene_3d_label_param, the parameter 'visible' was incorrectly listed as 'visibility' in the value list and autocompletion of the parameter. Additionally, when setting the 'position' parameter to a tuple with row and column coordinates, those coordinates were incorrectly set. These problems have been fixed.
- Adding more than 50 objects to a smart buffer or window with the graphics stack enabled and graphics_stack_max_element_num set to 'unlimited' led to excessive memory usage. This problem has been fixed.
- For displaying regions, a performance regression occurred. This problem has been fixed.
Inspection
- set_texture_inspection_model_param crashed for read-in models, when the 'novelty_threshold' has been set for a single untrained level. This problem has been fixed.
Images
- affine_trans_image crashed in rare cases if the interpolation was set to 'nearest_neighbor' for real images. This problem has been fixed.
- read_image accepted multi-channel images, where the different channels had inconsistent dimensions. This problem has been fixed.
Matching
- create_local_deformable_model, create_local_deformable_model_xld, create_planar_calib_deformable_model, create_planar_calib_deformable_model_xld, create_planar_uncalib_deformable_model, and create_planar_uncalib_deformable_model_xld reset the system variable 'tsp_neighborhood' to its default value 8. This problem has been fixed.
- A crash or error 6006 ("Tmp-memory management: could not find memory element") occurred when the operator create_planar_uncalib_deformable_model got interrupted. This problem has been fixed.
- A crash or error 6006 ("Tmp-memory management: could not find memory element") occurred when create_shape_model, create_shape_model_xld, create_scaled_shape_model, create_scaled_shape_model_xld, create_aniso_shape_model, create_aniso_shape_model_xld, create_component_model, create_trained_component_model, or set_shape_model_metric got interrupted. This problem has been fixed.
- create_shape_model, create_scaled_shape_model, and create_aniso_shape_model crashed in rare circumstances with certain combinations of parameter settings and input images. This problem has been fixed.
- For 'uint2' images find_ncc_model and find_ncc_models discarded matches at the image border in some cases. This problem has been fixed.
- In rare cases, find_shape_model (as well as the scaled and aniso variants) returned the error 3513 ("Internal error: number of chords too big for num_max"). This problem has been fixed. Note that this change affects the compatibility. Read more.
- get_shape_model_params returned a slightly different value for ScaleStep if a shape model was created with ScaleStep set to 'auto'. This problem has been fixed.
- A crash or error 6006 ("Tmp-memory management: could not find memory element") occurred when the operator train_model_components got interrupted. This problem has been fixed.
Matrix
- Passing a parameter of wrong type to pow_matrix or pow_matrix_mod was not properly detected. This problem has been fixed.
Miscellaneous
- area_intersection_rectangle2 returned a wrong intersection area in rare cases, where vertices of one rectangle are on or very close to an edge of the other rectangle. This problem has been fixed.
- The header file hclib_inttypes.h incorrectly assumed that the inttypes.h header file was available for MSCV 1700 (Visual Studio 2012), which led to a fatal error when using that specific compiler. This problem has been fixed.
- The HIntDef.h header file included the hclib_inttypes.h header file, even though it does not use any of that header's definitions. This problem has been fixed and the unecessary hclib_inttypes.h header file has been removed.
OCR
- deserialize_handle, deserialize_tuple, and read_dict did not work correctly on handles of type 'ocr_mlp' and 'ocr_svm', and on dicts containing handles of these types. This problem has been fixed.
Region
- For some special cases, add_image used an MMX implementation that wrote results outside the actual region. This problem has been fixed.
As a consequence of the fix, add_image is now up to 50% faster for images of type 'byte', 'uint2', and 'int2' for Mult = 1.0 and Add = 0.0.
For Mult = 0.5 and Add = 0.0 a performance improvement of up to 200% can be expected for images of type 'byte', up to 250% for 'int2' images, and up to 120% for 'uint2' images. - The operator gen_random_regions ignored the random seed defined via set_system. This problem has been fixed. Now, calls to gen_random_regions deliver reproducible results if the same random seed is set.
- min_max_gray, gray_features, and select_gray returned wrong values for regions consisting of a single pixel. This problem has been fixed.
- select_shape selected only features greater than 0 when using 'min' for the Min argument. This problem has been fixed.
Segmentation
- The SIMD implementations for dyn_threshold returned wrong results in some cases if the values for the parameter 'Offset' exceeded the maximum for the used datatype (i.e., >= 256 for 'byte' and >= 65536 for 'uint2' images). This problem has been fixed.
Due to a revised implementation, dyn_threshold is now faster if the parameter 'Offset' is set to values smaller than zero for 'light' and 'dark'. In particular, the performance improvement is up to 20% for 'byte' images and 50% for 'uint2' images. - threshold returned wrong regions for vector_field images with very large component values. This problem has been fixed.
Tuple
- deserialize_handle, deserialize_tuple, and read_dict did not work correctly on handles of type 'ocr_mlp' and 'ocr_svm', and on dicts containing handles of these types. This problem has been fixed.
- When calling integer_to_handle for a handle that was already cleared, HALCON would have entered an inconsistent state that could have led to handles being erroneously cleared later on. This problem has been fixed. Calling integer_to_handle on a cleared handle now throws an error message instead of returning the handle.
- read_dict sometimes did not work correctly on dicts containing a 2D data code model. This problem has been fixed.
XLD
- connect_grid_points accepted a wrong number of elements for the control parameter Sigma and crashed for an empty tuple. This problem has been fixed.
- In some cases, when outliers were present at the ends of the input contour, fit_circle_contour_xld returned a wrong PointOrder if a geometric approximation method was used. This problem has been fixed.
HALCON/.NET
Functionality
- The HALCON/.NET interface has been extended with support for .NET Core. This support comes in the form of two new packages that are available online via NuGet:
- MVTec.HalconDotNet
- This package targets .NET Standard 2.0 and provides full access to the HALCON library as well as HDevEngine. It can be used on all architectures supported by HALCON.
- MVTec.HalconDotNet-Windows
- This package targets .NET Core 3.1 and additionally includes Windows Forms and WPF controls for integrating HALCON windows into GUI applications.
The minimal new C# example 'ConsoleApp' demonstrates the use of .NET Core under Windows and Linux. In addition, the C# examples 'Matching' and 'MatchingWPF' have been extended with build configurations for .NET Core under Windows. Instructions for creating a minimal console-based HDevEngine example can be found in the documentation. - MVTec.HalconDotNet
Language Interface Example Programs
Functionality
- The C# and VB HDevEngine examples for executing programs and procedures now use a background thread for execution. This provides a better experience when these examples are adapted to execute own code that makes use of interactive drawing objects.
Bug Fixes
- The example c#/DrawingObjects only showed a part of the HALCON window on some systems. This problem has been fixed.
Extension Packages
Functionality
- For the procedure HIncrRL, which increases the current runlength number for memory allocation, a dedicated documentation is provided in the Extensions Package Programmers Manual.
HBench
Functionality
- The list of hbench reference values (hbench -reference) has been extended by benchmark values for the processors AMD Ryzen™ 9 3950X and Intel® Core™ i9-10900X.
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.
Miscellaneous
- The MVTec GigE Vision Streaming Filter version 2.2.8.3 that is part of the Windows installer fixes two problems:
When using '[Stream]EventTransferEnd' on multiple NICs, the filter driver sporadically stopped to deliver events. Further, get_framegrabber_param(..., 'num_buffers_underrun', ...) was only available with the socket driver up to now.
Image Acquisition Example Programs
- The new HDevelop example programs
- hdevelop/Image/Acquisition/gstreamer_2pipelines.hdev
- hdevelop/Image/Acquisition/gstreamer_acquisition_events.hdev
- hdevelop/Image/Acquisition/gstreamer_nvidia_arguscamera_simple.hdev
- hdevelop/Image/Acquisition/gstreamer_simple.hdev
Digital I/O Interfaces
The latest information about new interface revisions and newly supported digital I/O interfaces can be found on MVTec's web server. Please refer to the release notes within the documentation of the individual digital I/O interfaces for information about improvements, bugfixes, or whether a new revision of the corresponding device driver is required.
Digital I/O Example Programs
- The following HDevelop example programs have been added to show the functionality of the new Linux-GPIO I/O interface:
- hdevelop/System/IO-Devices/linux-gpio_digital_read.hdev
- hdevelop/System/IO-Devices/linux-gpio_digital_write.hdev
- hdevelop/System/IO-Devices/linux-gpio_list_channels.hdev
HALCON for Embedded Vision
Functionality
- JIT compilation of procedures is now supported with the standard Arm architectures aarch64-linux and armv7a-linux.
The size of the HDevEngine for Arm architectures increased to approximately 30 MB.
Documentation
Programmer's Manuals
- The usability of the Programmer's Guide has been improved. In particular, it now contains more information and examples about compiling and linking C++ programs.
- For the procedure HIncrRL, which increases the current runlength number for memory allocation, a dedicated documentation is provided in the Extensions Package Programmers Manual.
User Guides
- The documentation has been extended by a new technical note "Surface-Based Matching". It contains information about different methods, troubleshooting, and further useful information regarding surface-based matching.
- The Installation Guide mentioned an outdated path for installing the Variable Inspect in a later installation. This problem has been fixed.
- The HDevelop User's Guide has been improved. The content of the unspecific chapter "Miscellaneous" moved into other chapters. For example, the keyboard shortcuts are now in a first level chapter (Appendix D). Further, wrong or outdated shortcuts have been updated.
- The HDevelop User's Guide has been improved. Now, the memory usage shown in the status bar is described in chapter 6.1 "Main Window".
Solution Guides
- The chapter about calibrated mosaicking within the Solution Guide on 3D Vision has been extended by a new approach. For this approach, one calibration plate with hexagonally arranged marks is sufficient, thus the proceeding is simplified distinctly.
Reference Manual
- The reference manual entries of create_funct_1d_array and create_funct_1d_pairs did not clearly state the meaning of all the components of the created function. This problem has been fixed.
- The reference manual entries of create_planar_uncalib_deformable_model, create_planar_calib_deformable_model and create_local_deformable_model did not mention the restriction regarding the parameter 'AngleStep'. Further, the description of the parameter 'Contrast' was not consistent.
These problems have been fixed. - The reference manual entries of create_shape_model, create_aniso_shape_model, create_scaled_shape_model, and inspect_shape_model have been extended to clearly describe the results to be expected when setting the minimum size for the parameter 'Contrast'.
- The reference manual entries of eliminate_sp, mean_sp, gray_dilation_rect, gray_erosion_rect, gray_opening_rect, gray_closing_rect, gray_range_rect, illuminate, mean_image, and deviation_image did not state any information on maximum mask sizes. This problem has been fixed.
- The reference manual entry of find_box_3d did not clearly state the difference between setting the generic parameter 'box_type' to 'single_side_visible' and setting the parameter 'SideLen3' to '[-1]'. This problem has been fixed.
- The reference manual entry for find_component_model has been improved. Now the information is structured better and thus it is easier to get an overview and find possible parts.
- The reference manual entry of find_planar_uncalib_deformable_model falsely stated that the parameter 'angle_change_restriction' allows arbitrary deformation when set to 0 and no deformation when set to pi/2. The actual behavior is the other way around. This problem has been fixed.
- The reference manual entry of fit_primitives_object_model_3d did not mention that the parameter 'fitting_algorithm' has no impact on the fitting of planes, as the same result is returned for each option. This problem has been fixed.
- The reference manual entries of gen_circle_sector and gen_ellipse_sector were not clear concerning special angle combinations. This problem has been fixed.
- The reference manual entries of gen_measure_rectangle2 and gen_measure_arc did not state that the coordinates of the rectangle's or arc's center point are rounded internally. This problem has been fixed.
- The reference manual entry for get_bar_code_result had an erroneous entry for Code 128. This problem has been fixed.
- The reference manual entry of get_data_code_2d_param did not mention the regarded width of the quite zone parameter used for the value 'strict_quiet_zone'. This problem has been fixed.
- The reference manual entry of lines_gauss did not contain the information that the values returned in the attribute 'contrast' may be higher than the maximum gray value specified by the type of the input image if the underlying line model is not present in the image. This problem has been fixed.
- The reference manual entry of points_sojka did not mention the restrictions applying to the value range of the parameter 'SigmaW'. This problem has been fixed.
- The reference manual entry of sample_object_model_3d has been extended by information on the computation of the model normals, depending on the input model.
- The reference manual entry of set_bar_code_param did not mention the maximum value possible for 'quiet_zone'. This problem has been fixed.
- In the German reference manual entry of set_system 'cleanup' was not listed as a possible value for the system parameter 'global_mem_cache'. This problem has been fixed.
- The reference manual entries of the deep learning training operators have been extended to mention their non-deterministic behavior. Additionally, the corresponding entry of set_system has been improved.
- The reference manual entry of smooth_funct_1d_gauss did not explain how the maximum value for Sigma is effected by an equidistance of the x values differing from 1. This problem has been fixed.
- Within the reference manual, the introduction of the chapter Bar Code has been extended with more detailed descriptions regarding the general bar code composition and symbols.
- The reference manual chapter concerning deep learning models has been improved to provide a data structure overview.
Installation
- The Linux-GPIO interface is now available for Arm-based platforms.
- On macOS, the installer displayed a wrong installation path for the HALCON examples during the installation process. This problem has been fixed. Note that the examples have been installed to the correct location, while only the text displayed by the installer was incorrect.
- The number of images in the image sequence 'xing', which is used as a traffic monitoring example, has been reduced. Furthermore, the HDevelop example program Applications/Security-Systems/xing_simple.hdev has been removed.
- The GStreamer interface is now available for Linux platforms.
Licensing
- The following licensing issues are known:
- After starting applications based on HALCON 20.05 (or later), the dongle
must be removed and inserted again before starting applications based on
HALCON 19.11 (or earlier).
This problem can be avoided by installing the CodeMeter Runtime from
WIBU SYSTEMS AG.
The CodeMeter Runtime is not shipped with HALCON and must be downloaded from
https://www.wibu.com in the download area. - On Arm platforms (aarch64 architecture) with GLIBC 2.21, it is no longer
possible to run both 64-bit and 32-bit HALCON processes in parallel because
they might block each other.
- After starting applications based on HALCON 20.05 (or later), the dongle
Miscellaneous
- hrun did not correctly handle non-ASCII characters in the Windows command line. This problem has been fixed.
Release Notes of Previous HALCON Versions
Follow this link to read about the changes of previous HALCON versions.