![]() |
stromx
0.8.0
|
Matrix implementation based on OpenCV matrices. More...
#include <Matrix.h>
Public Member Functions | |
| Matrix () | |
| Matrix (const stromx::cvsupport::Matrix &matrix) | |
| Matrix (const unsigned int rows, const unsigned int cols, const ValueType valueType) | |
| Matrix (cv::Mat &cvMatrix) | |
| Matrix (const cv::MatExpr &cvMatExpr) | |
| Matrix (const stromx::runtime::Matrix &matrix) | |
| Matrix (const cv::Rect &cvRect) | |
| Matrix (const cv::RotatedRect &cvRotatedRect) | |
| Matrix (const unsigned int size) | |
| Matrix (const std::string &filename) | |
| virtual const runtime::Version & | version () const |
| virtual const std::string & | type () const |
| virtual const std::string & | package () const |
| virtual Data * | clone () const |
| const Matrix & | operator= (const runtime::Matrix &matrix) |
Public Member Functions inherited from stromx::runtime::MatrixWrapper | |
| MatrixWrapper (const unsigned int bufferSize, uint8_t *const buffer) | |
| MatrixWrapper () | |
| virtual const VariantHandle & | variant () const |
| virtual uint8_t * | buffer () |
| virtual unsigned int | bufferSize () const |
| virtual unsigned int | rows () const |
| virtual unsigned int | cols () const |
| virtual unsigned int | stride () const |
| virtual ValueType | valueType () const |
| virtual uint8_t * | data () |
| virtual const uint8_t * | data () const |
| virtual void | initializeMatrix (const unsigned int rows, const unsigned int cols, const unsigned int stride, uint8_t *data, const ValueType valueType) |
| virtual void | serialize (OutputProvider &output) const |
| virtual void | deserialize (InputProvider &input, const Version &version) |
| void | resize (const unsigned int rows, const unsigned int cols, const ValueType valueType) |
| void | resize (const unsigned int size) |
| void | open (const std::string &filename) |
| void | save (const std::string &filename) const |
Public Member Functions inherited from stromx::runtime::Matrix | |
| virtual unsigned int | valueSize () const |
| template<class T > | |
| T & | at (const unsigned row, const unsigned col) |
| template<class T > | |
| const T & | at (const unsigned int row, const unsigned col) const |
| template<class T > | |
| const T | value (const unsigned int row, const unsigned int col) const |
Public Member Functions inherited from stromx::runtime::DataInterface | |
| bool | isVariant (const VariantInterface &v) const |
Static Public Member Functions | |
| static cvsupport::Matrix | eye (const unsigned int rows, const unsigned int cols, const ValueType valueType) |
| static cvsupport::Matrix | zeros (const unsigned int rows, const unsigned int cols, const ValueType valueType) |
Static Public Member Functions inherited from stromx::runtime::MatrixWrapper | |
| static void | save (const std::string &filename, const runtime::Matrix &matrix) |
Static Public Member Functions inherited from stromx::runtime::Matrix | |
| static unsigned int | valueSize (const ValueType valueType) |
Friends | |
| STROMX_CVSUPPORT_API cv::Mat | getOpenCvMat (const runtime::Matrix &matrix, const unsigned int numChannels) |
Additional Inherited Members | |
Public Types inherited from stromx::runtime::Matrix | |
| enum | ValueType { NONE, INT_8, UINT_8, INT_16, UINT_16, INT_32, UINT_32, FLOAT_32, FLOAT_64 } |
Protected Member Functions inherited from stromx::runtime::MatrixWrapper | |
| void | setBuffer (uint8_t *const buffer, const unsigned int bufferSize) |
Static Protected Member Functions inherited from stromx::runtime::Matrix | |
| static const runtime::VariantHandle | dataVariantFromValueType (const ValueType valueType) |
Matrix implementation based on OpenCV matrices.
| stromx::cvsupport::Matrix::Matrix | ( | ) |
Constructs an empty matrix with zero rows and columns and value type Matrix::NONE. No data is associated with the matrix, i.e. its data and buffer pointers are 0.
| stromx::cvsupport::Matrix::Matrix | ( | const stromx::cvsupport::Matrix & | matrix | ) |
Copy constructs a matrix from matrix.
|
explicit |
Constructs a matrix for the given parameters.
|
explicit |
Constructs a matrix from cvMatrix. The data of the input matrix is not copied only a lightweight wrapper is allocated which references cvMatrix.
|
explicit |
Constructs a matrix from cvMatExpr. The data of the input matrix is copied to this matrix.
|
explicit |
Copy constructs a matrix from matrix.
|
explicit |
Allocates a 1 x 4 matrix with 32-bit integer values and copies the (x, y, width, height) values from cvRect to it.
|
explicit |
Allocates a 1 x 5 matrix with 32-bit float values and copies the (centerX, centerY, width, height, angle) of cvRotatedRect to it.
|
explicit |
Allocates a matrix with a buffer of a given size in bytes. The matrix has 1 row and size columns. Its value type is Image::NONE. The buffer size of the image is guaranteed to be at least size.
|
explicit |
Allocates a matrix and reads its content from the file filename.
|
virtual |
Returns a copy of the data object, i.e. a object of the same type is allocated and the data of the original object is copied to the new object. A pointer to the new object is returned.
Implements stromx::runtime::DataInterface.
|
static |
Returns the identity matrix (or a submatrix of a larger identity matrix) with the given number of rows and cols and with values of type of valueType.
| const Matrix & stromx::cvsupport::Matrix::operator= | ( | const runtime::Matrix & | matrix | ) |
Copies the the matrix on the right hand side.
|
inlinevirtual |
Returns the package of the class of this data object.
Implements stromx::runtime::DataInterface.
|
inlinevirtual |
Returns the name of the class of this data object.
Implements stromx::runtime::DataInterface.
|
inlinevirtual |
Returns the version of the class of this data object.
Implements stromx::runtime::DataInterface.
|
static |
Returns the zero matrix with the given number of rows and cols and with values of type of valueType.
|
friend |
Returns an OpenCV matrix header for matrix.
1.8.12