diff --git a/modules/gpuwarping/src/pyramids.cpp b/modules/gpuwarping/src/pyramids.cpp index 0e8445df2c..aa86e3a40b 100644 --- a/modules/gpuwarping/src/pyramids.cpp +++ b/modules/gpuwarping/src/pyramids.cpp @@ -237,7 +237,7 @@ Ptr cv::gpu::createImagePyramid(InputArray img, int nLayers, Strea throw_no_cuda(); return Ptr(); #else - return new ImagePyramidImpl(img, nLayers, stream); + return Ptr(new ImagePyramidImpl(img, nLayers, stream)); #endif }