Check Area
This function block lets you draw a rectangular area on an image with the mouse and check whether given position coordinates fall inside that area. Use it to validate detections, filter points by region, or visualize which points lie within a selected ROI.
π₯ Inputs
Input Image (Binary Image) Provide the image where the area will be drawn and shown. The image is used as reference for selecting and displaying the ROI.
Position Coordinate(s) Provide one or multiple point coordinates to check against the selected area. Accepts a single (x, y) coordinate or a list of coordinates.
π€ Outputs
Area Rectangle The rectangle describing the selected area (top-left and bottom-right points). Returned in a shape format suitable for other blocks that accept rectangle/shape inputs.
Object In Area A boolean value indicating whether any provided coordinates are inside the selected area.
Detection Count The number of input coordinates that fall inside the selected area.
πΉοΈ Controls
Image Display Click and drag on the image area to draw a rectangular selection. The selection is previewed live on the image.
Selected Rectangle The drawn rectangle is shown on the image and persisted so it remains available while the scenario runs.
βοΈ Running mechanism
When an image is connected and the scenario is run, you can drag on the displayed image to define a rectangular area.
The block uses the current rectangle to test each provided coordinate. Both a single coordinate or a list of coordinates are accepted.
For every coordinate found inside the rectangle, a visual marker is drawn on the image and the detection count is incremented.
If no rectangle has been drawn, the block uses the entire image as the default area.
π¨ Features
Interactive mouse-based ROI selection with live preview.
Accepts single or multiple coordinates for batch checks.
Outputs both geometric shape and simple boolean / numeric results for easy downstream logic.
Persists the last drawn rectangle between runs so you donβt need to re-draw repeatedly.
Visual feedback: selected rectangle and detected points are drawn on the image output.
π Usage Instructions
Connect an image to the
Input Image (Binary Image)input and run once so the image appears in the block.Click and drag on the displayed image to draw a rectangle (the selection will be previewed).
Feed coordinates into the
Position Coordinate(s)input (single point or list). These can come from detection blocks or manual inputs.Read the outputs:
Area Rectangle,Object In Area, andDetection Count. The displayed image will show the rectangle and markers for coordinates that fall inside.
π‘ Tips and Tricks
Combine with
Object DetectionorObject Detection - Customto feed detected object center coordinates intoPosition Coordinate(s)and count objects inside the selected area.Use
Object_Detection_Trackerto supply tracked positions (with IDs) so you can monitor entries/exits from the area over time.Feed the blockβs
Area Rectangleoutput intoGet ROIorImage ROIto crop the image around the selected area for focused processing.Visualize results in a larger view by sending the image output to
Show Imageor log snapshots when detection occurs withImage Logger/Image Write.Use
Draw PointorDraw Rectangleto create custom overlays based on outputs, or export counts to logs withCSV Export/Data to JSONfor reporting.
π οΈ Troubleshooting
No image visible after connecting the input: run the scenario once to populate the image display. The block expects an initial run to load image data.
Invalid coordinate input: ensure coordinates are provided as a tuple/list of two integers or a list of such tuples. The block will mark the input as invalid and show an error if the format is incorrect.
Selection outside image bounds: the block will clamp the selection to the image area, but avoid drawing beyond the image to get accurate results.
Last updated
Was this helpful?