public Histogram GetHistogram() { var result = new Histogram(255); ForEachPixel((comp, b) => result.AddValue(comp, b)); return result; }
public Histogram GetHistogram(int maxIndex) { var result = new Histogram(maxIndex); ForEachPixel(b => { result.AddValue(0, (int)(maxIndex * b.Value.X)); result.AddValue(1, (int)(maxIndex * b.Value.Y)); result.AddValue(2, (int)(maxIndex * b.Value.Z)); }); return result; }