Returns void
void ocl::
abs
(const oclMat& src, oclMat& dst)¶Parameters: |
|
---|
Computes per-element absolute values of the input array. Supports all data types.
Returns void
void ocl::
absdiff
(const oclMat& src1, const oclMat& src2, oclMat& dst)¶
void ocl::
absdiff
(const oclMat& src1, const Scalar& s, oclMat& dst)¶Parameters: |
|
---|
Computes per-element absolute difference between two arrays or between array and a scalar. Supports all data types.
Returns void
void ocl::
add
(const oclMat& src1, const oclMat& src2, oclMat& dst, const oclMat& mask=oclMat())¶
void ocl::
add
(const oclMat& src1, const Scalar& s, oclMat& dst, const oclMat& mask=oclMat())¶Parameters: |
|
---|
Computes per-element additon between two arrays or between array and a scalar. Supports all data types.
Computes the weighted sum of two arrays.
void ocl::
addWeighted
(const oclMat& src1, double alpha, const oclMat& src2, double beta, double gama, oclMat& dst)¶Parameters: |
|
---|
The function addWeighted
calculates the weighted sum of two arrays as follows:
\texttt{c} (I)= \texttt{saturate} ( \texttt{a} (I)* \texttt{alpha} + \texttt{b} (I)* \texttt{beta} + \texttt{gamma} )
where I
is a multi-dimensional index of array elements. In case of multi-channel arrays, each channel is processed independently.
See also
Returns void
void ocl::
bitwise_and
(const oclMat& src1, const oclMat& src2, oclMat& dst, const oclMat& mask=oclMat())¶
void ocl::
bitwise_and
(const oclMat& src1, const Scalar& s, oclMat& dst, const oclMat& mask=oclMat())¶Parameters: |
|
---|
Computes per-element bitwise_and between two arrays or between array and a scalar. Supports all data types.
Returns void
void ocl::
bitwise_not
(const oclMat& src, oclMat& dst)¶Parameters: |
|
---|
The functions bitwise not compute per-element bit-wise inversion of the source array. Supports all data types.
Returns void
void ocl::
bitwise_or
(const oclMat& src1, const oclMat& src2, oclMat& dst, const oclMat& mask=oclMat())¶
void ocl::
bitwise_or
(const oclMat& src1, const Scalar& s, oclMat& dst, const oclMat& mask=oclMat())¶Parameters: |
|
---|
Computes per-element bitwise_or between two arrays or between array and a scalar. Supports all data types.
Returns void
void ocl::
bitwise_xor
(const oclMat& src1, const oclMat& src2, oclMat& dst, const oclMat& mask=oclMat())¶
void ocl::
bitwise_xor
(const oclMat& src1, const Scalar& s, oclMat& dst, const oclMat& mask=oclMat())¶Parameters: |
|
---|
Computes per-element bitwise_xor between two arrays or between array and a scalar. Supports all data types.
Returns void
void ocl::
cartToPolar
(const oclMat& x, const oclMat& y, oclMat& magnitude, oclMat& angle, bool angleInDegrees=false)¶Parameters: |
|
---|
Calculates the magnitude and angle of 2D vectors. Supports only CV_32F
and CV_64F
data types.
Returns void
void ocl::
compare
(const oclMat& src1, const oclMat& src2, oclMat& dst, int cmpop)¶Parameters: |
|
---|
Performs per-element comparison of two arrays or an array and scalar value. Supports all data types.
Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix.
void ocl::
dft
(const oclMat& src, oclMat& dst, Size dft_size=Size(), int flags=0)¶Parameters: |
|
---|
Use to handle real matrices (CV_32FC1
) and complex matrices in the interleaved format (CV_32FC2
).
The dft_size
must be powers of 2
, 3
and 5
. Real to complex dft output is not the same with cpu version. Real to complex and complex to real does not support DFT_ROWS
.
See also
Returns void
void ocl::
divide
(const oclMat& src1, const oclMat& src2, oclMat& dst, double scale=1)¶
void ocl::
divide
(double scale, const oclMat& src1, oclMat& dst)¶Parameters: |
|
---|
Computes per-element divide between two arrays or between array and a scalar. Supports all data types.
Returns void
void ocl::
exp
(const oclMat& src, oclMat& dst)¶Parameters: |
|
---|
The function exp calculates the exponent of every element of the input array. Supports only CV_32FC1
and CV_64F
data types.
Returns void
void ocl::
flip
(const oclMat& src, oclMat& dst, int flipCode)¶Parameters: |
|
---|
The function flip flips the array in one of three different ways (row and column indices are 0-based). Supports all data types.
Performs generalized matrix multiplication.
void ocl::
gemm
(const oclMat& src1, const oclMat& src2, double alpha, const oclMat& src3, double beta, oclMat& dst, int flags=0)¶Parameters: |
|
---|
See also
Returns void
void ocl::
log
(const oclMat& src, oclMat& dst)¶Parameters: |
|
---|
The function log calculates the log of every element of the input array. Supports only CV_32FC1
and CV_64F
data types.
Returns void
void ocl::
LUT
(const oclMat& src, const oclMat& lut, oclMat& dst)¶Parameters: |
|
---|
Performs a look-up table transform of an array.
Returns void
void ocl::
magnitude
(const oclMat& x, const oclMat& y, oclMat& magnitude)¶Parameters: |
|
---|
The function magnitude calculates magnitude of 2D vectors formed from the corresponding elements of x
and y
arrays. Supports only CV_32F
and CV_64F
data types.
Returns void
void ocl::
meanStdDev
(const oclMat& mtx, Scalar& mean, Scalar& stddev)¶Parameters: |
|
---|
The functions meanStdDev compute the mean and the standard deviation M of array elements, independently for each channel, and return it via the output parameters. Supports all data types.
Returns void
void ocl::
merge
(const vector<oclMat>& src, oclMat& dst)¶Parameters: |
|
---|
Composes a multi-channel array from several single-channel arrays. Supports all data types.
Returns void
void ocl::
multiply
(const oclMat& src1, const oclMat& src2, oclMat& dst, double scale=1)¶Parameters: |
|
---|
Computes per-element multiply between two arrays or between array and a scalar. Supports all data types.
Returns the calculated norm
double ocl::
norm
(const oclMat& src1, int normType=NORM_L2)¶
double ocl::
norm
(const oclMat& src1, const oclMat& src2, int normType=NORM_L2)¶Parameters: |
|
---|
The functions norm
calculate an absolute norm of src1
(when there is no src2
):
norm = \forkthree{\|\texttt{src1}\|_{L_{\infty}} = \max _I | \texttt{src1} (I)|}{if $\texttt{normType} = \texttt{NORM\_INF}$ } { \| \texttt{src1} \| _{L_1} = \sum _I | \texttt{src1} (I)|}{if $\texttt{normType} = \texttt{NORM\_L1}$ } { \| \texttt{src1} \| _{L_2} = \sqrt{\sum_I \texttt{src1}(I)^2} }{if $\texttt{normType} = \texttt{NORM\_L2}$ }
or an absolute or relative difference norm if src2
is there:
norm = \forkthree{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} = \max _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if $\texttt{normType} = \texttt{NORM\_INF}$ } { \| \texttt{src1} - \texttt{src2} \| _{L_1} = \sum _I | \texttt{src1} (I) - \texttt{src2} (I)|}{if $\texttt{normType} = \texttt{NORM\_L1}$ } { \| \texttt{src1} - \texttt{src2} \| _{L_2} = \sqrt{\sum_I (\texttt{src1}(I) - \texttt{src2}(I))^2} }{if $\texttt{normType} = \texttt{NORM\_L2}$ }
or
norm = \forkthree{\frac{\|\texttt{src1}-\texttt{src2}\|_{L_{\infty}} }{\|\texttt{src2}\|_{L_{\infty}} }}{if $\texttt{normType} = \texttt{NORM\_RELATIVE\_INF}$ } { \frac{\|\texttt{src1}-\texttt{src2}\|_{L_1} }{\|\texttt{src2}\|_{L_1}} }{if $\texttt{normType} = \texttt{NORM\_RELATIVE\_L1}$ } { \frac{\|\texttt{src1}-\texttt{src2}\|_{L_2} }{\|\texttt{src2}\|_{L_2}} }{if $\texttt{normType} = \texttt{NORM\_RELATIVE\_L2}$ }
The functions norm
return the calculated norm.
A multi-channel input arrays are treated as a single-channel, that is, the results for all channels are combined.
Returns void
void ocl::oclMat::
convertTo
(oclMat& m, int rtype, double alpha=1, double beta=0) const
¶Parameters: |
|
---|
The method converts source pixel values to the target datatype. Saturate cast is applied in the end to avoid possible overflows. Supports all data types.
Returns void
void ocl::oclMat::
copyTo
(oclMat& m, const oclMat& mask=oclMat()) const
¶Parameters: |
|
---|
Copies the matrix to another one. Supports all data types.
Returns oclMat
oclMat& ocl::oclMat::
setTo
(const Scalar& s, const oclMat& mask=oclMat())¶Parameters: |
|
---|
Sets all or some of the array elements to the specified value. This is the advanced variant of Mat::operator=(const Scalar s) operator. Supports all data types.
Returns void
void ocl::
phase
(const oclMat& x, const oclMat& y, oclMat& angle, bool angleInDegrees=false)¶Parameters: |
|
---|
The function phase computes the rotation angle of each 2D vector that is formed from the corresponding elements of x
and y
. Supports only CV_32FC1
and CV_64FC1
data type.
Returns void
void ocl::
polarToCart
(const oclMat& magnitude, const oclMat& angle, oclMat& x, oclMat& y, bool angleInDegrees=false)¶Parameters: |
|
---|
The function polarToCart computes the cartesian coordinates of each 2D vector represented by the corresponding elements of magnitude and angle. Supports only CV_32F
and CV_64F
data types.
Returns void
void ocl::
pow
(const oclMat& x, double p, oclMat& y)¶Parameters: |
|
---|
The function pow raises every element of the input array to p
. Supports only CV_32FC1
and CV_64FC1
data types.
Returns void
void ocl::
setIdentity
(oclMat& src, const Scalar& val=Scalar(1))¶Parameters: |
|
---|
The function initializes a scaled identity matrix.
Returns void
void ocl::
sortByKey
(oclMat& keys, oclMat& values, int method, bool isGreaterThan=false)¶Parameters: |
|
---|
Returns the sorted result of all the elements in values based on equivalent keys.
The element unit in the values to be sorted is determined from the data type, i.e., a CV_32FC2
input {a1a2, b1b2}
will be considered as two elements, regardless its matrix dimension.
Both keys and values will be sorted inplace.
Keys needs to be a single channel oclMat
.
Example:
input -
keys = {2, 3, 1} (CV_8UC1)
values = {10,5, 4,3, 6,2} (CV_8UC2)
sortByKey(keys, values, SORT_SELECTION, false);
output -
keys = {1, 2, 3} (CV_8UC1)
values = {6,2, 10,5, 4,3} (CV_8UC2)
Returns void
void ocl::
split
(const oclMat& src, vector<oclMat>& dst)¶Parameters: |
|
---|
The functions split split multi-channel array into separate single-channel arrays. Supports all data types.
Returns void
void ocl::
subtract
(const oclMat& src1, const oclMat& src2, oclMat& dst, const oclMat& mask=oclMat())¶
void ocl::
subtract
(const oclMat& src1, const Scalar& s, oclMat& dst, const oclMat& mask=oclMat())¶Parameters: |
|
---|
Computes per-element subtract between two arrays or between array and a scalar. Supports all data types.