AddBorder

The AddBorder block adds a border to the perimeter of an image.

    AddBorder

Library

ComputerVision/Images/Operations

Parameters

AddBorder_0

NameLabelDescriptionData TypeValid Values

top

Top

Specifies the top border width in pixels.

Scalar

bottom

Bottom

Specifies the bottom border width in pixels.

Scalar

left

Left

Specifies the left border width in pixels.

Scalar

right

Right

Specifies the right border width in pixels.

Scalar

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

AddBorder_1

NameLabelDescriptionData TypeValid Values

borderType

Border Type

Constant: Displays a solid color border. You can change the color with the Color parameter.

Replicate: Displays a border by replicating the pixel values at the edges of the image.

Reflect: Displays a border by reflecting the pixel values at the borders of the image.

Wrap: Displays a border by reflecting the pixel values at the borders of the image and swapping top-bottom and left right.

String

'Constant'
'Replicate'
'Reflect'
'Wrap'

R

R

Specifies the border R color.

Scalar

G

G

Specifies the border G color.

Scalar

B

B

Specifies the border B color.

Scalar

Ports

NameTypeDescriptionIO TypeNumber

src

explicit

input

1

image

explicit

output

1

Port 3

activation

input

externalActivation