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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user