Comment on page
Rectangles in Rectangle
The Rectangles in Rectangle block, is a valuable component in AugeLab Studio's visual programming environment. This block allows you to check whether a set of provided rectangles are within a reference rectangle. It is particularly useful for tasks involving the detection of smaller rectangles within a larger bounding rectangle.
- Block Name: Rectangles in Rectangle
- Block Type: Image Processing
- Block Category: ROI Processing
- Block Tooltip: Check if provided rectangles are in the reference rectangle.
The Rectangles in Rectangle block checks if a series of rectangles, represented as pairs of coordinates (top-left and bottom-right points), fall within a specified reference rectangle. Here's an overview of its functionality:
- 1.Input Rectangles: This block takes three input sockets:
- Input Image: The image on which the rectangles are to be drawn.
- Reference Rectangle: The bounding rectangle within which to check for other rectangles.
- Rectangles to Check: A list of rectangles to be evaluated for their containment within the reference rectangle.
- 2.Processing: The block processes the input data to determine which of the provided rectangles are entirely contained within the reference rectangle.
- 3.Output: The block provides the following outputs:
- Result Image: An image with the input rectangles drawn on it, where rectangles within the reference rectangle are marked as green (OK) and others as red (NOK).
- Not Empty: A boolean value indicating whether there are rectangles within the reference rectangle.
- Count: The number of rectangles within the reference rectangle.
- Rectangles: A list of rectangles that are entirely contained within the reference rectangle.
Consider a scenario where you have an image containing a larger bounding rectangle (e.g., a frame) and multiple smaller rectangles (e.g., objects within the frame). You can use the Rectangles in Rectangle block to identify which of the smaller rectangles are completely within the frame. This block can be part of an image processing pipeline for quality control or object tracking applications.
- The Rectangles in Rectangle block checks for containment based on the coordinates of the rectangles' top-left and bottom-right points. Rectangles that are fully inside the reference rectangle are marked as "OK," while others are marked as "NOK."
- The block provides both visual feedback (colored rectangles on the output image) and data outputs (count and a list of rectangles) to assist with further processing within your visual program.
- Carefully manage your input data, ensuring that it follows the required format of lists or tuples for coordinates, to achieve the desired results with this block.