mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 23:03:03 +04:00
Merge pull request #12674 from dmatveev:gapi_upd270918
* Update G-API code base to 27-Sep-18 Changes mostly improve standalone build support * G-API code base update 28-09-2018 * Windows/Documentation warnings should be fixed * Fixed stability issues in Fluid backend * Fixed precompiled headers issues in G-API source files * G-API code base update 28-09-18 EOD * Fixed several static analysis issues * Fixed issues found when G-API is built in a standalone mode
This commit is contained in:
committed by
Alexander Alekhin
parent
66fdddc339
commit
2c6ab65476
@@ -5,11 +5,13 @@
|
||||
// Copyright (C) 2018 Intel Corporation
|
||||
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <ade/util/zip_range.hpp>
|
||||
|
||||
#include "opencv2/core/types.hpp"
|
||||
#include "opencv2/gapi/opencv_includes.hpp"
|
||||
#include "executor/gexecutor.hpp"
|
||||
|
||||
cv::gimpl::GExecutor::GExecutor(std::unique_ptr<ade::Graph> &&g_model)
|
||||
@@ -150,8 +152,21 @@ void cv::gimpl::GExecutor::run(cv::gimpl::GRuntimeArgs &&args)
|
||||
using cv::util::get;
|
||||
const auto desc = get<cv::GMatDesc>(d.meta);
|
||||
const auto type = CV_MAKETYPE(desc.depth, desc.chan);
|
||||
|
||||
#if !defined(GAPI_STANDALONE)
|
||||
// Building as part of OpenCV - follow OpenCV behavior
|
||||
// if output buffer is not enough to hold the result, reallocate it
|
||||
auto& out_mat = *get<cv::Mat*>(args.outObjs.at(index));
|
||||
out_mat.create(cv::gapi::own::to_ocv(desc.size), type);
|
||||
#else
|
||||
// Building standalone - output buffer should always exist,
|
||||
// and _exact_ match our inferred metadata
|
||||
auto& out_mat = *get<cv::gapi::own::Mat*>(args.outObjs.at(index));
|
||||
GAPI_Assert( out_mat.type() == type
|
||||
&& out_mat.data != nullptr
|
||||
&& out_mat.rows == desc.size.height
|
||||
&& out_mat.cols == desc.size.width)
|
||||
#endif // !defined(GAPI_STANDALONE)
|
||||
}
|
||||
}
|
||||
// Update storage with user-passed objects
|
||||
|
||||
Reference in New Issue
Block a user