Method Reduce
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Reduce(InputArray, OutputArray, ReduceDimension, ReduceTypes, int)
transforms 2D matrix to 1D row or column vector by taking sum, minimum, maximum or mean value over all the rows
public static void Reduce(InputArray src, OutputArray dst, ReduceDimension dim, ReduceTypes rtype, int dtype)
Parameters
srcInputArrayThe source 2D matrix
dstOutputArrayThe destination vector. Its size and type is defined by dim and dtype parameters
dimReduceDimensionThe dimension index along which the matrix is reduced. 0 means that the matrix is reduced to a single row and 1 means that the matrix is reduced to a single column
rtypeReduceTypesdtypeintWhen it is negative, the destination vector will have the same type as the source matrix, otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), mtx.channels())