From 2c1ce8c0e977443d285b44be5e9866a4c87913a0 Mon Sep 17 00:00:00 2001 From: Namgoo Lee Date: Wed, 16 May 2018 03:31:47 +0900 Subject: [PATCH] cuda_meanStdDev : bug fix --- modules/cudaarithm/src/reductions.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/cudaarithm/src/reductions.cpp b/modules/cudaarithm/src/reductions.cpp index ce1bc232cf..4824a5c4da 100644 --- a/modules/cudaarithm/src/reductions.cpp +++ b/modules/cudaarithm/src/reductions.cpp @@ -137,12 +137,11 @@ void cv::cuda::meanStdDev(InputArray _src, OutputArray _dst, Stream& stream) if (!deviceSupports(FEATURE_SET_COMPUTE_13)) CV_Error(cv::Error::StsNotImplemented, "Not sufficient compute capebility"); - GpuMat src = getInputMat(_src, stream); + const GpuMat src = getInputMat(_src, stream); CV_Assert( src.type() == CV_8UC1 ); - _dst.create(1, 2, CV_64FC1); - GpuMat dst = _dst.getGpuMat(); + GpuMat dst = getOutputMat(_dst, 1, 2, CV_64FC1, stream); NppiSize sz; sz.width = src.cols;