CannyEdgeDetection

Find edges using the Canny edge detection algorithm.
Can use available TwinCAT Job Tasks for executing parallel code regions.

Syntax

Definition:

HRESULT CannyEdgeDetection(
    HRESULT      hrPrev,
    ITcVnImage*  ipSrcImage,
    ITcVnImage*& ipDestImage,
    double       fThresholdLow,
    double       fThresholdHigh,
    ULONG        nApertureSize = 3,
    bool         bL2Gradient = false
)

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 (elements of type USINT)

ipDestImage

ITcVnImage*&

 

Destination image (elements of type USINT. An appropriate destination image will be created if required.)

fThresholdLow

double

 

Low threshold

fThresholdHigh

double

 

High threshold

nApertureSize

ULONG

3

Aperture size for the Sobel operator (3, 5, 7)

bL2Gradient

bool

false

If true, the more accurate (and slower) L2 norm is used instead of the L1 norm

CannyEdgeDetection 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