TemporalMedian

This node applies a temporal median filter to the input clip. It outputs each pixel by calculating the median of the current frame, the frame before, and the frame after. This can be useful for removing grain, for example.

Inputs and Controls

Connection Type

Connection Name

Function

Input

unnamed

The image sequence to apply a temporal median filter to (typically, the image sequence to degrain).

mask

An optional image to use as a mask. By default, the temporal median 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.

Control (UI)

Knob (Scripting)

Default Value

Function

TemporalMedian Tab

channels

channels

all

The temporal median filter effect 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.

core

core

0.05

If the differences between pixel values on the current, previous, and next frame are greater than this value, those pixels are left unchanged. This is because higher differences between frames probably indicate something other than film grain.

mask

N/A

disabled

Enable 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 temporal median 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 temporal median 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.