G-API: "deownification" corrections

- moved "standalone" aliases of cv types to "opencv_includes.hpp" to
keep responsibility principle aplied
- introduced correct aliasing for "descr_of(Mat)" function for
standalone case
 - added missing include in `gapi/own/mat.hpp`
This commit is contained in:
Anton Potapov
2020-05-12 14:06:50 +03:00
parent 713577b257
commit 7386d8523b
6 changed files with 25 additions and 22 deletions
+2 -6
View File
@@ -48,9 +48,9 @@ namespace{
}
}
#if !defined(GAPI_STANDALONE)
cv::GMatDesc cv::descr_of(const cv::Mat &mat)
{
#if !defined(GAPI_STANDALONE)
const auto mat_dims = mat.size.dims();
if (mat_dims == 2)
@@ -62,12 +62,8 @@ cv::GMatDesc cv::descr_of(const cv::Mat &mat)
dims[i] = mat.size[i];
}
return GMatDesc{mat.depth(), std::move(dims)};
#else
return (mat.dims.empty())
? GMatDesc{mat.depth(), mat.channels(), {mat.cols, mat.rows}}
: GMatDesc{mat.depth(), mat.dims};
#endif
}
#endif
cv::GMatDesc cv::gapi::own::descr_of(const Mat &mat)
{
+2
View File
@@ -46,6 +46,8 @@ const cv::GOrigin& cv::GScalar::priv() const
return *m_priv;
}
//N.B. if we ever need more complicated logic for desc_of(cv::(gapi::own::)Scalar)
//dispatching should be done in the same way as for cv::(gapi::own)::Mat
cv::GScalarDesc cv::descr_of(const cv::Scalar &)
{
return empty_scalar_desc();