🟧 Image ROI

Function Description

This operator can extract one or more specified rectangular ROIs from input images. It provides two main operation modes: one is to directly crop out the ROI region to generate a smaller new image; the other is to keep the original image size unchanged and fill regions outside (or inside) the ROI with black pixels.

Usage Scenarios

  • Suitable for scenarios that only need to analyze specific parts of the image. This operator can first extract that region to reduce unnecessary computational load and improve processing efficiency.

  • By framing main objects, irrelevant backgrounds or interfering objects in the image can be effectively removed, simplifying subsequent processing data volume.

  • Combined with the "Enable Inversion" function, certain regions in the image can be "blacked out", and subsequent calculations ignore these regions.

Input Output

Input

Input Image: One or more images prepared for ROI operations.

2D ROI: One or more 2D rectangular boxes used to define regions to be extracted.

Output

ROI Images: Image list after ROI operation processing.

Parameter Description

Keep Original Shape

Parameter Description

This parameter controls whether the output image size needs to remain consistent with the input image.

Parameter Adjustment

  • On (Default): The output image shape and size are exactly the same as the input image, with pixels in the "cropped" ROI region outside filled with black (0). The advantage of this mode is that it preserves the original pixel coordinate system, facilitating subsequent position-related analysis.

  • Off: The output image will be directly cropped to the size of the ROI box, so the output image size will be smaller than the input image, containing only pixel content inside the ROI, which can reduce data volume. If this is turned off, then subsequent image detection results need to use the 'ROI Post-Detection Result Alignment' node to align back to the original image, otherwise results may not correspond with the point cloud.

Enable Inversion

Parameter Description

Invert ROI selection logic, i.e., select regions outside the ROI rather than inside.

Note: This parameter only takes effect when "Keep Original Shape" is enabled.

Parameter Adjustment

  • Off (Default): Keep image content inside the ROI, set regions outside the ROI to black.

  • On: Keep image content outside the ROI, set regions inside the ROI to black.