C# Класс SimplePaletteQuantizer.Quantizers.NeuQuant.NeuralColorQuantizer

The NeuQuant Neural-Net image quantization algorithm (© Anthony Dekker 1994) is a replacement for the common Median Cut algorithm. It is described in the article Kohonen neural networks for optimal colour quantization in Volume 5, pp 351-367 of the journal Network: Computation in Neural Systems, Institute of Physics Publishing, 1994 (PDF version available).
Наследование: BaseColorQuantizer
Показать файл Открыть проект

Открытые методы

Метод Описание
NeuralColorQuantizer ( ) : System

Initializes a new instance of the NeuralColorQuantizer class.

NeuralColorQuantizer ( Byte quality ) : System

Initializes a new instance of the NeuralColorQuantizer class.

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

Метод Описание
LearnNeuronNeighbors ( Int32 red, Int32 green, Int32 blue, Int32 networkIndex, Int32 radius ) : void

Spread the bias to neuron neighbors.

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

See BaseColorQuantizer.OnAddColor 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 IColorQuantizer.GetPaletteIndex for more details.

OnPrepare ( ImageBuffer image ) : void

See BaseColorQuantizer.OnPrepare for more details.

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

Метод Описание
FindClosestNeuron ( Int32 red, Int32 green, Int32 blue ) : Int32
LearnNeuron ( Int32 alpha, Int32 red, Int32 green, Int32 blue, Int32 networkIndex ) : void

Forces the strength of bias of the neuron towards certain color.

LearnSampleColor ( Color color ) : void
SortNetwork ( ) : void
UnbiasNetwork ( ) : void

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

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

Spread the bias to neuron neighbors.
protected LearnNeuronNeighbors ( Int32 red, Int32 green, Int32 blue, Int32 networkIndex, Int32 radius ) : void
red System.Int32
green System.Int32
blue System.Int32
networkIndex System.Int32
radius System.Int32
Результат void

NeuralColorQuantizer() публичный Метод

Initializes a new instance of the NeuralColorQuantizer class.
public NeuralColorQuantizer ( ) : System
Результат System

NeuralColorQuantizer() публичный Метод

Initializes a new instance of the NeuralColorQuantizer class.
public NeuralColorQuantizer ( Byte quality ) : System
quality Byte The quality.
Результат System

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

See BaseColorQuantizer.OnAddColor 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 IColorQuantizer.GetPaletteIndex 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