Skip to content

Frequently asked questionsđź”—

Note

If your question is not yet listed here, we’d love to hear from you under www.mvtec.com/products/halcon/halcon-feedback!


Memory-related questionsđź”—

Why does the memory consumption of my HALCON application keep climbing?

This is most likely caused by memory caching. See How to analyze memory usage for more information.

What should I do if I suspect there is a memory leak?

This is most likely caused by memory caching. See How to analyze memory usage for more information.

Why does the memory consumption not (immediately) decrease after I delete a HALCON object?

This is most likely caused by memory caching. See How to analyze memory usage for more information.

What is the purpose of memory caching?

See Managing memory.

How do HALCON’s caches work?

See Caching in HALCON.

Can all the cached memory be released immediately?

For the memory cached by HALCON, this depends on the type of cache:

Is there a way to predict or limit the total amount of memory HALCON uses?

Not in general, because HALCON allocates memory dynamically.

The amount of memory HALCON needs depends on several factors such as the operators used, the chosen parameters, the number of threads, the image size, and the image content. An example for the dependence on image content is shape-based matching, where the amount of memory depends on the number of candidates found in the image.
HALCON’s memory consumption can be reduced, for example, by lowering the number of (AOP and user) threads, by reducing image size or image domain, and by limiting the amount of cached memory.

See How to analyze memory usage for more information.

Is there a way to reduce the amount of memory HALCON caches?

Yes, see How to analyze memory usage.

Does HALCON cache data?

No, HALCON only caches unused memory.

Why are the first few operator calls or program runs (in a loop) usually slower?

At first, there is no cached memory to speed up the program. Over time, the caches will grow, which will speed up operator execution increasingly until they reach a plateau.
If necessary, run the relevant piece of code a few times using offline image data to “warm up” the caches and improve processing times at the start of live image acquisition.

Does HALCON allocate new memory for every output image?

See About image data.

Are in-place operations supported for images? What happens if input and output image share the same name?

See About image data.