OpenCV  3.1.0
Open Source Computer Vision
Public Member Functions | Public Attributes | List of all members
cv::MatExpr Class Reference

Matrix expression representation. More...

#include "mat.hpp"

Public Member Functions

 MatExpr ()
 
 MatExpr (const Mat &m)
 
 MatExpr (const MatOp *_op, int _flags, const Mat &_a=Mat(), const Mat &_b=Mat(), const Mat &_c=Mat(), double _alpha=1, double _beta=1, const Scalar &_s=Scalar())
 
MatExpr col (int x) const
 
Mat cross (const Mat &m) const
 
MatExpr diag (int d=0) const
 
double dot (const Mat &m) const
 
MatExpr inv (int method=DECOMP_LU) const
 
MatExpr mul (const MatExpr &e, double scale=1) const
 
MatExpr mul (const Mat &m, double scale=1) const
 
 operator Mat () const
 
template<typename _Tp >
 operator Mat_< _Tp > () const
 
MatExpr operator() (const Range &rowRange, const Range &colRange) const
 
MatExpr operator() (const Rect &roi) const
 
MatExpr row (int y) const
 
Size size () const
 
MatExpr t () const
 
int type () const
 

Public Attributes

Mat a
 
double alpha
 
Mat b
 
double beta
 
Mat c
 
int flags
 
const MatOpop
 
Scalar s
 

Related Functions

(Note that these are not member functions.)

MatExpr operator+ (const Mat &a, const Mat &b)
 
MatExpr operator+ (const Mat &a, const Scalar &s)
 
MatExpr operator+ (const Scalar &s, const Mat &a)
 
MatExpr operator+ (const MatExpr &e, const Mat &m)
 
MatExpr operator+ (const Mat &m, const MatExpr &e)
 
MatExpr operator+ (const MatExpr &e, const Scalar &s)
 
MatExpr operator+ (const Scalar &s, const MatExpr &e)
 
MatExpr operator+ (const MatExpr &e1, const MatExpr &e2)
 
MatExpr operator- (const Mat &a, const Mat &b)
 
MatExpr operator- (const Mat &a, const Scalar &s)
 
MatExpr operator- (const Scalar &s, const Mat &a)
 
MatExpr operator- (const MatExpr &e, const Mat &m)
 
MatExpr operator- (const Mat &m, const MatExpr &e)
 
MatExpr operator- (const MatExpr &e, const Scalar &s)
 
MatExpr operator- (const Scalar &s, const MatExpr &e)
 
MatExpr operator- (const MatExpr &e1, const MatExpr &e2)
 
MatExpr operator- (const Mat &m)
 
MatExpr operator- (const MatExpr &e)
 
MatExpr operator* (const Mat &a, const Mat &b)
 
MatExpr operator* (const Mat &a, double s)
 
MatExpr operator* (double s, const Mat &a)
 
MatExpr operator* (const MatExpr &e, const Mat &m)
 
MatExpr operator* (const Mat &m, const MatExpr &e)
 
MatExpr operator* (const MatExpr &e, double s)
 
MatExpr operator* (double s, const MatExpr &e)
 
MatExpr operator* (const MatExpr &e1, const MatExpr &e2)
 
MatExpr operator/ (const Mat &a, const Mat &b)
 
MatExpr operator/ (const Mat &a, double s)
 
MatExpr operator/ (double s, const Mat &a)
 
MatExpr operator/ (const MatExpr &e, const Mat &m)
 
MatExpr operator/ (const Mat &m, const MatExpr &e)
 
MatExpr operator/ (const MatExpr &e, double s)
 
MatExpr operator/ (double s, const MatExpr &e)
 
MatExpr operator/ (const MatExpr &e1, const MatExpr &e2)
 
MatExpr operator< (const Mat &a, const Mat &b)
 
MatExpr operator< (const Mat &a, double s)
 
MatExpr operator< (double s, const Mat &a)
 
MatExpr operator<= (const Mat &a, const Mat &b)
 
MatExpr operator<= (const Mat &a, double s)
 
MatExpr operator<= (double s, const Mat &a)
 
MatExpr operator== (const Mat &a, const Mat &b)
 
MatExpr operator== (const Mat &a, double s)
 
MatExpr operator== (double s, const Mat &a)
 
MatExpr operator!= (const Mat &a, const Mat &b)
 
MatExpr operator!= (const Mat &a, double s)
 
MatExpr operator!= (double s, const Mat &a)
 
