1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #15888 from OrestChura:facebeautification_gapi_sample

Introducing the sample of Face Beautification algorithm implemented via Graph-API

* Introducing the sample of Face Beautification algorithm implemented via Graph-API
- 'gapi/samples/face_beautification.cpp' added
- FIXME added in 'gcpukernel.hpp'

* INF_ENGINE fix
- preprocessing clauses added not to run the sample without Inference Engine

* INF_ENGINE fix 2
- warnings removed

* Fixes
- checking IE version cut as there is no dependency
- some alignments fixed
- the comment about preprocessing commands fixed

* ie::backend() issue fix (according to dmatveev)
- as the sample needs the cv::gapi::ie::backend() to be defined regardless of having IE or not, there is its throw-error definition in `giebackend.cpp` now (by dmatveev)
- for the same reason, #includes in `giebackend.hpp` are fixed
- HAVE_INF_ENGINE check is removed from the sample
This commit is contained in:
Orest Chura
2019-11-18 15:13:05 +03:00
committed by Alexander Alekhin
parent fc41c18c6f
commit af230ec133
4 changed files with 801 additions and 3 deletions
+9 -1
View File
@@ -6,6 +6,10 @@
#include "precomp.hpp"
// needs to be included regardless if IE is present or not
// (cv::gapi::ie::backend() is still there and is defined always)
#include "backends/ie/giebackend.hpp"
#ifdef HAVE_INF_ENGINE
#if INF_ENGINE_RELEASE <= 2018050000
@@ -32,7 +36,6 @@
#include "compiler/gobjref.hpp"
#include "compiler/gmodel.hpp"
#include "backends/ie/giebackend.hpp"
#include "backends/ie/util.hpp"
#include "api/gbackend_priv.hpp" // FIXME: Make it part of Backend SDK!
@@ -601,4 +604,9 @@ InferenceEngine::Blob::Ptr cv::gapi::ie::util::to_ie(cv::Mat &blob) {
return wrapIE(blob);
}
#else
cv::gapi::GBackend cv::gapi::ie::backend() {
// Still provide this symbol to avoid linking issues
util::throw_error(std::runtime_error("G-API has been compiled without OpenVINO IE support"));
}
#endif // HAVE_INF_ENGINE
+3 -1
View File
@@ -7,6 +7,9 @@
#ifndef OPENCV_GAPI_GIEBACKEND_HPP
#define OPENCV_GAPI_GIEBACKEND_HPP
// Include anyway - cv::gapi::ie::backend() still needs to be defined
#include "opencv2/gapi/infer/ie.hpp"
#ifdef HAVE_INF_ENGINE
#include <ade/util/algorithm.hpp> // type_list_index
@@ -35,7 +38,6 @@
#include <opencv2/gapi/garg.hpp>
#include <opencv2/gapi/gproto.hpp>
#include <opencv2/gapi/infer/ie.hpp>
#include "api/gorigin.hpp"
#include "backends/common/gbackend.hpp"