Graphics Reference
In-Depth Information
9. The result of running both the horizontal and vertical blur filters is shown in the
following figure comparing three filter sizes (3x3 (A), 5x5 (B), and 9x9 (C)):
Uniform box blur using varying kernel sizes: 3x3 (A), 5x5 (B), and 9x9 (C)
How it works…
To implement our blur filters, we use the convolution of two signals. This involves moving
our first signal, a 2D matrix (called a kernel or convolution matrix, or sometimes a mask),
from texel to texel over the source texture (our second signal). Usually the process replaces
the original texel for the current kernel position (generally the central element of the kernel)
with the sum of the products of the kernel elements with the texel underneath (see the
following figure). This process is used to implement a range of other image filtering effects,
such as edge detection and sharpening.
Convolution filter kernel (center) applied to input image, origin element is highlighted
The size of this kernel, and therefore the number of samples needed for the filter,
is commonly referred to as the number of taps, that is, an N-tap filter. For example,
a 3x3-tap filter will use a 3x3 kernel (and nine samples), whereas a 3-tap filter will
use a 3x1 kernel (and three samples).
 
Search WWH ::




Custom Search