Package com.wf.captcha.utils
Class Quant
java.lang.Object
com.wf.captcha.utils.Quant
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected int[]protected int[]protected static final intgamma = 1024protected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intdefs for freq and bias.protected intprotected static final intprotected static final intprotected static final intno. of learning cyclesprotected static final intbias for colour valuesprotected static final intnumber of colours usedprotected int[]protected int[][]protected static final intfour primes near 500 - assume no image has a length so.protected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected int[]protected intprotected byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidalterneigh(int rad, int i, int b, int g, int r) protected voidaltersingle(int alpha, int i, int b, int g, int r) byte[]colorMap()protected intcontest(int b, int g, int r) voidinxbuild()voidlearn()intmap(int b, int g, int r) byte[]process()void
-
Field Details
-
NET_SIZE
protected static final int NET_SIZEnumber of colours used- See Also:
-
PRIME_1
protected static final int PRIME_1four primes near 500 - assume no image has a length so. large that it is divisible by all four primes- See Also:
-
PRIME_2
protected static final int PRIME_2- See Also:
-
PRIME_3
protected static final int PRIME_3- See Also:
-
PRIME_4
protected static final int PRIME_4- See Also:
-
MIN_PICTURE_BYTES
protected static final int MIN_PICTURE_BYTES- See Also:
-
MAX_NETPOS
protected static final int MAX_NETPOS- See Also:
-
NET_BIAS_SHIFT
protected static final int NET_BIAS_SHIFTbias for colour values- See Also:
-
NCYCLES
protected static final int NCYCLESno. of learning cycles- See Also:
-
INTBIASSHIFT
protected static final int INTBIASSHIFTdefs for freq and bias. bias for fractions- See Also:
-
INTBIAS
protected static final int INTBIAS- See Also:
-
BETASHIFT
protected static final int BETASHIFT- See Also:
-
GAMMASHIFT
protected static final int GAMMASHIFT- See Also:
-
BETA
protected static final int BETA- See Also:
-
BETAGAMMA
protected static final int BETAGAMMA- See Also:
-
GAMMA
protected static final int GAMMAgamma = 1024- See Also:
-
INITRAD
protected static final int INITRAD- See Also:
-
RADIUSBIASSHIFT
protected static final int RADIUSBIASSHIFT- See Also:
-
RADIUSBIAS
protected static final int RADIUSBIAS- See Also:
-
INITRADIUS
protected static final int INITRADIUS- See Also:
-
RADIUSDEC
protected static final int RADIUSDEC- See Also:
-
ALPHABIASSHIFT
protected static final int ALPHABIASSHIFT- See Also:
-
INITALPHA
protected static final int INITALPHA- See Also:
-
RADBIASSHIFT
protected static final int RADBIASSHIFT- See Also:
-
RADBIAS
protected static final int RADBIAS- See Also:
-
ALPHARADBSHIFT
protected static final int ALPHARADBSHIFT- See Also:
-
ALPHARADBIAS
protected static final int ALPHARADBIAS- See Also:
-
alphadec
protected int alphadec -
thepicture
protected byte[] thepicture -
lengthcount
protected int lengthcount -
samplefac
protected int samplefac -
network
protected int[][] network -
netindex
protected int[] netindex -
bias
protected int[] bias -
freq
protected int[] freq -
radpower
protected int[] radpower
-
-
Constructor Details
-
Quant
public Quant(byte[] thepic, int len, int sample)
-
-
Method Details
-
colorMap
public byte[] colorMap() -
inxbuild
public void inxbuild() -
learn
public void learn() -
map
public int map(int b, int g, int r) -
process
public byte[] process() -
unbiasnet
public void unbiasnet() -
alterneigh
protected void alterneigh(int rad, int i, int b, int g, int r) -
altersingle
protected void altersingle(int alpha, int i, int b, int g, int r) -
contest
protected int contest(int b, int g, int r)
-