F_VN_Reduce
Reduce ipSrcImage by applying the specified operation across rows/columns to obtain a single row/column with the resulting values.
Syntax
Definition:
FUNCTION F_VN_Reduce : HRESULT
VAR_INPUT
ipSrcImage : ITcVnImage;
ipDestImage : Reference To ITcVnImage;
nDim : DINT;
eReduceType : ETcVnReduceType;
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipSrcImage |
Source image (USINT or REAL elements, 1 channel) | |
ipDestImage |
Reference To ITcVnImage |
Destination image. If ipSrcImage is of type USINT and the reduction type is SUM or AVG, ipDestImage will be of type REAL; otherwise, it retains the same type as ipSrcImage (An appropriate single channel destination image will be created if required.) |
nDim |
DINT |
Index along which the ITcVnImage is reduced: 0 reduces the matrix to a single row, 1 reduces it to a single column |
eReduceType |
Reduction operation | |
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.59 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |