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.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public void Reduce<TOtherDepth>(
	CvArray<TOtherDepth> array1D,
	REDUCE_DIMENSION dim,
	REDUCE_TYPE type
)
where TOtherDepth : new()
Visual Basic
Public Sub Reduce(Of TOtherDepth As New) ( 
	array1D As CvArray(Of TOtherDepth),
	dim As REDUCE_DIMENSION,
	type As REDUCE_TYPE
)
Visual C++
public:
generic<typename TOtherDepth>
where TOtherDepth : gcnew()
void Reduce(
	CvArray<TOtherDepth>^ array1D, 
	REDUCE_DIMENSION dim, 
	REDUCE_TYPE type
)
F#
member Reduce : 
        array1D : CvArray<'TOtherDepth> * 
        dim : REDUCE_DIMENSION * 
        type : REDUCE_TYPE -> unit  when 'TOtherDepth : new()

Parameters

array1D
Type: Emgu.CV..::..CvArray<(Of <(<'TOtherDepth>)>)>
The destination single-row/single-column vector that accumulates somehow all the matrix rows/columns
dim
Type: Emgu.CV.CvEnum..::..REDUCE_DIMENSION
The dimension index along which the matrix is reduce.
type
Type: Emgu.CV.CvEnum..::..REDUCE_TYPE
The reduction operation type

Type Parameters

TOtherDepth
The type of depth of the reduced 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