Skip to content
START WITH A QUESTION

What would you like to understand?

Find an answer. See the moment it becomes clear. Follow the idea further.

← Concept directory

Answers for “如何在 HALCON 中获取图像的宽度和高度?”

2 keyword matches

Understanding your question. You can explore the search results below now.

Find a method

↗

To obtain the width and height of an image in HALCON, you use the get_image_size operator. You pass the loaded image variable as an input, and declare Width and Height variables as outputs to receive the pixel dimensions.

Conditions: The image must already be loaded into a variable (e.g., using read_image).; The operator get_image_size is called in the HDevelop environment.

Find a method

↗

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.