Struct opencv::gapi::GMat

source ·
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 typeI/O data type
cv::GMatcv::Mat, cv::UMat, cv::RMat
cv::GScalarcv::Scalar
cv::GArray<T>std::vector
cv::GOpaque<T>T
cv::GFramecv::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

Implementations

Constructs an empty GMat

Normally, empty G-API data objects denote a starting point of the graph. When an empty GMat is assigned to a result of some operation, it obtains a functional link to this operation (and is not empty anymore).

Trait Implementations

Wrap the specified raw pointer Read more
Return an the underlying raw pointer while consuming this wrapper. Read more
Return the underlying raw pointer. Read more
Return the underlying mutable raw pointer Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.