CreateLowpassButterworthFilter

Creates a lowpass Butterworth filter, which can be applied to a frequency domain image by element-wise multiplication.

Syntax

Definition:

HRESULT CreateLowpassButterworthFilter(
    HRESULT      hrPrev,
    ITcVnImage*& ipFilter,
    ULONG        nWidth,
    ULONG        nHeight,
    bool         bDoublePrecision,
    bool         bOriginAtCenter,
    double       fCutoffDistance,
    ULONG        nOrder,
    double       fScale
)

Parameters

Name

Type

Description

hrPrev

HRESULT

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

ipFilter

ITcVnImage*&

Returns the created filter (1 channel of type REAL or LREAL, depending on bDoublePrecision. Non-zero interface pointers are reused.).

nWidth

ULONG

Filter width (even, >= 2, must match the width of the image it is applied to)

nHeight

ULONG

Filter height (even, >= 2, must match the height of the image it is applied to)

bDoublePrecision

bool

If true, the filter is generated with double precision (LREAL) instead of single precision (REAL).

bOriginAtCenter

bool

If true, the filter origin is shifted to the image center.

fCutoffDistance

double

The cutoff distance of the Butterworth filter (> 0).

nOrder

ULONG

The order of the Butterworth filter (> 0).

fScale

double

The scale factor of the Butterworth filter denominator term (> 0, e.g. 0.414 or 1.0).

CreateLowpassButterworthFilter 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