OpenCV  4.10.0-dev
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | List of all members
cv::GArray< T > Class Template Reference

cv::GArray<T> template class represents a list of objects of class T in the graph. More...

#include <opencv2/gapi/garray.hpp>

Collaboration diagram for cv::GArray< T >:

Public Member Functions

 GArray ()
 Constructs an empty cv::GArray<T>
 
 GArray (const std::vector< HT > &v)
 Constructs a value-initialized cv::GArray<T>
 
 GArray (std::vector< HT > &&v)
 Constructs a value-initialized cv::GArray<T>
 

Detailed Description

template<typename T>
class cv::GArray< T >

cv::GArray<T> template class represents a list of objects of class T in the graph.

cv::GArray<T> describes a functional relationship between operations consuming and producing arrays of objects of class T. The primary purpose of cv::GArray<T> is to represent a dynamic list of objects – where the size of the list is not known at the graph construction or compile time. Examples include: corner and feature detectors (cv::GArray<cv::Point>), object detection and tracking results (cv::GArray<cv::Rect>). Programmers can use their own types with cv::GArray<T> in the custom operations.

Similar to cv::GScalar, cv::GArray<T> may be value-initialized – in this case a graph-constant value is associated with the object.

GArray<T> is a virtual counterpart of std::vector<T>, which is usually used to represent the GArray<T> data in G-API during the execution.

See also
cv::GOpaque<T>

Constructor & Destructor Documentation

◆ GArray() [1/3]

template<typename T >
cv::GArray< T >::GArray ( const std::vector< HT > &  v)
inlineexplicit

Constructs a value-initialized cv::GArray<T>

cv::GArray<T> objects may have their values be associated at graph construction time. It is useful when some operation has a cv::GArray<T> input which doesn't change during the program execution, and is set only once. In this case, there is no need to declare such cv::GArray<T> as a graph input.

Note
The value of cv::GArray<T> may be overwritten by assigning some other cv::GArray<T> to the object using operator= – on the assignment, the old association or value is discarded.
Parameters
va std::vector<T> to associate with this cv::GArray<T> object. Vector data is copied into the cv::GArray<T> (no reference to the passed data is held).

◆ GArray() [2/3]

template<typename T >
cv::GArray< T >::GArray ( std::vector< HT > &&  v)
inlineexplicit

Constructs a value-initialized cv::GArray<T>

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

Parameters
va std::vector<T> to associate with this cv::GArray<T> object. Vector data is moved into the cv::GArray<T>.

◆ GArray() [3/3]

template<typename T >
cv::GArray< T >::GArray ( )
inline

Constructs an empty cv::GArray<T>

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


The documentation for this class was generated from the following file: