# – What makes Gaussian blur, well, Gaussian? What exactly makes it different from other types of blurring?

32 views
0

– What makes Gaussian blur, well, Gaussian? What exactly makes it different from other types of blurring?

In: 3

I think Mr. Gauss defined a rather boring curve, perhaps with some natural significance, and a Gaussian blur is a kind of pixel-by-surrounding-pixel weighted average following that curve.

In Gaussian blur each pixel receives a weighed influence from many surrounding pixels in both vertical and horizontal directions, theoretically infinitely many but in practice until some set cutoff of the contribution. Applying a multiplier to each and adding up the values takes relatively many calculations. A simpler method is a box blur where an area of pixels are averaged together without weights. This creates aliasing, or boxy, repetitive pattern. Most programs approximate gaussian blur with several stacked box blurs.

The way most blurring algorithms work is to make each pixel in the blurred image a weighted average of all the pixels in a nearby radius in the original image. Say your radius is the 3×3 grid of pixels that surrounds the individual pixel you’re working on. So you could set the output pixel to be 1/9 of the sum of all those 9 pixels in the grid. Now imaging expanding the grid to 5×5 or 7×7. Now would you want to give each pixel in that larger grid equal weight in the average, or might you want to weight the pixels closer to the center of the grid higher?

That’s where the Gaussian comes in. You’ve probably heard of the normal distribution, or the “bell curve”. That’s also known as the Gaussian distribution, after its discoverer. You can extend the concept of the Gaussian curve to two dimensions – imagine “rotating” the bell curve around its peak – you’d get an actual 3d bell shape.

Now a Gaussian blur assigns weights for the neighboring pixels based on the 2D Gaussian “bell” distribution. Imagine setting the bell shape atop your grid of pixels. The weight each pixel gets in the average is proportional to how high the surface of the bell is above that pixel. So the weight of the center pixel is the strongest, and the weight given to other pixels drops off based on how far it is from the center according to the Gaussian distribution, where the weights initially fall off quickly, and then more slowly as you get further and further from the central pixel.