Bilateral Filtering
C_Bilateral is a smoothing filter that operates by mixing nearby source pixels according to their spatial distance and color similarity. Unlike Nuke's standard Blur, this filter is particularly good at preserving edges, though it can be computationally expensive.
It's similar to the standard Nuke Bilateral node, but with the addition of GPU acceleration and an optional guide input to compute color similarity while filtering, which can be useful when scaling images.
Preserving Edges
The standard blurring employed by Nuke can destroy edges in images, particularly as the size of the blur increases. C_Bilateral features a number of controls that can help retain edges by giving more 'weight' to pixels at a given position or color value.
The default, low values for the Positional and Color Sigma only blend pixels that are close to each other and of a similar color, which can help preserve edges.
For example, adjusting the controls of the C_Bilateral node in the Facebook Surround toolset can help preserve edges in the point cloud.
|
|
Blending in the 3D Viewer with no filter. |
Blending using the C_Bilateral node. |
Using the Guide Input
C_Bilateral's optional guide input can be connected to a depth map to improve filtering further using color similarity. The depth in the image helps CaraVR to preserve edges using the extra information in the guide image.
|
|
The source image with no filter applied. |
|
|
|
Blur Size 10 with a high Positional Sigma. |
The same blur with Color Sigma adjusted. |
Connecting the guide input converts the output from the filter to the same format as the guide image, resulting in a joint bilateral resampling filter. If the src and guide images have the same format, the node acts as a cross bilateral filter.
If the guide input is not connected, the output format is equal to that of the src input and acts as a standard bilateral filter.