F_VN_CreateBandpassButterworthFilter
Creates a bandpass Butterworth filter, which can be applied to a frequency domain image by element-wise multiplication.
Syntax
Definition:
FUNCTION F_VN_CreateBandpassButterworthFilter : HRESULT
VAR_INPUT
ipFilter : Reference To ITcVnImage;
nWidth : UDINT;
nHeight : UDINT;
bDoublePrecision : BOOL;
bOriginAtCenter : BOOL;
fCutoffDistance : LREAL;
fBandWidth : LREAL;
nOrder : UDINT;
fScale : LREAL;
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipFilter |
Reference To ITcVnImage |
Returns the created filter (1 channel of type REAL or LREAL, depending on bDoublePrecision. Non-zero interface pointers are reused.). |
nWidth |
UDINT |
Filter width (even, >= 2, must match the width of the image it is applied to) |
nHeight |
UDINT |
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 |
LREAL |
The cutoff distance of the Butterworth filter (> 0). |
fBandWidth |
LREAL |
The band width of the Butterworth filter (> 0). |
nOrder |
UDINT |
The order of the Butterworth filter (> 0). |
fScale |
LREAL |
The scale factor of the Butterworth filter denominator term (> 0, e.g. 0.414 or 1.0). |
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
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 |