Crop Image
Use this tool to crop images to an image part that is defined by a region of interest (ROI). For this, the tool requires a rectangular ROI that defines the desired image part to be cropped.
You can either draw the required rectangular ROI with an arbitrarily orientation into the image or you can connect the parameter "ROI" with an appropriate ROI result of a previous tool and use this ROI for the cropping. The graphics window of the tool shows the input image and the possible ROI if used. The cropped image is automatically used in all subsequent tools.
Parameters
Basic Parameters
Image:
This parameter represents the input image to be cropped. If an image is available as a result of a previous tool, it is connected automatically and used as input image.
If a color image is used as an input image, all channels of the color image are used for the processing.
Additional Parameters
ROI:
This parameter contains the region of interest that defines the part of the image to be cropped. By default no ROI is defined and the image is not cropped. To specify the part of the image to be cropped, you either have to connect the parameter to an appropriate ROI result of a previous tool to make sure that an ROI is transmitted to this tool or you have to draw an ROI into the image using the available ROI buttons.
If a rotated ROI is used to define the image part to be cropped, the resulting image is returned as an axially parallel image.
This tool only supports the use of a single ROI. If the parameter contains multiple ROIs, either from a connection from a previous tool or by drawing multiple ROIs with the ROI buttons, only the last created ROI will be used for the cropping.
Alignment Data:
This parameter represents the alignment data that are used to align the ROI. By default no alignment data are connected and thus no effect is visible. If you want to use specific alignment data, you have to connect the parameter to an appropriate result of a previous tool such as Determine Alignment with Matching, Determine Alignment with Straight Border, Align Image, or Rotate Image.
Results
Basic Results
Cropped Image:
This result returns the cropped image part that has been defined by the ROI.
Tool State:
"Tool State" returns information about the state of the tool and thus can be used for error handling. For more information, see Tool State Result
Additional Results
Processing Time:
This result returns the duration of the most recent execution of the tool in milliseconds. The result is provided as additional result. Therefore, it is hidden by default but it can be displayed via the button beside the tool results. For more information see the section Processing Time in the tool reference overview.
Application Examples
This tool is used in the following MERLIC Vision App examples:
- check_correct_filling_on_3d_height_images.mvapp