Analyzes an input bitmap (RGB or RGBA) and reports its color statistics. The reported values are also available as parameter outputs for use elsewhere in the graph.
When to Use
- Checking a texture: See the average, lightest, and darkest colors of an image, and how bright it looks overall.
- Driving other devices from an image: Feed the measurements to other devices; for example, the Value range output is suitable for feeding into a Clamp device.
- Measuring part of an image: Connect a mask to measure only the area you care about.
How to Use
Connect a bitmap to the Primary Input and build. The statistics appear as reports in the parameter panel, and the same values are available on the parameter outputs.
- Connect the bitmap to analyze to the Primary Input.
- Optionally connect a mask to the Mask Input to limit the analysis to part of the image.
- Build, and read the results in the reports.
- Connect the parameter outputs you need to other devices, such as Value range to a Clamp device.
Inputs
| Port | Type | Required | Description |
|---|---|---|---|
| Primary Input | RGB or RGBA | Yes | The bitmap image to analyze. |
| Mask Input | Heightfield | No | Limits the analysis to part of the image. The average color is weighted by the mask, and areas where the mask is black are left out of the lightest and darkest colors. |
Outputs
| Port | Type | Description |
|---|---|---|
| Average color | Parameter | The average RGB color across the image. |
| Lightest color | Parameter | The largest per-channel RGB values found in the image. |
| Darkest color | Parameter | The smallest per-channel RGB values found in the image. |
| Average luminosity | Parameter | The average perceived lightness of the image, from 0 (black) to 1 (white). |
| Value range | Parameter | A range parameter spanning from the darkest to the lightest channel value, suitable for feeding into a Clamp device. |
Parameters
None.
Reports
| Report | Description |
|---|---|
| Average color | An average of all RGB colors in the input image. |
| Lightest color | The largest RGB channel values present in the image. |
| Darkest color | The smallest RGB channel values present in the image. |
| Average luminosity | The average perceived lightness of the image. |
| Value range | A range from the smallest to the largest channel values present in the image. |