template class cv::MatCommaInitializer_
Overview
Comma-separated Matrix Initializer. More…
#include <mat.hpp> template <typename _Tp> class MatCommaInitializer_ { public: // construction MatCommaInitializer_(Mat_<_Tp>* _m); // methods operator Mat_< _Tp >() const; template <typename T2> MatCommaInitializer_<_Tp>& operator,(T2 v); protected: // fields MatIterator_<_Tp> it; };
Detailed Documentation
Comma-separated Matrix Initializer.
The class instances are usually not created explicitly. Instead, they are created on “matrix << firstValue” operator.
The sample below initializes 2x2 rotation matrix:
double angle = 30, a = cos(angle*CV_PI/180), b = sin(angle*CV_PI/180); Mat R = (Mat_<double>(2,2) << a, -b, b, a);
Construction
MatCommaInitializer_(Mat_<_Tp>* _m)
the constructor, created by “matrix << firstValue” operator, where matrix is cv::Mat
Methods
operator Mat_< _Tp >() const
another form of conversion operator
template <typename T2> MatCommaInitializer_<_Tp>& operator,(T2 v)
the operator that takes the next value and put it to the matrix