Image ROI Circle
This function block lets you create a single editable circular region of interest (ROI) on an image. Use the interactive canvas to draw, move and resize the circle. The block returns the cropped circular image and a circle shape (center and radius) that you can pass to other blocks.
π₯ Inputs
Image Image to crop and to edit the circle overlay on (grayscale or color).
π€ Outputs
Image Cropped image containing the circular area (background outside circle masked out).
Circle Circle shape describing the selected ROI as center and radius (useful for geometry-aware blocks).
πΉοΈ Controls
ROI Canvas Interactive image area where you create and edit the circle by mouse.
Create by Drag Click-and-drag on the canvas to create a new circle.
Move Center Drag the circle center to reposition the ROI.
Resize Radius Drag the radius handle to change the circle size.
Clear (C) Press the C key to clear the current circle and start over.
βοΈ Running mechanism
The block displays the provided image on the interactive canvas and overlays the current circle (if set).
While running, the canvas listens for mouse drag and move events to create, move or resize the circle.
Once a valid circle exists, the block produces the cropped circular image (masked) and a shape output containing center and radius values.
If the circle is not defined or radius is zero the block outputs
Nonefor both sockets so downstream blocks can handle the absence of a ROI.
β¨ Features
Intuitive click-and-drag interaction to create an ROI.
Separate handles for moving the center and resizing the radius.
Immediate visual feedback with a colored overlay and handle highlighting.
Outputs both the masked crop and a reusable shape description.
π Usage instructions
Connect an image-producing block to the
Imageinput and run once so the image appears on the canvas.Click and drag on the
ROI Canvasto create a circle.Drag the circle center to move it or drag the radius handle to resize.
Press
Cto clear and redraw if needed.Use the
ImageandCircleoutputs to send the crop or shape to other blocks.
π‘ Tips and Tricks
Preview the selected crop in a larger window with
Show Imagefor a closer inspection before exporting.If your source image is large, use
Image Resizebefore this block to speed interaction and ensure the ROI fits the workspace.Use
Apply Maskto combine the circular mask with other images or to overlay the mask result on a different background.To select more complex or multiple regions, consider using
Image ROI SelectorImage ROI Polygon Multiand then refine with this circular ROI if needed.Save captured crops directly using
Image LoggerorImage Writefor record keeping or downstream processing.Preprocess noisy inputs with
BlurorImage Thresholdso the visual region aligns better with your detection or measurement workflows.Combine circle outputs with measurement or analysis blocks (for example shape-analysis or detectors) by passing the
Circleshape where supported.
π οΈ Troubleshooting
No image visible on the canvas: ensure the upstream block is producing an image and run the scenario once so the image is loaded.
Outputs are
None: circle center or radius is undefined, or radius is effectively zero. Redraw the circle.Circle appears off or too small: try resizing the canvas via upstream
Image Resizeor redraw the circle at a larger scale.Interaction feels unresponsive: confirm the image was provided at least once and that the canvas shows the image; re-run the block if needed.
Last updated