Skip to content

2D Template Creation

Operator Function

Output the cropped image according to the input ROI.

Parameter Introduction

Input Parameters

ParameterRangeDefault ValueDescriptionIllustration
Input Image0-80IM number for image input

Calculation Parameters

ParameterRangeDefault ValueDescriptionIllustration
Region2D Window2D WindowSet the range of the search area
Template FileEmptySave address of the image
Output Image0-81IM number for image output

Output Parameters

NameTypeRangeDescription
Resultbooltrue/falsetrue for success
false for failure
Warningbooltrue/falsetrue indicates a warning
false indicates no warning
MessagestringOutput success, error, or warning messages. Empty if no error or warning.
TimefloatOperator execution time, unit: ms

Exception Troubleshooting

No.Exception InformationCorresponding ParameterSolution
1Cannot read valid 2D imageCheck if the IM image is a 2D image or empty
2Input value is {0t}, invalid region typeRegion typeOnly window2d supported
3Parameter "{0t}" cannot be emptyInput parameter name (Model File)Complete parameter "{0t}"
4File does not exist or cannot be accessedFile pathFile path is incorrect or does not exist
5Failed to write image to file "{0}"File pathCheck if the file has write permission
6Image cropping failedStart point, End pointCheck if the cropping range is appropriate

Example Introduction

Engineering Design

  1. Select the Load Image tool to load the required 2D image to IM0.

  2. Select the 2D Template Creation tool.

Tool Usage

  1. Select the input image for the operation. The image number must match the IM number where the image is located in the project.

  2. Move the window to the position to be measured, enclosing the image that needs to be used as the template.

::: Warning Tips 1. Use the ROI controller on the image window to drag or scale the window; 2. Directly modify the window's start or end point coordinates in the calculation parameters to adjust the window position and size; :::

Result_img

  1. Set the template file address.

  2. Set the output image IM.

  3. Click Test to check if the image window and parameters meet expectations.

  4. If there are no issues, click Save. Run the operator in the run list, and then view the running results in the corresponding IM.

Result_img

AI-Vision, Making 3D Measurement Easier