C# Class SimplePaletteQuantizer.Quantizers.XiaolinWu.WuColorQuantizer

Author: Xiaolin Wu Dept. of Computer Science Univ. of Western Ontario London, Ontario N6A 5B7 [email protected]
Inheritance: IColorQuantizer
Mostra file Open project: RHY3756547/FreeSO Class Usage Examples

Protected Methods

Method Description
OnAddColor ( Color color, Int32 key, Int32 x, Int32 y ) : void

See BaseColorQuantizer.AddColor for more details.

OnFinish ( ) : void

See BaseColorQuantizer.OnFinish for more details.

OnGetPalette ( Int32 colorCount ) : List

See BaseColorQuantizer.OnGetPalette for more details.

OnGetPaletteIndex ( Color color, Int32 key, Int32 x, Int32 y, Int32 &paletteIndex ) : void

See BaseColorQuantizer.OnGetPaletteIndex for more details.

OnPrepare ( ImageBuffer image ) : void

See BaseColorQuantizer.OnPrepare for more details.

Private Methods

Method Description
Bottom ( WuColorCube cube, Int32 direction, System.Int64 moment ) : System.Int64

Splits the cube in a given color direction at its minimum.

CalculateMoments ( ) : void

Converts the histogram to a series of moments.

CalculateVariance ( WuColorCube cube ) : System.Single

Calculates statistical variance for a given cube.

Cut ( WuColorCube first, WuColorCube second ) : System.Boolean

Cuts a cube with another one.

Mark ( WuColorCube cube, Int32 label, IList tag ) : void

Marks all the tags with a given label.

Maximize ( WuColorCube cube, Int32 direction, Int32 first, Int32 last, IList cut, System.Int64 wholeRed, System.Int64 wholeGreen, System.Int64 wholeBlue, System.Int64 wholeWeight ) : System.Single

Finds the optimal (maximal) position for the cut.

Top ( WuColorCube cube, Int32 direction, Int32 position, System.Int64 moment ) : System.Int64

Splits the cube in given position, and color direction.

Volume ( WuColorCube cube, System.Int64 moment ) : System.Int64

Computes the volume of the cube in a specific moment.

VolumeFloat ( WuColorCube cube, System.Single moment ) : System.Single

Computes the volume of the cube in a specific moment. For the floating-point values.

Method Details

OnAddColor() protected method

See BaseColorQuantizer.AddColor for more details.
protected OnAddColor ( Color color, Int32 key, Int32 x, Int32 y ) : void
color Color
key System.Int32
x System.Int32
y System.Int32
return void

OnFinish() protected method

See BaseColorQuantizer.OnFinish for more details.
protected OnFinish ( ) : void
return void

OnGetPalette() protected method

See BaseColorQuantizer.OnGetPalette for more details.
protected OnGetPalette ( Int32 colorCount ) : List
colorCount System.Int32
return List

OnGetPaletteIndex() protected method

See BaseColorQuantizer.OnGetPaletteIndex for more details.
protected OnGetPaletteIndex ( Color color, Int32 key, Int32 x, Int32 y, Int32 &paletteIndex ) : void
color Color
key System.Int32
x System.Int32
y System.Int32
paletteIndex System.Int32
return void

OnPrepare() protected method

See BaseColorQuantizer.OnPrepare for more details.
protected OnPrepare ( ImageBuffer image ) : void
image SimplePaletteQuantizer.Helpers.ImageBuffer
return void