Commit d63f698c authored by Alexander Alekhin's avatar Alexander Alekhin

cudafilters: don't modify "const" data

parent d25cbaab
...@@ -312,9 +312,8 @@ Ptr<Filter> cv::cuda::createLaplacianFilter(int srcType, int dstType, int ksize, ...@@ -312,9 +312,8 @@ Ptr<Filter> cv::cuda::createLaplacianFilter(int srcType, int dstType, int ksize,
{2.0f, 0.0f, 2.0f, 0.0f, -8.0f, 0.0f, 2.0f, 0.0f, 2.0f} {2.0f, 0.0f, 2.0f, 0.0f, -8.0f, 0.0f, 2.0f, 0.0f, 2.0f}
}; };
Mat kernel(3, 3, CV_32FC1, (void*)K[ksize == 3]); Mat kernel1(3, 3, CV_32FC1, (void*)K[ksize == 3]);
if (scale != 1) Mat kernel = (scale == 1) ? kernel1 : (kernel1 * scale);
kernel *= scale;
return cuda::createLinearFilter(srcType, dstType, kernel, Point(-1,-1), borderMode, borderVal); return cuda::createLinearFilter(srcType, dstType, kernel, Point(-1,-1), borderMode, borderVal);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment