Package | Description |
---|---|
net.sourceforge.jiu.color.quantization |
Classes to perform color image quantization, the reduction of the number of unique
colors in an image.
|
Modifier and Type | Field and Description |
---|---|
private MedianCutNode[] |
MedianCutContourRemoval.leaves |
private MedianCutNode |
MedianCutNode.leftSuccessor |
private MedianCutNode |
MedianCutNode.parent |
private MedianCutNode |
MedianCutNode.rightSuccessor |
private MedianCutNode |
MedianCutQuantizer.root |
Modifier and Type | Method and Description |
---|---|
MedianCutNode[] |
MedianCutQuantizer.createLeafList()
Creates a linear list of leaf nodes.
|
private MedianCutNode |
MedianCutQuantizer.findLeafToBeSplit(MedianCutNode node)
Traverses tree given by argument node and returns leaf with largest distribution
of samples for any of its three components.
|
MedianCutNode |
MedianCutQuantizer.findNearestNeighbor(int[] rgb)
For a given RGB value, searches the node in the internal node tree whose
representative color is closest to this color.
|
MedianCutNode |
MedianCutNode.getLeftSuccessor()
Returns left successor node (or null if this node is a leaf).
|
MedianCutNode |
MedianCutNode.getParentNode()
Returns parent node (or null if this node is the root node).
|
MedianCutNode |
MedianCutNode.getRightSuccessor()
Returns right successor node (or null if this node is a leaf).
|
MedianCutNode |
MedianCutNode.getSuccessor(int[] rgb) |
Modifier and Type | Method and Description |
---|---|
private void |
MedianCutQuantizer.addNodes(MedianCutNode[] nodeList,
MedianCutNode node) |
private void |
MedianCutQuantizer.addNodes(MedianCutNode[] nodeList,
MedianCutNode node) |
double |
MedianCutNode.computeRgbDistance(MedianCutNode node)
Computes the distance in RGB color space between the representative color of this node and the
argument node and returns it as non-negative value.
|
private MedianCutNode |
MedianCutQuantizer.findLeafToBeSplit(MedianCutNode node)
Traverses tree given by argument node and returns leaf with largest distribution
of samples for any of its three components.
|
int |
MedianCutQuantizer.findNearestNeighbor(MedianCutNode[] nodes,
int red,
int green,
int blue)
For each node in the argument array computes the distance between the
representative color of that node and the color given by the three
argument samples.
|
private void |
MedianCutQuantizer.findRepresentativeColors(MedianCutNode node)
Calls findRepresentativeColor with node if node is a leaf.
|
private int |
MedianCutQuantizer.setPaletteIndexValues(MedianCutNode node,
int index)
Recursively visits node and its descendants, assigning ascending
palette index values to leaves via MedianCutNode.setPaletteIndex(int).
|
void |
MedianCutNode.setSuccessors(MedianCutNode left,
MedianCutNode right)
Sets the successor nodes for this node.
|
void |
MedianCutQuantizer.splitNode(MedianCutNode node) |
Constructor and Description |
---|
MedianCutNode(MedianCutNode parent,
int index1,
int index2)
Creates a node for a Median Cut tree of nodes with index values for
some external color array and the parent node.
|