2012-10-30 21:58:44 +08:00
Matrix Reductions
=============================
.. highlight :: cpp
ocl::countNonZero
2013-09-26 14:04:11 +08:00
---------------------
2012-10-30 21:58:44 +08:00
Returns the number of non-zero elements in src
2012-12-26 21:51:04 +08:00
.. ocv:function :: int ocl::countNonZero(const oclMat &src)
2012-10-30 21:58:44 +08:00
:param src: Single-channel array
Counts non-zero array elements.
ocl::minMax
------------------
Returns void
2012-12-26 21:51:04 +08:00
.. ocv:function :: void ocl::minMax(const oclMat &src, double *minVal, double * maxVal = 0, const oclMat &mask = oclMat())
2012-10-30 21:58:44 +08:00
:param src: Single-channel array
:param minVal: Pointer to returned minimum value, should not be NULL
:param maxVal: Pointer to returned maximum value, should not be NULL
:param mask: The optional mask used to select a sub-array
Finds global minimum and maximum in a whole array or sub-array. Supports all data types.
ocl::minMaxLoc
------------------
Returns void
2012-12-26 21:51:04 +08:00
.. ocv:function :: void ocl::minMaxLoc(const oclMat &src, double *minVal, double * maxVal = 0, Point *minLoc = 0, Point * maxLoc = 0,const oclMat &mask = oclMat())
2012-10-30 21:58:44 +08:00
:param src: Single-channel array
:param minVal: Pointer to returned minimum value, should not be NULL
:param maxVal: Pointer to returned maximum value, should not be NULL
:param minLoc: Pointer to returned minimum location (in 2D case), should not be NULL
:param maxLoc: Pointer to returned maximum location (in 2D case) should not be NULL
:param mask: The optional mask used to select a sub-array
The functions minMaxLoc find minimum and maximum element values and their positions. The extremums are searched across the whole array, or, if mask is not an empty array, in the specified array region. The functions do not work with multi-channel arrays.
ocl::Sum
------------------
Returns the sum of matrix elements for each channel
2012-12-26 21:51:04 +08:00
.. ocv:function :: Scalar ocl::sum(const oclMat &m)
2012-10-30 21:58:44 +08:00
2013-09-26 14:04:11 +08:00
:param m: The Source image of all depth.
2012-10-30 21:58:44 +08:00
Counts the sum of matrix elements for each channel.
2013-09-26 14:04:11 +08:00
ocl::absSum
---------------
Returns the sum of absolute values for matrix elements.
.. ocv:function :: Scalar ocl::absSum(const oclMat &m)
:param m: The Source image of all depth.
Counts the abs sum of matrix elements for each channel.
2012-10-30 21:58:44 +08:00
ocl::sqrSum
------------------
Returns the squared sum of matrix elements for each channel
2012-12-26 21:51:04 +08:00
.. ocv:function :: Scalar ocl::sqrSum(const oclMat &m)
2012-10-30 21:58:44 +08:00
2013-09-26 14:04:11 +08:00
:param m: The Source image of all depth.
2012-10-30 21:58:44 +08:00
2013-08-21 21:26:54 +08:00
Counts the squared sum of matrix elements for each channel.