Re: [Algorithms] Gaussian blur kernels
Brought to you by:
vexxed72
|
From: Sam M. <sam...@ge...> - 2009-07-18 09:31:33
|
Yeah, I hit send a bit quickly on this one. It might convey the rough idea, but I can poke holes in it already and need to actually bottom out the maths once and for all. It might take a bit of time, but if I complete it I'll write it up. We had torrential rain in Cambridge (UK) yesterday. The rear entrance to our office is slightly underground. A submerged pump either broken down or was blocked causing the area to suddenly fill up with water and pour under the back door. Half the team bailed the water out while the other half rescued all the equipment. Some carpet destroyed, but otherwise we're fine! Lesson learnt: never put your UPS on the bottom rung of your server rack. ta, Sam -----Original Message----- From: Sam Martin [mailto:sam...@ge...] Sent: Fri 17/07/2009 17:10 To: Game Development Algorithms Subject: Re: [Algorithms] Gaussian blur kernels Thanks, that's clearer. I think there's an extra detail here that might explain things. Warning: this contains some hand-wavey maths. Let's imagine for a second that the space your original line lives in is some real domain, R^2. Instead of doing the integration as we did before we apply (convolve with) a box filter and produce a new function, also in R^2. This would look like a blurry line. Note that it doesn't look like the result we got with the projection into the pixel basis. It would instead look a bit like the bokeh effect you get on a camera, but square. If we now *point-sample* this new signal we could produce a nice looking reconstruction with a pixel basis. I believe (subject to resolving some further fiddly details) the issues with the previous solution will have gone away - I think. No integration per-pixel was required this time. We had already band-limited the signal with the previous continuously-applied box filter. Incidentally, I believe we could also perfectly reconstruct the R^2 blurry line from the point-sampled pixel basis, but I'm not sure exactly what the reconstruction filter would be, and whether it requires the box filter to be twice the size of the original pixel or not. It's one of those things I've wanted to find out for a while, but the maths is a bit heavy. Eek. Have to go. Office is flooding with water. Ta, Sam -----Original Message----- From: Simon Fenney [mailto:sim...@po...] Sent: 17 July 2009 14:59 To: Game Development Algorithms Subject: Re: [Algorithms] Gaussian blur kernels Sam Martin wrote: > I'm not sure I quite understand what you mean by antialiasing in your > experiment? Sorry, I thought that was obvious from the context :-( Pragmatically, I meant take NxN samples per pixel, apply the (trivial) weighting due to a box filter (i.e. 1/N^2), and either choose a "large enough" N or take the limit as N->infinity. The latter should then be your integral below. > 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 > alias-free result, but isn't exactly easy in general :). I wasn't intending it to be easy :-). I just wanted to show that a box filter is not ideal. Cheers Simon ------------------------------------------------------------------------ ------ 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 _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-lis t ------------------------------------------------------------------------------ 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 _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |