http://www.emgu.com
Reduces matrix to a vector by treating the matrix rows/columns as a set of 1D vectors and performing the specified operation on the vectors until a single row/column is obtained.
Namespace: Emgu.CVAssembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.2.0.2682 (3.2.0.2682)
Syntax public static void Reduce(
IInputArray src,
IOutputArray dst,
ReduceDimension dim = ReduceDimension.Auto,
ReduceType type = ReduceType.ReduceSum,
DepthType dtype = DepthType.Default
)
Public Shared Sub Reduce (
src As IInputArray,
dst As IOutputArray,
Optional dim As ReduceDimension = ReduceDimension.Auto,
Optional type As ReduceType = ReduceType.ReduceSum,
Optional dtype As DepthType = DepthType.Default
)
public:
static void Reduce(
IInputArray^ src,
IOutputArray^ dst,
ReduceDimension dim = ReduceDimension::Auto,
ReduceType type = ReduceType::ReduceSum,
DepthType dtype = DepthType::Default
)
static member Reduce :
src : IInputArray *
dst : IOutputArray *
?dim : ReduceDimension *
?type : ReduceType *
?dtype : DepthType
(* Defaults:
let _dim = defaultArg dim ReduceDimension.Auto
let _type = defaultArg type ReduceType.ReduceSum
let _dtype = defaultArg dtype DepthType.Default
*)
-> unit
Parameters
- src
- Type: Emgu.CVIInputArray
The input matrix - dst
- Type: Emgu.CVIOutputArray
The output single-row/single-column vector that accumulates somehow all the matrix rows/columns - dim (Optional)
- Type: Emgu.CV.CvEnumReduceDimension
The dimension index along which the matrix is reduce. - type (Optional)
- Type: Emgu.CV.CvEnumReduceType
The reduction operation type - dtype (Optional)
- Type: Emgu.CV.CvEnumDepthType
Optional depth type of the output array
Remarks
The function can be used to compute horizontal and vertical projections of an raster image.
In case of CV_REDUCE_SUM and CV_REDUCE_AVG the output may have a larger element bit-depth to preserve accuracy.
And multi-channel arrays are also supported in these two reduction modes
See Also