OpenCV
4.7.0-dev
Open Source Computer Vision
|
G-API functions and classes for serialization and deserialization. More...
Namespaces | |
cv::gapi | |
cv::gapi::s11n | |
This namespace contains G-API serialization and deserialization functions and data structures. | |
Classes | |
struct | cv::gapi::s11n::detail::NotImplemented |
struct | cv::gapi::s11n::detail::S11N< T > |
This structure allows to implement serialization routines for custom types. More... | |
Functions | |
cv::GRunArgsP | cv::gapi::bind (cv::GRunArgs &out_args) |
Wraps deserialized output GRunArgs to GRunArgsP which can be used by GCompiled. More... | |
cv::GRunArg | cv::gapi::bind (cv::GRunArgP &out) |
Wraps output GRunArgsP available during graph execution to GRunArgs which can be serialized. More... | |
template<> | |
cv::GComputation | cv::gapi::deserialize (const std::vector< char > &bytes) |
Deserialize GComputation from a byte array. More... | |
template<typename T , typename... Types> | |
std::enable_if< std::is_same< T, GCompileArgs >::value, GCompileArgs >::type | cv::gapi::deserialize (const std::vector< char > &bytes) |
Deserialize GCompileArgs which types were specified in the template from a byte array. More... | |
template<typename T , typename AtLeastOneAdapterT , typename... AdapterTypes> | |
std::enable_if< std::is_same< T, GRunArgs >::value, GRunArgs >::type | cv::gapi::deserialize (const std::vector< char > &bytes) |
Deserialize GRunArgs including RMat and MediaFrame objects if any from a byte array. More... | |
std::vector< char > | cv::gapi::serialize (const cv::GComputation &c) |
Serialize a graph represented by GComputation into an array of bytes. More... | |
std::vector< char > | cv::gapi::serialize (const cv::GCompileArgs &ca) |
std::vector< char > | cv::gapi::serialize (const cv::GMetaArgs &ma) |
std::vector< char > | cv::gapi::serialize (const cv::GRunArgs &ra) |
std::vector< char > | cv::gapi::serialize (const std::vector< std::string > &vs) |
G-API functions and classes for serialization and deserialization.
cv::GRunArgsP cv::gapi::bind | ( | cv::GRunArgs & | out_args | ) |
#include <opencv2/gapi/garg.hpp>
Wraps deserialized output GRunArgs to GRunArgsP which can be used by GCompiled.
Since it's impossible to get modifiable output arguments from deserialization it needs to be wrapped by this function.
Example of usage:
out_args | deserialized GRunArgs. |
cv::GRunArg cv::gapi::bind | ( | cv::GRunArgP & | out | ) |
#include <opencv2/gapi/garg.hpp>
Wraps output GRunArgsP available during graph execution to GRunArgs which can be serialized.
GRunArgsP is pointer-to-value, so to be serialized they need to be binded to real values which this function does.
Example of usage:
out | output GRunArgsP available during graph execution. |
|
inline |
#include <opencv2/gapi/s11n.hpp>
Deserialize GComputation from a byte array.
Check different overloads for more examples.
bytes | serialized vector of bytes. |
|
inline |
#include <opencv2/gapi/s11n.hpp>
Deserialize GCompileArgs which types were specified in the template from a byte array.
Deserialize GComputation from a byte array.
bytes | vector of bytes to deserialize GCompileArgs object from. |
|
inline |
#include <opencv2/gapi/s11n.hpp>
Deserialize GRunArgs including RMat and MediaFrame objects if any from a byte array.
Deserialize GComputation from a byte array.
Adapter types are specified in the template.
bytes | vector of bytes to deserialize GRunArgs object from. |
std::vector<char> cv::gapi::serialize | ( | const cv::GComputation & | c | ) |
#include <opencv2/gapi/s11n.hpp>
Serialize a graph represented by GComputation into an array of bytes.
Check different overloads for more examples.
c | GComputation to serialize. |
std::vector<char> cv::gapi::serialize | ( | const cv::GCompileArgs & | ca | ) |
#include <opencv2/gapi/s11n.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
ca | GCompileArgs to serialize. |
std::vector<char> cv::gapi::serialize | ( | const cv::GMetaArgs & | ma | ) |
#include <opencv2/gapi/s11n.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
ma | GMetaArgs to serialize. |
std::vector<char> cv::gapi::serialize | ( | const cv::GRunArgs & | ra | ) |
#include <opencv2/gapi/s11n.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
ra | GRunArgs to serialize. |
std::vector<char> cv::gapi::serialize | ( | const std::vector< std::string > & | vs | ) |
#include <opencv2/gapi/s11n.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
vs | std::vector<std::string> to serialize. |