The Bilateral Filter is a non-linear, edge-preserving smoothing filter that is commonly used in Computer Vision as a simple noise-reduction stage in a pipeline. It calculates the intensity of each output pixel as a weighted average of intensity values from nearby pixels in the input image. Crucially, the weights depend not only on the Euclidean distance between current and neighbor pixels, but also on the radiometric differences (e.g., color intensity differences) between them. The outcome is that edges are preserved while regions with similar intensities are smoothed out.
\(\sigma_r\) controls the intensity range that is smoothed out. Higher values will lead to larger regions being smoothed out. The \(\sigma_r\) value should be selected with the dynamic range of the image pixel values in mind.
\(\sigma_s\) controls smoothing factor. Higher values will lead to more smoothing.
C API functions
For list of limitations, constraints and backends that implements the algorithm, consult reference documentation of the following functions:
Run bilateral filter on input image using the CUDA backend. It's using a 7x7 kernel with \(\sigma_r=50\) and \(\sigma_s=1.7\), and ZERO boundary condition. Input and output are VPI images.
Submit the algorithm to the stream using the CUDA backend, along with all parameters. Here we're using a 7x7 kernel with \(\sigma_r=50\) and \(\sigma_s=1.7\).