|
|
|
|
|
by iainmerrick
951 days ago
|
|
Does that actually look good? I would have thought it would have really obnoxious diagonal artifacts. Unless it can be tuned to behave like a repeated box blur (and therefore approximate a true Gaussian). A tent shape would just be two box blurs, right? |
|
And repeated box filters asymptotically approach a Gaussian filter, though in practice it converges very quickly. A single box filter can be thought of as a piece-wise constant approximation of a Gaussian filter. Two passes of box filters produce a piece-wise linear approximation (the tent). And three passes of box filters produce a piece-wise quadratic approximation. Four passes for a cubic approximation, etc. Usually, just the three box filters are used since they are close enough.
I'd need to look at the math in detail here, but I suspect that it's ultimately just cleverly interleaving the running sums for the two box filter to perform them in a single pass.
If so, it might be an interesting challenge to see if the idea can be extended to compute the higher quality three box filter approximation in a single pass.