Reduce

Reduce ipSrcImage by applying the specified operation across rows/columns to obtain a single row/column with the resulting values.

Syntax

Definition:

HRESULT Reduce(
    HRESULT         hrPrev,
    ITcVnImage*     ipSrcImage,
    ITcVnImage*&    ipDestImage,
    LONG            nDim,
    ETcVnReduceType eReduceType
)

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 (USINT or REAL elements, 1 channel)

ipDestImage

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

LONG

Index along which the ITcVnImage is reduced: 0 reduces the matrix to a single row, 1 reduces it to a single column

eReduceType

ETcVnReduceType

Reduction operation

 Return value

HRESULT

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