Table of Contents

Enum WhiteBalanceMethod

Namespace
Egami.Operations
Assembly
Egami.dll

How AutoWhiteBalance(WhiteBalanceMethod, bool) finds the cast to remove.

public enum WhiteBalanceMethod

Fields

GrayWorld = 0

Gray world in Lab, as ImageMagick's -white-balance: the mean a* and b* of the image, weighted by lightness, are taken out of every pixel. The default.

WhitePatch = 1

The brightest 1% of the pixels is taken to be white, and the channels are scaled in linear light so it becomes neutral.

Examples

// Correct a tungsten-lit photo, as a raw editor's temperature slider does.
raster.Apply(o => o.WhiteBalance(temperature: 3200), Ct);

// Or pick a gray card's color and make it neutral.
raster.Apply(o => o.WhiteBalance(new Rgba8(182, 170, 151, 255)), Ct);

// Or let the image tell: ImageMagick's gray world, or the brightest pixels as white.
raster.Apply(o => o.AutoWhiteBalance(WhiteBalanceMethod.GrayWorld), Ct);
raster.Apply(o => o.AutoWhiteBalance(WhiteBalanceMethod.WhitePatch), Ct);