pub struct GMat { /* private fields */ }
Expand description
\addtogroup gapi_data_objects
G-API data objects used to build G-API expressions.
These objects do not own any particular data (except compile-time
associated values like with cv::GScalar or cv::GArray<T>
) and are
used only to construct graphs.
Every graph in G-API starts and ends with data objects.
Once constructed and compiled, G-API operates with regular host-side data instead. Refer to the below table to find the mapping between G-API and regular data types when passing input and output data structures to G-API:
G-API data type | I/O data type |
---|---|
cv::GMat | cv::Mat, cv::UMat, cv::RMat |
cv::GScalar | cv::Scalar |
cv::GArray<T> | std::vector |
cv::GOpaque<T> | T |
cv::GFrame | cv::MediaFrame |
/ |
GMat class represents image or tensor data in the graph.
GMat doesn’t store any data itself, instead it describes a functional relationship between operations consuming and producing GMat objects.
GMat is a virtual counterpart of Mat and UMat, but it doesn’t mean G-API use Mat or UMat objects internally to represent GMat objects – the internal data representation may be backend-specific or optimized out at all.
See also
Mat, GMatDesc