|
(Note that these are not member functions.)
|
|
CV_EXPORTS MatExpr | operator+ (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator+ (const Mat &a, const Scalar &s) |
|
CV_EXPORTS MatExpr | operator+ (const Scalar &s, const Mat &a) |
|
CV_EXPORTS MatExpr | operator+ (const MatExpr &e, const Mat &m) |
|
CV_EXPORTS MatExpr | operator+ (const Mat &m, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator+ (const MatExpr &e, const Scalar &s) |
|
CV_EXPORTS MatExpr | operator+ (const Scalar &s, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator+ (const MatExpr &e1, const MatExpr &e2) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator+ (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator+ (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator- (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator- (const Mat &a, const Scalar &s) |
|
CV_EXPORTS MatExpr | operator- (const Scalar &s, const Mat &a) |
|
CV_EXPORTS MatExpr | operator- (const MatExpr &e, const Mat &m) |
|
CV_EXPORTS MatExpr | operator- (const Mat &m, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator- (const MatExpr &e, const Scalar &s) |
|
CV_EXPORTS MatExpr | operator- (const Scalar &s, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator- (const MatExpr &e1, const MatExpr &e2) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator- (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator- (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator- (const Mat &m) |
|
CV_EXPORTS MatExpr | operator- (const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator* (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator* (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator* (double s, const Mat &a) |
|
CV_EXPORTS MatExpr | operator* (const MatExpr &e, const Mat &m) |
|
CV_EXPORTS MatExpr | operator* (const Mat &m, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator* (const MatExpr &e, double s) |
|
CV_EXPORTS MatExpr | operator* (double s, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator* (const MatExpr &e1, const MatExpr &e2) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator* (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator* (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator/ (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator/ (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator/ (double s, const Mat &a) |
|
CV_EXPORTS MatExpr | operator/ (const MatExpr &e, const Mat &m) |
|
CV_EXPORTS MatExpr | operator/ (const Mat &m, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator/ (const MatExpr &e, double s) |
|
CV_EXPORTS MatExpr | operator/ (double s, const MatExpr &e) |
|
CV_EXPORTS MatExpr | operator/ (const MatExpr &e1, const MatExpr &e2) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator/ (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator/ (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator< (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator< (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator< (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator< (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator< (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator<= (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator<= (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator<= (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator<= (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator<= (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator== (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator== (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator== (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator== (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator== (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator!= (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator!= (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator!= (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator!= (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator!= (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator>= (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator>= (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator>= (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator>= (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator>= (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator> (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator> (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | operator> (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator> (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator> (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator& (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator& (const Mat &a, const Scalar &s) |
|
CV_EXPORTS MatExpr | operator& (const Scalar &s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator& (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator& (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator| (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator| (const Mat &a, const Scalar &s) |
|
CV_EXPORTS MatExpr | operator| (const Scalar &s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator| (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator| (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator^ (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator^ (const Mat &a, const Scalar &s) |
|
CV_EXPORTS MatExpr | operator^ (const Scalar &s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator^ (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | operator^ (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | operator~ (const Mat &m) |
|
CV_EXPORTS MatExpr | min (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | min (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | min (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | min (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | min (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | max (const Mat &a, const Mat &b) |
|
CV_EXPORTS MatExpr | max (const Mat &a, double s) |
|
CV_EXPORTS MatExpr | max (double s, const Mat &a) |
|
template<typename _Tp , int m, int n> |
static MatExpr | max (const Mat &a, const Matx< _Tp, m, n > &b) |
|
template<typename _Tp , int m, int n> |
static MatExpr | max (const Matx< _Tp, m, n > &a, const Mat &b) |
|
CV_EXPORTS MatExpr | abs (const Mat &m) |
| Calculates an absolute value of each matrix element. More...
|
|
CV_EXPORTS MatExpr | abs (const MatExpr &e) |
|
Matrix expression representation This is a list of implemented matrix operations that can be combined in arbitrary complex expressions (here A, B stand for matrices ( Mat ), s for a scalar ( Scalar ), alpha for a real-valued scalar ( double )):
- Addition, subtraction, negation:
A+B
, A-B
, A+s
, A-s
, s+A
, s-A
, -A
- Scaling:
A*alpha
- Per-element multiplication and division:
A.mul(B)
, A/B
, alpha/A
- Matrix multiplication:
A*B
- Transposition:
A.t()
(means AT)
- Matrix inversion and pseudo-inversion, solving linear systems and least-squares problems:
A.inv([method]) (~ A<sup>-1</sup>)
, A.inv([method])*B (~ X: AX=B)
- Comparison:
A cmpop B
, A cmpop alpha
, alpha cmpop A
, where cmpop is one of >
, >=
, ==
, !=
, <=
, <
. The result of comparison is an 8-bit single channel mask whose elements are set to 255 (if the particular element or pair of elements satisfy the condition) or 0.
- Bitwise logical operations:
A logicop B
, A logicop s
, s logicop A
, ~A
, where logicop is one of &
, |
, ^
.
- Element-wise minimum and maximum:
min(A, B)
, min(A, alpha)
, max(A, B)
, max(A, alpha)
- Element-wise absolute value:
abs(A)
- Cross-product, dot-product:
A.cross(B)
, A.dot(B)
- Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as norm, mean, sum, countNonZero, trace, determinant, repeat, and others.
- Matrix initializers ( Mat::eye(), Mat::zeros(), Mat::ones() ), matrix comma-separated initializers, matrix constructors and operators that extract sub-matrices (see Mat description).
- Mat_<destination_type>() constructors to cast the result to the proper type.
- Note
- Comma-separated initializers and probably some other operations may require additional explicit Mat() or Mat_<T>() constructor calls to resolve a possible ambiguity.
Here are examples of matrix expressions:
SVD svd(A);
Mat pinvA = svd.vt.t()*
Mat::diag(1./svd.w)*svd.
u.t();
Mat blurred;
double sigma = 1,
threshold = 5, amount = 1;
Mat sharpened = img*(1+amount) + blurred*(-amount);
img.copyTo(sharpened, lowContrastMask);
CV_EXPORTS MatExpr abs(const Mat &m)
Calculates an absolute value of each matrix element.
MatExpr inv(int method=DECOMP_LU) const
Mat diag(int d=0) const
Extracts a diagonal from a matrix.
UMatData * u
interaction with UMat
Definition: mat.hpp:2158
static CV_NODISCARD_STD MatExpr eye(int rows, int cols, int type)
Returns an identity matrix of the specified size and type.
@ DECOMP_CHOLESKY
Definition: base.hpp:143
Size2i Size
Definition: types.hpp:370
const CvArr CvArr * x
Definition: core_c.h:1195
CV_EXPORTS_W void GaussianBlur(InputArray src, OutputArray dst, Size ksize, double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT)
Blurs an image using a Gaussian filter.
CV_EXPORTS_W double threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type)
Applies a fixed-level threshold to each array element.