TVIScale

This node scales an image by a factor of two. It uses a Total Variational Inpainting (TVI) technique that minimizes noise while still preserving the edges. The Lambda control is the main control here. The larger the value, the less smoothing is allowed and the more noise present in the original image makes it to the larger image.

Inputs and Controls

Connection Type

Connection Name

Function

Input

unnamed

The input you want to scale by a factor of two.

mask

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

TVIScale Tab

channels

channels

all

The scale 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.

Iterations

Iterations

5

Sets the number of iterations to apply to achieve the best solution.

This is an iterative filter - the longer it runs, the closer it gets to the ’best’ solution. In this case, the noisy smooth areas converge on a non-noisy smooth area.

Lambda

Lambda

5

Controls how far the filtered values are allowed to stray from the original input.

The larger the value, the less smoothing is allowed and the more noise present in the original image makes it to the larger image.

A

A

0.0001

This is a regularization control that should always be above zero to prevent Divides-By-Zero in the algorithm.

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 matte. By default, he transform 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 transform 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.