MatExpr operator>= (const Mat &a, const Mat &b)
 
MatExpr operator>= (const Mat &a, double s)
 
MatExpr operator>= (double s, const Mat &a)
 
MatExpr operator> (const Mat &a, const Mat &b)
 
MatExpr operator> (const Mat &a, double s)
 
MatExpr operator> (double s, const Mat &a)
 
MatExpr operator& (const Mat &a, const Mat &b)
 
MatExpr operator& (const Mat &a, const Scalar &s)
 
MatExpr operator& (const Scalar &s, const Mat &a)
 
MatExpr operator| (const Mat &a, const Mat &b)
 
MatExpr operator| (const Mat &a, const Scalar &s)
 
MatExpr operator| (const Scalar &s, const Mat &a)
 
MatExpr operator^ (const Mat &a, const Mat &b)
 
MatExpr operator^ (const Mat &a, const Scalar &s)
 
MatExpr operator^ (const Scalar &s, const Mat &a)
 
MatExpr operator~ (const Mat &m)
 
MatExpr min (const Mat &a, const Mat &b)
 
MatExpr min (const Mat &a, double s)
 
MatExpr min (double s, const Mat &a)
 
MatExpr max (const Mat &a, const Mat &b)
 
MatExpr max (const Mat &a, double s)
 
MatExpr max (double s, const Mat &a)
 
MatExpr abs (const Mat &m)
 Calculates an absolute value of each matrix element. More...
 
MatExpr abs (const MatExpr &e)
 

Detailed Description

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

Constructor & Destructor Documentation

cv::MatExpr::MatExpr ( )
cv::MatExpr::MatExpr ( const Mat m)
explicit
cv::MatExpr::MatExpr ( const MatOp _op,
int  _flags,
const Mat _a = Mat(),
const Mat _b = Mat(),
const Mat _c = Mat(),
double  _alpha = 1,
double  _beta = 1,
const Scalar _s = Scalar() 
)

Member Function Documentation

MatExpr cv::MatExpr::col ( int  x) const
Mat cv::MatExpr::cross ( const Mat m) const
MatExpr cv::MatExpr::diag ( int  d = 0) const
double cv::MatExpr::dot ( const Mat m) const
MatExpr cv::MatExpr::inv ( int  method = DECOMP_LU) const
MatExpr cv::MatExpr::mul ( const MatExpr e,
double  scale = 1 
) const
MatExpr cv::MatExpr::mul ( const Mat m,
double  scale = 1 
) const
cv::MatExpr::operator Mat ( ) const
template<typename _Tp >
cv::MatExpr::operator Mat_< _Tp > ( ) const
MatExpr cv::MatExpr::operator() ( const Range rowRange,
const Range colRange 
) const
MatExpr cv::MatExpr::operator() ( const Rect roi) const
MatExpr cv::MatExpr::row ( int  y) const
Size cv::MatExpr::size ( ) const
MatExpr cv::MatExpr::t ( ) const
int cv::MatExpr::type ( ) const

Friends And Related Function Documentation

MatExpr abs ( const Mat m)
related

Calculates an absolute value of each matrix element.

abs is a meta-function that is expanded to one of absdiff or convertScaleAbs forms:

  • C = abs(A-B) is equivalent to absdiff(A, B, C)
  • C = abs(A) is equivalent to absdiff(A, Scalar::all(0), C)
  • C = Mat_<Vec<uchar,n> >(abs(A*alpha + beta)) is equivalent to convertScaleAbs(A, C, alpha, beta)

The output matrix has the same size and the same type as the input one except for the last case, where C is depth=CV_8U .

