DrawRects

The DrawRects block draws a rectangle around an image based on the points specified.

    DrawRects

Library

ComputerVision/Images/Draw

Description

The DrawRects block works in conjunction with the Threshold, FindContour, and BoundingBox blocks to draw a rectangle around an image based on the points specified.

Parameters

DrawRects_0

NameLabelDescriptionData TypeValid Values

thickness

Thickness

Specifies line thickness as an integer greater than 0.

Scalar

type

Type

Specifies the algorithm for drawing the line.

Structure

type/fill

Filled

Number

0
1

type/con4

4-connected Bresenham

Number

0
1

type/con8

8-connected Bresenham

Number

0
1

type/antiallias

Antialiased

Number

0
1

externalActivation

External activation

This parameter defines if the block receives or inherits an external activation. When External Activation is used, an additional activation port is added to the block. Default is OFF.

Number

0
1

DrawRects_1

NameLabelDescriptionData TypeValid Values

colorR

R

Specifies the rect’s color as RGB values.

Scalar

colorG

G

Specifies the rect’s color as RGB values.

Scalar

colorB

B

Specifies the rect’s color as RGB values.

Scalar

randomColor

Random Colors

When activated, it overrides the color selection and colors the lines in random colors.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

rects

explicit

input

1

src

explicit

input

2

image

explicit

output

1

Port 4

activation

input

externalActivation