Graphics Reference
In-Depth Information
Figure 1 0.1 1. A comparison of the original image, Gaussian filtered (center) and the bilateral filtered (right).
Due to its edge-preserving properties, the bilateral filter can be used to perform a
different class of functions than the Gaussian filter. For example, algorithms that use sto-
chastic methods to sample the properties of a complex object often result in a noisy output,
due to the randomized nature of the sampling technique. The bilateral filter can be used to
reduce or minimize the noise in the signal, while still retaining the important boundaries
that define various objects in the image. A common example of this is using a bilateral filter
to smooth the results of screen space ambient occlusion calculations.
10.3.1 Theory
The bilateral filter shares some properties with the Gaussian filter. With the bilateral filter,
weights are based on the spatial distances from the center of the filter, as with the Gaussian
filter, but an additional factor is added to the weight calculation. The filter weights are also
scaled by the relative difference in color values between the current pixel being processed
and the sample pixel. If the two colors are somewhat similar, the scaling of the weight
leaves the weight value mostly unchanged. However, if there is a large difference between
the two color values, the weight is scaled to a smaller value, which has less influence on
the overall result of the pixel. Thus, the bilateral filter modifies its weights based not only
on the spatial arrangement of samples, but also on the intensity values contained within
the image. The equation for calculating the weights of each individual sample is shown in
Equation (10.3):
(10.3)
Search WWH ::




Custom Search