Skip to content

Parallelizing HALCON programs🔗

This section explains how to use HALCON on multi-core or multi-processor hardware, concentrating on the main features: automatic parallelization and the support of parallel programming.

For a deeper understanding, you can find information in a tutorial about parallelization concepts, which also covers corresponding HDevelop examples.

Further, you find information about various other aspects to consider when parallelizing regarding graphics, use of OpenMP, customization options, image acquisition interfaces, or spinlocks.

Available examples

HALCON currently provides the following examples for parallel programming (paths relative to %HALCONEXAMPLES%):

HALCON/C🔗

  • c\source\example_multithreaded1.c
    Two threads extract different elements on a board in parallel

HALCON/.NET🔗

  • c#\MultiThreading (C#)
    Performs image acquisition, processing, and display in three threads
  • hdevengine\c#\MultiThreading (C#)
    executes the same HDevelop procedure in parallel by two threads using HDevEngine
  • hdevengine\c#\MultiThreadingTwoWindows (C#)
    executes different HDevelop procedures in parallel by two threads using HDevEngine

HALCON/C++🔗

  • mfc\FGMultiThreading (using MFC)
    Performs image acquisition / display and processing in two threads
  • hdevengine\mfc\source\exec_programs_mt_mfc.cpp
    Executes HDevelop procedures for image acquisition, 2d code reading, and visualization in parallel using HDevEngine and MFC
  • hdevengine\cpp\source\exec_procedures_mt.cpp
    Executes HDevelop programs in parallel using HDevEngine