Skip to content

Commit 3649ee3

Browse files
authored
Merge pull request opencv#8887 from krishraghuram:gpu_reduce_doc
Modified doc for gpu::reduce(fixes issue 8628)
2 parents 01e34b6 + d0f3a14 commit 3649ee3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/gpu/doc/matrix_reductions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ Reduces a matrix to a vector.
186186
187187
:param mtx: Source 2D matrix.
188188

189-
:param vec: Destination vector. Its size and type is defined by ``dim`` and ``dtype`` parameters.
189+
:param vec: Destination row vector. Its type is defined by ``dtype`` parameter.
190190

191-
:param 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.
191+
:param dim: Dimension index along which the matrix is reduced. 0 means that the matrix is reduced to a single row(of length equal to number of matrix columns). 1 means that the matrix is reduced to a single column(of length equal to the number of matrix rows). In either case, the output is always stored as a row vector of appropriate length.
192192

193193
:param reduceOp: Reduction operation that could be one of the following:
194194

@@ -202,6 +202,6 @@ Reduces a matrix to a vector.
202202

203203
:param dtype: When it is negative, the destination vector will have the same type as the source matrix. Otherwise, its type will be ``CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), mtx.channels())`` .
204204

205-
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 ``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.
205+
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 column/row is obtained. However, the result is always stored as a row vector. For example, the function can be used to compute horizontal and vertical projections of a 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.
206206

207207
.. seealso:: :ocv:func:`reduce`

0 commit comments

Comments
 (0)