| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Namespaces | Classes | Functions
G-API Metadata Descriptors
G-API framework » G-API Data Types

## Detailed Description

## Namespaces
namespace | 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.
GAPI_WRAP | cv::GScalar::GScalar (const cv::Scalar &s)
| Constructs a value-initialized GScalar.
| cv::GScalar::GScalar (cv::Scalar &&s)
| Constructs a value-initialized GScalar.
| cv::GScalar::GScalar (double v0)
| Constructs a value-initialized GScalar.
GMatDesc | cv::descr_of (const cv::Mat &mat)
GScalarDesc | cv::descr_of (const cv::Scalar &scalar)
GMatDesc | cv::descr_of (const cv::UMat &mat)
GMatDesc | cv::descr_of (const RMat &mat)
template<typename U >
GArrayDesc | cv::descr_of (const std::vector< U > &)
template<typename U >
GOpaqueDesc | cv::descr_of (const U &)
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

## Function Documentation

## ◆ GScalar() [1/4]

GAPI_WRAP cv::GScalar::GScalar | ( |  | ) |

Python:
| cv.GScalar( |  | ) -> | <GScalar object>
| cv.GScalar( | s | ) -> | <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]

GAPI_WRAP cv::GScalar::GScalar | ( | const cv::Scalar & | s | ) |
| explicit

Python:
| cv.GScalar( |  | ) -> | <GScalar object>
| cv.GScalar( | s | ) -> | <GScalar object>

`#include <opencv2/gapi/gscalar.hpp>`

Constructs a value-initialized GScalar.

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 assignment, the old GScalar value is discarded.

Parameters

  s | a cv::Scalar value to associate with this GScalar object.

## ◆ GScalar() [3/4]

cv::GScalar::GScalar | ( | cv::Scalar && | s | ) |
| explicit

Python:
| cv.GScalar( |  | ) -> | <GScalar object>
| cv.GScalar( | s | ) -> | <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

  s | a cv::Scalar value to associate with this GScalar object.

## ◆ GScalar() [4/4]

cv::GScalar::GScalar | ( | double | v0 | ) |

Python:
| cv.GScalar( |  | ) -> | <GScalar object>
| cv.GScalar( | s | ) -> | <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

  v0 | A `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 a;
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]

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

`#include <opencv2/gapi/gmat.hpp>`

## ◆ descr_of() [2/6]

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

`#include <opencv2/gapi/gscalar.hpp>`

## ◆ descr_of() [3/6]

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

`#include <opencv2/gapi/gmat.hpp>`

## ◆ descr_of() [4/6]

GMatDesc cv::descr_of | ( | const RMat & | mat | ) |

`#include <opencv2/gapi/gmat.hpp>`

## ◆ descr_of() [5/6]

template<typename U >

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

`#include <opencv2/gapi/garray.hpp>`

## ◆ descr_of() [6/6]

template<typename U >

GOpaqueDesc cv::descr_of | ( | const U & |  | ) |

`#include <opencv2/gapi/gopaque.hpp>`

## ◆ empty_array_desc()

GArrayDesc cv::empty_array_desc | ( |  | ) |
| inline

Python:
| cv.empty_array_desc( |  | ) -> | retval

`#include <opencv2/gapi/garray.hpp>`

## ◆ empty_gframe_desc()

static GFrameDesc cv::empty_gframe_desc | ( |  | ) |
| inline static

`#include <opencv2/gapi/gframe.hpp>`

## ◆ empty_gmat_desc()

static GMatDesc cv::empty_gmat_desc | ( |  | ) |
| inline static

`#include <opencv2/gapi/gmat.hpp>`

## ◆ empty_gopaque_desc()

GOpaqueDesc cv::empty_gopaque_desc | ( |  | ) |
| inline

Python:
| cv.empty_gopaque_desc( |  | ) -> | retval

`#include <opencv2/gapi/gopaque.hpp>`

## ◆ empty_scalar_desc()

GScalarDesc cv::empty_scalar_desc | ( |  | ) |
| inline

Python:
| cv.empty_scalar_desc( |  | ) -> | retval

`#include <opencv2/gapi/gscalar.hpp>`

## ◆ operator!=()

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

`#include <opencv2/gapi/gscalar.hpp>`

## ◆ operator<<()

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

`#include <opencv2/gapi/gscalar.hpp>`

## ◆ operator==()

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

`#include <opencv2/gapi/gscalar.hpp>`