C# 클래스 ScreenToGif.Encoding.NeuQuant

Neural Quantization Class
파일 보기 프로젝트 열기: dbremner/ScreenToGif 1 사용 예제들

공개 메소드들

메소드 설명
Map ( int b, int g, int r ) : int

Search for BGR values 0..255 (after net is unbiased) and return color index.

NeuQuant ( byte thePic, int len, int sample ) : System

Initialise the quantization process in range (0,0,0) to (255,255,255).

Process ( ) : byte[]

Starts the quantization.

비공개 메소드들

메소드 설명
AlterNeighbour ( int radValue, int bestBias, int b, int g, int r ) : void

Move adjacent neurons by precomputed alpha*(1-((i-j)^2/[r]^2)) in _radpower[|i-j|]

Altersingle ( int alpha, int bestBias, int b, int g, int r ) : void

Move neuron (bestBias) towards biased (b,g,r) by factor alpha.

ColorMap ( ) : byte[]
Contest ( int b, int g, int r ) : int

Search for biased BGR values.

Inxbuild ( ) : void

Insertion sort of network and building of _netindex[0..255] (to do after unbias).

Learn ( ) : void

Main Learning Loop.

Unbiasnet ( ) : void

Unbias network to give byte values 0..255 and record position to prepare for sort.

메소드 상세

Map() 공개 메소드

Search for BGR values 0..255 (after net is unbiased) and return color index.
public Map ( int b, int g, int r ) : int
b int Blue
g int Green
r int Red
리턴 int

NeuQuant() 공개 메소드

Initialise the quantization process in range (0,0,0) to (255,255,255).
public NeuQuant ( byte thePic, int len, int sample ) : System
thePic byte The image in bytes.
len int The length of the pixels.
sample int Sample interval for the quantitizer.
리턴 System

Process() 공개 메소드

Starts the quantization.
public Process ( ) : byte[]
리턴 byte[]