|
|
|
|
|
by a_e_k
951 days ago
|
|
The convolution of a box filter with a box filter is a tent filter. So yes, a tent filter blur can be done with two box filter blurs. 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. |
|