#include <opencv2/gapi/own/mat.hpp>
|
| Mat ()=default |
|
| Mat (int _rows, int _cols, int _type, void *_data, size_t _step=AUTO_STEP) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
| Mat (Mat const &src, const Rect &roi) |
|
| Mat (Mat const &src)=default |
|
| Mat (Mat &&src)=default |
|
int | channels () const |
| Returns the number of matrix channels. More...
|
|
void | copyTo (Mat &dst) const |
| Copies the matrix to another one. More...
|
|
void | create (int _rows, int _cols, int _type) |
|
void | create (Size _size, int _type) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
int | depth () const |
| Returns the depth of a matrix element. More...
|
|
size_t | elemSize () const |
| Returns the matrix element size in bytes. More...
|
|
bool | empty () const |
| Returns true if the array has no elements. More...
|
|
Mat | operator() (const Rect &roi) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
Mat & | operator= (Mat const &src)=default |
|
Mat & | operator= (Mat &&src)=default |
|
Mat & | operator= (const Scalar &s) |
| Sets all or some of the array elements to the specified value. More...
|
|
uchar * | ptr (int row, int col=0) |
| Returns a pointer to the specified matrix row. More...
|
|
const uchar * | ptr (int row, int col=0) const |
|
size_t | total () const |
| Returns the total number of array elements. More...
|
|
int | type () const |
| Returns the type of a matrix element. More...
|
|
|
int | cols = 0 |
|
uchar * | data = nullptr |
| pointer to the data More...
|
|
int | flags = 0 |
| includes several bit-fields: More...
|
|
int | rows = 0 |
| the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions More...
|
|
size_t | step = 0 |
|
◆ anonymous enum
◆ anonymous enum
◆ Mat() [1/5]
cv::gapi::own::Mat::Mat |
( |
| ) |
|
|
default |
◆ Mat() [2/5]
cv::gapi::own::Mat::Mat |
( |
int |
_rows, |
|
|
int |
_cols, |
|
|
int |
_type, |
|
|
void * |
_data, |
|
|
size_t |
_step = AUTO_STEP |
|
) |
| |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
_rows | Number of rows in a 2D array. |
_cols | Number of columns in a 2D array. |
_type | Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices. |
_data | Pointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data. Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. |
_step | Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See Mat::elemSize. |
◆ Mat() [3/5]
cv::gapi::own::Mat::Mat |
( |
Mat const & |
src, |
|
|
const Rect & |
roi |
|
) |
| |
|
inline |
◆ Mat() [4/5]
cv::gapi::own::Mat::Mat |
( |
Mat const & |
src | ) |
|
|
default |
◆ Mat() [5/5]
cv::gapi::own::Mat::Mat |
( |
Mat && |
src | ) |
|
|
default |
◆ channels()
int cv::gapi::own::Mat::channels |
( |
| ) |
const |
|
inline |
◆ copyTo()
void cv::gapi::own::Mat::copyTo |
( |
Mat & |
dst | ) |
const |
|
inline |
◆ create() [1/2]
void cv::gapi::own::Mat::create |
( |
int |
_rows, |
|
|
int |
_cols, |
|
|
int |
_type |
|
) |
| |
|
inline |
- Parameters
-
_rows | New number of rows. |
_cols | New number of columns. |
_type | New matrix type. |
Referenced by copyTo().
◆ create() [2/2]
void cv::gapi::own::Mat::create |
( |
Size |
_size, |
|
|
int |
_type |
|
) |
| |
|
inline |
◆ depth()
int cv::gapi::own::Mat::depth |
( |
| ) |
const |
|
inline |
Returns the depth of a matrix element.
The method returns the identifier of the matrix element depth (the type of each individual channel). For example, for a 16-bit signed element array, the method returns CV_16S . A complete list of matrix types contains the following values:
- CV_8U - 8-bit unsigned integers ( 0..255 )
- CV_8S - 8-bit signed integers ( -128..127 )
- CV_16U - 16-bit unsigned integers ( 0..65535 )
- CV_16S - 16-bit signed integers ( -32768..32767 )
- CV_32S - 32-bit signed integers ( -2147483648..2147483647 )
- CV_32F - 32-bit floating-point numbers ( -FLT_MAX..FLT_MAX, INF, NAN )
- CV_64F - 64-bit floating-point numbers ( -DBL_MAX..DBL_MAX, INF, NAN )
References CV_MAT_DEPTH, and cv::gapi::own::detail::MatHeader::flags.
◆ elemSize()
size_t cv::gapi::own::Mat::elemSize |
( |
| ) |
const |
|
inline |
Returns the matrix element size in bytes.
The method returns the matrix element size in bytes. For example, if the matrix type is CV_16SC3 , the method returns 3*sizeof(short) or 6.
References CV_ELEM_SIZE.
◆ empty()
bool cv::gapi::own::Mat::empty |
( |
| ) |
const |
Returns true if the array has no elements.
The method returns true if Mat::total() is 0 or if Mat::data is NULL. Because of pop_back() and resize() methods M.total() == 0
does not imply that M.data == NULL
.
◆ operator()()
Mat cv::gapi::own::Mat::operator() |
( |
const Rect & |
roi | ) |
const |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
roi | Extracted submatrix specified as a rectangle. |
◆ operator=() [1/3]
Mat& cv::gapi::own::Mat::operator= |
( |
Mat const & |
src | ) |
|
|
default |
◆ operator=() [2/3]
Mat& cv::gapi::own::Mat::operator= |
( |
Mat && |
src | ) |
|
|
default |
◆ operator=() [3/3]
Mat& cv::gapi::own::Mat::operator= |
( |
const Scalar & |
s | ) |
|
|
inline |
◆ ptr() [1/2]
uchar* cv::gapi::own::Mat::ptr |
( |
int |
row, |
|
|
int |
col = 0 |
|
) |
| |
|
inline |
Returns a pointer to the specified matrix row.
The methods return uchar*
or typed pointer to the specified matrix row. See the sample in Mat::isContinuous to know how to use these methods.
- Parameters
-
row | Index along the dimension 0 |
col | Index along the dimension 1 |
Referenced by copyTo().
◆ ptr() [2/2]
const uchar* cv::gapi::own::Mat::ptr |
( |
int |
row, |
|
|
int |
col = 0 |
|
) |
| const |
|
inline |
◆ total()
size_t cv::gapi::own::Mat::total |
( |
| ) |
const |
|
inline |
◆ type()
int cv::gapi::own::Mat::type |
( |
| ) |
const |
|
inline |
◆ cols
int cv::gapi::own::detail::MatHeader::cols = 0 |
|
inherited |
◆ data
uchar* cv::gapi::own::detail::MatHeader::data = nullptr |
|
inherited |
◆ flags
int cv::gapi::own::detail::MatHeader::flags = 0 |
|
inherited |
◆ rows
int cv::gapi::own::detail::MatHeader::rows = 0 |
|
inherited |
◆ step
size_t cv::gapi::own::detail::MatHeader::step = 0 |
|
inherited |
The documentation for this class was generated from the following file: