C# Класс SimplePaletteQuantizer.Quantizers.XiaolinWu.WuColorQuantizer

Author: Xiaolin Wu Dept. of Computer Science Univ. of Western Ontario London, Ontario N6A 5B7 [email protected]
Наследование: IColorQuantizer
Показать файл Открыть проект Примеры использования класса

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

OnAddColor() защищенный Метод

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
Результат void

OnFinish() защищенный Метод

See BaseColorQuantizer.OnFinish for more details.
protected OnFinish ( ) : void
Результат void

OnGetPalette() защищенный Метод

See BaseColorQuantizer.OnGetPalette for more details.
protected OnGetPalette ( Int32 colorCount ) : List
colorCount System.Int32
Результат List

OnGetPaletteIndex() защищенный Метод

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
Результат void

OnPrepare() защищенный Метод

See BaseColorQuantizer.OnPrepare for more details.
protected OnPrepare ( ImageBuffer image ) : void
image SimplePaletteQuantizer.Helpers.ImageBuffer
Результат void