0
votes

I have implemented Gaussian blur using matrices/kernels. I have 3x3, 5x5 and 7x7. However in Corel PhotoPaint it is possible to use Gaussian Blur with parameter ranging from 0.1 to 250.0. For value of 250 it makes the image totally blurred and works instantly. I tried applying my 7x7 blur 7 times but it takes a lot of time and the image is as blurred as Gaussian Blur of 4.0 from Corel.

How can I make my Gaussian blur parameterized like the one from Corel and blur images fast?

I am using a bit optimized C code from Rosetta and 7x7 matrix from Wikipedia

I also used this routine to create 51x51 kernel but the result is comparable with Corel's Gauss = 15.0 and takes about 30 seconds (which is 30 times slower than Corel).

1
I think code, pseudo code, or a general description of your blurring algorithm could be helpful. If your blurring algorithm is O(N^2), then I think there are optimizations to be made.angelatlarge
I think it might also be important to be clear on what the blur parameters mean. My impression is that one would need two parameters: the pixels to be blurred (call that blur area, or parameter N) and the size of the square examined for determining the blurred pixel's new value (call that M). In your 3x3 blur, is N=3 or M=3?angelatlarge
@angelatlarge I think my M is 3 (as the size of my kernel) and N is 400 (the size of the image is about 400x400).Tom

1 Answers

2
votes

You must surely be aware that the 2D Gaussian blur is a separable transform?

It can be implemented as two separate 1D transforms. Also, check this out.