Houdini 20.5 Nodes Copernicus nodes

Histogram Copernicus node

Builds a histogram from a layer.

On this page

This node creates a histogram from an incoming layer to visually represent the distribution of that layer’s quantative data. Set the Mode parameter to output the histogram as a bar graph or a series of horizontal bars whose intensity varies with the number of pixels that are in each bucket.

Note

If alpha is in the source, the result has alpha-colored bars that may be clipped.

Use this node by defining a range and a number of buckets. Each pixel in the source layer then adds its channels to the corresponding buckets. The count of pixels in the buckets show the distribution of values in the source layer.

Note

Bucketing a range of values divides that range into a series of intervals.

You can use the Remap COP instead of this node when you want to move the range of a grayscale image.

Parameters

Signature

The layer type that the source accepts.

See Signatures for more information.

Mode

The type of histogram to output.

Colored Bars

Output the histogram as a horizontal ramp. Each vertical line is colored by how many pixels in the source fall in that bucket range. If alpha is in the source, this affects the bars and can result in clipping.

Separate Bars

Output the histogram as separate horizontal bars for each channel. Each bar is grayscale, where red is the bottom bar and alpha (if present) is the top bar.

Graph

Control how high to draw the bar instead of controlling the bar’s intensity. Each channel is done independently, which results in a mixture of red, green, blue, and alpha bars overlapping.

Buckets

The number of buckets to divide the range into. Finer buckets provide a more accurate graph.

Note

The Histogram node bases the height or intensity of a bar on the percentage of total pixels that fall into the bucket.

Minimum

The value at which to start the histogram. This is usually 0 for black.

Maximum

The value at which to end the histogram. This is usually 1 for white.

Outside Values

The method used to manage pixel values that lie outside of the histogram range. Discarding and clamping are done per-channel, so the totals of each channel may not be the same if you use Discard.

Discard

Ignore values outside of the range so they don’t contribute to the histogram.

Clamp

The values outside of the range contribute to either the first or last bucket. This method causes the buckets to have extreme values, but can help you determine how much the window has cropped out.

Scale

The amount to scale the percentage of total pixels that fall into the bucket. This is often a small percentage, so increasing that value enhances the chart’s legibility.

Channel Scope

The RGBA channels to which you apply the effects of this node.

Note

The number of bars or channels don’t change, so unscoped channels have zero contributions.

Toggle RGB

Turns the Red, Green, and Blue channels on and off.

Red

Applies this node’s effects to the Red channel.

Green

Applies this node’s effects to the Green channel.

Blue

Applies this node’s effects to the Blue channel.

Alpha

Applies this node’s effects to the Alpha channel.

Inputs

source

A layer for which to build the histogram.

active

A layer that specifies a region of pixels to use for the histogram. Only pixels where the active layer is greater than or equal to 0.5 contribute to the histogram.

Outputs

histogram

The layer of the same type and size as the source, but with a histogram written to it according to the Mode parameter.

counts

The layer that stores the raw bucket values. Its width is the number of buckets and its height is 5. The first four rows (from the bottom) are the red, green, blue, and alpha histogram counts. The last row contains the total number of processed pixels in the 0th column.

See also

Copernicus nodes