From 028d4d83d3087db6ce789ec3fa900649cde761d9 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 28 Oct 2022 17:03:43 +0000 Subject: [PATCH] imgproc: sigma2=sigma1 in top-level function of GaussianBlur --- modules/imgproc/src/smooth.dispatch.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/imgproc/src/smooth.dispatch.cpp b/modules/imgproc/src/smooth.dispatch.cpp index b001a37f89..2fb2fef8b7 100644 --- a/modules/imgproc/src/smooth.dispatch.cpp +++ b/modules/imgproc/src/smooth.dispatch.cpp @@ -635,6 +635,9 @@ void GaussianBlur(InputArray _src, OutputArray _dst, Size ksize, return; } + if (sigma2 <= 0) + sigma2 = sigma1; + bool useOpenCL = ocl::isOpenCLActivated() && _dst.isUMat() && _src.dims() <= 2 && _src.rows() >= ksize.height && _src.cols() >= ksize.width && ksize.width > 1 && ksize.height > 1;