diff --git a/modules/imgproc/src/smooth.dispatch.cpp b/modules/imgproc/src/smooth.dispatch.cpp index 69d07580f2..b001a37f89 100644 --- a/modules/imgproc/src/smooth.dispatch.cpp +++ b/modules/imgproc/src/smooth.dispatch.cpp @@ -566,7 +566,7 @@ static bool ipp_GaussianBlur(InputArray _src, OutputArray _dst, Size ksize, if (IPP_DISABLE_GAUSSIAN_BLUR_32FC4_1TH && (threads == 1 && src.type() == CV_32FC4)) return false; - if(IPP_GAUSSIANBLUR_PARALLEL && threads > 1) { + if(IPP_GAUSSIANBLUR_PARALLEL && threads > 1 && iwSrc.m_size.height/(threads * 4) >= ksize.height/2) { bool ok; ipp_gaussianBlurParallel invoker(iwSrc, iwDst, ksize.width, (float) sigma1, ippBorder, &ok); diff --git a/modules/imgproc/test/test_filter.cpp b/modules/imgproc/test/test_filter.cpp index 3e28a2caad..6de6cf4f87 100644 --- a/modules/imgproc/test/test_filter.cpp +++ b/modules/imgproc/test/test_filter.cpp @@ -2355,5 +2355,16 @@ TEST(Imgproc, filter_empty_src_16857) EXPECT_TRUE(dst2.empty()); } +TEST(Imgproc_GaussianBlur, regression_11303) +{ + cv::Mat dst; + int width = 2115; + int height = 211; + double sigma = 8.64421; + cv::Mat src(cv::Size(width, height), CV_32F, 1); + cv::GaussianBlur(src, dst, cv::Size(), sigma, sigma); + EXPECT_LE(cv::norm(src, dst, NORM_L2), 1e-3); +} + }} // namespace