Block Category: Draw
Input Image Requirements: None
The Draw Rectangles block works in conjunction with the Threshold, Find Contour, and Bounding Box blocks to draw a rectangle around an image based on the points specified.
Color: Specifies the color of the outline of the rectangles.
Random: When activated, it overrides the color selection and colors the outline of the rectangles in random colors.
Thickness: Specifies the rectangle’s border thickness as an integer greater than 0.
In this example, the Threshold and Find Contour blocks are used to isolate and determine the contour of the hexagon in the image. The Bounding Box block calculates the smallest rectangle to enclose the hexagon while the Rectangle block draws the rectangle.