Release Notes for HALCON 24.11.1.0 Steady
This document provides the release notes for MVTec HALCON 24.11.1.0 Steady, as released in November2024.
Major New Features of HALCON 24.11.1.0 Steady
Out of Distribution Detection (OOD) for Classification
This new HALCON feature makes it easy to recognize unexpected behavior caused by incorrect
classifications in production. Thus, users can take appropriate measures, such as stopping the
machine, in a targeted and efficient manner. When using a deep learning classifier, unknown objects
are assigned to one of the classes that the system has learned. This can lead to problems if, for
example, the defects or objects themselves are of a type that has never occurred before.
The
new deep learning feature “Out of Distribution Detection (OOD)” indicates when an object is
classified that was not included in the training data. For example, this could be an object made of
metal if the system was only trained on glass bottles. In such cases, OOD provides an “OOD score”,
which indicates the degree of deviation from the trained classes.
The OOD score can also
be useful when expanding deep learning models with new training images by indicating which of the
new images will have the greatest value for the new model. For example, a high OOD score for a new
training image indicates a greater deviation from the images already seen by the network – this
means a higher information content and, therefore, greater value for the training.
Preview of the new IDE HDevelopEVO
HALCON 24.11 has a special highlight for all users of HALCON's own integrated development environment
(IDE) HDevelop: a preview of the new IDE HDevelopEVO.
This is characterized, among other
things, by a more modern, intuitive user interface and an improved editor (i.e., the central
programming element). The latter enables faster and more efficient programming and prototyping of
machine vision applications.
Users can already extensively test the new development environment
in HALCON 24.11. The range of functions of HDevelopEVO will be continuously expanded in the coming
releases and it will over time become the standard HALCON development environment.
Improved Shape-based Matching
The new HALCON version makes the “Shape-based Matching” feature, used in many applications, more user-friendly. This technology is used to find objects fast, accurately, and precisely. HALCON 24.11 includes the new patent pending “Extended Parameter Estimation” for this purpose. This allows parameters to be estimated with greater granularity, which significantly increases robustness in some applications. “Extended Parameter Estimation” enables this estimation also for users without in-depth machine vision expertise.
Optimized QR Code Reader
The performance of HALCON's QR Code Reader has been significantly increased. This is particularly evident under difficult conditions, for example, when many codes need to be found in the image area or many textures in the image complicate the detection. The recognition rate has been increased and the evaluation time has been significantly reduced in demanding scenarios.
Deep 3D Matching
With this feature, HALCON 24.11 contains a deep-learning-based market innovation for the 3D vision
sector, especially for bin-picking and pick-and-place applications. This feature is particularly
robust in determining the exact position and rotation of a trained object and is characterized by
very low parameterization effort and fast execution time. Depending on the accuracy requirements,
one or more cost-efficient standard 2D cameras can be used to determine the position.
Training
is performed exclusively on synthetic data generated from a CAD model. Further training data is
therefore not required.
Customers can already run this feature in HALCON 24.11 – to train
the model and evaluate applications, they can contact MVTec at any time. Training and evaluation
within HALCON will follow in the next release.
Deep Counting
With Deep Counting, a feature is available to customers as of HALCON 23.05 that can be used to count a large number of objects quickly and robustly as well as to detect their position. The deep-learning-based technology offers significant advantages over existing machine vision methods: The feature can be deployed very quickly, since only very few objects need to be labeled and trained – both steps can be easily done within HALCON. The technology provides reliable results even for objects of highly reflective and amorphous material. With Deep Counting, large numbers of objects such as glass bottles, tree trunks, or food can be counted.
Training for Deep OCR
Deep OCR reads texts in a very robust way, even regardless of their orientation and font. For this purpose, the technology first detects the relevant text within the image and then reads it. With HALCON 23.05, it’s now also possible to fine-tune the text detection by retraining the pretrained network with application-specific images. This provides even more robust results and opens new application possibilities. For example: the detection of text with arbitrary printing type or unseen character types as well as an improved readability in noisy, low contrast environments.
Extended Parameter Estimation for Shape Matching
HALCON 24.05 introduces the first iteration of the extended parameter estimation for Shape Matching.
With its subpixel accuracy, Shape Matching finds objects robustly and accurately in real-time, even
in the most challenging situations. Thanks to the extended parameter estimation, manual parameter
adjustments will soon be a thing of the past.
Using multiple annotated images, users can now
easily optimize for maximum online speed while keeping robustness through automated parameter
tuning. Users thus benefit from a faster implementation of shape matching applications, even without
specialized expertise.
Shape Matching has never been easier!
Bar Code Reader Improvements for Stacked Bar Codes
The bar code reader for GS1 DataBar Expanded Stacked codes has been improved in HALCON 24.05. Depending on the application, customers can expect significant improvements to their decoding rates. This will especially benefit industries such as logistics, retail, and manufacturing, where stacked bar codes are an essential means of tracking and tracing goods.
3D Improvements & Enhancements: Importing 3D Object Models From the STEP Format
Starting with version 24.05, HALCON supports the STEP (Standard for the Exchange of Product Data) file format, the industry standard for 3D CAD data. Customers can now seamlessly load STEP CAD data directly into a HALCON 3D object model without any intermediate steps or conversions. The STEP format is supported by most common CAD programs, increasing interoperability and efficiency, because models for 3D matching can be taken directly from the planning data in the CAD software.
New Version of the OpenVINO™ Toolkit AI² Plug-in
Parallel to the HALCON 24.05 release, a new version of the OpenVINO Toolkit AI² plug-in will be
released. This update uses the latest LTS version of the Intel® Distribution of OpenVINO™ Toolkit,
ensuring compatibility with the latest Intel hardware and boosting the inference performance of deep
learning applications.
Notably, the new plug-in version enhances support for Intel’s 13th
generation of Core processors, leading to improved inference performance. In addition, customers can
now also utilize Intel’s discrete graphics cards for inference, providing greater flexibility in
selecting the appropriate hardware for their application.
Speedups and Further Improvements
HALCON 24.05 also includes several performance optimizations for various core technologies. For
example, unwarping byte images using a vector field is now up to 285 % faster on AVX2-capable Intel
CPUs. The operator map_image is now up to 25% faster as well.
In addition, HALCON 24.05
provides adjustments to many operators to address performance impacts resulting from Intel's
resolution of the “Downfall” security vulnerability.
Further Highlights of HALCON 24.11.1.0 Steady
HALCON’s GigE Vision Interface Supports RoCEv2
With this release, HALCON's GigE Vision interface supports the RoCEv2 network protocol, which enables increased performance in image transmission.
Improved HALCON Progress Edition
HALCON Progress is now fully compatible with the HALCON Steady edition. Progress users can now collaborate with Steady users on the same projects. Additionally, HALCON Progress users will receive the same maintenance updates as HALCON Steady users. In the future, switching from Steady to Progress will simply require exchanging the license file.
Training for 3D Gripping Point Detection
3D Gripping Point Detection can be used to robustly detect surfaces on any object that is suitable for gripping with suction. In HALCON 23.05, there is now the possibility to retrain the pretrained model with own application-specific image data. The grippable surfaces are thus recognized even more robustly. The necessary labeling is done easily and efficiently via the MVTec Deep Learning Tool.
Easy Extensions Interface
With the help of HALCON extension packages, the integration of external programming languages is possible. The advantage for customers: Functionalities that go beyond pure image processing can thus be covered by HALCON. In HALCON 23.05, the integration of external code has become much easier with the Easy Extensions Interface. This allows users to make their own functions written in .NET code usable in HDevelop and HDevEngine in just a few steps, while benefiting from the wide range of functionalities offered by the .NET framework. Even the data types and HALCON operators known from the HALCON/.NET language interface can be used. This increases both the flexibility and the application possibilities of HALCON.
Multi-Label Classification
In the new HALCON version, customers now have access to multi-label classification, a new deep learning method that enables the detection of several different classes within a single image. Such classes can include different defects, objects as well as properties such as structure or color. In practice, this method can, for example, detect the presence of different types of defects in an image and provide a more detailed classification of the different possible defect types. Compared to object detection or instance segmentation, this deep learning method is faster in processing and the labeling effort is much lower.
Further Improvements
In HALCON 23.11, a number of improvements for existing methods and technologies were
implemented:
For Global Context Anomaly Detection, a method for detecting complex anomalies,
the underlying neural network has been further optimized. This improves the accuracy of anomaly
detection without increasing hardware requirements or execution time.
In addition, HALCON
now utilizes the latest NVIDIA® CUDA® toolkit. This provides users with the opportunity to choose from
an even greater range of AI accelerators. For example, the new NVIDIA Jetson OrinTM modules are now
supported as well.
Finally, several performance optimizations of HALCON’s core technologies
have been implemented in HALCON 23.11. For example, template matching operators (NCC Matching for large
templates) now run up to 80% faster on Arm-based systems.
- Global Context Anomaly Detection (GC-AD) models could not be optimized
correctly to HAILO-8 AI² Plugin and hardware.
This hardware only allows int8 calibration precision. The calibration result showed faulty anomaly
images, which led to very poor segmentation results and incorrect classification results. This
problem has been fixed.
Now, optimize_dl_model_for_inference
converts the GC-AD models so that the quantitative results are very similar to full precision
float32 models.
It is necessary to calibrate GC-AD models with the new version again using optimize_dl_model_for_inference. It is also necessary to adjust the classification/segmentation thresholds for best results after calibration.
Compatibility
Licenses
All HALCON 24.05 Progress licenses or licenses of earlier versions must be replaced or upgraded. Please contact your local distributor. HALCON 24.11.1.0 Steady licenses will be downwards compatible to HALCON 24.05 Progress.
HALCON Library
Compared to HALCON 24.05 Progress, many extensions have been introduced. Thus, the HALCON 24.11.1.0 Steady libraries are not binary compatible with HALCON 24.05 Progress or earlier versions. However, HALCON 24.11.1.0 Steady is mostly source-code compatible to HALCON 24.05 Progress except for the changes listed below:
For sample_object_model_3d, the parameter 'SampleDistance' has been renamed to 'SamplingParam'. When using named parameters in HALCON/Python or HALCON/.NET, the parameter has to be renamed.
More information.For read_object_model_3d, the output parameter 'ObjectModel3D' is now of type ObjectModel3D array instead of the single valued type ObjectModel3D. This influences the object-oriented signatures of read_object_model_3d in the language interfaces HALCON/C++ and HALCON/.NET, both the HObjectModel3D constructor and its member function HObjectModel3D::ReadObjectModel3D. Undocumented single valued signatures are still provided for backwards compatibility but cannot be used with the new parameter 'split_level'. For fully supported signatures, see the operator reference.
More information.The operators area_intersection_rectangle2, distance_pr, distance_lr, distance_sr, distance_sc, distance_lc, distance_cc_min, distance_cc_min_points, and distance_cc now accept inputs that previously threw an exception. Additionally, the HALCON/C++ and HALCON/.NET interfaces of the operators distance_cc, distance_cc_min and distance_cc_min_points now support additional overloads, which can cause compatibility issues in rare cases.
More information.convex_hull_object_model_3d, triangulate_object_model_3d, intersect_plane_object_model_3d, register_object_model_3d_pair, and register_object_model_3d_global now return error 9526 ("Primitive in 3D object model has no extended data") instead of one of the errors 9203, 9511, 9514, 9515, 9517, or incorrect results for infinite primitives of type cylinder or plane.
More information.The HTuple::GetHctuple() member function has been changed to take a reference to an Hctuple structure to copy the data to instead of returning an Hctuple.
The undocumented at_i, at_d, at_h, and at_s macros have been removed from HalconCDefs.h.
The signature of the HGetPPar function has changed so that the third parameter now takes a Hcpar const* H_RESTRICT* parameter instead of a Hcpar* H_RESTRICT* parameter. Any code calling HGetPPar directly or indirectly will need to be changed.
More information.
Note that this is not a semantic change, as the documentation for HGetPPar states that the Hcpar values returned by HGetPPar must not be modified. This change makes this restriction explicit to the compiler.find_shape_model, find_scaled_shape_model, and find_aniso_shape_model expected integers for the parameters 'NumLevels' and 'NumMatches', but accepted also doubles. As these values should be integers, setting a double value will now result in an error in order to inform the user.
More information.In the inference of object detection models, predicted boxes are now kept during non-maximum suppression if they have an intersection over union (IoU) with another predicted box equal to the set thresholds 'max_overlap' or 'max_overlap_class_agnostic', respectively.
More information.The GPU runtime initialization of a deep learning model has been improved. The performance should be more stable than before, and it should take much less time to initialize the model. As a side effect, the runtime performance and GPU memory usage of apply_dl_model and train_dl_model_batch can vary with respect to previous versions of HALCON. This only applies to GPU runtime devices. Note that for optimal inference performance on a GPU, an AI² Interfaces like Tensor RT should be used (see query_available_dl_devices).
More information.The color of the display of 'gripping_map', in the procedure 'dev_display_dl_data', could be changed using the parameter 'heatmap_color_scheme'. This behavior has been changed. Now, the parameter 'heatmap_color_scheme' has no influence on the color of the displayed gripping map anymore. Instead, the parameters 'gripping_point_map_color' and 'gripping_point_background_color' can be used to change the colors of the gripping map.
More information.If the augmentation method 'saturation_variation' was already used as input of augment_dl_samples in a training script for Deep-OCR recognition models, then the script will fail in a newer HALCON version. In order to make the script work, the key 'saturation_variation' has to be removed from the input dictionary.
More information.get_calib_data for ItemType='calib_obj_pose' sometimes did not raise an error when the calib_obj_pose was missing from the data, or returned the error 8458 ("Invalid calibration object index"). get_calib_data now returns the error 8459 ("Invalid calibration object pose index").
More information.The pretrained Deep OCR detection model has been improved and changed. apply_deep_ocr may now produce different results for the modes 'detection' and 'auto' for certain images. Existing applications should test the parameter settings based on the new model. In a new version of HALCON the old Deep Learning models are backward compatible for reading.
More information.Applications using the Hpar f union member can safely be modified to use the binary compatible d member. Any usage of the macro FLOAT_PAR can safely be replaced with the identical macro DOUBLE_PAR.
More information.The minimum system requirements for HALCON library on armv7a-linux, x64-linux platform, and armv8-linux platforms have been increased to gcc 7 and glibc 2.27.
More information.Trainings using the 'pretrained_dl_classifier_resnet18.hdl' model may have slightly different results compared to previous releases.
More information.The procedures procedures/general/structured_light_camera_screen_sync.hdvp and procedures/general/structured_light_inspect_segmentation.hdvp have been moved to the new procedure library procedures/general/structured_light.hdpl.
More information.affine_trans_object_model_3d does not copy primitives anymore. affine_trans_object_model_3d and rigid_trans_object_model_3d do not copy precomputed data structures for 3D distance computation anymore.
More information.To optimize the performance on x64-linux and x64-win64 architectures, cuDNN now performs online selection of the used convolution algorithms. As a consequence, the runtime initialization is more time-consuming than in the previous HALCON version, and the results are not always reproducible.
More information.
To reproduce the same results on the same GPU, the system setting 'cudnn_deterministic' can be set to 'true', sacrificing performance, or the TensorRT AI² interface can be used to optimize the model, if applicable.
The new cuDNN version creates an initial GPU memory cache after its first use, which remains present until the process is terminated. The size of this initial cache can vary depending on the used GPU hardware and its actual usage.The handling of memory blocks has been extended to support empty memory blocks as well. Any application that uses a memory block of size zero to indicate an error should be adapted accordingly.
More information.The values retrieved by get_generic_shape_model_param of user-set parameters, i.e., the parameters queried with suffix '_param', may be different for HALCON versions after and including 22.11. Additionally, resulting shape models of train_generic_shape_model may be different.
More information.
To retain consistent behavior of get_generic_shape_model_param and train_generic_shape_model after reading shape models written with HALCON versions before 21.05, users have to set affected parameters to the values written in the shape model. For example, the parameter num_levels has to be queried first using get_generic_shape_model_param(ModelID, 'num_levels', NumLevels), and then set by set_generic_shape_model_param(ModelID, 'num_levels', NumLevels) to achieve that NumLevelsParam from get_generic_shape_model_param(ModelID, 'num_levels_param', NumLevelsParam) results in the same value as NumLevels.The behavior of train_generic_shape_model_param with a shape model created by create_shape_model, create_shape_model_xld, create_scaled_shape_model, create_scaled_shape_model_xld, create_aniso_shape_model, or create_aniso_shape_model_xld can differ regarding its treatment of 'min_contrast' and 'contrast'.
More information.
The procedures procedures/general/structured_light_camera_screen_sync.hdvp and procedures/general/structured_light_inspect_segmentation.hdvp have been moved to the new procedure library procedures/general/structured_light.hdpl.
More information.affine_trans_object_model_3d does not copy primitives anymore. affine_trans_object_model_3d and rigid_trans_object_model_3d do not copy precomputed data structures for 3D distance computation anymore.
More information.To optimize the performance on x64-linux and x64-win64 architectures, cuDNN now performs online selection of the used convolution algorithms. As a consequence, the runtime initialization is more time-consuming than in the previous HALCON version, and the results are not always reproducible.
More information.
To reproduce the same results on the same GPU, the system setting 'cudnn_deterministic' can be set to 'true', sacrificing performance, or the TensorRT AI² interface can be used to optimize the model, if applicable.
The new cuDNN version creates an initial GPU memory cache after its first use, which remains present until the process is terminated. The size of this initial cache can vary depending on the used GPU hardware and its actual usage.The handling of memory blocks has been extended to support empty memory blocks as well. Any application that uses a memory block of size zero to indicate an error should be adapted accordingly.
More information.The values retrieved by get_generic_shape_model_param of user-set parameters, i.e., the parameters queried with suffix '_param', may be different for HALCON versions after and including 22.11. Additionally, resulting shape models of train_generic_shape_model may be different.
More information.
To retain consistent behavior of get_generic_shape_model_param and train_generic_shape_model after reading shape models written with HALCON versions before 21.05, users have to set affected parameters to the values written in the shape model. For example, the parameter num_levels has to be queried first using get_generic_shape_model_param(ModelID, 'num_levels', NumLevels), and then set by set_generic_shape_model_param(ModelID, 'num_levels', NumLevels) to achieve that NumLevelsParam from get_generic_shape_model_param(ModelID, 'num_levels_param', NumLevelsParam) results in the same value as NumLevels.The behavior of train_generic_shape_model_param with a shape model created by create_shape_model, create_shape_model_xld, create_scaled_shape_model, create_scaled_shape_model_xld, create_aniso_shape_model, or create_aniso_shape_model_xld can differ regarding its treatment of 'min_contrast' and 'contrast'.
More information.
Legacy gnuplot operators have been removed from HALCON.
More information.A model calibrated with optimize_dl_model_for_inference in the fixed version and for the HAILO AI² Plugin can only be inferred by HALCON versions that also include the bug fix. The bug fix is compatible with all HAILO AI² Plugins that are compatible with the given HALCON version.
More information.Due to numerical instabilities, the calculation of the value compared with aniso_scale_change_restriction has been fixed which can result in different results obtained by find_local_deformable_model, find_planar_calib_deformable_model, and find_planar_uncalib_deformable_model.
More information.
HALCON Applications
Please re-compile all C, C++, or .NET programs developed with HALCON 24.05 Progress. The incompatibility with HALCON 24.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 24.11.1.0 Steady, HALCON 24.05 Progress, and HALCON 20.11 Steady image acquisition interfaces are library compatible.
HALCON 24.11.1.0 Steady includes only a subset of available image acquisition interfaces. For more information, see the reference documentation of the Image Acquisition Interfaces. You can download additional interfaces from our web server.
Digital I/O Interfaces
In general, HALCON 24.11.1.0 Steady, HALCON 24.05 Progress, and HALCON 20.11 Steady digital I/O interfaces are library compatible.
HALCON 24.11.1.0 Steady includes only a subset of available digital I/O interfaces. For more information, see the reference documentation of the I/O Interfaces. You can download additional interfaces from our web server.
Extension Packages
Please re-generate your own extension packages developed with HALCON 24.05 Progress.
Further Compatibility Information
For gray_histo, gray_histo_abs, and gray_histo_range, the input parameter 'Regions' has been renamed to 'Region', which breaks compatibility in case of calls with keyword argument.
More information.
Legacy or No Longer Supported Functionality
The following functionality may be discontinued in a future major release:
See the reference manual entries of legacy operators for details on how to replace them.
The License Server for HALCON Steady is now deprecated. In the future, the License Server will only be available for HALCON Progress.
The armv7-linux platform has been announced legacy as standard HALCON platform since HALCON 24.11 and will no longer be delivered starting with HALCON 25.11 for the Progress Edition and HALCON 26.11 for the Steady Edition. The platform will still be available on demand as part of the HALCON Embedded program.
The legacy handle mode has been announced legacy for HALCON 24.11. The mode shifts the ownership of a handle to the user via the parameter 'legacy_handle_mode' of the set_system operator and will be removed from the following HALCON version 25.05, including the operators for collective handle destruction:
clear_all_bar_code_models, clear_all_barriers, clear_all_calib_data, clear_all_camera_setup_models, clear_all_class_gmm, clear_all_class_knn, clear_all_class_lut, clear_all_class_mlp, clear_all_class_svm, clear_all_class_train_data, clear_all_color_trans_luts, clear_all_component_models, clear_all_conditions, clear_all_data_code_2d_models, clear_all_deformable_models, clear_all_descriptor_models, clear_all_events, clear_all_lexica, clear_all_matrices, clear_all_metrology_models, clear_all_mutexes, clear_all_ncc_models, clear_all_object_model_3d, clear_all_ocr_class_knn, clear_all_ocr_class_mlp, clear_all_ocr_class_svm, clear_all_sample_identifiers, clear_all_scattered_data_interpolators, clear_all_serialized_items, clear_all_shape_model_3d, clear_all_shape_models, clear_all_sheet_of_light_models, clear_all_stereo_models, clear_all_surface_matching_results, clear_all_surface_models, clear_all_templates, clear_all_text_models, clear_all_text_results, clear_all_training_components, clear_all_variation_models, close_all_bg_esti, close_all_class_box, close_all_files, close_all_framegrabbers, close_all_measures, close_all_ocrs, close_all_ocvs, close_all_serials, close_all_sockets.
The operators for releasing the content of individual handles are still supported.The procedure set_dl_model_param_max_gpu_batch_size has been announced legacy since HALCON 24.05 and will no longer be delivered starting with HALCON 25.11 for the Progress Edition and HALCON 26.11 for the Steady Edition.
The Matching/Component-Based functionality has been announced legacy since HALCON 24.05 and will no longer be delivered starting with HALCON 26.11 for the Steady Edition and Progress Edition.
The Matching/Gray-Value-Based functionality has been announced legacy since HALCON 13.0 and will no longer be delivered starting with HALCON 25.11 for the Progress Edition and HALCON 26.11 for the Steady Edition.
The Classification/Hyperboxes functionality has been announced legacy since HALCON 13.0 and will no longer be delivered starting with HALCON 25.11 for the Progress Edition and HALCON 26.11 for the Steady Edition.
The old DL Classifier functionality has been announced legacy since HALCON 22.05 and will no longer be delivered starting with HALCON 25.05 for the Progress Edition and HALCON 26.11 for the Steady Edition.
The support of uint2 images in find_bar_code and decode_bar_code_rectangle2 has been announced legacy since HALCON 13.0 and will no longer be delivered starting with HALCON 25.05 for the Progress Edition and HALCON 26.11 for the Steady Edition.
The operators set_insert, get_insert, and query_insert have been announced legacy since HALCON 20.05 and will no longer be delivered starting with HALCON 25.05 for the Progress Edition and HALCON 26.11 for the Steady Edition.
The operator bin_threshold has been announced legacy since HALCON 12.00 and will no longer be delivered starting with HALCON 25.05 for the Progress Edition and HALCON 26.11 for the Steady Edition.
As announced in previous releases, MVTec has discontinued the support of macOS systems with the release of HALCON 23.05. We recommend switching to Windows or Linux platforms for future applications.
Programs using the procedure dev_display_dl_data for 3D visualization of 3D gripping point data with the value 'point_cloud' as KeysForDisplay parameter will no longer work. Instead of dev_display_dl_data, the procedure dev_display_dl_3d_data has to be called. Moreover, the parameter value has been renamed to 'gripping_point_cloud'.
More information.Exported code using dictionaries, that was exported with HDevelop 22.11 or earlier, is not source code compatible with later versions of the language interfaces, and must be reexported.
More information.Since the release of HALCON 23.05, MVTec has discontinued support for the Windows 8.1 and Windows Server 2012 R2 operating system. This means that as of version 23.05, HALCON will no longer be tested on this platform and operating system. Specific issues with this platform will no longer be handled by the support channel.
Supported Operating Systems
Windows
HALCON 24.11.1.0 Steady has been compiled for the x64-win64 platform version for Windows 10 (x64 editions), 11, Windows Server 2016, 2019, 2022 on Intel 64 or AMD 64 with SSE2 (AVX2 dispatch) processors.
Linux
HALCON 24.11.1.0 Steady has been compiled for the following Linux platform versions:
- x64-linux platform version for Linux x86_64xspace, GLIBC_2.27, GLIBCXX_3.4.24 on Intel 64 or AMD 64 with SSE2 (AVX2 dispatch) processors
- armv7a-linux platform version for Linux armv7axspace, Kernel with hidraw support, hard-float ABI, GLIBCXX_3.4.24, GLIBCXX_3.4.24 on Armv7-A with NEON support
- aarch64-linux platform version for Linux aarch64xspace, Kernel with hidraw support, GLIBC_2.27, GLIBCXX_3.4.24 on Armv8-A with AArch64 support
Please refer to the Installation Guide for detailed system requirements corresponding to the different Application Binary Interfaces.
Detailed Description of Changes in HALCON 24.11.1.0 Steady
The changes in HALCON 24.11.1.0 Steady are described with respect to HALCON 24.05.
HDevelop
New Functionality
GUI
The MVTec Academy can now be reached via the Start dialog of HDevelop.
Working with more than one HDevelop has been improved. Instead of storing the coordinates and size properties of a widget each time it was closed in the HDevelop.ini, it is now stored only after HDevelop is closed.
The program window combo box of HDevelop has been improved. The grouping of procedures has been changed further it is now possible to search for procedures.
By consenting to sharing anonymous data with us you may receive additional information on our latest or upcoming products.
CTRL + W did close the whole program window, regardless if there were any open tabs. Now, the current tab gets closed, and if no other tab is open, CTRL + W closes the program window.
The usability of the Window menu has been improved. The option 'Open Canvas' now has a dedicated icon.
The usability of HDevelop has been improved. Now, it is possible to hide the docking drop indicators by pressing the Ctrl key. Thus, it is possible to move windows and prevent them from being docked.
It is now possible to show white spaces in the program editor by using the option provided under Preferences > User Interface > Program Window.
Assistants
In HDevelop, the usability of some parameter types on the parameters tab of the image acquisition assistant has been improved. IP and MAC addresses as well as hexadecimal numbers are now displayed as human-readable strings.
IDE
The usability of HDevelop has been improved by a mechanism that informs the user about modified program, procedure, or procedure library files, and offers to reload the modified files. This mechanism is implemented twofold:
- One implementation is based upon system operations. It has no effects on performance and is regarded as the preferred implementation.
- For those rare cases where that implementation is not sufficient (e.g., because the operating system is not able to hold enough file handles open simultaneously), a timer-based implementation is provided. This implementation affects performance and responsiveness of the HDevelop application, and, therefore, is merely intended as a fallback solution.
Which implementation is used is stored persistently, and can be selected, in HDevelop's General Options. It is also possible to deactivate file tracking completely.
dev_get_system now also supports the parameter 'call_stack', which can be used to return the current call stack.
Language
Dictionary lookup expressions now support multiple keys (0-N). For more information, see the HDevelop User's Guide.
Note that this change affects the compatibility. Read more.
Bug Fixes
Assistants
In the Calibration Assistant, user-defined calibration did not reactivate previously excluded parameters. This problem has been fixed.
In the HDevelop Matching Assistant, 'Display Image Pyramid Level' for the correlation-based, descriptor-based, and deformable matching was disabled. This problem has been fixed.
Code Export
Using HDevelop via command line, e.g., for hdevelop -convert operations, did not properly return floating licenses. This problem has been fixed.
The C export of dev_open_window did not work when the background color was not a constant value literal. This problem has been fixed.
GUI
Adding a new tuple element in HDevelop's Variable Inspect Window was not possible anymore. This problem has been fixed.
The Gray Histogram of HDevelop did not display the correct histogram data if there were more than one graphics windows. This problem has been fixed.
In some cases, HDevelop notified that a new software update is available even if the version was up-to-date. This problem has been fixed.
dev_open_tool, did not consider the origin of coordinates while opening the tool. The tool was always opened with respect to the primary screen. This problem has been fixed. dev_open_tool now considers the selected origin while opening the tools.
HDevelop showed the autocompletion suggestion list too often, making editing less convenient. If the cursor was inside an operator and the user typed something, the suggestion list was displayed. This problem has been fixed.
Custom colors set in HDevelop were reset after restart of the application. This problem has been fixed.
HDevelop News may not have worked if the package Development > Third-party libraries libcrypto and libssl were not installed. This problem has been fixed. Now, the package is per default installed when HDevelop is selected.
Information about variables with multiple tuple elements could appear garbled in the variable window tooltip or status bar when the GUI language did not correspond to the OS system language. This problem has been fixed.
The graphics windows appeared to be pushed to the top left corner within the canvas upon maximizing and restoring. This problem has been fixed.
The last column header of the tabs in the Quick Navigation window showed a white space upon resizing the window. This problem has been fixed.
The labels of the x- and y-axis of the Function Inspect window were not visible in the dark theme. This problem has been fixed.
The function inspect windows title was not properly updated after removing functions. This problem has been fixed.
When displaying a small image, it did not fit correctly to the window while resizing. It either was displayed too large, and parts were clipped, or too small, causing black borders to appear. This problem has been fixed.
The tooltip color of the autocompletion was not correct after a theme change. This problem has been fixed.
Zoom out via the '-' button did not work, if the zoom factor was at the maximum value. This problem has been fixed.
The multiple values for "Center" and "Bounding Box" were not properly displayed in the object model 3d inspect window. This problem has been fixed.
Autocompletion in the program editor was slow. This problem has been fixed.
The autocompletion was hidden after pressing the left or right arrow keys. This problem has been fixed.
An updated iconic variable within a dict was not immediately displayed in the graphics window. This problem has been fixed. The graphics window is now updated, once the user clicks on the iconic variable in the Handle Inspect Widget.
When connecting to Linux from Windows, it was possible that HDevelop lost its focus in some rare cases. This could cause unwanted shortcuts to be triggered or characters to be lost when editing an HDevelop program. This problem has been fixed.
The dev_open_tool operator did not set the correct tool geometry when using default parameters. This problem has been fixed.
In rare cases, it took very long until the dialog Attach To Process was shown. This problem has been fixed.
If the display was set to a scaling other than 100%, lines in the Object Model 3D Inspect Window were cut off in rare cases. This problem has been fixed.
IDE
When (temporarily) losing the connection to the file system in combination with HDevelop's application file tracking, HDevelop could become unresponsive. This problem has been fixed. Now, HDevelop reports the problem and offers to stop the application file tracking.
In some cases, HDevelop's file tracking mechanism could lead to a crash. The crash occurred when an unloaded procedure (e.g., due to an invalid file name) was modified and HDevelop subsequently tried to reload it. This problem has been fixed.
When copying code that contains a call to a local procedure, the user could have been asked if the local procedure should also be pasted. This problem has been fixed.
HDevelop file tracking did not sync signature changes. This problem has been fixed.
Dragging and dropping HDVP and HDPL files on HDevelop did not work. This problem has been fixed.
Editing a running program could lead to a false positive warning about program corruption when interrupting a long-running operator. This problem has been fixed.
The autocompletion for dev_get_system did not offer the 'call_stack' parameter. This problem has been fixed.
A find&replace operation in HDevelops program window led to a wrong highlighting, in some cases. This problem has been fixed.
Procedures
The augmentation 'rotate_range' of the Deep OCR recognition training raised an exception in augment_dl_samples. This problem has been fixed.
For procedures without short description, the title of the corresponding (empty) section in the HTML documentation of the procedure always appeared in English, regardless of the selected language. This problem has been fixed.
Reusing an existing parameter name, in the procedure interface dialog, caused an invalid renaming. This problem has been fixed.
Creating a procedure, using dictionary or vector access expressions from selection, did not always determine the proper input parameters for code. This problem has been fixed.
The procedure read_dl_dataset_ocr_recognition did not use additional text classes that can be defined in a Deep OCR project of the Deep Learning Tool (DLT). This problem has been fixed.
Miscellaneous
Compute devices were not deactivated when resetting the program in HDevelop (e.g., when pressing F2). This problem has been fixed.
HDevelop crashed during the attempt to auto complete an inactive line with the TAB key. This problem has been fixed.
HDevelop could crash when canceling the loading of a program, while the start dialog was open. This problem has been fixed.
Using HDevelop via command line, e.g., for hdevelop -convert operations, did not properly return floating licenses. This problem has been fixed.
The program window crashed when the tooltip for autocompletion was shown between two monitors, one scaled with 125% and the other with 150%. This problem has been fixed.
The autocompletion sometimes suggested the framegrabber interface where it was not applicable. This problem has been fixed.
Opening the read image dialog after checking the option to show low-level errors (Preference > General Options > Experienced User) led to an error. Further, opening HDevelop with an image as parameter from a Linux shell threw a low-level error. These problems have been fixed.
It was possible to write code that opened a very large window. This could lead to a crash. This problem has been fixed. Now, the maximum width and height of a window is limited to 2^15.
HDevelop in some rare cases crashed while an inspection widget to select a specific iconic object was opened, and the displayed variable was modified by the running program. This problem has been fixed.
When using an HDevelop.ini file where the JSON-based entry 'MainWndDockingLayout_Canvas' has many children objects in the layout section, HDevelop took a long time to load this layout. This problem has been fixed.
In rare cases, the program window could enter an inconsistent state causing erratic behavior and coloring as well as corruption of the currently edited procedure body in the HDEV/HDVP/HDPL file. While the root cause of this issue has not yet been identified with certainty, several mitigating fixes have been implemented that reduce both the probability and the impact of such an event. In particular, one potential problem involving typing with an open handle inspect widget has been fixed. Also, there is now defensive early detection of an internal inconsistent state in the editor, which allows to save a plain text backup copy of the current editor contents prior to potential corruption.
HDevelop Example Programs
New HDevelop Example Programs
- hdevelop/3D-Matching/3D-Gripping-Point-Detection/3d_gripping_point_detection_training_workflow.hdev
- hdevelop/Applications/Battery-Inspection/battery_electrode_sheet_inspection.hdev
- hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_stationary_cam_stochastic.hdev
- hdevelop/Classification/k-Nearest-Neighbor/classify_pills_hyperspectral.hdev
- hdevelop/3D-Matching/Deep-3D-Matching/deep_3d_matching_workflow.hdev
- hdevelop/Matching/Deep-Counting/deep_counting.hdev
- hdevelop/Matching/Deep-Counting/deep_counting_workflow.hdev
- hdevelop/OCR/Deep-OCR/deep_ocr_detection_training_workflow.hdev
- hdevelop/Applications/Battery-Inspection/detect_3d_defects_on_battery_surface.hdev
- hdevelop/Deep-Learning/Classification/detect_out_of_distribution_samples_for_classification.hdev
- hdevelop/Deep-Learning/MultiLabelClassification/dl_multi_label_classification_workflow.hdev
- hdevelop/System/Sockets/generic_socket_transmit_memory_block.hdev
- hdevelop/halcon_basic_concepts.hdev
- hdevelop/Applications/Battery-Inspection/inspect_and_identify_battery_cells.hdev
- hdevelop/XLD/Sets/intersection_region_contour_xld.hdev
- hdevelop/Identification/Data-Code/print_quality_smallest_module_size.hdev
- hdevelop/3D-Object-Model/Creation/read_object_model_3d_generic_ascii.hdev
- hdevelop/3D-Reconstruction/Structured-Light/structured_light_3d_surface_reconstruction.hdev
- hdevelop/3D-Reconstruction/Structured-Light/structured_light_calibration.hdev
- hdevelop/Matching/Shape-Based/train_generic_shape_model_sample_workflow.hdev
- hdevelop/Tuple/String-Operations/tuple_str_distance.hdev
- hdevelop/XLD/Sets/intersection_region_contour_xld.hdev
- hdevelop/Matching/Shape-Based/train_generic_shape_model_sample_workflow.hdev
New Functionality
The new HDevelop example hdevelop/Applications/Battery-Inspection/detect_3d_defects_on_battery_surface.hdev demonstrates how 3D defects are found on unrolled surfaces of cylindrical batteries.
The new HDevelop example hdevelop/Applications/Battery-Inspection/inspect_and_identify_battery_cells.hdev demonstrates how battery cells are inspected with shape-based matching and identified with Data Matrix ECC 200 code reading in two parallel threads.
The new HDevelop example hdevelop/Classification/k-Nearest-Neighbor/classify_pills_hyperspectral.hdev demonstrates the use of different classifiers to evaluate hyperspectral images.
The new HDevelop example program hdevelop/Applications/Battery-Inspection/battery_electrode_sheet_inspection.hdev shows the inspection process for battery electrode sheets. It uses the images battery_measure.png, battery_defect_01.png, …, battery_defect_5.png from the subdirectory images/battery_electrode.
The HDevelop example program hdevelop/Deep-Learning/AnomalyDetection/dl_anomaly_detection_global_context_inference.hdev has been extended to consider the image domain stored in the metadata of a GC-AD DLModelHandle, which was exported by the Deep-Learning Tool, for example.
The HDevelop example program hdevelop/System/Parameters/query_system_parameters.hdev now also queries information about the used and the available licenses.
The new HDevelop example program hdevelop/halcon_basic_concepts.hdev gives an introduction to the HALCON-specific concepts of images, regions, domain, and tuples.
Bug Fixes
The HDevelop examples locate_car_door, locate_engine_parts, and create_planar_calib_deformable_model mentioned erroneous coordinate systems in their explaining comments. This problem has been fixed.
The HDevelop example program hdevelop/Calibration/Multi-View/calibrate_cameras_monocular.hdev in very rare cases raised an error. This problem has been fixed.
The example description for hdevelop/Tools/Geometry/angle_lx.hdev was wrong: The angle is calculated between the line and the horizontal axis (not the vertical axis). This problem has been fixed.
The deep_counting_workflow example did not run if there was no graphics window available. This problem has been fixed.
The example check_calib_image_quality.hdev sometimes displayed a coordinate system of the calibration plate incorrectly. This problem has been fixed.
HDevEngine
Functionality
'Export Program' does not export MacOS/Apple (C/C++) specific code anymore.
Bug Fixes
In some cases, calling operators that return iconic values could lead to a memory leak in JIT-compiled procedures. This problem has been fixed.
Loading the .NET assembly in the adapter_dotnet when the .NET runtime was already running led to an error. This problem has been fixed.
Unloading an individual library procedure was not a well-defined operation and could cause a crash. This problem has been fixed. Now, calling UnloadProcedure on a library procedure implicitly unloads the entire library. Later attempts to create an HDevProcedure from one of the library procedures will reload the library.
dev_get_system('jit_enabled') reported an error when called from a JIT-compiled procedure. This problem has been fixed.
Loading or writing a procedure using dynamic dictionary keys caused a very small one-time memory leak. This problem has been fixed.
In some cases, calling operators that return iconic values could lead to a memory leak in JIT-compiled procedures. This problem has been fixed.
Loading the .NET assembly in the adapter_dotnet when the .NET runtime was already running led to an error. This problem has been fixed.
Unloading an individual library procedure was not a well-defined operation and could cause a crash. This problem has been fixed. Now, calling UnloadProcedure on a library procedure implicitly unloads the entire library. Later attempts to create an HDevProcedure from one of the library procedures will reload the library.
HALCON Library
Speedup
difference, intersection, symm_difference, and union2 are now faster when the second parameter is a single region with a large number of runs.
unwarp_image_vector_field for byte images is now faster on AVX2 capable Intel processors by up to 285%. This only applies to image sizes that do not require HALCON XL.
distance_pc is now faster for large input tuples.
emphasize is now faster, especially on ARM architectures. In particular, the following speedups can be expected for a 512x512 image:
Architecture Instruction set Image Type Filter Size Factor Speedup ARM NEON byte 3x3 1.0 up to 175% 5x5 up to 110% 15x15 up to 75% 3x3 0.7/2.8 up to 140% 5x5 up to 110% 15x15 up to 60/90% int2/uint2 3x3 1.0 up to 35/30% 5x5 up to 35/25% 15x15 up to 30/25% x86/x64 AVX2 byte 3x3 up to 20% 5x5 up to 10 % int2/uint2 3x3 0.7/2.8 up to 5%/15% 5x5 up to 8% 15x15 up to 8% highpass_image is now faster for byte images. In particular, the following speedups can be expected for a 512x512 image:
Filter Size Architecture Instruction set Speedup 3x3 ARM NEON up to 170% 3x3 x86/x64 AVX2 up to 15% 9x9 ARM NEON up to 70% bandpass_image is now faster. In particular, the following speedups can be expected for a 512x512 image:
Architecture Instruction set Image Type Speedup ARM NEON byte up to 30% ARM64 uint2 up to 200% ARMv7a up to 300% x86/x64 AVX2 byte up to 12% fill_up is now faster by up to 90%.
find_ncc_model and find_ncc_models is now faster for byte images with NEON instructions. In particular, the following speedups can be expected:
ARM architecture Speedup ARM64 up to 80% Armv7 up to 40% Note that the achievable speedup strongly depends on the size of the template on each pyramid level. While there might be no speedup at all for small templates, it increases for larger templates.
The ellipse fitting functionality has been optimized. As a result, fit_ellipse_contour_xld is now up to 475% faster when using the 'geohuber', 'geometric', and 'geotukey' algorithms. Additionally, the performance of apply_metrology_model has also been enhanced for ellipses.
mean_image is now faster for byte images with small filter masks with NEON instructions. In particular, the following speedups can be expected:
ARM architecture Filter Size Speedup ARM64 3x3 up to 20% Armv7 up to 5% ARM64 5x5 up to 10% mean_image_shape is now faster for byte images with filter masks smaller than a mask area of 129 with NEON instructions. In particular, the following speedups can be expected:
ARM architecture Speedup ARM64 up to 40% Armv7 up to 20% The runtime of read_region when reading binary TIFF images has been improved significantly.
bit_lshift and bit_rshift are now faster for int1 type images. On Intel platforms, bit_lshift and on Arm platforms, bit_rshift is now three times faster.
For Intel platforms and image type 'byte', div_image is faster now by about 50%.
The Data Matrix ECC 200 and the DotCode reader have been improved with respect to its decoding performance. Our in-house benchmark suggests an improvement, especially on ARM machines, with an expected speedup of up to 15% (ECC 200) and 20% (DotCode). On machines with x86 or x64 processors, the decoding performance has experienced a minor improvement as well.
frei_amp, prewitt_amp, robinson_amp, and kirsch_amp now are up to four times faster on Intel platforms.
The gray morphology operators gray_bothat, gray_closing, gray_dilation, gray_erosion, gray_opening, and gray_tophat are now faster on all platforms and for all image types when used with non-flat structuring elements. Speed improvements range from 15% to 60%.
On Arm-based platforms, the gray morphology operators gray_bothat, gray_closing, gray_dilation, gray_erosion, gray_opening, and gray_tophat are now faster for all image types when used with flat structuring elements. The speed improvements for aarch64-linux range from a factor of five for byte images to a factor of three for uint2 and a factor of two for real images.
inner_circle and shape_trans(::, 'inner_circle') are now faster by up to 215%. The speedup depends on the size of the input regions: For larger regions, a greater speedup can be expected.
mean_image for byte images and larger masks beginning with 7x7 is now faster by up to 50% on AVX2-capable processors.
emphasize for byte images and larger masks beginning with 7x7 is now faster by up to 50% on AVX2-capable processors.
highpass_image for byte images and larger masks beginning with 7x7 is now faster by up to 40% on AVX2-capable processors.mean_image is now faster on uint2 images for mask sizes greater or equal to 5 on AVX2 capable machines. The speedup is up to 300%.
mean_image is also faster on uint2 images for all mask sizes on Arm machines. The speedup is up to 60%.emphasize is now faster on uint2 images for mask sizes greater or equal to 5 on AVX2 capable machines. The speedup is up to 250%.
emphasize is also faster on uint2 images for all mask sizes on Arm machines. The speedup is up to 60%.On Arm-based systems, moments_object_model_3d is now 50% faster.
On Intel platforms, sub_image for int2 images and Mult=1 is faster now. The speedup for Add=0 is 25% and four times for Add!=0. Furthermore, add_image is 40% faster now when adding a byte image to an uint2 image and using Mult=1 and Add=0.
The performance of trans_from_rgb has been improved for the colorspaces yuv, cielab, ciexyz2, and ciexyz3 when processing int2 images on x64-processors. Cielab is now faster by up to 80%; yuv, ciexyz2, and ciexyz3 by up to 100%.
The performance of trans_from_rgb and trans_to_rgb has been improved on Intel platforms for some colorspaces. trans_to_rgb is now three times or more faster for cieluv and cielchuv for byte, uint2, and int4 images. ciexyz4 improved by 60% or more for byte, uint2, and int4 images. lsm improved by 40% or more for uint2 and int4 images. Furthermore, converting to hsv from rgb is now four times faster.
tuple_repeat and tuple_repeat_elem are now faster for large tuples. The achievable speedup strongly depends on type and number of elements of the tuple.
For some image types, the operators gen_gauss_pyramid, zoom_image_factor, and zoom_image_size are now faster on systems supporting SSSE3/AVX2/NEON for the interpolation mode 'constant' and a scale factor of 0.5. In particular, the following speedups can be expected for an image of size 512x512:
Operator Image Type Instruction Set Speedup gen_gauss_pyramid byte SSSE3 up to 70% AVX2 up to 30% uint2 SSSE3 up to 70% AVX2 up to 55% zoom_image_size
zoom_image_factorbyte SSSE3 up to 95% AVX2 up to 40% uint2 SSSE3 up to 80% AVX2 up to 80% int2 NEON up to150% mirror_image has been sped up for mode 'col' by using AVX512 instructions. On Intel machines that support the AVX512BW instruction set, it is now up to 21% faster, depending on the size of the image and region at hand. On AMD machines that support the AVX512BW/AVX512VBMI instruction set, it is now up to 45% / 91% faster, depending on the size of the image and region at hand.
The runtime of the operators read_dl_model, deserialize_dl_model, read_object_model_3d, and deserialize_object_model_3d has been improved. When ignoring I/O times, these operators are now up to 320% faster. Several other reading and deserialization operators were also sped up, though to a lesser amount.
New Functionality
3D
intersect_plane_object_model_3d has been extended to allow 1:N relations between one input 3D object model and multiple plane poses. Now, the operator allows the relations 1:N, N:N and N:1.
With HALCON 24.05, read_object_model_3d now supports reading of the STEP 3D data exchange format. A new STEP-specific generic parameter 'max_surface_deviation' is introduced to set the accuracy of the read model. The reference manual entry of read_object_model_3d has been extended accordingly. Additionally, an example model 'engine_part_bearing.step' is included in the installation.
The Qhull library has been updated to version 2020.2 (8.0.2).
When using any of the following 3D operators in parallel running threads (for example, using par_start), the performance of these operators might have been affected by the usage of another operator from the list in a different task:
convex_hull_object_model_3d, distance_object_model_3d (for generic parameter 'method' set to 'voxel'), max_diameter_object_model_3d, intersect_plane_object_model_3d (only for 3D primitives), prepare_object_model_3d (for parameter Purpose set to 'distance_computation'), register_object_model_3d_global (only for 3D primitives), register_object_model_3d_pair (only for 3D primitives), select_object_model_3d (for parameter Feature set to 'diameter_bounding_box' or 'diameter_object'), smallest_bounding_box_object_model_3d, smallest_sphere_object_model_3d, triangulate_object_model_3d (only for 3D primitives and parameter 'Method' set to 'greedy')
This problem has been fixed.
The HALCON structured light model has been extended to support high quality 3D reconstruction of diffuse surfaces.
3D surfaces can be reconstructed from lambertian or diffuse object surfaces, using a pattern projector for illumination, which projects directed light like an 'inverse camera'. In contrast, up to now structured light models solely have been used for deflectometry, i.e., for detecting defects on a specular surface, using a diffuse display or monitor for illumination.
create_structured_light_model sets the new ModelType '3d_reconstruction', set_structured_light_model_param can be used to set the calibration information in 'camera_setup_model'. get_structured_light_model_param has been extended accordingly. The new operator reconstruct_surface_structured_light performs the 3d reconstruction.
The chapters Inspection/Structured Light or 3D Reconstruction/Structured Light of the Reference Manual describe the use of the new functionality.
The new HDevelop example program hdevelop/3D-Reconstruction/Structured-Light/structured_light_calibration.hdev shows how to calibrate a structured light setup. It uses the new images from structured_light/calibration.
The new HDevelop example program hdevelop/3D-Reconstruction/Structured-Light/structured_light_3d_surface_reconstruction.hdev shows how to reconstruct surfaces using a calibrated structured light setup. It uses the new images from structured_light/cast_part.
The new HDevelop procedure compute_structured_light_modulation in the new library procedures/general/structured_light.hdpl helps the user to estimate the quality of the aquired sequence of camera pattern images. The already existing example hdevelop/Inspection/Structured-Light/structured_light_tap_collar.hdev has been extended with the modulation computation.
Note that this change affects the compatibility. Read more.
For sample_object_model_3d, the parameter 'SampleDistance' has been renamed to 'SamplingParam'. The parameter can take distances in 'm' or pixel and also the number of points of the sampled object depending on the used method. The new parameter name describes the behavior in a more accurate manner.
Note that this change affects the compatibility. Read more.surface_normals_object_model_3d has been improved. Now, for the method 'triangles', the operator also returns the normals of each triangle in the extended attributes '&triangle_normal_x', '&triangle_normal_y', and '&triangle_normal_z'.
read_object_model_3d has been extended by the format option 'generic_ascii'. Now, different ASCII formats containing 3D point information can be read, e.g., .xyz, .pts, .ptx. The new HDevelop example hdevelop/3D-Object-Model/Creation/read_object_model_3d_generic_ascii.hdev has been added to show the usage.
HALCON has been extended with the DL-based Deep 3D Matching inference.
Deep 3D Matching finds the 3D poses of one or more instances of a CAD model using multiple calibrated camera views of the scene. Training Deep 3D Matching models will be available in a future version of HALCON. To obtain a trained Deep 3D Matching model at this point, please contact your HALCON sales representative.The new operators read_deep_matching_3d and write_deep_matching_3d can be used to deserialize and serialize a Deep 3D Matching model. The new operators set_deep_matching_3d_param and get_deep_matching_3d_param can be used to set and obtain the parameters of such a model, like the camera parameters and poses. Further, the new operator apply_deep_matching_3d can be used to perform the pose estimation using a Deep 3D Matching model and the search images.
The new HDevelop example
hdevelop/3D-Matching/Deep-3D-Matching/deep_3d_matching_workflow.hdev
has been added to show how to use this feature in HALCON. For this example, a new set of images has been added, which are located in the example images directory named 3d_machine_vision/multi_view. Additionally, a pre-trained model has been added, called hdevelop/3D-Matching/Deep-3D-Matching/pretrained_bitholder_deep_3d_matching.dm3Further, a new reference manual chapter "3D Matching/Deep 3D Matching" has been added, which outlines the corresponding workflow.
read_object_model_3d now offers the generic parameter 'split_level' for step files. Using this parameter, the model components from one input step file can be read into various 3D object models.
Note that this change affects the compatibility. Read more.
HALCON has been extended with 3D Gripping Point Detection training. Now, the 3D Gripping Point Detection model can be finetuned to improve the detection performance for a specific 3D sensor or setup.
The new HDevelop example hdevelop/3D-Matching/3D-Gripping-Point-Detection/3d_gripping_point_detection_training_workflow.hdev has been added to show how to use this feature in HALCON. For this example, a new set of images has been added. It is located in the example images folder "3d_machine_vision/depalletizing".
The following deep learning procedures have been extended:
- augment_dl_samples
- create_dl_preprocess_param_from_model
- dev_display_dl_data
- dev_display_dl_data_tiled
- evaluate_dl_model
- preprocess_dl_samples
- preprocess_dl_model_images
- train_dl_model
The following new procedures are now available:
The reference manual chapters "3D Matching/3D Gripping Point Detection", and "Deep Learning/Model" as well as the operator entry for get_dl_model_param, and set_dl_model_param have been extended.
Note that this change affects the compatibility. Read more.
Bar Code
Decoding of GS1 DataBar Expanded Stacked barcodes is now more robust.
get_bar_code_result and get_data_code_2d_results now support the new mandatory associations of GS1 application identifiers for AI 8030 (DIGSIG), which have been introduced with the GS1 General Specifications, Version 24.0. The mandatory associations are considered when using the result parameters 'gs1_lint_result' and 'gs1_lint_passed'.
The following new GS1 Application Identifiers, which have been introduced with the General Specifications Change Notification (GSCN) 22-246, are now supported:
7250 (Date of birth), 7251 (Date and time of birth), 7252 (Biological sex), 7253 (Family name of person), 7255 (Given name of person), 7255 (Name suffix of person), 7256 (Full name of person), 7257 (Address of person), 7258 (Baby birth sequence indicator), 7259 (Baby of family name)The new GS1 Application Identifiers 7241 (AIDC MEDIA TYPE) and 7242 (VCN) are now supported.
Reading of stacked GS1 DataBar symbologies is now more robust in the presence of print growth or print loss.
The new GS1 Application Identifiers 4330 (MAX TEMP F.), 4331 (MAX TEMP C.), 4332 (MIN TEMP F.), 4333 (MIN TEMP C.), and 8030 (DIGSIG) are now supported.
find_bar_code now supports UPC-E bar codes with number system 1 by setting the new parameter 'upce1_enable' to 'true'.
set_bar_code_param and set_bar_code_param_specific have been extended with the parameter 'max_code_length'. With this parameter, the maximum allowed length of a decoded string with which a bar code will still be considered valid, can be specified. With get_bar_code_param and get_bar_code_param_specific, the current value of the mentioned parameter can be queried.
get_bar_code_result and get_data_code_2d_results have been extended with the new parameters 'gs1_lint_result' and 'gs1_lint_passed' to check the contents of GS1 code for conformance with the GS1 specification.
The robustness of the bar code reader against false reads of EAN/UPC codes with add-on ('EAN-13 Add-On 2', 'EAN-13 Add-On 5', 'EAN-8 Add-On 2', 'EAN-8 Add-On 5', 'UPC-A Add-On 2', 'UPC-A Add-On 5', 'UPC-E Add-On 2', 'UPC-E Add-On 5') has been improved. Now, edges that are too far away from the main symbol are not considered as possible add-on edges which reduces the amount of false reads, e.g., when two codes are very close to each other.
Calibration
calibrate_hand_eye has been extended with a new robust method modeling the uncertainty of measured observations including the robot poses. set_calib_data sets the new method 'stochastic' using the parameter 'optimization_method'. get_calib_data has been extended with new parameters for additional output. The new HDevelop example program hdevelop/Calibration/Hand-Eye/calibrate_hand_eye_stationary_cam_stochastic.hdev shows, how this method is integrated into the hand-eye calibration workflow. It uses the new images from 3d_machine_vision/hand_eye/stationary_cam_stochastic.
Classification
classify_class_knn is now internally parallelized over the input points, using the automatic operator parallelization.
Data Code
get_data_code_2d_results has been extended with the parameter 'quality_isoiec29158_intermediate_float_grades', which returns the intermediate grades of the print quality inspection of Data Matrix ECC 200 codes according to ISO/IEC 29158:2020.
get_bar_code_result and get_data_code_2d_results now support the new mandatory associations of GS1 application identifiers for AI 8030 (DIGSIG), which have been introduced with the GS1 General Specifications, Version 24.0. The mandatory associations are considered when using the result parameters 'gs1_lint_result' and 'gs1_lint_passed'.
The default value for 'model_type' in the QR Code reader has been changed to 2 for 'standard_recognition' and 'enhanced_recognition', as Model Type 1 codes are deprecated and have been removed from ISO/IEC 18004 in 2006. Applications still working with Model Type 1 codes need to set 'model_type' to 'any'.
For the Data Matrix ECC 200 symbol, the tolerance of find_data_code_2d with respect to the variation of the module widths along the two alternating finder-pattern sides has been improved. Thus, a new parameter 'alternating_pattern_tolerance' is now available via set_data_code_2d_param or create_data_code_2d_model. A total of three different values can be set: 'low' allows only a small variation, 'medium' allows a larger variation, and 'high' additionally expands the search space. A higher setting always includes the lower values.
Note that the new parameter has only an effect on search passes using 'finder_pattern_tolerance' equal to 'low'. Furthermore, it will be automatically set to 'low' for 'default_parameters' set to 'standard_recognition', to 'medium' for 'enhanced_recognition', and to 'high' for 'maximum_recognition'. The new parameter is trainable via find_data_code_2d, and get_data_code_2d_results can be used to check if it was needed for a successful decode. If the decode is based on 'finder_pattern_tolerance' equal to 'high', get_data_code_2d_results will return 'undefined' for 'alternating_pattern_tolerance'.
The changes made can also have a small effect on the print quality inspection result if 'quality_isoiec15415_decode_algorithm' is set to 'robust'.The new GS1 Application Identifiers 7241 (AIDC MEDIA TYPE) and 7242 (VCN) are now supported.
The 2D code readers now support specifying Shift JIS as string encoding by setting the parameter 'string_encoding' to 'shiftjis' in set_data_code_2d_param.
The new GS1 Application Identifiers 4330 (MAX TEMP F.), 4331 (MAX TEMP C.), 4332 (MIN TEMP F.), 4333 (MIN TEMP C.), and 8030 (DIGSIG) are now supported.
The QR Code reader and the Micro QR Code reader have been improved. By using a more powerful method to find code candidates in the image, the detection rate could be increased, especially for challenging scenarios like images with many codes or highly textured backgrounds. At the same time, the runtime has been significantly reduced for complex images. Additionally, the decoding performance for dot-printed QR Codes has been improved.
The candidate search has been extended by a mode that is more robust against local contrast variations, which can be activated using the data code model parameter 'contrast_tolerance'.
Further, the data code model parameter 'candidate_selection' can now be used to control the generation of candidate regions that are used for (Micro) QR Code symbol detection.
In addition, the complexity of the symbol search can be adapted using the find_data_code_2d parameter 'symbol_search'. However, this is only necessary in very specific cases, i.e., for very simple ('rudimental') or very complex ('exhaustive') images.With the new candidate search method, the value of the existing data code model parameter 'contrast_min' is less crucial for the performance of the code reader and only needs to be set in rare cases. Moreover, the default values of the parameter 'module_gap_max' have been changed for (Micro) QR Code models. The custom HPeek demo and the following HDevelop example programs have been adapted accordingly:
- hdevelop/Applications/Data-Codes/micro_qr_optimized_settings.hdev
- hdevelop/Applications/Data-Codes/qrcode_optimized_settings.hdev
- hdevelop/Identification/Data-Code/qrcode_deformed.hdev
- hdevelop/explore_halcon.hdev
(Micro) QR Code models created with older HALCON versions can still be read, but may cause different results.
The QR Code and Micro QR Code reader is now more robust against false positive reads. Therefore, the HDevelop example program hdevelop/Identification/Data-Code/micro_qr_strict_quiet_zone.hdev has been removed.
The following new GS1 Application Identifiers, which have been introduced with the General Specifications Change Notification (GSCN) 22-246, are now supported:
7250 (Date of birth), 7251 (Date and time of birth), 7252 (Biological sex), 7253 (Family name of person), 7255 (Given name of person), 7255 (Name suffix of person), 7256 (Full name of person), 7257 (Address of person), 7258 (Baby birth sequence indicator), 7259 (Baby of family name)
The print quality inspection of direct part marked codes now supports continuous grading according to ISO/IEC 29158 by using the new get_data_code_2d_results parameter 'quality_isoiec29158_float_grades' for the following code types:
Data Matrix ECC 200, QR Code, Micro QR Code, Aztec CodeAdditionally, the parameters
- quality_isoiec_tr_29158
- quality_isoiec_tr_29158_labels
- quality_isoiec_tr_29158_values
- quality_isoiec_tr_29158_rows
- quality_isoiec_tr_29158_cols
- quality_isoiec_tr_29158_intermediate
- quality_isoiec_tr_29158_intermediate_labels
- quality_isoiec_tr_29158_intermediate_values
- quality_isoiec_tr_29158_reflectance_margin_module_grades
are renamed to
- quality_isoiec29158
- quality_isoiec29158_labels
- quality_isoiec29158_values
- quality_isoiec29158_rows
- quality_isoiec29158_cols
- quality_isoiec29158_intermediate
- quality_isoiec29158_intermediate_labels
- quality_isoiec29158_intermediate_values
- quality_isoiec29158_reflectance_margin_module_grades
preserving backward compatibility.
The debug procedures grade_data_code_2d and dev_display_data_code_2d_print_quality_results now use 'isoiec29158' as input for the parameter 'Standard' and 'QualityStandard', respectively. This also preserves backward compatibility.
It is now possible to set the list of supported GS1 Application Identifiers by providing the syntax dictionary, which can be obtained from https://ref.gs1.org/tools/gs1-barcode-syntax-resource/syntax-dictionary/, to the new set_system parameter 'gs1_syntax_dictionary'.
It is now possible to set the smallest module size used for print quality grading of 2d data codes. The new set_data_code_2d_param parameter quality_isoiec15415_smallest_module_size has been added for this purpose.
The new example hdevelop/Identification/Data-Code/print_quality_smallest_module_size.hdev shows how to use this functionality.The DotCode reader was improved with respect to its decoding performance. The biggest benefit is given for DotCodes with some kind of visual disturbance, e.g., codes covered with foil. Our in-house benchmark suggests a relative improvement of 10% in decodability.
In addition, the default value of the generic parameter 'max_allowed_error_correction' has been reduced from 1.0 to 0.9, i.e., the code reader will use at most 90% of its error correction capacity.
Deep Learning
Global Context Anomaly Detection (GC-AD) has been extended with domain aware inference. The procedure preprocess_dl_samples has been extended to support 'keep_domain' as an option for DLPreprocessParam.domain_handling for GC-AD models in inference mode. As a result, apply_dl_model will only consider the input domain when calculating the 'anomaly_score' value.
The following two HDevelop programs have been extended to show the new functionality:- hdevelop/Deep-Learning/AnomalyDetection/dl_anomaly_detection_global_context_inference.hdev
- hdevelop/Deep-Learning/AnomalyDetection/dl_anomaly_detection_global_context_workflow.hdev
A section named "Domain Handling During Inference" has been added to the "Deep Learning/Anomaly Detection and Global Context Anomaly Detection" chapter reference to explain the new functionality.
A new version of the OpenVINO AI Accelerator Interface, 21.05.3.1, is released at the same time as HALCON 24.05 and can be obtained via SOM. By default, the HALCON OpenVINO AI Accelerator Interface is delivered with the OpenVINO 2023.3 LTS plugins for CPU and GPU.
A new deep learning method named multi-label classification has been added to HALCON. This method allows assigning multiple classes to an image at once, with little effort to label the data and a lower inference time compared to other model types like detection.
In addition to extending the deep learning operators and procedures with the new multi-label classification model type, the following procedures are introduced:
create_dl_model_multi_label_classification, read_dl_dataset_multi_label_classification, convert_classification_dataset_to_multi_label_classification, convert_detection_dataset_to_multi_label_classification, convert_segmentation_dataset_to_multi_label_classification, dev_display_multi_label_classification_evaluationThe HDevelop example program hdevelop/Deep-Learning/MultiLabelClassification/dl_multi_label_classification_workflow.hdev has been added to show how the DL model of multi-label classification can be used in HALCON.
A chapter describing the use of the new multi-label classification method has been added to the reference manual ("Deep Learning" > "Multi-Label Classification").
The new procedure dev_display_multi_label_classification_evaluation can be used to visualize the results of a multi-label classification model.
An existing classification, recognition, or segmentation dataset can be converted into a multi-label classification dataset using the provided conversion procedures.The NVIDIA CUDA Basic Linear Algebra Subroutine library (cuBLAS) and NVIDIA CUDA Deep Neural Network library (cuDNN) have been updated to the latest versions. To support also the latest NVIDIA graphics cards, HALCON now ships and supports these libraries for CUDA versions 12.1 on x64-linux and x64-win64 platforms. The libraries can be found in the cuda12_1 subdirectories of the thirdparty library directory.
The following versions of the NVIDIA libraries are shipped for CUDA 12.1:- NVIDIA CUDA Basic Linear Algebra Subroutine library (cuBLAS) from the CUDA 12.1 Toolkit version 12.1.3.1
- NVIDIA CUDA Deep Neural Network library (cuDNN) version 8.9.2
For aarch64-linux, HALCON now supports NVIDIA Jetpack 5.1.1.
Note that this change affects the compatibility. Read more.The DL Framework now contains the new operator create_dl_layer_matmul. This allows building custom CNN graphs that contain matrix multiplications of two inputs DLLayerA and DLLayerB, where the 2D matrices are encoded in the last two dimensions (H, W) of the input tensors, respectively.
create_dl_layer_elementwise now allows creating a DL layer with a new elementwise operation type 'division'.
The DL framework now contains the new operator create_dl_layer_reduce that creates a Reduce layer within a custom DL model. The layer can be used to reduce an input tensor along one or several given axes by a given operation. Currently, the operation 'norm_l2' to compute the L2-Norm along the given axis is supported.
The anomaly detection performance of Global Context Anomaly Detection (GC-AD) has been improved. This is enabled by a novel loss layer in the local network of the GC-AD model and by new pretrained model weights. The updated model has the same name as in previous HALCON versions: pretrained_dl_anomaly_global_context.hdl Although it may perform worse in some cases, this model detects anomalies considerably better on average than the previous versions of GC-AD.
The changes to the GC-AD model do not affect the runtime and memory requirements during inference. The novel loss layer has a small effect on the training duration. For the default image size and patch size setting, this effect is only marginal. Another effect of the updated loss layer is that the loss values observed during training are expected to be numerically higher.optimize_dl_model_for_inference has been extended to support int8 precision together with the Deep Counting model.
A new operator create_dl_layer_reduce with operations sum and norm_l2 has been introduced.
The distance loss layer now supports the L1 distance. create_dl_layer_loss_distance has been extended accordingly.
The Deep Learning Inference module has been renamed Deep Learning Enhanced and the Deep Learning Training module has been renamed Deep Learning Professional. For more information on which technology belongs to which module, see the Installation Guide (chapter 5.4.2).
The required license modules have been adapted according to the new deep learning licensing.
get_dl_model_param has been extended with the parameter 'min_version'. It returns the minimal required HALCON version supporting the given model. This allows users to ensure their models are compatible with older HALCON versions.
The runtime initialization of a GPU device on a deep-learning model took a large amount of time since HALCON 23.11. This has been significantly improved.
Note that this change affects the compatibility. Read more.HALCON has been expanded to include the Out-of-Distribution Detection (OOD) function for all deep learning classification models. This function recognizes when an input is outside the distribution of the training data.
In addition to the extension of the deep learning operators and procedures with the new out-of-distribution detection function, the operator fit_dl_out_of_distribution and the procedure add_dl_out_of_distribution_data have been introduced.
The HDevelop example program hdevelop/Deep-Learning/Classification/detect_out_of_distribution_samples_for_classification.hdev has been added to show how to set up a classification DL model with this feature.
The reference manual entry "Deep Learning” > “Classification” has been extended with instructions on how to fit a classification model for out-of-distribution detection.
The procedure evaluate_dl_model has been extended to evaluate the out-of-distribution detection feature using multiple evaluation metrics.
read_dl_model now supports reading ONNX models that contain Transpose operations.
read_dl_model now supports reading ONNX models that contain Reshape operations.
HALCON has been extended with Deep Counting. This method makes it possible to count objects in an image easily and robustly without setting complex parameters.
The operators for Deep Counting are:- apply_deep_counting_model
- create_deep_counting_model
- prepare_deep_counting_model
- set_deep_counting_model_param
- get_deep_counting_model_param
- write_deep_counting_model
- read_deep_counting_model
The HDevelop example programs hdevelop/Matching/Deep-Counting/deep_counting_workflow.hdev and hdevelop/Matching/Deep-Counting/deep_counting.hdev have been added to show how to use Deep Counting in HALCON.
The example hdevelop/Matching/Deep-Counting/deep_counting.hdev has been extended with the new images flasks_[01-03].jpg, pipes_[01-03].jpg, and rods_[01-03].jpg from the subdirectory images/counting.
The example hdevelop/Matching/Deep-Counting/deep_counting_workflow.hdev uses the already existing images, bottle_crate_[01-24].png, from the subdirectory images/bottles.The new procedure draw_deep_counting_templates can be used to draw templates for the Deep Counting model. The new procedure dev_display_deep_counting_results can be used to visualize the results of Deep Counting.
The reference manual has been extended with a chapter describing how to use the new Deep Counting functionality ("Matching" > "Deep Counting").
read_dl_model can now read ONNX models that contain a ConvTranspose operation. Moreover, the transposed convolution (create_dl_layer_transposed_convolution) does now support a bias term and CPU training.
HALCON has been extended with Deep OCR detection training. Now, the detection component of a Deep OCR model can be retrained on a specific application domain for even better detection results.
The new HDevelop example hdevelop/OCR/Deep-OCR/deep_ocr_detection_training_workflow.hdev has been added to show how to use this feature in HALCON. For this example, a new set of images has been added. It is located in the example images folder named "punched_numbers".
The existing HDevelop example program hdevelop/OCR/Deep-OCR/deep_ocr_prelabel_dataset.hdev has been adapted and it shows how to prelabel images using Deep OCR and create a dataset that can be imported into the Deep Learning Tool for refining the labels.The following deep learning procedures have been extended:
- augment_dl_samples
- create_dl_preprocess_param
- create_dl_preprocess_param_from_model
- dev_display_dl_data
- dev_display_dl_data_tiled
- evaluate_dl_model
- preprocess_dl_samples
- preprocess_dl_model_images
- preprocess_dl_model_augmentation_data
- train_dl_model
The following new procedures are now available:
- convert_ocr_detection_result_to_object_detection
- dev_display_dl_invalid_samples
- preprocess_dl_model_images_ocr_detection
- read_dl_dataset_ocr_detection
The operators set_dl_model_param and get_dl_model_param have been extended with Deep OCR detection specific parameters:
- 'min_character_score'
- 'min_link_score'
- 'min_word_area'
- 'min_word_score'
- 'orientation'
- 'sort_by_line'
- 'tiling'
- 'tiling_overlap'
The reference manual chapters "Deep Learning", "Deep Learning/Model", and "OCR/Deep-OCR" as well as the operator entry for get_dl_model_param, set_dl_model_param, set_deep_ocr_param, and get_deep_ocr_param have been extended. They now describe how to use the method and the corresponding parameters. The chapter on Deep OCR in the Solution Guide I Basics has been adapted accordingly.
The pretrained Deep OCR detection model has been improved and extended. The resulting detection boxes of apply_deep_ocr for the modes ‘detection’ and ‘auto’ are now more precise.
Note that this change affects the compatibility. Read more.
Additionally, a new compact detection component has been added. This compact model is slightly less precise than the default. As a benefit, it uses significantly less memory and is much faster during inference. Both models can be retrained using Deep OCR detection training.
set_deep_ocr_param has been extended with the option to specify a filename, ‘compact’ or ‘default’ for the parameter ‘detection_model’. The parameter ‘recognition_model’ has been extended with the option to set a filename or ‘default’.
The following pretrained model has been updated:
dl/pretrained_deep_ocr_detection.hdl
The following pretrained model has been added:
dl/pretrained_deep_ocr_detection_compact.hdlIt is now possible to set certain model parameters after calling optimize_dl_model_for_inference. This eliminates the need to repeat the time-consuming optimization.
An optimized model's architecture cannot be changed, therefore only a selection of parameters is supported. In addition, restrictions may be placed on the supported parameters to meet these constraints.
The following parameters of each model type can be changed using set_dl_model_param after model optimization:- Anomaly Detection: standard_deviation_factor
- Global Context Anomaly Detection: anomaly_score_tolerance
- Classification: class_names
- Detection: class_names, max_num_detections, max_overlap, max_overlap_class_agnostic, min_confidence
- Deep OCR Detection Component: min_character_score, min_link_score, min_word_score, orientation, sort_by_line, tiling, tiling_overlap
- Deep OCR Recognition Component: alphabet, alphabet_internal, alphabet_mapping
- Segmentation: class_names
set_deep_ocr_param has also been extended with this new functionality and supports the following parameters after optimization:
- Deep OCR: detection_min_character_score, detection_min_link_score, detection_min_word_score, detection_orientation, detection_sort_by_line, detection_tiling, detection_tiling_overlap, recognition_alphabet, recognition_alphabet_internal, recognition_alphabet_mapping
set_dl_model_param and get_dl_model_param have been extended. Using the parameter 'image_size' the width and height of the input image can be set and get, while keeping the depth, the same.
File
Memory block support has been improved. Previously, handling of empty memory blocks was not supported. Now, memory blocks can be handled even when empty.
Note that this change affects the compatibility. Read more.
list_files has been extended to support listing of symbolic links on Linux systems.
HALCON has been extended with serialization and deserialization support for the data types 'serialized_item', 'memory_block' and 'encrypted_item'.
Graphics
set_lut (and its HDevelop counterpart dev_set_lut) have been extended, such that the minimum and maximum gray value for the mapping of the LUT can be specified by passing a tuple [LUTName, MinGray, MaxGray] to this operator.
Skia, the library used for HALCON's visualization, has been updated to milestone 115.
disp_text and dev_disp_text have been extended with new generic parameters:
- `backdrop_blur_sigma' to specify the amount of blur of the background of the text box
- 'rotate_phi', 'rotate_col', and 'rotate_row' to enable rendering of rotated text
- 'border_width' and 'border_color' to specify how the border of the text box is rendered
Legacy gnuplot operators have been removed from HALCON.
Note that this change affects the compatibility. Read more.
The new LUTs 'batlow' and 'invers_batlow' have been added. These LUTs are perceptually uniform and color-vision-deficiency friendly.
set_drawing_object_params has been extended with the parameter 'marker_size' to make the size of the anchors used to manipulate drawing objects configurable.
Image
HALCON has been extended with the operator add_image_border. It can be used to add an arbitrarily sized border with a constant gray value to an image.
Matching
train_generic_shape_model now offers the possibility to determine the parameter 'min_score' by extended parameter estimation. Doing so, a suitable value is estimated given representative matching samples. Accordingly, set_generic_shape_model_param has been extended to set representative samples to the matching model.
Component-based matching is set to legacy for HALCON 24.05.
The operators for finding shape models for shape-based matching find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, find_aniso_shape_models, and find_generic_shape_model are now faster on processors that support the SSE2, AVX2, AVX512, or NEON instruction sets. The speedup depends on the configuration of the shape-based matching (e.g., on the number of pyramid levels, the sub-pixel refinement, the available instruction set, and highly on the value for greediness) and can therefore be non-existent as well. The following speedups can be expected for an exemplary configuration:
Image Type Available Instruction Set Speedup byte, uint2 SSE2 15% AVX2 30% AVX512 50% NEON 20% As a consequence of this speedup, the speed of find_component_model and find_shape_model_3d has also improved for some configurations.
train_generic_shape_model now offers a new method to determine search parameter values by extended parameter estimation. Given representative matching samples, the estimation result replaces 'greediness' and 'min_score'. Accordingly, set_generic_shape_model_param has been extended with a new parameter named 'extended_parameter_estimation'. The new method can be enabled with the value 'per_level'.
As a consequence, the extended parameter estimation of 'min_score' is now enabled by setting the new parameter to the value 'linear'. The HDevelop example train_generic_shape_model_sample_workflow.hdev has been adapted.
As the estimation replaces 'greediness' and 'min_score', the result values cannot be retrieved by get_generic_shape_model_param.For train_generic_shape_model, determining 'min_score' through the extended parameter estimation method 'linear_estimate' has been modified. The criterion for accepting matches in samples has been improved. This may change the behavior in rare cases.
The operator now also returns the error 8684 ("Extended parameter estimation failed") in case of no or too many found matches on a sample.
The generic shape matching interface now allows evaluation of the max overlap for an instance for all models passed in find_generic_shape_model. To enable global max overlap, call set_generic_shape_model_param with 'max_overlap_global_enable' set to the value 'true'.
Miscellaneous
The 'val' parameter of the HPGetPPar function was changed from Hcpar* H_RESTRICT to Hcpar const* H_RESTRICT*.
Note that this change affects the compatibility. Read more.
The Hpar f union was declared legacy since HALCON 11.0 and has been removed. Furthermore, the macro FLOAT_PAR has been removed.
Note that this change affects the compatibility. Read more.The minimum system requirements for HALCON library on armv7a-linux, x64-linux platform, and armv8-linux platforms have been increased to gcc 7 and glibc 2.27.
Note that this change affects the compatibility. Read more.
OCR
HALCON has been extended with an operator tuple_str_distance that calculates the edit distance between strings.
Parallelization
HALCON's automatic operator parallelization can now use more than 64 cores when running Windows 11 or Windows Server 2022.
Region
The Extension Package Programmer's Manual now explains more details of the HSetExtendedErrorInfo function and also mentions the related HSetExtendedErrorInfoF function.
On August 24, 2022, a security vulnerability found in 6th through 11th generations of consumer and 1st through 4th generations of Xeon Intel x86-64 microprocessors has been reported to INTEL (CVE-2022-40982). To resolve the vulnerability, microcode updates have been released that significantly reduce the performance of HALCON operators that make use of gather instructions. To mitigate the performance impact of the microcode updates, many affected HALCON operators have been revised.
On startup, HALCON now automatically detects if the used CPU is affected and prefers the usage of alternative implementations without gather instructions. To query the recommendation of HALCON, get_system has been extended with the new parameter 'avx2_gather_recommended'. If the old implementations with gather instructions is desired (e.g., for unpatched CPUs), set_system now has the new parameter 'avx2_gather_enable' to control whether AVX2 gather instructions should be used or not. 'avx2_gather_enable' is also available for get_system to query the current status.
HALCON automatically sets 'avx2_gather_enable' to 'false' for AMD CPUs Zen1 and Zen2 because of their poor performance with gather instructions.The following operators are affected by the security vulnerability and have been revised to either mitigate the performance impact or improve the performance compared to previous HALCON versions:
- map_image
is now faster for maps of type 'bilinear‘ and 'coord_map_sub_pix‘ for byte and uint2 images. The
slowdown on patched CPUs (up to −70%) has been compensated completely and a speedup of up to 25%
(byte) and 30% (uint2) compared to previous HALCON versions can be expected.
For unpatched CPUs that enable the gather instructions or for unaffected CPUs, a speedup of up to 40% can be expected. This only applies to image sizes/maps that do not require HALCON XL.
- affine_trans_image, affine_trans_image_size,
zoom_image_factor (if
the ScaleWidth and ScaleHeight are not exactly 0.5), zoom_image_size (if the
output image size is not half the input image size), rotate_image (for angles not
multiples of 90 degrees), and crop_rectangle2 with
AlignToAxis set to 'true' and system parameter 'int_zooming' set to 'true' have been revised for
interpolation 'bicubic' for all available image types ('byte', 'int2', 'uint2', and 'real') on
processors that support AVX2 to mitigate the −70% slowdown.
For images of type 'byte' and 'int2', the operators are up to 20% faster, for images of type 'uint2', the operators are up to 25% faster and for images of type 'real', a speedup of up to 40% can be expected when compared to previous HALCON versions for patched CPUs. For unaffected or unpatched CPUs, a speedup of up to 5% for images of type 'int2', a speedup of up to 10% and for images of type 'real', a speedup of up to 15% can be expected when compared to previous HALCON versions.
- affine_trans_image, affine_trans_image_size, zoom_image_factor (if the ScaleWidth and ScaleHeight are not exactly 0.5), zoom_image_size (if the output image size is not half the input image size), rotate_image (for angles not multiples of 90 degrees) and crop_rectangle2 with AlignToAxis set 'true' and system parameter 'int_zooming' set to 'true' have also been revised for interpolations 'bilinear', 'constant', and 'weighted' on processors that support AVX2 to mitigate the up to −70% slowdown. The same holds for gen_gauss_pyramid using interpolation 'constant' and 'weighted' for images of type 'uint2', when the Scale is not exactly 0.5. The slowdown of images of type int2 and uint2 could not be compensated entirely and are now up to −20% slower than with an unpatched CPU. For images of type real, the performance is mostly equal for patched CPUs, with a slowdown of up to −15%.
- zoom_image_factor (if the ScaleWidth and ScaleHeight are exactly 0.5), zoom_image_size (if the output image size is half the input image size) have been revised for interpolation method 'bicubic', 'bilinear', and 'none' on processors that support AVX2 to mitigate the up to −65% slowdown. HALCON 24.05 is now faster by up to 20% for images of type 'real' compared to previous versions. For newer Intel generations that are not affected, the speedup can be up to 30%.
- rotate_image (for angles of 90 and 270 degrees) has also been revised for all supported interpolation types for images of type 'byte' on processors that support AVX2 to mitigate the up to −65% slowdown. Even with an installed microcode update, the performance is identical or slightly faster when compared with an unpatched CPU.
- projective_trans_image
and projective_trans_image_size
with system parameter 'int_zooming' set to 'true' have also been revised for interpolations
'bilinear' on processors that support AVX2 to mitigate the up to −55% slowdown.
The slowdown of images of type uint2 could not be compensated entirely, and is now up to −20% slower than with an unpatched CPU. For images of type real, the slowdown is slightly less and is up to −10% slower than without a microcode update.
- polar_trans_image_ext with system parameter 'int_zooming' set to 'true' has been revised for interpolation 'bilinear' for images of type 'int2' and 'uint2' on processors that support AVX2 to mitigate the −50% slowdown. Although the slowdown could not be compensated entirely, the performance regression is now only up to –20%.
- derivate_gauss has been revised for all supported image types and the performance regression of up to −20% due to a microcode update could almost entirely be fixed with a remaining slowdown of about −5% for images with full domain. As a result of this, edges_color, edges_color_sub_pix and edges_sub_pix for images of type 'byte' and 'uint2' for Filter 'canny', points_foerstner for Smoothing 'gauss', critical_points_sub_pix for Filter 'gauss' and 'facet' and all supported image types, local_max_sub_pix and local_min_sub_pix for Filter 'gauss' and 'facet' and all supported image types and saddle_points_min_sub_pix for Filter 'gauss' and 'facet' have been affected in an identical or slightly less manor.
- find_planar_calib_deformable_model has been revised on processors that support AVX2 to mitigate the up to −10% slowdown. The slowdown could be compensated entirely.
- gen_grid_rectification_map has been revised for images of type 'byte' and 'uint2' on processors that support AVX2 to mitigate the up to −45% slowdown. Although the slowdown could not be compensated entirely, the performance regression is now only up to –20%.
- binary_threshold has been revised for images of type 'byte' on processors that support AVX2 for Method 'smooth_histo' to mitigate the up to −45% slowdown. Although the slowdown could not be compensated entirely, the performance regression is now only up to –20%.
- histo_to_thresh has been revised for absolute histograms with 256 values on processors that support AVX2 to mitigate the up to −60% slowdown. The slowdown could not be compensated entirely, the performance regression is now only up to –30%.
- determine_shape_model_params and determine_ncc_model_params have been revised for images of type 'uint2' on processors that support AVX2 to mitigate the up to −10% slowdown. The slowdown could be compensated entirely.
- create_shape_model, create_scaled_shape_model and create_aniso_shape_model have been revised for Templates of type 'uint2' on processors that support AVX2 to mitigate the up to −20% slowdown. HALCON 24.05 is now faster by up to 15% compared to previous versions.
Although not affected by the security vulnerability, many HALCON operators have been sped-up:
- affine_trans_image, affine_trans_image_size, zoom_image_factor (if the ScaleWidth and ScaleHeight are not exactly 0.5), zoom_image_size (if the output image size is not half the input image size), rotate_image (for angles not multiples of 90 degrees) and crop_rectangle2 with AlignToAxis set 'true' with system parameter 'int_zooming' set to 'true' for interpolation 'bilinear', 'constant', and 'weighted', on processors that support AVX2 are now up to 35% faster for affected CPUs and up to 60% faster for newer, unaffected CPUs for images of type 'byte'. The same holds for gen_gauss_pyramid using interpolation 'constant' and 'weighted' for images of type 'byte', when the Scale is not exactly 0.5.
- affine_trans_region with system parameter 'int_zooming' set to 'true' is now up to 35% faster for affected CPUs and up to 65% faster for newer, unaffected CPUs for interpolation 'constant' on processors that support AVX2.
- projective_trans_image, projective_trans_image_size, and projective_trans_region with system parameter 'int_zooming' set to 'true' for interpolation 'bilinear' on processors that support AVX2 are now up to 70% faster for affected CPUs and up to 60% faster for newer, unaffected CPUs for images of type 'byte'.
- gen_bundle_adjust_mosaic and gen_projective_mosaic are now up to 70% faster for images of type 'byte' for affected and patched CPUs while the speedup for newer, unaffected CPUs is up to 60%, when compared to HALCON 23.05.
- A speedup of 10% on average can be expected for the robust PQI, i.e., for the print quality inspection if 'quality_isoiec15415_decode_algorithm' is set to 'robust' using set_data_code_2d_param.
- polar_trans_image_ext with system parameter 'int_zooming' set to 'true' for interpolation 'bilinear' on processors that support AVX2 are now up to 35% faster for affected CPUs and up to 45% faster for newer, unaffected CPUs for images of type 'byte'.
- create_shape_model, create_scaled_shape_model, and create_aniso_shape_model are now up to 20% faster for affected CPUs and up to 25% faster for newer, unaffected CPUs on processors that support AVX2 for Templates of type 'byte'.
- map_image
is now faster for maps of type 'bilinear‘ and 'coord_map_sub_pix‘ for byte and uint2 images. The
slowdown on patched CPUs (up to −70%) has been compensated completely and a speedup of up to 25%
(byte) and 30% (uint2) compared to previous HALCON versions can be expected.
The following operators now support parameter broadcasting, where input tuples of length 1 are automatically extended and used for all created elements:
gen_circle, gen_circle_sector, gen_ellipse, gen_ellipse_sector, gen_rectangle1, gen_rectangle2, gen_circle_contour_xld, gen_cross_contour_xld, gen_ellipse_contour_xld, gen_rectangle2_contour_xld, gen_box_object_model_3d, gen_sphere_object_model_3d, and gen_sphere_object_model_3d_center
The new operator test_region_points can be used to query which points are contained in one or more regions. Contrary to test_region_point, the test result is returned for each tested point individually. The operator supports parameter broadcasting, with either a single region and multiple points, multiple regions and a single point, or multiple regions and multiple points.
System
The HALCON third-party library OpenSSL has been updated to OpenSSL 3. Previously, OpenSSL 1.1 was used. The docker example examples/docker/halcon-application/ has been adapted to use Ubuntu 22.04, which supports OpenSSL 3 by default.
Note that this change affects the compatibility. Read more.
open_socket_connect now allows setting the "Server Name Indication" (RFC 6066) for TLS sockets using the generic parameter 'tls_sni'.
get_system_info now supports all parameters that get_system supports.
set_system and get_system have been extended with the parameter 'enable_neon'. This parameter controls whether NEON operations are used to accelerate selected image processing operators.
Additionally, get_system has been extended with the parameter 'neon_supported'. This parameter indicates if the processor supports NEON operations.send_data and receive_data have been extended with support for the data type 'memory_block'.
On Windows, HALCON 22.11 added usage of the mimalloc memory allocator (see https://microsoft.github.io/mimalloc for more details) to improve performance in some specific cases. However, this change increased overall memory consumption for all cases. As a result, mimalloc can now be disabled with set_system's new 'memory_allocator' parameter. Additionally, the mimalloc memory allocator is now also available for Linux.
Tools
distance_pp, distance_ps, distance_pl, distance_sl, distance_ss, angle_ll, angle_lx, and projection_pl have been extended to support parameter broadcasting of the form 1:N and N:1, where each argument can have length N or 1. Additionally, the operators are now automatically parallelized. Finally, the operator distance_pp is now faster by up to 27% for longer input tuples.
The following operators now support parameter broadcasting, where input tuples of length 1 are automatically extended and used for all created elements: area_intersection_rectangle2, distance_pr, distance_lr, distance_sr, distance_sc, distance_lc, distance_cc_min, distance_cc_min_points, and distance_cc
Note that this change affects the compatibility. Read more.
Tuple
HALCON has been extended with the operator tuple_str_replace, which replaces all occurrences of a substring in a string. It is also available as inline operation str_replace.
HALCON has been extended with the operators tuple_repeat and tuple_repeat_elem:
- tuple_repeat computes the iterated concatenation of a tuple to itself.
- tuple_repeat_elem replaces every element in a tuple by a given number of copies of itself.
The control tuple datatype now supports a copy-on-write mechanism. This increases the processing speed when copying or accessing tuple elements, especially when dealing with long tuples. As a consequence, the processing of dictionaries is accelerated if long tuples are included.
The access on the key table of HALCON dictionaries is now thread safe. See the reference documentation of create_dict for more details.
set_dict_tuple can now set multiple keys at the same time. For this, either a single value can be passed, which will be used as value for all keys, or a tuple of values, one for each key. This also applies to dict assignment expressions.
XLD
The new operator intersection_region_contour_xld can be used to select those parts of a contour XLD that intersect with a region.
Bug Fixes
3D
get_stereo_model_param sometimes leaked memory in case it raised an error. This problem has been fixed.
max_diameter_object_model_3d, smallest_sphere_object_model_3d, smallest_bounding_box_object_model_3d, convex_hull_object_model_3d, distance_object_model_3d, and select_object_model_3d leaked memory when used with the parameters 'diameter_object' or 'diameter_bounding_box'.
prepare_object_model_3d leaked memory when used with the parameter 'distance_computation'.
In some cases, triangulate_object_model_3d, intersect_plane_object_model_3d, register_object_model_3d_pair, register_object_model_3d_global, and sample_object_model_3d also were affected. These problems have been fixed.write_object_model_3d accessed invalid memory in rare cases. This problem has been fixed.
reconstruct_surface_stereo did not support OpenCL compute devices when 'disparity_method' was set to 'binocular_ms'. This problem has been fixed.
On Windows, reading 3D STL files that are larger than 2 GB with read_object_model_3d did not always work. This problem has been fixed.
intersect_plane_object_model_3d, convex_hull_object_model_3d, register_object_model_3d_pair, and register_object_model_3d_global sometimes delivered erroneous results for input models of primitive type 'cylinder'. This problem has been fixed.
get_object_model_3d_params with the generic parameter 'has_points' returned 'true' for models created with empty XYZ mappings, which do not have any points. This problem has been fixed. Now, 'has_points' only returns 'true' if the 3D Object Model has at least one point.
intersect_plane_object_model_3d crashed when using multiple input object models, when a model containing polygons was followed by a model without polygons. This problem has been fixed.
affine_trans_object_model_3d copied primitives without modification. affine_trans_object_model_3d and rigid_trans_object_model_3d copied precomputed data structures for 3D distance computation without modification. These problems have been fixed. Now, these attributes are not copied anymore.
Note that this change affects the compatibility. Read more.disp_object_model_3d, object_model_3d_to_xyz, render_object_model_3d, and other visualizations of 3D object models using OpenGL sometimes produced no output if a 3D object model contained many points. This problem has been fixed.
sample_object_model_3d threw an error with 3D primitives as input models when using methods furthest_point or furthest_point_compute_normals. However, the reference stated that the method is ignored for 3D primitives. This problem has been fixed. Now, the operator ignores the method and does not throw an error.
add_deformable_surface_model_sample, create_surface_model and create_deformable_surface_model in rare cases leaked memory when they raised an error. This problem has been fixed.
triangulate_object_model_3d with Method set to 'greedy' sometimes leaked memory when it raised an error. This problem has been fixed.
find_surface_model and find_deformable_surface_model could leak memory in rare error cases. This problem has been fixed.
disp_object_model_3d and render_object_model_3d leaked memory in some error cases. This problem has been fixed.
get_stereo_model_param sometimes leaked a small amount of memory in case it raised an error. This problem has been fixed.
read_object_model_3d sometimes leaked memory when reading a dxf file. This problem has been fixed.
When copying a 3D object model that was prepared for shape matching, small amounts of memory would leak. This issue has been fixed.
max_diameter_object_model_3d leaked memory in some error cases. This problem has been fixed.
moments_object_model_3d sometimes leaked memory when it raised an error. This problem has been fixed.
area_object_model_3d sometimes leaked memory when it raised an error. This problem has been fixed.
volume_object_model_3d_relative_to_plane leaked memory in some cases. This problem has been fixed.
read_deformable_surface_model could leak memory in some cases. This problem has been fixed.
When setting symmetry poses of a surface model using the parameter 'symmetry_poses' of set_surface_model_param, the surface model leaked a small amount of memory when cleared. This problem has been fixed.
get_structured_light_model_param leaked memory in some error cases. This problem has been fixed.
prepare_object_model_3d with the parameter Purpose set to 'distance_computation' leaked memory in some cases. This problem has been fixed.
Displaying a scene containing a cylinder model with display_scene_3d or render_scene_3d leaked this model. This problem has been fixed.
read_object_model_3d for files of format 'dxf' leaked memory in some cases. This problem has been fixed.
edges_object_model_3d crashed in rare cases if the input 3D object model did not contain points. This problem has been fixed.
gen_camera_setup_object_model_3d sometimes returned unintuitive cones for ConeLength= 'auto', and wrong cones for image-side telecentric cameras. This problem has been fixed.
uncalibrated_photometric_stereo returned pixels with the value NaN in the output NormalField and Gradient images in rare cases. This problem has been fixed. Now, in case the reconstruction for some pixels cannot be calculated, the pixels of the resulting NormalField and Gradient are set to 0.
intersect_plane_object_model_3d did not report an error if the 'Plane' parameter was of the wrong type. This problem has been fixed.
convex_hull_object_model_3d, triangulate_object_model_3d, intersect_plane_object_model_3d, register_object_model_3d_pair, and register_object_model_3d_global behaved inconsistently for infinite primitives of type cylinder or plane. Depending on the input data, the operators returned different errors (9203, 9511, 9514, 9515, 9517) or incorrect results. This problem has been fixed. Now, the operators return error 9526 ("Primitive in 3D object model has no extended data") for infinite primitives.
Note that this change affects the compatibility. Read more.create_deformable_surface_model could crash in rare cases if complex geometric objects were used with a small relative sampling distance. This problem has been fixed.
For models of type '3d_gripping_point_detection', optimize_dl_model_for_inference produced incorrect results if 'calibration_precisions' were used as precision (e.g., 'int8'). This problem has been fixed.
When processing 3D object model data with an excessive number of points using prepare_object_model_3d using 'gen_xyz_mapping' and 'xyz_map_width', or 'xyz_map_height' parameters, a corrupted 3D object model might have been generated. This problem has been fixed. Now, an error will be raised if the parameters are not suitable for the given number of 3D points.
project_3d_point and other operators that must compute the lens distortion, using the polynomial model, in rare cases returned erroneous coordinates for the distorted point. This problem has been fixed. In these cases, the error 8406 ("Point cannot be projected") is now returned.
segment_object_model_3d did not work correctly or crashed, when the input 3D object model had been created using triangulate_object_model_3d with GenParamName set to 'xyz_mapping_max_view_angle'. This problem has been fixed.
read_object_model_3d leaked memory when reading a DXF file containing a circle and/or an arc. This problem has been fixed.
reset_sheet_of_light_model sometimes crashed after calling apply_sheet_of_light_calibration. This problem has been fixed.
Bar Code
set_bar_code_param and set_bar_code_param_specific could crash if values of unexpected type were used for certain parameters. In particular, parameters expecting strings as input were affected. This problem has been fixed.
The quiet zone check settable via set_bar_code_param did not correctly work if the successful decode was based on the 'small_elements_robustness' feature. In these cases, the quiet zone check could invalidate correct decodes even though the quiet zone was completely free of any defects. This problem has been fixed.
Some PharmaCode barcodes could not be read if the ratio of the number of wide bars to the number of narrow bars was extremely large. This problem has been fixed.
In some cases, find_bar_code could decode barcodes by using edges outside the specified reduced image domain. This problem has been fixed. Now, edges outside the image domain will never be used for the decoding attempt.
In some cases, get_bar_code_result and get_bar_code_object could fail to return the correct status and objects for a successfully decoded candidate. This problem has been fixed.
find_bar_code did not always use the correct gray values as reference for the bar/space classification during the decoding step if the 'merge_scanlines' feature was used. This problem has been fixed. Note that the change can lead to slightly different decoding performance in rare cases.
In some cases, find_bar_code in training mode, get_bar_code_result, and get_bar_code_object leaked memory if 'merge_scanlines' decoding attempts were enabled. This problem has been fixed.
find_bar_code could leak memory in error, timeout, or other interruption cases. This problem has been fixed.
In very rare cases, it could happen that find_bar_code did not consider all successfully decoded results for the composite code detection, if 'composite_code' was set to 'CC-A/B'. This problem has been fixed.
read_bar_code_model, write_bar_code_model, serialize_bar_code_model, and deserialize_bar_code_model did not consider the bar code model parameter 'quiet_zone'. This problem has been fixed. Now, the quiet zone value is correctly read, written, serialized, and deserialized, respectively.
The Aztec Code reader returned a FNC1 at first position in the DecodedDataStrings and in 'decoded_data' obtained by get_data_code_2d_results. This problem has been fixed.
In very rare cases, find_bar_code could crash if a candidate was successfully decoded by the 'small_elements_robustness' feature with activated quiet zone check, even though not a single edge pair could be detected on the original scanlines. This problem has been fixed.
set_bar_code_param and set_bar_code_param_specific could alter the model even if the operator call failed. The reason was that all valid parameters were parsed until an invalid pair was reached. This problem has been fixed. Now, the model is only adjusted if the set_bar_code_param/set_bar_code_param_specific call completes successfully. Furthermore, certain dependency issues between parameters such as 'bar_code_width_min'/'bar_code_width_max' have been fixed, which could occur if both were set in one call.
GS1 codes with two-digit application identifiers and only one-digit content were not decoded correctly. This problem has been fixed.
Calibration
binocular_calibration, get_calib_data, and set_calib_data_calib_object leaked memory in some error cases. This problem has been fixed.
query_calib_data_observ_indices could leak memory if the results were empty. This problem has been fixed.
find_calib_object leaked memory in case of an error. This problem has been fixed.
find_calib_object leaked a small amount of memory in some cases. This problem has been fixed.
set_stereo_model_image_pairs leaked memory in some error cases. This problem has been fixed.
calibrate_hand_eye sometimes did not raise an error when a needed calib_obj_pose was missing from the data but returned a wrong result. get_calib_data sometimes did not raise an error when a needed calib_obj_pose was missing from the data or returned the error 8458 ("Invalid calibration object index"). Now, calibrate_hand_eye returns the error 8467 ("Incomplete observation data"), get_calib_data returns the error 8459 ("Invalid calibration object pose index"). This problem has been fixed.
Note that this change affects the compatibility. Read more.get_calib_data sometimes returned wrong or undefined results when DataName was an array with more than one entry, containing 'hand_eye_calib_error'. This problem has been fixed.
The HDevelop example program hdevelop/Applications/Robot-Vision/pick_and_place_with_2d_matching_moving_cam.hdev did not correctly rectify the model images for matching and robot approach poses. This problem has been fixed.
Classification
get_params_class_knn could leak memory in case of error. This problem has been fixed.
read_texture_inspection_model could leak some memory if the operator exited with an error. This problem has been fixed.
Color Processing
When transforming byte images using trans_from_rgb or trans_to_rgb from or to the 'cielab' colorspace, the a and b channels were handled slightly incorrect due to a value scaling error. This problem has been fixed.
create_color_trans_lut caused a small memory leak. This problem has been fixed.
Data Code
In very rare cases, the grid determination in find_data_code_2d could fail for Data Matrix ECC 200 Codes. This problem has been fixed.
The Aztec Code reader decoded codes with less than 3 words for error correction. These codes do not conform to ISO/IEC 24778:2008 and reading codes with less than 3 words for error correction increases the probability of a false read. This problem has been fixed and the Aztec Code reader now only reads conforming codes with at least 3 words for error correction.
get_data_code_2d_results in some cases crashed for (Micro) QR Code models if the result parameter 'orientation' was used together with other parameters. This problem has been fixed.
The ECC 200 reader returned false positives in very rare cases. This problem has been fixed.
get_data_code_2d_results in some cases returned an incorrect number of values if the result parameters 'gs1_lint_result' or 'gs1_lint_passed' were used together with other parameters. This problem has been fixed. Further, the error 8827 ("One of the parameters returns several values and has to be used exclusively for a single candidate") is now returned if the parameter 'gs1_lint_result' is not queried exclusively for one result.
The DataMatrix reader in rare cases leaked a small amount of memory. This problem has been fixed.
find_data_code_2d crashed if the image width or image height exceeded the maximum image size allowed with small modules robustness set to 'high'. This problem has been fixed.
get_data_code_2d_results and get_data_code_2d_objects in some cases returned wrong result parameters 'status', 'corr_coded_data', 'raw_coded_data', 'bin_module_data' and wrong result objects 'module_0_rois'/'module_1_rois' for candidates that could not be decoded. This problem has been fixed.
In some cases, find_bar_code in training mode, get_bar_code_result, and get_bar_code_object leaked memory if 'merge_scanlines' decoding attempts were enabled. This problem has been fixed.
find_data_code_2d leaked a small amount of memory for Aztec Codes. This problem has been fixed.
In rare cases, get_data_code_2d_results leaked memory for the parameter 'quality_isoiec15415_additional_reflectance_check'. This problem has been fixed.
For DotCode symbols, find_data_code_2d could run into a division-by-zero issue if candidates were detected with dot-like structures very close to the image boundaries. This problem has been fixed.
For DotCode symbols, find_data_code_2d could run into the internal error 3513 ("Internal error: number of chords too big for num_max") due to an insufficient number of chords. This problem has been fixed.
find_data_code_2d with Data Matrix ECC 200 codes in rare cases returned the error 3513 ("Internal error: number of chords too big for num_max"). This problem has been fixed.
Calling find_data_code_2d with the set_system parameter 'database' set to true could cause HALCON to hang or crash. This problem has been fixed.
For the DataMatrix ECC 200 symbol type, the 'trained' state of the parameter 'contrast_tolerance' was not considered during serialize_data_code_2d_model or write_data_code_2d_model. This problem has been fixed.
In rare cases, the modules obtained by get_data_code_2d_objects with `module_1_rois' or 'module_0_rois' were mirrored if 'finder_pattern_tolerance' was set to 'any' or 'high' and 'mirrored' was set to 'any'. This problem has been fixed.
get_data_code_2d_results returned the raw_coded_data of Micro QR Codes without the error correction words. This problem has been fixed. Furthermore, the raw_coded_data and the corr_coded data is now returned in packed bytes by get_data_code_2d_results for Micro QR Codes.
The Micro QR Code reader crashed in rare cases. This problem has been fixed.
find_data_code_2d identified PDF417 and Aztec symbols twice in very rare cases. This problem has been fixed.
The QR Code parameter 'position_pattern_min' was trained when calling find_data_code_2d with parameter 'train' set to 'all' even though it was not documented as a trainable parameter. Further, query_data_code_2d_params did not return it in the list of 'trained' parameters. These problems have been fixed. Now, 'position_pattern_min' is documented as trainable for QR Code models and can be trained as single parameter or together with other parameters (including 'all').
The Aztec Code reader returned a FNC1 at first position in the DecodedDataStrings and in 'decoded_data' obtained by get_data_code_2d_results. This problem has been fixed.
query_data_code_2d_params returned the name of a parameter that is not used anymore. This problem has been fixed.
Due to an insufficiency of the reference decode algorithm for rectangular Data Matrix ECC 200 codes with a small number of modules in the short direction (e.g. 8x..), print quality inspection (ISO/IEC 15415) with 'quality_isoiec15415_decode_algorithm' set to 'reference' could have failed, even for nearly perfect codes. This problem has been fixed.
set_data_code_2d_param and find_data_code_2d accept strings as input for many numerical or boolean GenParamValues. However, the internal conversion mechanism did not reliably catch all conversion errors. This problem has been fixed. Additionally, for the DotCode, the error codes of find_data_code_2d have been changed if a wrong GenParamName or wrong GenParamValue are used. The new error codes are in accordance with the other 2D symbols: a wrong value leads to 8830 ("Invalid parameter value") and a wrong name to 8831 ("Unknown parameter name").
set_data_code_2d_param and find_data_code_2d accepted values of different types, which could lead to an overflow, unexpected narrowing conversion, or were simply not supported. However, the internal parsing mechanism did not reliably catch all errors. This problem has been fixed. Now, an extended error message will be thrown informing the user about bad input values.
find_data_code_2d, gray_closing_shape, gray_dilation_shape, gray_erosion_shape, and gray_opening_shape showed a significant slowdown on armv7a and aarch64. This problem has been fixed.
The reference decoding algorithm, which can be activated via set_data_code_2d_param using the generic parameter 'quality_isoiec15415_decode_algorithm' and the associated value 'reference', did not inform the user in case that the grid determination failed, but instead used a fallback mechanism leading to a fixed grid. This problem has been fixed. Now, quality grades equal to -1 will be returned if the reference decoding algorithm is not applicable. In these cases, we suggest using the 'robust' mode instead.
The ranges specified for certain parameters of set_data_code_2d_param, set_bar_code_param, and set_bar_code_param_specific were not always checked. This problem has been fixed. Now, values outside the documented range will throw an error. However, there are exceptions, where no error will be thrown, in favor of usability.
GS1 codes with two-digit application identifiers and only one-digit content were not decoded correctly. This problem has been fixed.
The Data Matrix ECC 200 code reader had a problem detecting the correct symbol size for codes with strongly different module dimensions. The mentioned issue could also impact print quality results. This problem has been fixed.
The MicroQR code reader crashed in rare cases. This problem has been fixed.
The DotCode reader may have rejected good candidates due to too few dots located at the symbol boundary. This problem has been fixed.
If 'mirrored' was set to 'any' via set_data_code_2d_param, get_data_code_2d_objects returned incorrect 'module_0_rois' and 'module_1_rois' for non-decodable QR-code candidates. This problem has been fixed.
For DotCode symbols, find_data_code_2d leaked memory when called in training mode. This problem has been fixed.
read_data_code_2d_model leaked memory when reading model files generated with HALCON 6.1 or earlier. This problem has been fixed.
find_data_code_2d in some cases caused a memory leak in subsequent operator calls for Aztec Code symbols when used in training mode. This problem has been fixed.
Deep Learning
Global Context Anomaly Detection (GC-AD) models could not be optimized correctly to HAILO-8 AI² Plugin and hardware. This hardware only allows int8 calibration precision. The calibration result showed faulty anomaly images, which led to very poor segmentation results and incorrect classification results. This problem has been fixed. Now, optimize_dl_model_for_inference converts the GC-AD models so that the quantitative results are very similar to full precision float32 models. It is necessary to calibrate GC-AD models with the new version again using optimize_dl_model_for_inference. It is also necessary to adjust the classification/segmentation thresholds for best results after calibration.
Note that this change affects the compatibility. Read more.Setting the parameter 'angle_step' of a deep counting model via set_deep_counting_model_param was not possible as long as the 'angle_start' and 'angle_end' parameters were on default values (0.0). This problem has been fixed.
The procedure set_dl_model_param_max_gpu_batch_size has become obsolete since the cuDNN update in HALCON 23.11. The reason for this is that the selected cuDNN algorithms are not always the same, and therefore, the memory used by them is not deterministic anymore. The procedure has been set to legacy and is not used anymore in the examples. The operator set_dl_model_param with a suitable 'batch_size' should be used instead.
set_dl_model_param leaked memory for the parameter 'device' if the model device was an AI2 device and it was changed to a standard CPU- or GPU-device. This problem has been fixed.
When running GC-AD inference and calculating the anomaly score for very big images, an error "DL Internal Error" was thrown. This problem has been fixed.
get_dl_model_layer could crash if layers were requested in a different order than they appeared in the network graph. This problem has been fixed.
apply_deep_ocr returned wrong detection results when called with multiple images of different size. This problem has been fixed.
train_dl_model_batch leaked memory if a model with a permutation layer was trained on the CPU. This problem has been fixed.
set_dl_model_param could crash or return an error if the given model was created with get_dl_model_layer and create_dl_model under very specific circumstances. The issue only occurred if the device of a model used in get_dl_model_layer was initialized. Further, the issue only occurred if set_dl_model_param was called for the created model before initializing its device and the parameter name was 'input_dimensions', 'image_dimensions', 'image_size', 'image_width', or 'image_height'. This problem has been fixed.
In some rare cases when deep learning operators could not access the CUDA functionality for some reason, the subsequent operator call could wrongly display an unrelated extended error information about the CUDA functionality in case of failure. This problem has been fixed.
create_dl_layer_loss_focal did not check the size of the parameter ClassWeights correctly and failed for the default value []. This problem has been fixed.
If the 'solver_type' of a deep learning model was set to 'adam' and then back to 'sgd' to allow reading with versions older than HALCON 22.05, this forward compatibility was broken. This problem has been fixed. Now, deep learning models can be read with older versions as long as the 'solver_type' is changed back to 'sgd'.
Code Export
Using HDevelop via command line, e.g., for hdevelop -convert operations, did not properly return floating licenses. This problem has been fixed.
The C export of dev_open_window did not work when the background color was not a constant value literal. This problem has been fixed.
GUI
HALCON has been extended with the public procedure get_image_dir. This procedure returns the directories that will be searched by HALCON when reading images (e.g., with read_image or read_sequence). This may include but is not limited to the contents of the HALCONIMAGES environment variable and the local directory.
Example programs now use get_image_dir instead of manually constructing the path using the example directory.Reduce layers produced an error if all given axes already had a dimension of 1. This problem has been fixed. Reduce layers now behave like an Identity in this special case.
query_available_dl_devices internally initialized both HALCON runtimes (CPU and GPU) together, even if only one of them was requested in the generic parameters. This behavior has been optimized.
Models containing a zoom layer could fail during optimization when combined with certain input sizes. Affected pretrained models were:
- initial_dl_anomaly_large.hdl
- initial_dl_anomaly_medium.hdl
- pretrained_deep_ocr_detection_compact.hdl
- pretrained_deep_ocr_detection.hdl
- pretrained_dl_3d_gripping_point.hdl
- pretrained_dl_anomaly_global_context.hdl
- pretrained_dl_edge_extractor.hdl
- pretrained_dl_segmentation_compact.hdl
- pretrained_dl_segmentation_enhanced.hdl
This problem has been fixed.
When using a Hailo device, certain model parameters could not be set on optimized models. Now, supported parameters can be adjusted after calling optimize_dl_model_for_inference on Hailo devices without re-running the optimization.
Further, it was possible to change the number of classes after calling optimize_dl_model_for_inference, which resulted in an error during inference. This problem has been fixed.read_deep_ocr, read_deep_counting_model, and deserialize_handle could behave unexpectedly when passing them the wrong handle type or a corrupt one, because no handle type check was done for DeepOCR and DeepCounting handles during deserialization. This problem has been fixed. Now, an error is raised if the handle type does not match the expected one.
For DL object detection models with 'max_overlap' or 'max_overlap_class_agnostic' set to 0, only a single box was predicted per class or per image, respectively, even if other boxes were not overlapping. This problem has been fixed.
Note that this change affects the compatibility. Read more.The augmentation 'rotate_range' of the Deep OCR recognition training raised an exception in augment_dl_samples. This problem has been fixed.
The error messages that can occur when using the parameter 'type' in set_dl_model_param have been improved to be more descriptive.
In rare cases, apply_dl_model could have returned unnecessary intermediate outputs if the model was created with create_dl_model. This could have happened only if the model has intermediate nodes that are connected to multiple outputs and the intermediate node is directly connected to one or more losses or dropout layers. None of the pretrained models is affected by this issue. This problem has been fixed.
Saving HALCON Deep OCR models was not possible in the variable window. Saving HALCON DL Models resulted in an unreadable file. This problem has been fixed.
The augmentation method 'saturation_variation', for Deep-OCR recognition models, was wrongly supported by the procedure augment_dl_samples. This problem has been fixed.
Note that this change affects the compatibility. Read more.The output dictionary of apply_dl_model on custom deep-learning models, with a depthmax layer of mode 'arg_and_value' at the end of the network, did not contain the key for the first output. This problem has been fixed.
The procedures read_dl_dataset_anomaly and read_dl_dataset_segmentation could have failed for image directories, containing characters with special meaning in regular expressions. This problem has been fixed.
The example deep_ocr_recognition_training_workflow.hdev did not use the proper test images in step 5.) DEEP OCR INTEGRATION AND INFERENCE. This problem has been fixed.
If a deep learning dataset contained big numbers as class IDs some procedures have used too much memory. The following procedures have been affected by this issue: read_dl_dataset_from_coco, split_dl_dataset. This problem has been fixed. The public procedure create_dl_class_id_mapping has been added to support a memory efficient mapping of class IDs even if the IDs are big integer values.
The procedure check_dl_gc_anomaly_scores_normalization threw the error 2105 ("Access to undefined gray value component") if it was called for a model that had been optimized with optimize_dl_model_for_inference. This problem has been fixed.
In some cases, an ONNX DL model file could not be read if it contained a dropout operation. This problem has been fixed.
In some cases, read_dl_model failed for an ONNX model that contained a resize operation to zoom the input feature map by a given scale-factor. This problem has been fixed.
Changing the parameter recognition_alphabet with set_deep_ocr_param can fail if the parameter was set from a different thread. This only applied if the runtime of the recognition component was set to 'gpu'. This problem has been fixed.
After calling set_system('cudnn_deterministic', 'true'), train_dl_model_batch was not deterministic for runtime 'gpu' for object detection and semantic segmentation deep learning models. This problem has been fixed.
Setting the parameter 'anomaly_region_threshold' to a value could lead to an error in some scenarios. This problem has been fixed.
When using the DL Framework, it was possible to create a model for which not all output layers were connected to a loss. In those cases, using 'cpu' runtime, the operator train_dl_model_batch was throwing an error and thus the model could not be trained. This problem has been fixed.
The classification model 'pretrained_dl_classifier_resnet18.hdl' had slightly inconsistent initial values for the batch norm statistics. This should not have been a problem in applications, because the batch norm statistics are learned during finetuning to fit the new custom domain. This problem has been fixed.
Note that this change affects the compatibility. Read more.If apply_deep_ocr was aborted due to a timeout or a break event, there could have been a memory leak. This leak only occurred if the parameter 'tiling' of the Deep OCR handle was set to 'true'. This problem has been fixed.
read_dl_model leaked memory in some error cases. This problem has been fixed.
File
write_image_metadata leaked memory when EXIF tags were written to a TIFF file. Furthermore, read_image_metadata leaked memory when reading a tuple of tags and at least one tag could not be read. These problems have been fixed.
read_sequence could crash HALCON XL when reading very large binary images. This problem has been fixed.
json_to_dict and read_dict could not convert JSON arrays containing at least one JSON object to a tuple containing dicts when the option 'convert_json_arrays_to' was set to 'tuple' or 'tuple_if_possible'. This problem has been fixed.
An open file descriptor did not get closed and has been leaked, when an error occurred while using read_memory_block. This problem has been fixed.
Filter
gen_gauss_pyramid, zoom_image_size, and zoom_image_factor could produce wrong values along the right and bottom image borders for zoom factors equal to 0.5 and interpolation set to 'weighted' if the input images had odd dimensions. There could also be an effect for exhaustive_match_mg during the resolution pyramid creation. This problem has been fixed.
gen_gauss_pyramid, zoom_image_size, and zoom_image_factor did not respect rounding effects for byte, int2 and uint2 images for zoom factors equal to 0.5 and interpolation set to 'weighted'. There could also be an effect for exhaustive_match_mg during the resolution pyramid creation of byte images. This problem has been fixed.
gen_filter_mask leaked memory in case of an error. This problem has been fixed.
In rare cases, convol_image could raise error 3513 ("Internal error: number of chords too big for num_max") for non-rectangular input regions. This problem has been fixed.
segment_image_mser could return a memory management-related error for certain values of 'MinArea'. This problem has been fixed.
In parallel execution, edges_sub_pix could lead to non-deterministic results if the '_junctions' suffix was added to values of Filter. Furthermore, returned Edges could be duplicates in rare cases, i.e., they occurred more often than once in the result. These problems have been fixed.
optical_flow_mg returned the same VectorField when multiple images with the same reference were passed as input images, even when the other input images were different. This problem has been fixed.
zoom_image_size returned incorrect results for Interpolation 'weighted' on int2, uint2, and real images. Specifically, the 'constant' interpolation method was used instead of the required 'weighted' method. This problem has been fixed. Now, the correct interpolation method is used for all image types.
adjust_mosaic_images did not work correctly for 'uint2' images if the first image channel did not contain the maximum gray value among all image channels. This problem has been fixed.
Graphics
Displaying a scene containing a cylinder model with display_scene_3d or render_scene_3d leaked this model. This problem has been fixed.
HALCON could crash when displaying large vector fields with disp_obj or dev_display. This problem has been fixed.
When a drawing object was detached and as a consequence the next drawing object in a window was selected while the 'on_select' callback was registered for this drawing object, HALCON returned an error. This problem has been fixed.
Using the 'pixmap' or 'PostScript' window type leaked memory when HALCON was loaded and unloaded. This problem has been fixed.
set_drawing_object_params returned an error for very small rectangular drawing objects. This problem has been fixed.
Further, the signature of drawing object callback functions has not been updated to HALCON handles in the reference documentation. This problem has been fixed.
In buffer windows and in HDevelop graphics windows, get_mposition(_subpix) returned the state of the modifier keys even if no mouse button was pressed. This problem has been fixed and get_mposition(_subpix) now does not return the state of the modifier keys in this case.
For dev_set_draw_mode('margin'), the visualization of regions is limited to their contours. This interacted badly with the new pixel-grid feature, which overlayed the region contours and made them hard to see. This problem has been fixed.
draw_nurbs and draw_nurbs_mod leaked memory. This problem has been fixed.
Inspection
Due to numerical instabilities, the calculation of the value compared with aniso_scale_change_restriction could have failed in special cases to produce meaningful values for operators find_local_deformable_model, find_planar_calib_deformable_model, and find_planar_uncalib_deformable_model. This problem has been fixed.
Note that this change affects the compatibility. Read more.
Images
On Windows, reading memory blocks that are larger than 2 GB using read_memory_block could return an error. This problem has been fixed.
When using the set_system options 'extern_alloc_funct' or 'extern_free_funct' in conjunction with read_image to read a PNG file with alpha channel, the var_threshold operator or the concat_ocr_trainf operator resulted in a heap corruption error. This problem has been fixed.
convert_image_type rounded complex numbers incorrectly to signed integer types. This led to wrong conversion results for complex images with negative real part values. This problem has been fixed.
convert_image_type could overflow during the conversion from 'float'/'complex' type to signed integer types. This problem has been fixed.
convert_image_type did not clip the lower bound value of -0.5 for the type conversion from 'float'/'complex' to 'direction'. This problem has been fixed.
add_image_border did not adapt the system width and height correctly. This problem has been fixed.
zoom_image_factor was performing erroneous calculations for very big images in HALCON XL due to floating point errors. This problem has been fixed.
convert_image_type could crash for very large images in HALCON XL on 64-bit systems. This problem has been fixed.
The operator cooc_feature_matrix leaked small amounts of memory when an internal error occured. This problem has been fixed.
Identification
When training the Aztec Code reader, find_data_code_2d did not accept 'contrast' as parameter to be trained, instead it expected 'contrast_min'. This problem has been fixed, and both values are accepted now.
Matching
cluster_model_components, create_component_modelcreate_trained_component_model, deserialize_component_model, deserialize_training_components, get_component_model_tree, read_component_model, read_training_components, and train_model_components leaked memory or crashed in case of errors. This problem has been fixed.
Due to numerical instabilities, the calculation of the value compared with aniso_scale_change_restriction could have failed in special cases to produce meaningful values for operators find_local_deformable_model, find_planar_calib_deformable_model, and find_planar_uncalib_deformable_model. This problem has been fixed.
Note that this change affects the compatibility. Read more.In very rare cases and when using a very low 'min_score', some matching operators did not allocate enough memory for the top-level matching. This problem has been fixed.
find_local_deformable_model, find_planar_calib_deformable_model, and find_planar_uncalib_deformable_model crashed in rare cases when 'border_shape_model' was set to 'true' using set_system. This problem has been fixed.
find_shape_models, find_scaled_shape_models, find_aniso_shape_models and find_generic_shape_model behaved unexpectedly when searching multiple models with different values for border_shape_models. Only the last model of the search was considered for the value of 'border_shape_models'. This problem has been fixed. Now, 'border_shape_models' is true for all models if it is true for any of the models in a search. Additionally, this behavior is now specified in the reference manual entries of these operators.
Undefined behavior could happen during execution of operators find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, find_aniso_shape_models, find_generic_shape_model, find_shape_model_3d, and find_component_model when a domain for the search image was used. In very rare cases, this may have resulted in unexpected or slightly incorrect matching results. This problem has been fixed.
find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, find_aniso_shape_models, find_generic_shape_model, find_component_model, and find_shape_model_3d did not use the NEON optimized implementations. This problem has been fixed.
read_component_model leaked memory in case of an error. This problem has been fixed.
set_planar_uncalib_deformable_model_metric leaked memory in rare cases. This problem has been fixed.
find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, and find_aniso_shape_models could run into undefined behavior when using a pregenerated model with a model center outside the model region. This problem has been fixed. In rare cases, this can lead to runtime regressions.
Note that the change leads to a new shape matching file version. As a result, models created with this HALCON version cannot be read in by older HALCON versions.find_shape_models, find_scaled_shape_models, and find_aniso_shape_models returned overlapping instances of different models, although they should have been excluded based on the user-defined max_overlap, if the num_matches were set per model, too. This problem has been fixed.
train_model_components could leak memory in case of error. This problem has been fixed.
find_generic_shape_model suppressed correct matches when the option 'strinct_boundaries' is set to 'true'. This problem has been fixed.
The following operators estimated the maximum number of pyramid levels differently compared to when the user set a pyramid level:
cluster_model_components, create_aniso_shape_model, create_aniso_shape_model_xld, create_component_model, create_generic_shape_model, create_local_deformable_model, create_local_deformable_model_xld, create_ncc_model, create_planar_calib_deformable_model, create_planar_calib_deformable_model_xld, create_planar_uncalib_deformable_model, create_planar_uncalib_deformable_model_xld, create_scaled_shape_model, create_scaled_shape_model_xld, create_shape_model, create_shape_model_xld, create_trained_component_model, determine_deformable_model_params, determine_ncc_model_params, determine_shape_model_params, train_generic_shape_model, train_model_components
When the parameter NumLevels was set to 'auto' in the operator or in the corresponding matching model and the model region was almost the full domain of the model image, the number of pyramid levels was estimated too high. As a consequence, the estimated pyramid level was not settable by the user and matches may not have been found robustly. This problem has been fixed. Now, the maximum possible estimated pyramid level uses the same heuristic as a pyramid level set by the user.In rare cases, create_ncc_model estimated a small number of pyramid levels, although the model could be found on coarser pyramid levels as well, resulting in a very long runtime of find_ncc_model and find_ncc_models. This problem has been fixed. As a consequence, create_ncc_model might return a model with a different number of pyramid levels compared to previous versions.
find_generic_shape_model, find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, and find_aniso_shape_models were uninterruptible for huge numbers of matches and allowed deformation. This problem has been fixed.
read_shape_model did not consistently set the value of user-set parameters for shape models written with HALCON versions before 21.05. That is, the parameters queried with suffix '_param' using get_generic_shape_model_param were not consistent. This problem has been fixed.
Note that this change affects the compatibility. Read more.Using train_generic_shape_model_param with a shape model created by create_shape_model, create_shape_model_xld, create_scaled_shape_model, create_scaled_shape_model_xld, create_aniso_shape_model, or create_aniso_shape_model_xld reset the user-set search parameter 'min_contrast' and the model parameter 'contrast' if the models were generated using an XLD. This problem has been fixed.
Note that this change affects the compatibility. Read more.
Note that the change leads to a new shape matching file version. As a result, models created with this HALCON version cannot be read in by older HALCON versions.
find_generic_shape_model, find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, and find_aniso_shape_models suffered from a wrong offset when matches were not found on the last level with 'border_shape_model' set to true and allowed deformation. This problem could lead to erroneous match coordinates and has been fixed.
determine_shape_model_params and create_scaled_shape_model returned different estimated scaling values for given angles. This problem has been fixed.
find_ncc_model and find_ncc_models crashed when the model(s) were created on an empty image. This problem has been fixed. Now, they behave consistently to find_shape_model and find_shape_models, returning an error.
find_shape_model, find_scaled_shape_model, and find_aniso_shape_model expected integers for the parameters 'NumLevels' and 'NumMatches', but also accepted doubles, which hid a possible erroneous parameter usage. This problem has been fixed.
Note that this change affects the compatibility. Read more.set_generic_shape_model_object with GenParamName set to 'clutter_region' did not raise an error if the region contained negative coordinates, and the documentation did not indicate a clear workaround. This problem has been fixed. set_generic_shape_model_object now returns the error 8519 ("Clutter region contains negative coordinates").
find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, and find_aniso_shape_models did not allocate enough memory for all chords, which led to an error in certain cases. This problem has been fixed.
find_shape_model, find_shape_models, find_scaled_shape_model, find_scaled_shape_models, find_aniso_shape_model, find_aniso_shape_models, find_generic_shape_model crashed, when set_shape_model_metric was called, and the number of level was changed internally to a smaller value.
This problem has been fixed.set_shape_model_metric did not properly copy the user-set parameters of the shape model, but instead set default values for the adapted shape model. This problem has been fixed.
Subsequent calls to get_ncc_model_region in some cases leaked memory. This problem has been fixed.
Matrix
The operator read_matrix had difficulties reading matrices from ascii files, which under certain cases could lead to not reading the file or reading wrong numbers. This problem has been fixed.
Measure
add_metrology_object_circle_measure, add_metrology_object_ellipse_measureadd_metrology_object_generic, add_metrology_object_line_measure, and add_metrology_object_rectangle2_measure could crash when given invalid parameter types. This problem has been fixed.
Memory
When using binocular_disparity with very large images in conjunction with memory_allocator=mimalloc and a high degree of memory usage, crashes due to memory exhaustion could occur. This problem has been fixed.
Miscellaneous
There were a number of operators that could show a float-division-by-zero under certain rare circumstances. Note that the behavior of float division by zero is well-defined according to ISO/IEC/IEEE 60559 / IEEE 754. However, these cases might lead to unexpected behavior in later program parts. The following operators were potentially affected:
adjust_mosaic_images, apply_sample_identifier, create_bg_esti, find_bar_code, find_data_code_2d (for QR Code, Micro QR Code and Aztec Code), find_text, gen_bundle_adjusted_mosaic, get_data_code_2d_results, gen_projective_mosaic, projective_trans_image, projective_trans_image_size, projective_trans_region, regiongrowing_n, select_feature_set_gmm, set_planar_calib_deformable_model_metric, set_planar_uncalib_deformable_model_metric, set_shape_model_metric, train_class_gmm, train_texture_inspection_model
These problems have been fixed.HALCON 23.11.0.0 changed the paths Windows uses to search for DLLs by default by calling SetDefaultDllDirectories. As this led to problems, the change has been reverted and SetDefaultDllDirectories is no longer called.
For filename encoding not set to 'utf8', HALCON could fail to open acquisition interfaces or extension packages with non-ASCII characters in their name. This problem has been fixed.
gen_arbitrary_distortion_map and gen_grid_rectification_map with MapType set to 'coord_map_sub_pix' sometimes returned maps containing coordinates outside the images to be rectified, so that a subsequent call of map_image might have crashed. This problem has been fixed.
gen_image1 and gen_image3 leaked memory in some error cases. This problem has been fixed.
When parallelizing a HALCON operator on channels, some memory could be leaked if the operator exited with an error. This problem has been fixed.
protect_ocr_trainf, read_ocr_trainf_names_protected, and, when reading encrypted models, also read_dl_model, were not thread-safe. This problem has been fixed.
When image_to_memory_block had been called with an unsupported format, an empty memory block was created, and no error was raised. This problem has been fixed.
In some error cases, crop_rectangle2 leaked memory. This problem has been fixed.
dump_window_image leaked memory under certain error conditions. This problem has been fixed.
set_fuzzy_measure and set_fuzzy_measure_norm_pair in some error cases leaked memory. This problem has been fixed.
Morphology
gray_erosion_shape, gray_dilation_shape, gray_opening_shape, gray_closing_shape, gray_erosion_rect, gray_dilation_rect, gray_opening_rect, gray_closing_rect, gray_range_rect, and find_data_code_2d in some cases used a lot of memory, especially for many threads or big mask sizes. This problem has been fixed.
find_data_code_2d, gray_closing_shape, gray_dilation_shape, gray_erosion_shape, and gray_opening_shape showed a significant slowdown on armv7a and aarch64. This problem has been fixed.
erosion_rectangle1 did not behave analogously to erosion1 with a rectangular structuring element for even values of Width and Height, but to minkowski_sub1. This problem has been fixed.
OCR
trainf_ocr_class_box leaked memory in case of an error. This problem has been fixed.
read_ocr_trainf leaked memory in case of an error. This problem has been fixed.
read_ocr_trainf_select leaked memory in case of an error. This problem has been fixed.
trainf_ocr_class_mlp leaked memory in case of an error. This problem has been fixed.
select_characters could leak memory if 'punctuation' was set to 'true'. This problem has been fixed.
find_text for a text model of mode 'manual' could leak memory inside the text result after calling clear_text_result, if 'manual_persistence' was set to 'true'. This problem has been fixed.
read_ocr_trainf_names and read_ocr_trainf_names_protected leaked memory in case of an error. This problem has been fixed.
In some cases, text_line_orientation returned wrong orientation values if the parameters OrientationFrom and OrientationTo defined a large orientation range around the actual angle. This problem has been fixed.
create_ocr_class_svm returned the error 6006 ("Tmp-memory management: could not find memory element") if the input tuple 'Characters' contained duplicates. This problem has been fixed. Now, the correct error 1305 ("Wrong value of control parameter 5") is returned.
Parallelization
hcheck_parallel did not correctly report the name of the file to which the parallelization information is written. This problem has been fixed.
Calling par_start concurrently could lead to a crash. This problem has been fixed.
timed_wait_condition did not relock the mutex in the event of a timeout when used in HDevelop. This problem has been fixed.
Region
For some regions, smallest_rectangle2 failed to determine the smallest surrounding rectangle. While returning a surrounding rectangle, it was not the smallest surrounding rectangle in these cases. This problem has been fixed.
inner_rectangle1 sometimes returned different results than in previous HALCON versions. This problem has been fixed.
expand_region, expand_gray, and expand_gray_ref did not respect the setting of the 'clip_region' system parameter and always behaved as if it were 'true'. This problem has been fixed.
In rare cases, HALCON operators with multiple output control parameters could crash in case of an error. The problem could only occur on systems with multiple CPUs if HALCON is used with automatic operator parallelization, and only in HALCON versions 23.05 and 22.11.2. This problem has been fixed.
inner_circle returned the error 3513 ("Internal error: number of chords too big for num_max") if the input region contained a lot of small holes. This also affected region_features and select_shape with the corresponding features. This problem has been fixed.
gen_ellipse did not generate a full ellipse for some orientations. A very small sector was missing in this case. This problem has been fixed.
get_region_convex returned indeterministic results for regions that consist of a single pixel. This problem has been fixed. Now, the correct convex hull, i.e. row and column of the region pixel, is returned.
sort_region did not check the value of the input Order and RowOrCol. This problem has been fixed. Now, sort_region returns the error 1302 ("Wrong value of control parameter 2") and 1303 ("Wrong value of control parameter 3").
Segmentation
auto_threshold incorrectly returned an error about a wrong segmentation threshold for a certain Sigma value for real images. This problem has been fixed.
In HALCON XL only, binary_threshold with Method set to 'max_separability' could result in a segmentation, which does not maximize the separability. This problem has been fixed.
System
Passing an invalid string value to set_system('seed_rand') did not return an error. This problem has been fixed.
get_system_info('available_license_files') returned error 2036 ("could not find license file") if no license files could be found. Now, it will return no error but an empty tuple instead.
Attempting to run an operator with automatic operator parallelization turned on while the thread pool was turned off led to a crash. This problem has been fixed.
HALCON initialized output images for operators with more than one input image when all inputs where full domain images and the image dimensions were not equal. This problem has been fixed.
open_socket_connect leaked memory when resolving the given hostname failed. This problem has been fixed.
send_data did not allow sending data over unbound UDP sockets on Windows. This problem has been fixed.
Tools
distance_funct_1d returned the error 6006 ("Tmp-memory management: could not find memory element") for Sigma not equal to zero. This problem has been fixed.
In some cases, distance_funct_1d returned random values for Mode 'length'. This problem has been fixed.
gen_grid_rectification_map leaked memory in some error cases. This problem has been fixed.
gen_projective_mosaic returned an image that had an overflow of the gray value for some pixels. This problem has been fixed.
gen_projective_mosaic returned an output image that was one pixel larger than the input image when using just one input image and identity transformation. This problem has been fixed.
Some operators that use an input function containing points sorted in ascending order by the x-value and with different x-values could have returned a confusing error claiming that the values were wrongly ordered. The reason for this behavior is documented in create_funct_1d_pairs. This can happen if 2 points with different real (64-bit floating) x-values are so close to each other, that they produce the same float (32-bit floating) value, after the conversion from double to float. This problem has been fixed. Now a more suitable error message is returned for the case of points with x-values matching the same float value, also warning that this could have happened due to a double to float conversion.
List of potentially involved operators: integrate_funct_1d, zero_crossings_funct_1d, local_min_max_funct_1d, derivate_funct_1d, distance_funct_1d, invert_funct_1d, compose_funct_1d, match_funct_1d_trans, transform_funct_1d, sample_funct_1d, get_y_value_funct_1d, set_fuzzy_measure, set_fuzzy_measure_norm_pair.
Transformation
The parallelization of affine_trans_image for int2 images using the interpolation method 'bicubic' together with int_zooming set to 'true' for processors that support the AVX2 instruction set was broken. This problem has been fixed.
The following operators could have wrongly worked for image type 'int2' and interpolation mode 'constant' in border cases, due to a signed integer overflow:
affine_trans_image, affine_trans_image_size, crop_rectangle2, rotate_image, zoom_image_factor, zoom_image_size
This problem has been fixed.
get_rectangle_pose leaked memory in some error cases. This problem has been fixed.
In rare cases, polar_trans_region_inv did not return. The problem has been fixed.
gen_projective_mosaic leaked small amounts of memory in error case. This problem has been fixed.
Tuple
tuple_is_number returned 1 for the strings '08' and '09', which are not valid octal numbers. This problem has been fixed.
Processing tuples that contained NaN elements with tuple_select_rank or tuple_median resulted in a crash under certain conditions. This problem has been fixed.
Integer tuple elements smaller than INT32_MIN were not properly handled by serialize_tuple. This problem has been fixed.
XLD
In very rare corner cases, intersection_contours_xld could miss valid intersection points. This problem has been fixed.
fit_line_contour_xld leaked memory in some error cases. This problem has been fixed.
fit_ellipse_contour_xld with algorithm 'voss' or 'fitzgibbon' leaked memory in some error cases. This problem has been fixed.
fit_circle_contour_xld returned incorrect point order in some cases. This problem has been fixed.
In rare cases, closed contours transformed by affine_trans_contour_xld or projective_trans_contour_xld were not closed. This problem has been fixed.
create_distance_transform_xld crashed if MaxDistance was set to a very large value with the 'point_to_segment' mode. This problem has been fixed. Now, an error is returned in this case.
gen_ellipse_contour_xld leaked memory when one radius argument was set to zero. This problem has been fixed.
Procedures
Functionality
HALCON has been extended with a public procedure dev_disp_3d_coord_system. Previously, the procedure was only available locally in the example program hdevelop/Calibration/Multi-View/check_calib_image_quality.hdev. Some example programs now use dev_disp_3d_coord_system instead of disp_3d_coord_system.
Bug Fixes
The procedure train_dl_model failed to resume training if the given serialization base name had multiple subfolders. This problem has been fixed.
When working with the procedure dev_display_deep_counting_results and big images, the min_score slidebar and button Exit could disappear. This problem has been fixed.
When calling the procedure dev_display_dl_data with an empty tuple as 'DLDatasetInfo' with the request to display a classification ground truth or result, the procedure returned an error. This problem has been fixed. Now, the procedure behaves as described in its documentation if an empty tuple is passed as 'DLDatasetInfo'.
The deep learning procedure dev_display_dl_interactive_confusion_matrix sometimes became unusable when zooming in or out within the WindowHandle. This problem has been fixed.
The deep learning procedure find_dl_detection_param calculated wrong checks for compatible target input sizes. This problem has been fixed.
The procedure dev_display_dl_data used operators that are part of the Calibration and 3D Metrology license module. These operators were only used when the parameter KeysForDisplay contained the value 'point_cloud'. HDevelop's Used Modules dialogue always reported the Calibration and 3D Metrology license modules as used. This problem has been fixed. Now, all 3D visualization has been moved into a new dedicated procedure, dev_display_dl_3d_data. The example 3d_gripping_point_detection_workflow.hdev has been adapted, and the parameter 'point_cloud' was renamed to the more precise name 'gripping_point_cloud'.
Note that this change affects the compatibility. Read more.The procedure gen_dl_samples did not throw an error if images containing multiple objects were processed. This could have caused subsequent errors in other procedures that do not support this kind of images. This problem has been fixed. Now, gen_dl_samples throws a corresponding error for images with multiple objects.
HALCON/C
Bug Fixes
Using null strings could cause crashes or memory leaks with the C language interface. This problem has been fixed. Note that this usage is not recommended, as HALCON tuples do not have the concept of an invalid element. Instead, consider using an empty tuple to represent an invalid value, for example.
In addition, the following three string functions of the HALCON/C API did not work if HC_FAST was not defined: init_s_from_utf8, init_s_from_local8bit, init_s_from_wcs. This problem has been fixed as well.
HALCON/C++
Bug Fixes
Using null strings could cause crashes or memory leaks with the C++ language interface. This problem has been fixed. Note that this usage is not recommended, as HALCON tuples do not have the concept of an invalid element. Instead, consider using an empty tuple to represent an invalid value, for example.
HALCON/.NET
Bug Fixes
Resizing a HSmartWindowControlWPF when zoomed in with HKeepAspectRatio set to true always caused the full image to be shown again at 1:1 aspect. This problem has been fixed. Now, the visible part is just extended or reduced according to the size change of the control. However, if the part has never been changed from the default full image view after control creation or the last call to SetFullImagePart, then resizing will still fit the full image at 1:1 aspect to the new size.
Using null strings could cause crashes or memory leaks with the .NET language interface. This problem has been fixed. Note that this usage is not recommended, as HALCON tuples do not have the concept of an invalid element. Instead, consider using an empty tuple to represent an invalid value, for example.
The Easy Extension adapter did not report the correct parameter names in HDevelop when implementing multiple operators. This problem has been fixed.