Bilateral

A bilateral filter is a smoothing filter that is particularly good at preserving edges, though it can be computationally expensive.

Inputs and Controls

Connection Type

Connection Name

Function

Input

guide

An optional image to compute color similarity while filtering.

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 source 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 source input and acts as a standard bilateral filter.

mask

An optional image to use as a mask. By default, the filter effect is limited to the non-black areas of the mask.

At first, the mask input appears as triangle on the right side of the node, but when you drag it, it turns into an arrow labeled mask. If you cannot see the mask input, ensure that the mask control is disabled or set to none.

unnamed

The image sequence to filter.

Control (UI)

Knob (Scripting)

Default Value

Function

Bilateral Tab

Local GPU

gpuName

N/A

Displays the GPU used for rendering when Use GPU if available is enabled. Local GPU displays Not available when:

Use CPU is selected as the default blink device in the Preferences.

no suitable GPU was found on your system.

it was not possible to create a context for processing on the selected GPU, such as when there is not enough free memory available on the GPU.

You can select a different GPU, if available, by navigating to the Preferences and selecting an alternative from the default blink device dropdown.

Note:   Selecting a different GPU requires you to restart Nuke before the change takes effect.

Use GPU if available

useGPUIfAvailable

enabled

When enabled, rendering occurs on the Local GPU specified, if available, rather than the CPU.

Note:  Enabling this option with no local GPU allows the script to run on the GPU whenever the script is opened on a machine that does have a GPU available.
You should also select this if you wish to render from the command line with the --gpu option.

See Nuke 15 Release Notes for more information on the GPUs Nuke supports.

Channels

channels

all

The filter is only applied to these channels.

If you set this to something other than all or none, you can use the checkboxes on the right to select individual channels.

Guide Channels

guide

all

When the guide input is connected, sets the channels in the guide image used to compute the filtering weights.

The guide image should contain some prior information on the source useful to the filtering, such as a depth channel. If no information is available, the result of an unguided C_Bilateral filter can be used as guide input of a second filtering operation.

Size

size

3

Sets the height and width of the area within which pixels are compared to calculate the blur. Higher values widen the compare area, producing greater effect.

Positional Sigma

positionalSigma

0.4

Controls the amount that nearby pixels affect the overall blur.

Colour Sigma

colourSigma

0.4

Controls the amount of blur that occurs over edges in the image, lower values preserve edges more reliably.

Filter

filter

gaussian

Sets the type of color weighting applied to the output:

guassian - weighted to differences in the surrounding pixel color and how close those pixels are to one another.

median - weighted according to the middle value pixel.

Mask

N/A

disabled

Enables the associated mask channel to the right. Disabling this checkbox is the same as setting the channel to none.

maskChannelInput

none

The channel to use as a mask. By default, the filter effect is limited to the non-black areas of this channel.

Inject

inject

disabled

Copies the mask input to the predefined mask.a channel. Injecting the mask allows you to use the same mask further downstream.

Invert

invert_mask

disabled

Inverts the use of the mask channel so that the filter effect is limited to the non-white areas of the mask.

Fringe

fringe

disabled

When enabled, only apply the effect to the edge of the mask.

When disabled, the effect is applied to the entire mask.

Mix

mix

1

Dissolves between the original image at 0 and the full effect at 1.