diff --git a/modules/cudev/include/opencv2/cudev/ptr2d/glob.hpp b/modules/cudev/include/opencv2/cudev/ptr2d/glob.hpp index c64cafbb12..7304a8c7f5 100644 --- a/modules/cudev/include/opencv2/cudev/ptr2d/glob.hpp +++ b/modules/cudev/include/opencv2/cudev/ptr2d/glob.hpp @@ -91,6 +91,17 @@ __host__ GlobPtrSz globPtr(T* data, size_t step, int rows, int cols) return p; } +template +__host__ GlobPtrSz globPtr(const GpuMat& mat) +{ + GlobPtrSz p; + p.data = (T*) mat.data; + p.step = mat.step; + p.rows = mat.rows; + p.cols = mat.cols; + return p; +} + template struct PtrTraits< GlobPtrSz > : PtrTraitsBase, GlobPtr > { };