From: Sam Martin <sam.martin@ge...>  20090717 13:16:44

I'm not sure I quite understand what you mean by antialiasing in your experiment? If you have a line which you rasterise using the usual point sampling, you will immediately produce aliasing (jaggies). Blurring the result with any filter may make the output more acceptable  and some filters may be more pleasant any others  but it doesn't remove the aliasing. It just reduces the objectional high frequencies. To remove the aliasing completely you can't blur after sampling*. You'd need to rasterise the line by doing the integral over each pixel properly, rather than point sample. This will produce an aliasfree result, but isn't exactly easy in general :). There are further details here though. When working with a pixelbasis we aren't in exactly the same territory as when we pointsample. There is a more general theory of sampling worked out largely by Papoulis and another dude I forget. The concepts of band limited signals and the reconstruction filters change as your basis changes. Cheers, Sam * In general  but using blue noise can help push the aliasing into high frequencies which helps. Original Message From: Simon Fenney [mailto:simon.fenney@...] Sent: 17 July 2009 11:51 To: Game Development Algorithms Subject: Re: [Algorithms] Gaussian blur kernels Olivier Galibert wrote: > On Thu, Jul 16, 2009 at 09:56:58AM +0100, Simon Fenney wrote: >> Jon Watte wrote: >> >>> Actually, they are both lowpass filters, so >>> downsamplingplusupsampling is a form of blur. However, box >>> filtering (the traditional downsampling function) isn't actually all >>> that great at lowpass filtering, so it can generate aliasing, which >>> a Gaussian filter does not. >> >> AFAICS a box filter won't "generate" aliasing, it's just that it's >> not very good at eliminating the high frequencies which cause >> aliasing. A Gaussian, OTOH, has better behaviour in this respect... > > Aren't we talking about graphics here? Vision is area sampling, > making box filters perfect for integer downsampling. It's sound that > is point sampling and hence sensitive to high frequency aliasing. > > OG. Oh, I agree that there is a difference between what is 'best' for audio and graphics** but a box filter is far from an ideal way of downsampling graphics. I had a test image which was rendered with 10k samples per pixel but downfiltered*** using a box filter. The amount of aliasing surprised people. To show why a box is inadequate, as a thought experiment, *temporarily* consider the pixels as little squares (apologies to Alvy Ray Smith), and draw, say, a 1/8th pixel wide, *nearly* horizontal white line on a black background. Now imagine antialiasing it with a box filter. Now consider either animating the line, shifting it vertically by a fraction of a pixel per frame (and watch it jump), OR alternatively just consider a static frame. Assuming we do the latter, start from a point where the line crosses from one scanline into the next and run along the row to the next crossing. With the box filter, except for the areas where the line actually crosses the pixel boundaries, there will be a large number of pixels with exactly the same intensity. AFAICS, your brain expects to see more variation as the line sweeps across the pixels. Simon ** I have my own hypothesis on what is the root cause of this difference which is being hotly debated here in our research office. I now just need to install a better mathematical brain in my head to prove it :) ***In a linear colour space. This is V. important.   Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ GDAlgorithmslist mailing list GDAlgorithmslist@... https://lists.sourceforge.net/lists/listinfo/gdalgorithmslist Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithmslis t 