Ask Your Question

Clone Gaussian Filter of Photoshop

asked 2016-09-29 08:52:15 -0500

ZhangYun gravatar image

I tried Gaussian Blur of OpenCV. But it shows different result from Photoshop. For example, I was asked to input radius in Photoshop. So I typed 25.

And by using OpenCV, I coded as follows.

cv::Mat cvMat = cv::imread("1.jpg"); // this image is a grayscale image.
cv::Mat gb;
cv::GaussianBlur(cvMat , gb, cv::Size(25*2+1, 25*2+1), 25);

But I got different result. So I tried 50, instead of 25 and after that, I saw similar result, but still different. What should I do to get the same result as Photoshop Gaussian Filter?

Thank you.

edit retag flag offensive close merge delete



opencv != photoshop

berak gravatar imageberak ( 2016-09-29 10:09:06 -0500 )edit

I know. That's why I asked how to make same effect as Photoshop with OpenCV. It seems you don't know how to do.

ZhangYun gravatar imageZhangYun ( 2016-10-02 23:44:38 -0500 )edit

you're simply (ab)using the wrong library.

berak gravatar imageberak ( 2016-10-02 23:46:08 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-09-29 10:53:38 -0500

Tetragramm gravatar image

HERE is the documentation that describes OpenCV's choice of sigma based on size. It's up you to figure out how Photoshop does it.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-09-29 08:52:15 -0500

Seen: 254 times

Last updated: Sep 29 '16