PadImageBorder

Add padding around the original image borders.

Syntax

Definition:

HRESULT PadImageBorder(
    HRESULT                        hrPrev,
    ITcVnImage*                    ipSrcImage,
    ITcVnImage*&                   ipPaddedImage,
    ULONG                          nTopBorder,
    ULONG                          nBottomBorder,
    ULONG                          nLeftBorder,
    ULONG                          nRightBorder,
    ETcVnBorderInterpolationMethod ePaddingType = BIM_CONSTANT,
    TcVnVector4_LREAL&             aPaddingValue = {0, 0, 0, 0}
)

Parameters

Name

Type

Default

Description

hrPrev

HRESULT

 

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

ipSrcImage

ITcVnImage*

 

Source image

ipPaddedImage

ITcVnImage*&

 

Padded destination image (Same type as ipSrcImage, an appropriate destination image will be created if required.)

nTopBorder

ULONG

 

Padding height in pixels above top border

nBottomBorder

ULONG

 

Padding height in pixels below bottom border

nLeftBorder

ULONG

 

Padding width in pixels before left border

nRightBorder

ULONG

 

Padding width in pixels after right border

ePaddingType

ETcVnBorderInterpolationMethod

BIM_CONSTANT

Specifies how the pixel values of the padding area are determined

aPaddingValue

TcVnVector4_LREAL&

{0, 0, 0, 0}

Specifies the padding value if CONSTANT is used

PadImageBorder 1: Return value

HRESULT

Required License

TC3 Vision Base

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.54 or later

PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU

Tc3_Vision