transforms 2D matrix to 1D row or column vector by taking sum, minimum, maximum or mean value over all the rows
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic static void Reduce(
InputArray src,
OutputArray dst,
ReduceDimension dim,
ReduceTypes rtype,
int dtype
)
Public Shared Sub Reduce (
src As InputArray,
dst As OutputArray,
dim As ReduceDimension,
rtype As ReduceTypes,
dtype As Integer
)
public:
static void Reduce(
InputArray^ src,
OutputArray^ dst,
ReduceDimension dim,
ReduceTypes rtype,
int dtype
)
static member Reduce :
src : InputArray *
dst : OutputArray *
dim : ReduceDimension *
rtype : ReduceTypes *
dtype : int -> unit
OpenCvSharp.Cv2.Reduce = function(src, dst, dim, rtype, dtype);
Parameters
- src
- Type: OpenCvSharpInputArray
The source 2D matrix - dst
- Type: OpenCvSharpOutputArray
The destination vector.
Its size and type is defined by dim and dtype parameters - dim
- Type: OpenCvSharpReduceDimension
The 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 - rtype
- Type: OpenCvSharpReduceTypes
- dtype
- Type: SystemInt32
When 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())
See Also