User Guide Cancel

Histogram compute | Substance 3D Designer

Histogram compute: icon

In: Filters > Adjustments

Description

Computes the histogram for a grayscale image.

The histogram is encoded as a row of pixels in an image, where each pixel value is the population of the color value matching the pixel position on the X-axis.
E.g., a pixel value of 75 at (0.25, 0) means there are 75 pixels which have the 0.25 color value in the image.

The node also outputs the cumulative distribution function (CDF) computed for the image.

Custom tools can be created using the data computed by the node, such as custom masks, as shown below in the 'Examples' section.

Caution:

All values out of the [0,1] range are clamped, therefore the histogram may not be accurate for HDR images.


Input connectors

Input

Grayscale

PRIMARY

The image for which the histogram should be computed.


Output connectors

Histogram

Grayscale

The histogram computed for the input image, encoded as a row of pixels where each pixel value is the population of the color value matching the pixel position on the X-axis.

 

E.g., a pixel value of 75 at (0.25, 0) means there are 75 pixels which have the 0.25 color value in the image.

CDF

Grayscale

The result of the cumulative distribution function (CDF) computed for the image, encoded in a row of pixels where each pixel is the sum of all pixel values to its left.

 

That sum is then normalized against the total number of pixels in the image.


Parameters

Histogram resolution

Integer

The width of the histogram. A higher value allows for a finer value distribution.

 

Available resolutions are, in pixels:
256, 512, 1024, 2048, 4096


Examples

Histogram compute: Example 1

histogram_compute_example_2_before
histogram_compute_example_2_after

Get help faster and easier

New user?