Houdini 20.5 Nodes Copernicus nodes

Kuwahara Filter Copernicus node

Applies the Kuwahara filter, which creates painterly effects.

On this page

This node applies the Kuwahara filter , which sets each pixel to the average value of one of the four regions around the pixel. The four regions are offset from the pixel in each diagonal direction. The selected region is the one with the smallest standard deviation, which is the smoothest region.

Use this node when you want to preserve edges and flatten noise. Since the Kuwahara filter can remove textures and sharpen edges, you can use this node to create a painterly effect.

Parameters

Signature

The layer type that the source accepts.

See Signatures for more information.

Mask

The amount of the new value to mix in with the original value. Higher values mix in more of the new value. Lower values mix in less of the new value.

The default value is 1, which means this node uses only the new value. See Mask for more information.

Method

The method used to compute the filter.

Note

The Kuwahara filter requires access to k^2 pixels for every pixel, where k is the kernel diameter, which means large kernels can become expensive.

Approximate

Rather than computing the standard deviations and means for each pixel, generate it in a single pre-pass. This speeds up computation but causes variations in radius, which affects neighboring pixels.

Exact

Compute the filter exactly for each pixel. GPUs often make this practical even for large radii.

Luminance

The common standard deviation for quadrant selection. When the node processes more than one channel, the filter still picks the same source quadrant for all channels.

SGI Luminance

This is a historical luminance computation used in Houdini, which is believed to originate with SGI.

lum = 0.3086 * red + 0.6094 * green + 0.0820 * blue

NTSC Luminance

The standard NTSC luminance computation, which is a common luminance option.

lum = 0.299 * red + 0.587 * green + 0.114 * blue

HDTV Luminance

The HDTV standard luminance from BT 709.

lum = 0.2126 * red + 0.7152 * green + 0.0722 * blue

Average

An average of the channels.

Maximum Channel

The maximum of the channels.

Minimum Channel

The minimum of the channels.

Magnitude / Length

The length of the vector formed by taking the channels as components. For a mono input, this is the absolute value.

Hue

Convert to HSV and return the hue channel.

Saturation

Convert to HSV and return the saturation channel.

Value

Convert to HSV and return the value channel.

Red

Extract the red, or x, channel.

Green

Extract the green, or y, channel.

Blue

Extract the blue, or z, channel.

Alpha

Extract the alpha, or w, channel.

Radius

The radius (in pixels) of each of the four regions on which to perform blur. The radius offsets the four regions so they don’t overlap.

Blur Scale

When computing the average of a region, this is the amount to scale the size of the region. Lower values select a sharper source area, but use the larger area to determine the standard deviation. Higher values increase the blur effect but don’t affect which quadrant is picked.

Blend to Blur

A value of 0 picks the average from the region with the smallest standard deviation. A value of 1 averages the averages, which effectively performs a larger blur. Inbetween values adjust the weighting, increasing the weight of areas with large standard deviations.

Separation

The amount to scale the offset of the four regions, which is determined by the Radius. A value of 0 makes all the regions sample the same location, causing this to be a box blur. Values over 1 make the regions sample dislocated areas of the image.

Inputs

source

The original source layer to filter.

radius

An optional per-pixel scale for the size of the filter that’s scaled by the Radius parameter.

mask

An optional per-pixel mask amount that’s scaled by the Mask parameter.

Outputs

blur

The filtered output layer.

See also

Copernicus nodes