Bilateral filtering smooths images while preserving
edges, by means of a nonlinear combination of nearby
image values. The method is noniterative, local, and simple.
It combines gray levels or colors based on both their
geometric closeness and their photometric similarity, and
prefers near values to distant values in both domain and
range. In contrast with filters that operate on the three
bands of a color image separately, a bilateral filter can enforce
the perceptual metric underlying the CIE-Lab color
space, and smooth colors and preserve edges in a way
that is tuned to human perception. Also, in contrast with
standard filtering, bilateral filtering produces no phantom
colors along edges in color images, and reduces phantom
colors where they appear in the original image.