-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
ipp_GaussianBlur path in cv::GaussianBlur does not set sigmaY=sigmaX when sigmaY=0, just returns #22716
Copy link
Copy link
Closed
Labels
bugcategory: imgprocconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation completeoptimization
Milestone
Description
System Information
OpenCV version: 4.6.0
Operating System / Platform: Windows 10
Compiler & compiler version: Microsoft Visual Studio 2022 17.2.3
Detailed description
In smooth.dispatch.cpp, ippGaussianBlur checks:
if(sigma1 != sigma2) return false;
This causes the optimization to be skipped when sigma2 == 0 instead of setting sigma1=sigma2. By inspection, this optimization will also not work when both sigmas are zero, where the sigma should be calculated from ksize.
Steps to reproduce
- On x64 platform, build with OPENCV_IPP_GAUSSIAN_BLUR=ON.
- Test failure case like below. You will need to step through ipp_GaussianBlur in debugger or measure performance to observe the issue since it will fall back to the sepFilter2D path.
void runCV_Gaussian(const cv::Mat& imSrc, cv::Mat& imDst, int ksize, double sigma)
{
cv::GaussianBlur(imSrc, imDst, cv::Size(ksize, ksize), sigma);
};- Observe workaround behavior like this:
void runCV_Gaussian(const cv::Mat& imSrc, cv::Mat& imDst, int ksize, double sigma)
{
cv::GaussianBlur(imSrc, imDst, cv::Size(ksize, ksize), sigma, sigma); // IPP path requires sigmaY == sigmaX, others set Y to X if Y==0
};Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: imgprocconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation completeoptimization