matrix_reductions.rst 3.24 KB

Matrix Reductions

ocl::absSum

Returns the sum of absolute values for matrix elements.

Counts the abs sum of matrix elements for each channel. Supports all data types.

ocl::countNonZero

Returns the number of non-zero elements in src

Counts non-zero array elements. Supports all data types.

ocl::min

Computes element-wise minima of two arrays. Supports all data types.

ocl::max

Computes element-wise maxima of two arrays. Supports all data types.

ocl::minMax

Returns void

Finds global minimum and maximum in a whole array or sub-array. Supports all data types.

ocl::minMaxLoc

Returns void

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::sqrSum

Returns the squared sum of matrix elements for each channel

Counts the squared sum of matrix elements for each channel. Supports all data types.

ocl::sum

Returns the sum of matrix elements for each channel

Counts the sum of matrix elements for each channel.