Skip to content
← All questions

How does this read_image example demonstrate the operator invocation process?

The read_image example demonstrates the process by showing how to call an operator in HDevelop, pass a file path as an input parameter, and receive an image object as an output variable. After execution, the loaded image appears in the graphics window and the variable panel.

Conditions

  • The code is executed in the HALCON HDevelop main program region (#main).
  • The input is a valid image file path string.
  • The output is an image variable.

Reasoning, step by step

  1. Enter the read_image call in the HDevelop code window: read_image (Image, 'printer_chip/printer_chip_01').
  2. Execute the statement (e.g., by pressing F5).
  3. Observe the graphics window displaying the loaded circuit board image.
  4. Check the image variable area to see the new Image variable containing the loaded data.

Example

The code window displays read_image (Image, 'printer_chip/printer_chip_01'). After execution, the graphics window displays the circuit board image, and Image appears in the image variable area.

Common misconceptions

  • Thinking that the operator modifies the file path string instead of creating a new image variable.
  • Assuming the image is only visible in the graphics window and not stored as a variable.

Watch the explanation

Explore next

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.