Reduce

Reduce ipSrcImage by applying the specified operation across rows/columns to obtain a single row/column/channel 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, and 2 reduces to a single channel

eReduceType

ETcVnReduceType

Reduction operation

 Return value

HRESULT

Required License

TC3 Vision Base

System Requirements