The template scalar class. More...
#include <core.hpp>
Inherits cv::Vec< _Tp, 4 >.
Public Types | |
enum | |
typedef _Tp | value_type |
enum | |
typedef Matx< _Tp, MIN(m, n), 1 > | diag_type |
typedef Matx< _Tp, m, n > | mat_type |
Public Member Functions | |
Scalar_ () | |
various constructors | |
Scalar_ (_Tp v0, _Tp v1, _Tp v2=0, _Tp v3=0) | |
Scalar_ (const CvScalar &s) | |
Scalar_ (_Tp v0) | |
operator CvScalar () const | |
conversion to the old-style CvScalar | |
template<typename T2 > | |
operator Scalar_< T2 > () const | |
conversion to another data type | |
Scalar_< _Tp > | mul (const Scalar_< _Tp > &t, double scale=1) const |
per-element product | |
Scalar_< _Tp > | conj () const |
bool | isReal () const |
Vec | mul (const Vec< _Tp, cn > &v) const |
per-element multiplication | |
Matx< _Tp, m, n > | mul (const Matx< _Tp, m, n > &a) const |
multiply two matrices element-wise | |
Vec | cross (const Vec &v) const |
cross product of the two 3D vectors. | |
operator Vec< T2, cn > () const | |
convertion to another data type | |
const _Tp & | operator[] (int i) const |
element access | |
_Tp & | operator[] (int i) |
const _Tp & | operator() (int i) const |
1D element access | |
_Tp & | operator() (int i) |
const _Tp & | operator() (int i, int j) const |
element access | |
_Tp & | operator() (int i, int j) |
Matx< _Tp, MIN(m, n), 1 > | diag () const |
extract the matrix diagonal | |
_Tp | dot (const Matx< _Tp, m, n > &v) const |
dot product computed with the default precision | |
double | ddot (const Matx< _Tp, m, n > &v) const |
dot product computed in double-precision arithmetics | |
operator Matx< T2, m, n > () const | |
convertion to another data type | |
Matx< _Tp, m1, n1 > | reshape () const |
change the matrix shape | |
Matx< _Tp, m1, n1 > | get_minor (int i, int j) const |
extract part of the matrix | |
Matx< _Tp, 1, n > | row (int i) const |
extract the matrix row | |
Matx< _Tp, m, 1 > | col (int i) const |
extract the matrix column | |
Matx< _Tp, n, m > | t () const |
transpose the matrix | |
Matx< _Tp, n, m > | inv (int method=DECOMP_LU) const |
invert matrix the matrix | |
Matx< _Tp, n, l > | solve (const Matx< _Tp, m, l > &rhs, int flags=DECOMP_LU) const |
solve linear system | |
Matx< _Tp, n, 1 > | solve (const Matx< _Tp, m, 1 > &rhs, int method) const |
Static Public Member Functions | |
static Scalar_< _Tp > | all (_Tp v0) |
returns a scalar with all elements set to v0 | |
static Matx | zeros () |
static Matx | ones () |
static Matx | eye () |
static Matx | diag (const diag_type &d) |
static Matx | randu (_Tp a, _Tp b) |
static Matx | randn (_Tp a, _Tp b) |
Public Attributes | |
_Tp | val [m *n] |
The template scalar class.
This is partially specialized cv::Vec class with the number of elements = 4, i.e. a short vector of four elements. Normally, cv::Scalar ~ cv::Scalar_<double> is used.
typedef _Tp cv::Vec< _Tp, cn >::value_type [inherited] |
Reimplemented from cv::Matx< _Tp, cn, 1 >.
anonymous enum [inherited] |
anonymous enum [inherited] |
cv::Scalar_< _Tp >::Scalar_ | ( | ) |
various constructors
cv::Scalar_< _Tp >::Scalar_ | ( | _Tp | v0, |
_Tp | v1, | ||
_Tp | v2 = 0 , |
||
_Tp | v3 = 0 |
||
) |
cv::Scalar_< _Tp >::Scalar_ | ( | const CvScalar & | s | ) |
cv::Scalar_< _Tp >::Scalar_ | ( | _Tp | v0 | ) |
Scalar_< _Tp > cv::Scalar_< _Tp >::all | ( | _Tp | v0 | ) | [static] |
returns a scalar with all elements set to v0
Reimplemented from cv::Vec< _Tp, 4 >.
cv::Scalar_< _Tp >::operator CvScalar | ( | ) | const |
conversion to the old-style CvScalar
Reimplemented from cv::Vec< _Tp, 4 >.
conversion to another data type
Scalar_< _Tp > cv::Scalar_< _Tp >::mul | ( | const Scalar_< _Tp > & | t, |
double | scale = 1 |
||
) | const |
per-element product
Scalar_< _Tp > cv::Scalar_< _Tp >::conj | ( | ) | const |
bool cv::Scalar_< _Tp >::isReal | ( | ) | const |
per-element multiplication
multiply two matrices element-wise
cross product of the two 3D vectors.
For other dimensionalities the exception is raised
const _Tp& cv::Vec< _Tp, cn >::operator[] | ( | int | i | ) | const [inherited] |
element access
_Tp& cv::Vec< _Tp, cn >::operator[] | ( | int | i | ) | [inherited] |
const _Tp& cv::Vec< _Tp, cn >::operator() | ( | int | i | ) | const [inherited] |
1D element access
Reimplemented from cv::Matx< _Tp, cn, 1 >.
_Tp& cv::Vec< _Tp, cn >::operator() | ( | int | i | ) | [inherited] |
Reimplemented from cv::Matx< _Tp, cn, 1 >.
extract the matrix diagonal
dot product computed with the default precision
dot product computed in double-precision arithmetics
convertion to another data type
extract part of the matrix
invert matrix the matrix
Matx<_Tp, n, l> cv::Matx< _Tp, m, n >::solve | ( | const Matx< _Tp, m, l > & | rhs, |
int | flags = DECOMP_LU |
||
) | const [inherited] |
solve linear system
Matx<_Tp, n, 1> cv::Matx< _Tp, m, n >::solve | ( | const Matx< _Tp, m, 1 > & | rhs, |
int | method | ||
) | const [inherited] |