Download modules/core/misc/python/pyopencv_umat.hpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 640 Bytes
-
https://huggingface.co/tgollogly/test/resolve/main/modules/core/misc/python/pyopencv_umat.hpp
- Command line
-
hf download hf://tgollogly/test/modules/core/misc/python/pyopencv_umat.hpp
-
curl -L -o pyopencv_umat.hpp https://huggingface.co/tgollogly/test/resolve/main/modules/core/misc/python/pyopencv_umat.hpp
640 Bytes
| 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 = &GetNumpyAllocator(); | |
| _self->copyTo(m); | |
| return m; | |
| } | |