Skip to content

2D Image Crop

Operator Function

Output the cropped image to IM 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
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
1Input value is {0t}, invalid region typeRegion typeOnly window2d is supported
2Image cropping failedStart point, End pointCheck if the cropping range is appropriate
3Cannot read valid 2D imageCheck if the IM image is a 2D image or empty
4ROI parameters are incorrectStart point, End pointCheck if the cropping range exceeds limits

Example Introduction

Engineering Design

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

  2. Select the 2D Image Crop 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 output image IM.

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

  3. 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