Table of Contents

Struct ChannelStatistics

Namespace
Egami.Analysis
Assembly
Egami.dll

The statistics of one channel over a frame, on the 0 to 1 scale of the channel values, as ImageMagick's identify -verbose reports them.

public readonly record struct ChannelStatistics : IEquatable<ChannelStatistics>
Implements
Inherited Members

Examples

// Per-channel statistics on the 0 to 1 scale, as identify -verbose prints them.
RasterStatistics stats = photo.Statistics();
Console.WriteLine($"red mean {stats.Red.Mean:F3} ± {stats.Red.StdDev:F3}, luma {stats.Luma.Min:F2} to {stats.Luma.Max:F2}");
bool dark = stats.Luma.Mean < 0.25;

Properties

Entropy

Gets the Shannon entropy of the values at 16-bit precision divided by the most it could be for the number of distinct values present, so 1 when every distinct value is equally common and 0 when there is one value.

public double Entropy { get; }

Property Value

double

Kurtosis

Gets the excess kurtosis: the fourth central moment divided by StdDev⁴, minus 3; 0 when every value is equal.

public double Kurtosis { get; }

Property Value

double

Max

Gets the largest value.

public double Max { get; }

Property Value

double

Mean

Gets the mean.

public double Mean { get; }

Property Value

double

Min

Gets the smallest value.

public double Min { get; }

Property Value

double

Skewness

Gets the skewness: the third central moment divided by StdDev³, 0 when every value is equal.

public double Skewness { get; }

Property Value

double

StdDev

Gets the sample standard deviation, √(Σ(x − mean)² / (n − 1)), or 0 for a single pixel.

public double StdDev { get; }

Property Value

double