Blur filters

Started by
1 comment, last by AndyTX 17 years, 8 months ago
Hi, I'm using a gaussian filter but am finding that it falls off to quickly. I'd like a filter where if I laid the down-sampled image back over the screen (averaging the colors), a blurred object would almost, if not completey cover up the non-blurred one. This is not an additive effect. Thanks
Advertisement
There are a few of ways to increase the effective radius of your Gaussian filter.

The most accurate is to increase the size of your kernel. This is usually quite costly and isn't recommended for real-time processing.

Another is to apply the filter several times. While this works, it is not all that effective. Note that the mean pixel delta decays (quadtratic) exponentially with each pass, so there will come a point where floating roundoff will bring your image to equilibrium, often way before you're satisfied.

The most common way to get a 'devastating' Gaussian blur (for bloom effects, for example) is to scale down your image before applying the blur, then scale it back up afterwards. The softer your min- and mag-filters are, the better this will work. If you're using a bilinear filter on the way up and the way down, along with a 7x7 Gaussian kernel, it is not uncommon to scale a 1280x1024 image down to 64x64 or even smaller and still get good results.

Regards
Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
You'll need to take into account data about where the object is for that to work. Basically you want to make sure that inside the object, no samples are taken from outside of the object, even near the edges.

Think of it this way: you have a screen half filled with black and half filled with white - you have to know whether the "object" is black or white to apply a blur as you describe. Now you don't want to use object colour to do what you're describing, but you could certainly use depth or some other predication technique to get the desired effect.

This topic is closed to new replies.

Advertisement