diff --git a/modules/gpu/src/cuda/resize.cu b/modules/gpu/src/cuda/resize.cu index 732b0f775c..813bced7df 100644 --- a/modules/gpu/src/cuda/resize.cu +++ b/modules/gpu/src/cuda/resize.cu @@ -46,6 +46,7 @@ #include "opencv2/gpu/device/vec_math.hpp" #include "opencv2/gpu/device/saturate_cast.hpp" #include "opencv2/gpu/device/filters.hpp" +# include namespace cv { namespace gpu { namespace device { @@ -65,6 +66,17 @@ namespace cv { namespace gpu { namespace device } } + template __global__ void resize_area(const Ptr2D src, float fx, float fy, DevMem2D_ dst) + { + const int x = blockDim.x * blockIdx.x + threadIdx.x; + const int y = blockDim.y * blockIdx.y + threadIdx.y; + + if (x < dst.cols && y < dst.rows) + { + dst(y, x) = saturate_cast(src(y, x)); + } + } + template