CvArrayTDepthReduceTOtherDepth Method |
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.World (in Emgu.CV.World.dll) Version: 4.1.1.3497 (4.1.1.3497)
Syntaxpublic void Reduce<TOtherDepth>(
CvArray<TOtherDepth> array1D,
ReduceDimension dim,
ReduceType type
)
where TOtherDepth : new()
Public Sub Reduce(Of TOtherDepth As New) (
array1D As CvArray(Of TOtherDepth),
dim As ReduceDimension,
type As ReduceType
)
public:
generic<typename TOtherDepth>
where TOtherDepth : gcnew()
void Reduce(
CvArray<TOtherDepth>^ array1D,
ReduceDimension dim,
ReduceType type
)
member Reduce :
array1D : CvArray<'TOtherDepth> *
dim : ReduceDimension *
type : ReduceType -> unit when 'TOtherDepth : new()
Parameters
- array1D
- Type: Emgu.CVCvArrayTOtherDepth
The destination single-row/single-column vector that accumulates somehow all the matrix rows/columns - dim
- Type: Emgu.CV.CvEnumReduceDimension
The dimension index along which the matrix is reduce. - type
- Type: Emgu.CV.CvEnumReduceType
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