RETRO commands


PROGRAM NAME

vquant - Perform N-Dimensional Vector Quantization or Classification (K1)

DESCRIPTION

vquant performs N-dimensional vector quantization, also known as non-parametric vector classification. The technique is based on Paul Heckbert's median cut, with the modification that the histograms may have many independent axes, and are stored in a sparse data structure. Additionally, the splitting of a cluster is governed by the 2-norm of the subspace spanned by that cluster. That is, the decision regarding which "box" to split is made by finding the box representing the largest subspace in the 2-norm sense.

When splitting a cluster, the split axis is normally chosen to be the axis with the largest span across the enclosed data points, and the split point is the middle of the span. By setting the variance split flag, the split axis is chosen to be the axis with the largest variance of data across that axis, which should give better results at the cost of more computation. When the variance split flag is selected, the split point is at the mean of the distribution of data long the split axis.

References:

P. Heckbert, "Color Image Quantization for Frame Buffer Display", Computer Graphics, Vol. 16, No. 3, July 1982, p297.

The output from vquant is compatible with the spectrum classification application when the -m (map enable) option is set to true. The resulting cluster number image will have the ispare1 and ispare2 fields set. Ispare1 will be set to 0 and ispare2 will be set to the dimension of the vector.

REQUIRED ARGUMENTS

-i
type: infile
desc: Input image
-o
type: outfile
desc: Output cluster number image

OPTIONAL ARGUMENTS

-n
type: integer
desc: Number of vectors
default: 128
bounds: value > 0
-m
type: boolean
desc: Output Image Map Enable
default: true
-s
type: boolean
desc: Select split point: false = mid-span, true = mean
default: false
-axis
type: integer toggle
desc: Select splitting axis
default: 1
allowed values:
-o1
type: outfile
desc: Output cluster center image
default: {none}
-o2
type: outfile
desc: Output cluster variance image
default: {none}

EXAMPLES

vquant -i satellite_multiband -o classified -n 128

will generate a single-band output image, with pixel values between 0 and 127, with a mapping scheme of VFF_MS_ONEPERBAND, where the number of rows in the map is 128 and the number of columns is the number of planes in the input image. The actual coordinates of the vector representatives are stored as rows in the map.

SEE ALSO

RESTRICTIONS

vquant will currently only work on images of type VFF_TYP_FLOAT. Additionally, the output is currently restricted to type VFF_TYP_1_BYTE, and this in turn restricts the maximum number of representative vectors to 256.

Additionally, vquant suffers from the same statistical influences that igamut does; see igamut for more details.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.