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.

C# | Visual Basic | Visual C++ |
public void Reduce<TDepth2>( CvArray<TDepth2> array1D, REDUCE_TYPE type )
Public Sub Reduce(Of TDepth2) ( _ array1D As CvArray(Of TDepth2), _ type As REDUCE_TYPE _ )
public: generic<typename TDepth2> void Reduce( CvArray<TDepth2>^ array1D, REDUCE_TYPE type )

- TDepth2
[Missing <typeparam name="TDepth2"/> documentation for "M:Emgu.CV.CvArray`1.Reduce``1(Emgu.CV.CvArray{``0},Emgu.CV.CvEnum.REDUCE_TYPE)"]

- array1D (CvArray<(Of <(TDepth2>)>))
- The destination single-row/single-column vector that accumulates somehow all the matrix rows/columns
- type (REDUCE_TYPE)
- The reduction operation type

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