AdjustActiveContour

Adjust active contour (snake) in order to minimize its cummulative (internal and external) energy.

Syntax

Definition:

HRESULT AdjustActiveContour(
    HRESULT         hrPrev,
    ITcVnImage*     ipImage,
    ITcVnContainer* ipActiveContour,
    float           fAlpha,
    float           fBeta,
    float           fGamma,
    ULONG           nWindowWidth,
    ULONG           nWindowHeight,
    ULONG           nMaxIterations,
    bool            bUseGradient
)

Parameters

Name

Type

Description

hrPrev

HRESULT

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

ipImage

ITcVnImage*

Source image (1 channel, USINT elements)

ipActiveContour

ITcVnContainer*

Initial contour, which will be adjusted

fAlpha

float

Continuity energy coefficient

fBeta

float

Curvature energy coefficient

fGamma

float

Image energy coefficient

nWindowWidth

ULONG

Window width (3, 5, 7, ...)

nWindowHeight

ULONG

Window height (3, 5, 7, ...)

nMaxIterations

ULONG

Maximum iterations

bUseGradient

bool

If true, the gradient magnitude is used as image energy (otherwise: pixel intensity)

AdjustActiveContour 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