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§

source§

impl GMat

source

pub fn default() -> Result<GMat>

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§

source§

impl Boxed for GMat

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl Clone for GMat

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GMat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for GMat

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<GMatP> for GMat

source§

fn from(s: GMatP) -> Self

Converts to this type from the input type.
source§

impl GMatTrait for GMat

source§

impl GMatTraitConst for GMat

source§

impl Send for GMat

source§

impl VectorElement for GMatwhere Vector<GMat>: VectorExtern<GMat>,

Auto Trait Implementations§

§

impl RefUnwindSafe for GMat

§

impl !Sync for GMat

§

impl Unpin for GMat

§

impl UnwindSafe for GMat

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.