AdjustSearchWindowOrientationToLinearEdge

Adjust the search window to be orthogonal to a linear edge. Might be helpful before calling edge localization and distance measurement functions that rely on the search window.
Can use available TwinCAT Job Tasks for executing parallel code regions.

Syntax

Definition:

HRESULT AdjustSearchWindowOrientationToLinearEdge(
    HRESULT            hrPrev,
    ITcVnImage*        ipSrcImage,
    TcVnPoint2_REAL&   aStartPoint,
    TcVnPoint2_REAL&   aEndPoint,
    ETcVnEdgeDirection eEdgeDirection,
    float              fMinStrength,
    ULONG              nMaxThickness,
    ULONG              nSearchLines
)

Parameters

Name

Type

Description

hrPrev

HRESULT

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

ipSrcImage

ITcVnImage*

Source image

aStartPoint

TcVnPoint2_REAL&

Position from which to start the search process (in the direction of aEndPoint), which is not changed

aEndPoint

TcVnPoint2_REAL&

Position where the search process ends, which is adjusted by this function

eEdgeDirection

ETcVnEdgeDirection

Specification of the edge direction to search for

fMinStrength

float

Specification of the minimum strength (intensity difference) of the edge to search for

nMaxThickness

ULONG

Specification of the maximum thickness of the edge to search for, which means fMinStrength must be reached within nMaxThickness pixels

nSearchLines

ULONG

Width of the search window, i.e. the number of search lines (3, 5, 7, ...), centered around the line specified by aStartPoint and aEndPoint

AdjustSearchWindowOrientationToLinearEdge 1: Return value

HRESULT

Required License

TC3 Vision Metrology 2D

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