mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
5fb3869775
* Fixed clang -Wnewline-eof warnings * Fixed all trivial clang -Wextra-semi and -Wc++98-compat-extra-semi warnings * Removed trailing semi from various macros * Fixed various -Wunused-macros warnings * Fixed some trivial -Wdocumentation warnings * Fixed some -Wdocumentation-deprecated-sync warnings * Fixed incorrect indentation * Suppressed some clang warnings in 3rd party code * Fixed QRCodeEncoder::Params documentation. --------- Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
37 lines
637 B
C++
37 lines
637 B
C++
#ifdef HAVE_OPENCV_CORE
|
|
|
|
#include "opencv2/core/mat.hpp"
|
|
|
|
typedef std::vector<Range> vector_Range;
|
|
|
|
CV_PY_TO_CLASS(UMat)
|
|
CV_PY_FROM_CLASS(UMat)
|
|
|
|
static bool cv_mappable_to(const Ptr<Mat>& src, Ptr<UMat>& dst)
|
|
{
|
|
//dst.reset(new UMat(src->getUMat(ACCESS_RW)));
|
|
dst.reset(new UMat());
|
|
src->copyTo(*dst);
|
|
return true;
|
|
}
|
|
|
|
static void* cv_UMat_queue()
|
|
{
|
|
return cv::ocl::Queue::getDefault().ptr();
|
|
}
|
|
|
|
static void* cv_UMat_context()
|
|
{
|
|
return cv::ocl::Context::getDefault().ptr();
|
|
}
|
|
|
|
static Mat cv_UMat_get(const UMat* _self)
|
|
{
|
|
Mat m;
|
|
m.allocator = &g_numpyAllocator;
|
|
_self->copyTo(m);
|
|
return m;
|
|
}
|
|
|
|
#endif
|