Ask Your Question

GaussianBlur method, strange border on both ends[SOLVED]

asked 2019-07-08 21:51:51 -0500

nakamichi gravatar image

updated 2019-07-11 06:45:31 -0500

supra56 gravatar image

When using GaussianBlur, when Width = 5 and SigmaX = 9, strange lines are visible at both ends of the image.
What is the cause of the above?

Visual Studio 2017 C++ Project
OpenCV 4.1.0 x64

Source image
image description

Output image
image description

Mat src = imread("C:\\Temp\\test.bmp");
Mat dst1;
Mat dst2;
Mat dst3;
GaussianBlur(src, dst1, Size(5, 5), 8);
GaussianBlur(src, dst2, Size(5, 5), 9);
GaussianBlur(src, dst3, Size(5, 5), 10);
imshow("src", src);
imshow("dst1", dst1);
imshow("dst2", dst2);
imshow("dst3", dst3);
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-07-11 01:28:34 -0500

nakamichi gravatar image

but this code is alternative method.

Mat kernelX = getGaussianKernel(ksize_width, sigma_x);
Mat kernelY = getGaussianKernel(ksize_height, sigma_y);
sepFilter2D(src, src, -1, kernelX, kernelY);
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-07-08 21:51:51 -0500

Seen: 35 times

Last updated: Jul 11