Parameters
mmatrix.
See also
MatrixExpressions, absdiff, convertScaleAbs
MatExpr abs ( const MatExpr e)
related

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
ematrix expression.
MatExpr max ( const Mat a,
const Mat b 
)
related
MatExpr max ( const Mat a,
double  s 
)
related
MatExpr max ( double  s,
const Mat a 
)
related
MatExpr min ( const Mat a,
const Mat b 
)
related
MatExpr min ( const Mat a,
double  s 
)
related
MatExpr min ( double  s,
const Mat a 
)
related
MatExpr operator!= ( const Mat a,
const Mat b 
)
related
MatExpr operator!= ( const Mat a,
double  s 
)
related
MatExpr operator!= ( double  s,
const Mat a 
)
related
MatExpr operator& ( const Mat a,
const Mat b 
)
related
MatExpr operator& ( const Mat a,
const Scalar s 
)
related
MatExpr operator& ( const Scalar s,
const Mat a 
)
related
MatExpr operator* ( const Mat a,
const Mat b 
)
related
MatExpr operator* ( const Mat a,
double  s 
)
related
MatExpr operator* ( double  s,
const Mat a 
)
related
MatExpr operator* ( const MatExpr e,
const Mat m 
)
related
MatExpr operator* ( const Mat m,
const MatExpr e 
)
related
MatExpr operator* ( const MatExpr e,
double  s 
)
related
MatExpr operator* ( double  s,
const MatExpr e 
)
related
MatExpr operator* ( const MatExpr e1,
const MatExpr e2 
)
related
MatExpr operator+ ( const Mat a,
const Mat b 
)
related
MatExpr operator+ ( const Mat a,
const Scalar s 
)
related
MatExpr operator+ ( const Scalar s,
const Mat a 
)
related
MatExpr operator+ ( const MatExpr e,
const Mat m 
)
related
MatExpr operator+ ( const Mat m,
const MatExpr e 
)
related
MatExpr operator+ ( const MatExpr e,
const Scalar s 
)
related
MatExpr operator+ ( const Scalar s,
const MatExpr e 
)
related
MatExpr operator+ ( const MatExpr e1,
const MatExpr e2 
)
related
MatExpr operator- ( const Mat a,
const Mat b 
)
related
MatExpr operator- ( const Mat a,
const Scalar s 
)
related
MatExpr operator- ( const Scalar s,
const Mat a 
)
related
MatExpr operator- ( const MatExpr e,
const Mat m 
)
related
MatExpr operator- ( const Mat m,
const MatExpr e 
)
related
MatExpr operator- ( const MatExpr e,
const Scalar s 
)
related
MatExpr operator- ( const Scalar s,
const MatExpr e 
)
related
MatExpr operator- ( const MatExpr e1,
const MatExpr e2 
)
related
MatExpr operator- ( const Mat m)
related
MatExpr operator- ( const MatExpr e)
related
MatExpr operator/ ( const Mat a,
const Mat b 
)
related
MatExpr operator/ ( const Mat a,
double  s 
)
related
MatExpr operator/ ( double  s,
const Mat a 
)
related
MatExpr operator/ ( const MatExpr e,
const Mat m 
)
related
MatExpr operator/ ( const Mat m,
const MatExpr e 
)
related
MatExpr operator/ ( const MatExpr e,
double  s 
)
related
MatExpr operator/ ( double  s,
const MatExpr e 
)
related
MatExpr operator/ ( const MatExpr e1,
const MatExpr e2 
)
related
MatExpr operator< ( const Mat a,
const Mat b 
)
related
MatExpr operator< ( const Mat a,
double  s 
)
related
MatExpr operator< ( double  s,
const Mat a 
)
related
MatExpr operator<= ( const Mat a,
const Mat b 
)
related
MatExpr operator<= ( const Mat a,
double  s 
)
related
MatExpr operator<= ( double  s,
const Mat a 
)
related
MatExpr operator== ( const Mat a,
const Mat b 
)
related
MatExpr operator== ( const Mat a,
double  s 
)
related
MatExpr operator== ( double  s,
const Mat a 
)
related
MatExpr operator> ( const Mat a,
const Mat b 
)
related
MatExpr operator> ( const Mat a,
double  s 
)
related
MatExpr operator> ( double  s,
const Mat a 
)
related
MatExpr operator>= ( const Mat a,
const Mat b 
)
related
MatExpr operator>= ( const Mat a,
double  s 
)
related
MatExpr operator>= ( double  s,
const Mat a 
)
related
MatExpr operator^ ( const Mat a,
const Mat b 
)
related
MatExpr operator^ ( const Mat a,
const Scalar s 
)
related
MatExpr operator^ ( const Scalar s,
const Mat a 
)
related
MatExpr operator| ( const Mat a,
const Mat b 
)
related
MatExpr operator| ( const Mat a,
const Scalar s 
)
related
MatExpr operator| ( const Scalar s,
const Mat a 
)
related
MatExpr operator~ ( const Mat m)
related

Member Data Documentation

Mat cv::MatExpr::a
double cv::MatExpr::alpha
Mat cv::MatExpr::b
double cv::MatExpr::beta
Mat cv::MatExpr::c
int cv::MatExpr::flags
const MatOp* cv::MatExpr::op
Scalar cv::MatExpr::s

The documentation for this class was generated from the following file: