ImageConvolutionKernel::createGaussianBlur Question

Guys, I’m trying to blue a circle and I’m using ImageConvolutionKernel::createGaussianBlur which works ok. But I don’t understand correctly the kernel size, what it actually does. What I need is to make perfectly centred blurs, but so far they tend to shift a bit which is not ok for the code I’m creating.

I may release my code, later on, so you will understand a bit better. Doing a Knob generator. :wink:

I’m also trying ImageMagic, maybe it has some better stuff, but I rather stick with JUCE only.

Thanks! :slight_smile:

Cheers, WilliamK

It seems that using even numbers for the kernel solves the problem. :wink: So I will stick with that.

Soon I will show what I’m doing.

Cheers, WilliamK

Actually, Kernel = 1 and Radius = 8 gives me a nice 100% centered blur. Anything else will wooble a bit. :wink:

Traditionally convolution kernels have a odd number as size, so there is a centre pixel, where the effect is cancelled out with the influence of the surrounding pixels.
The wikipedia page “Convolution Kernels” has nice illustrations.

But it works the same like audio convolution, the kernel is moved along each line pixel by pixel. The only difference is, that the influence is drawn from two dimensions, and that it is applied on the whole frame instead as in audio only on future samples.

Nice, thanks a lot!