1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge pull request #18339 from rgarnov:rg/rmat_integration

[GAPI] RMat integration into the framework

* RMat integration

* Added initialization of input mat in GArray initialization tests

* Fixed klocwork warnings in RMat tests, changed argument order in EXPECT_EQ
This commit is contained in:
Ruslan Garnov
2020-10-04 21:57:41 +03:00
committed by GitHub
parent 199687a1c5
commit 5224d016e9
31 changed files with 659 additions and 229 deletions
+2 -1
View File
@@ -18,6 +18,7 @@
#include "compiler/gmodel.hpp"
#include "compiler/gislandmodel.hpp"
#include "compiler/gmodel.hpp"
#include "backends/common/gbackend.hpp" // RMatAdapter
#include "logger.hpp" // GAPI_LOG
@@ -348,7 +349,7 @@ void GIslandExecutable::run(GIslandExecutable::IInput &in, GIslandExecutable::IO
switch (in_data_orig.index())
{
case cv::GRunArg::index_of<cv::Mat>():
in_data = cv::GRunArg{cv::util::get<cv::Mat>(in_data_orig)};
in_data = cv::GRunArg{cv::make_rmat<cv::gimpl::RMatAdapter>(cv::util::get<cv::Mat>(in_data_orig))};
break;
case cv::GRunArg::index_of<cv::Scalar>():
in_data = cv::GRunArg{(cv::util::get<cv::Scalar>(in_data_orig))};
+2 -1
View File
@@ -22,7 +22,6 @@
namespace cv { namespace gimpl {
// FIXME: GAPI_EXPORTS only because of tests!
class GAPI_EXPORTS GIsland
{
@@ -122,6 +121,8 @@ public:
virtual bool canReshape() const = 0;
virtual void reshape(ade::Graph& g, const GCompileArgs& args) = 0;
virtual bool allocatesOutputs() const { return false; }
virtual cv::RMat allocate(const cv::GMatDesc&) const { GAPI_Assert(false && "should never be called"); }
// This method is called when the GStreamingCompiled gets a new
// input source to process. Normally this method is called once