pub fn reduce(src: &dyn core::ToInputArray, dst: &mut dyn core::ToOutputArray, dim: i32, rtype: i32, dtype: i32) -> Result<()> {
	input_array_arg!(src);
	output_array_arg!(dst);
	unsafe { sys::cv_reduce_const__InputArrayX_const__OutputArrayX_int_int_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), dim, rtype, dtype) }.into_result()
}
/// Reduces a matrix to a vector.
/// 
/// The function #reduce reduces the 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. For example, the function can be used to compute horizontal and vertical projections of a
/// raster image. In case of #REDUCE_MAX and #REDUCE_MIN , the output image should have the same type as the source one.
/// In case of #REDUCE_SUM and #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.
/// 
/// The following code demonstrates its usage for a single channel matrix.
/// [example](https://github.com/opencv/opencv/blob/3.4.10/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1)
/// 
/// And the following code demonstrates its usage for a two-channel matrix.
/// [example2](https://github.com/opencv/opencv/blob/3.4.10/samples/cpp/tutorial_code/snippets/core_reduce.cpp#L1)
/// 
/// ## Parameters
/// * src: input 2D matrix.
/// * dst: output vector. Its size and type is defined by dim and dtype parameters.
/// * dim: dimension index along which the matrix is reduced. 0 means that the matrix is reduced to
/// a single row. 1 means that the matrix is reduced to a single column.
/// * rtype: reduction operation that could be one of #ReduceTypes
/// * dtype: when negative, the output vector will have the same type as the input matrix,
/// otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src.channels()).
/// ## See also
/// repeat
/// 
/// ## C++ default parameters
/// * dtype: -1
Reduces a matrix to a vector.
The function #reduce reduces the 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. For example, the function can be used to compute horizontal and vertical projections of a
raster image. In case of #REDUCE_MAX and #REDUCE_MIN , the output image should have the same type as the source one.
In case of #REDUCE_SUM and #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.

The following code demonstrates its usage for a single channel matrix.
[example]

And the following code demonstrates its usage for a two-channel matrix.
[example2]
Reduces a matrix to a vector . The function #reduce reduces the 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 . For example the function can be used to compute horizontal and vertical projections of a raster image . In case of #REDUCE_MAX and #REDUCE_MIN the output image should have the same type as the source one . In case of #REDUCE_SUM and #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 . The following code demonstrates its usage for a single channel matrix . [ example ] And the following code demonstrates its usage for a two - channel matrix . [ example2 ]
pub fn reduce(src: &dyn core::ToInputArray, dst: &mut dyn core::ToOutputArray, dim: i32, rtype: i32, dtype: i32) -> Result<()> {
	input_array_arg!(src);
	output_array_arg!(dst);
	unsafe { sys::cv_reduce_const__InputArrayX_const__OutputArrayX_int_int_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), dim, rtype, dtype) }.into_result()
}
pub fn reduce ( src : & dyn core :: ToInputArray , dst : & mut dyn core :: ToOutputArray , dim : i32 , rtype : i32 , dtype : i32 ) -> Result < ( ) > { input_array_arg ! ( src ) ; output_array_arg ! ( dst ) ; unsafe { sys :: cv_reduce_const__InputArrayX_const__OutputArrayX_int_int_int ( src . as_raw__InputArray ( ) , dst . as_raw__OutputArray ( ) , dim , rtype , dtype ) } . into_result ( ) }
Reduces a matrix to a vector.
Reduces a matrix to a vector .
src
&dyn core::ToInputArray
dst
&mut dyn core::ToOutputArray
dim
i32
rtype
i32
dtype
i32
see also
None
c++ default parameters
None