For the complete documentation index, see llms.txt. This page is also available as Markdown.

Image ROI Select

This function block lets you select a single rectangular region of interest (ROI) interactively by dragging on the image preview. It is ideal for cropping an area from an image for further processing or inspection.

πŸ“₯ Inputs

Image Any The image to crop. Connect a grayscale or color image to define the area that can be selected.

πŸ“€ Outputs

Image Any The cropped image corresponding to the selected rectangle.

Rectangle The pixel rectangle describing the selected area (top-left and bottom-right coordinates).

πŸ•ΉοΈ Controls

Image Preview The interactive preview where you create and edit the rectangular ROI by mouse.

Drag Create a rectangle by dragging on the preview, or drag inside the rectangle to move it.

Edge / Corner Drag Resize the rectangle by dragging an edge or corner.

Ctrl Hold to force creation of a new rectangle even if an existing rectangle is present.

🎯 Features

  • Interactive rectangle creation, move and resize directly on the image preview.

  • Visual overlay shows the current rectangle and highlights it during interaction.

  • Accepts single or repeated selection; the most recent ROI is used for output.

  • Cropped result is returned immediately as an image along with rectangle coordinates.

  • The selected rectangle is preserved so the same ROI can be restored when the project is reloaded.

βš™οΈ Running mechanism

  • Provide an image to the Image Any input and run the scenario once to load the image into the preview.

  • Use the preview to Drag and draw a rectangle. Drag inside the rectangle to move it, or drag edges/corners to resize.

  • The block computes the pixel coordinates of the selected rectangle and outputs:

    • the cropped image extracted from those coordinates via Image Any

    • the rectangle coordinates via Rectangle

  • The preview overlay updates live while you create or edit the ROI.

πŸ“ Usage instructions

  1. Connect an image-producing block to the Image Any input and run once to populate the preview.

  2. Draw the ROI by clicking and dragging on the preview.

  3. Move or resize the ROI as needed.

  4. Hold Ctrl while dragging to create a fresh rectangle.

  5. Use the outputs to feed the cropped image or the rectangle coordinates to downstream blocks.

πŸ’‘ Tips and Tricks

  • Combine with Show Image to open the cropped result in a larger viewer for inspection.

  • If you need multiple editable ROIs, use Image ROI Select Multi instead of this block.

  • Use Image Resize after this block to normalize crop sizes before running detection or analysis.

  • Feed the cropped output into Find Object when you want to run template matching only inside the selected area β€” this reduces false matches and speeds processing.

  • Save important crops using Image Logger or Image Write to record examples for later review or training data.

  • To visualize detections or coordinates back on the original image, use Draw Rectangle downstream with the Rectangle output.

πŸ› οΈ Troubleshooting

  • If the preview is empty, make sure the producing block is connected and that you have run the pipeline once to load image data.

  • If selection appears outside the image, verify the input image dimensions and redraw the ROI inside the preview area.

  • For final processing, confirm the cropped image resolution is appropriate for downstream blocks (use Image Resize if needed).

Last updated