OpenCV  4.5.4
Open Source Computer Vision
Namespaces | Classes | Functions
G-API Metadata Descriptors

Namespaces

 cv::gapi
 

Classes

struct  cv::GArrayDesc
 
struct  cv::GFrameDesc
 
struct  cv::GMatDesc
 
struct  cv::GOpaqueDesc
 
struct  cv::GScalarDesc
 

Functions

GAPI_WRAP cv::GScalar::GScalar ()
 Constructs an empty GScalar. More...
 
 cv::GScalar::GScalar (const cv::Scalar &s)
 Constructs a value-initialized GScalar. More...
 
 cv::GScalar::GScalar (cv::Scalar &&s)
 Constructs a value-initialized GScalar. More...
 
 cv::GScalar::GScalar (double v0)
 Constructs a value-initialized GScalar. More...
 
template<typename U >
GArrayDesc cv::descr_of (const std::vector< U > &)
 
template<typename U >
GOpaqueDesc cv::descr_of (const U &)
 
GScalarDesc cv::descr_of (const cv::Scalar &scalar)
 
GMatDesc cv::descr_of (const cv::UMat &mat)
 
GMatDesc cv::descr_of (const RMat &mat)
 
GMatDesc cv::descr_of (const cv::Mat &mat)
 
GArrayDesc cv::empty_array_desc ()
 
static GFrameDesc cv::empty_gframe_desc ()
 
static GMatDesc cv::empty_gmat_desc ()
 
GOpaqueDesc cv::empty_gopaque_desc ()
 
GScalarDesc cv::empty_scalar_desc ()
 
bool cv::GScalarDesc::operator!= (const GScalarDesc &rhs) const
 
std::ostream & cv::operator<< (std::ostream &os, const cv::GScalarDesc &desc)
 
bool cv::GScalarDesc::operator== (const GScalarDesc &) const
 

Detailed Description

Function Documentation

◆ GScalar() [1/4]

GAPI_WRAP cv::GScalar::GScalar ( )
Python:
cv.GScalar() -> <GScalar object>

#include <opencv2/gapi/gscalar.hpp>

Constructs an empty GScalar.

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

◆ GScalar() [2/4]

cv::GScalar::GScalar ( const cv::Scalar s)
explicit
Python:
cv.GScalar() -> <GScalar object>

#include <opencv2/gapi/gscalar.hpp>

Constructs a value-initialized GScalar.

In contrast with GMat (which can be either an explicit graph input or a result of some operation), GScalars may have their values be associated at graph construction time. It is useful when some operation has a GScalar input which doesn't change during the program execution, and is set only once. In this case, there is no need to declare such GScalar as a graph input.

Note
The value of GScalar may be overwritten by assigning some other GScalar to the object using operator= – on the assigment, the old GScalar value is discarded.
Parameters
sa cv::Scalar value to associate with this GScalar object.

◆ GScalar() [3/4]

cv::GScalar::GScalar ( cv::Scalar &&  s)
explicit
Python:
cv.GScalar() -> <GScalar object>

#include <opencv2/gapi/gscalar.hpp>

Constructs a value-initialized GScalar.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
sa cv::Scalar value to associate with this GScalar object.

◆ GScalar() [4/4]

cv::GScalar::GScalar ( double  v0)
Python:
cv.GScalar() -> <GScalar object>

#include <opencv2/gapi/gscalar.hpp>

Constructs a value-initialized GScalar.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
v0A double value to associate with this GScalar. Note that only the first component of a four-component cv::Scalar is set to this value, with others remain zeros.

This constructor overload is not marked explicit and can be used in G-API expression code like this:

cv::GMat b = a + 1;

Here operator+(GMat,GScalar) is used to wrap cv::gapi::addC() and a value-initialized GScalar is created on the fly.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ descr_of() [1/6]

template<typename U >
GArrayDesc cv::descr_of ( const std::vector< U > &  )

◆ descr_of() [2/6]

template<typename U >
GOpaqueDesc cv::descr_of ( const U &  )

◆ descr_of() [3/6]

GScalarDesc cv::descr_of ( const cv::Scalar scalar)

◆ descr_of() [4/6]

GMatDesc cv::descr_of ( const cv::UMat mat)

◆ descr_of() [5/6]

GMatDesc cv::descr_of ( const RMat mat)

◆ descr_of() [6/6]

GMatDesc cv::descr_of ( const cv::Mat mat)

◆ empty_array_desc()

GArrayDesc cv::empty_array_desc ( )
inline
Python:
cv.empty_array_desc() -> retval

◆ empty_gframe_desc()

static GFrameDesc cv::empty_gframe_desc ( )
inlinestatic

◆ empty_gmat_desc()

static GMatDesc cv::empty_gmat_desc ( )
inlinestatic

◆ empty_gopaque_desc()

GOpaqueDesc cv::empty_gopaque_desc ( )
inline
Python:
cv.empty_gopaque_desc() -> retval

◆ empty_scalar_desc()

GScalarDesc cv::empty_scalar_desc ( )
inline
Python:
cv.empty_scalar_desc() -> retval

◆ operator!=()

bool cv::GScalarDesc::operator!= ( const GScalarDesc rhs) const
inline

◆ operator<<()

std::ostream& cv::operator<< ( std::ostream &  os,
const cv::GScalarDesc desc 
)

◆ operator==()

bool cv::GScalarDesc::operator== ( const GScalarDesc ) const
inline