Image ROI Select

This function block allows users to select a Region of Interest (ROI) within a given image using mouse input. It visually marks the selected area and outputs the cropped section for further processing.

πŸ“₯ Inputs

Image Any The original image from which the ROI will be selected.

πŸ“€ Outputs

Image Any This output contains the cropped image data based on the selected ROI.

Rectangle The coordinates of the selected rectangle area indicating the ROI.

πŸ•ΉοΈ Controls

Selected ROI Users can click and drag on the image to define the area to crop. The rectangle is visually represented on the image as it is being dragged.

🎨 Features

Interactive Selection The block allows interactive selection of a rectangular area directly on the displayed image, providing immediate visual feedback.

Visual Feedback The selected area is outlined with a green rectangle as the user selects it, aiding in selection accuracy.

πŸ“ Usage Instructions

  1. Connect Input: Link a valid image data source to the Image Any input.

  2. Select ROI: Click and drag on the displayed image to define the cropping rectangle. The rectangle will be drawn dynamically as you drag your mouse.

  3. Evaluate the Block: After making a selection, run the block to extract the ROI. The cropped image and coordinates will be output.

πŸ“Š Evaluation

Upon evaluation, the block outputs both the cropped image corresponding to the selected ROI and the coordinates that define the selected area.

πŸ’‘ Tips and Tricks

Using with Other Blocks

To improve image quality before selection, consider using the Image Threshold, Blur, or Super Resolution function blocks on the input image.

Ensuring Accurate Selection

Zoom in on the image (if possible) before selecting the ROI to help ensure the rectangle aligns precisely with the area you want to crop.

Handling Borders

If cropping very close to the edges of the image, ensure your selected rectangle doesn’t exceed image boundaries to avoid errors.

πŸ› οΈ Troubleshooting

No Output Image

If the output image is not showing, check that the input image is connected properly and that you've made a selection on the displayed image.

Error on No Selection

If you attempt to run the block without selecting an ROI, ensure you drag the mouse to create a rectangle before evaluating.

Last updated