| com.sun.media.jai.opimage.ColorQuantizerOpImage com.sun.media.jai.opimage.NeuQuantOpImage
NeuQuantOpImage | public class NeuQuantOpImage extends ColorQuantizerOpImage (Code) | | An OpImage implementing the "ColorQuantizer" operation as
described in javax.media.jai.operator.ExtremaDescriptor
based on the median-cut algorithm.
This is based on a java-version of Anthony Dekker's implementation of
NeuQuant Neural-Net Quantization Algorithm
NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994.
See "Kohonen neural networks for optimal colour quantization"
in "Network: Computation in Neural Systems" Vol. 5 (1994) pp 351-367.
for a discussion of the algorithm.
Any party obtaining a copy of these files from the author, directly or
indirectly, is granted, free of charge, a full and unrestricted irrevocable,
world-wide, paid up, royalty-free, nonexclusive right and license to deal
in this software and documentation files (the "Software"), including without
limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons who receive
copies from any such party to do so, with the only requirement being
that this copyright notice remain intact.
See Also: javax.media.jai.operator.ExtremaDescriptor See Also: ExtremaCRIF |
Constructor Summary | |
public | NeuQuantOpImage(RenderedImage source, Map config, ImageLayout layout, int maxColorNum, int upperBound, ROI roi, int xPeriod, int yPeriod) Constructs an NeuQuantOpImage . |
minpicturebytes | final protected static int minpicturebytes(Code) | | |
prime1 | final protected static int prime1(Code) | | four primes near 500 - assume no image has a length so large
that it is divisible by all four primes
|
prime2 | final protected static int prime2(Code) | | |
prime3 | final protected static int prime3(Code) | | |
prime4 | final protected static int prime4(Code) | | |
NeuQuantOpImage | public NeuQuantOpImage(RenderedImage source, Map config, ImageLayout layout, int maxColorNum, int upperBound, ROI roi, int xPeriod, int yPeriod)(Code) | | Constructs an NeuQuantOpImage .
Parameters: source - The source image. |
findNearestEntry | protected byte findNearestEntry(int r, int g, int b)(Code) | | Search for BGR values 0..255 (after net is unbiased) and
return colour index
|
train | protected synchronized void train()(Code) | | |
|
|