Struct RgbHistogram256

Exact 256-bin stored-byte distributions for three channels in R,G,B order. Each channel's bins sum to includedPixels. Excluded pixels contribute only to excludedPixels (not to bins). The two pixel counts add to the nonempty ROI area.

struct RgbHistogram256;

Extrema and arithmetic means describe included byte values. When no pixels are included, all statistics are zero and extrema have no observed-sample meaning. This value's .init is empty, not proof of successful processing: the return status must be checked.

Fields

NameTypeDescription
bins ulong[256][3]Exact frequencies: bins[channel][storedByte], channel order R,G,B.
excludedPixels ulongPixels omitted by the binary mask; zero for the unmasked overload.
includedPixels ulongPixels included once in every channel; each channel's bins sum to this.
maximum ubyte[3]Highest included R,G,B bytes; zero without observed samples.
mean double[3]Arithmetic means of stored R,G,B bytes, rounded in double; zero without observed samples. No colour-space conversion is applied.
minimum ubyte[3]Lowest included R,G,B bytes; zero without observed samples.