cv.bilateralFilter - MATLAB File Help
cv.bilateralFilter

Applies the bilateral filter to an image

result = cv.bilateralFilter(img)
result = cv.bilateralFilter(img, 'OptionName', optionValue, ...)

Input

Output

Options

The function applies bilateral filtering to the input image, as described in [CVonline]. cv.bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is very slow compared to most filters.

Sigma values: For simplicity, you can set the 2 sigma values to be the same. If they are small (< 10), the filter will not have much effect, whereas if they are large (> 150), they will have a very strong effect, making the image look "cartoonish".

Filter size: Large filters (Diameter > 5) are very slow, so it is recommended to use Diameter=5 for real-time applications, and perhaps Diameter=9 for offline applications that need heavy noise filtering.

References

[CVonline]:

Bilateral Filtering

See also