This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


applies a bilateral filter of spatial spread and pixel value spread to image.
  • BilateralFilter is a nonlinear local filter used for edge-preserving smoothing.
  • BilateralFilter replaces each pixel by a weighted average of its neighbors, using normalized Gaussian matrices as weights.
  • When applied to multichannel images, BilateralFilter computes the Euclidean distance between channel vectors.
  • For large values of , bilateral filtering yields results similar to Gaussian filtering.
  • By setting the option MaxIterations->n, up to n iterations of bilateral filtering are performed.
Smooth details in a color image:
Smooth details in a color image:
Click for copyable input
Bilateral filtering smooths an image while preserving edges:
Create a posterization effect by performing multiple iterations:
Removing noise:
Bilateral filtering with a large color spread value, used for background removal:
Bilateral filtering as a preprocessing step for image segmentation:
Unsharp masking using bilateral filtering:
New in 8