
vquant(1)                    Khoros                     vquant(1)

PROGRAM
     vquant - Perform N-dimensional vector quantization or clas-
     sification

SYNTAX
     vquant

     -i             input image

     -o             output resulting image

     -axis          Select splitting axis:
                    1 (Maximum span axis),
                    2 (Maximum variance axis),
                    or 3 (Principal eigenvector)

     [-o1]          cluster center output image

     [-o2]          cluster variance output image

     [-n]           number of vectors

     [-m]           Output Image Map Enable

     [-s]           Select split point - False: mid-span, True:
                    mean

     [-V]           Gives the version for vquant

     [-U]           Gives the usage for vquant

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vquant.ans or
                    file1

     [-a [file1]]   Uses vquant.ans or file1 as the answer file

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 modifica-
     tion 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 sub-
     space 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 clas-
     sification 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 resulting image

     -axis  type: integer
            desc: Select splitting axis
            allowed values:
            1 (Maximum span axis),
            2 (Maximum variance axis),
            or 3 (Principal eigenvector)

OPTIONAL ARGUMENTS
     -o1    type: outfile
            desc: cluster center output image

     -o2    type: outfile
            desc: cluster variance output image

     -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

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 represen-
     tatives are stored as rows in the map.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvquant(3)

RESTRICTIONS
     vquant will currently only work on images of type
     VFF_TYP_FLOAT.  Additionally, the output is currently res-
     tricted 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 vgamut does; see vgamut(1) for more details.

COPYRIGHT
     Copyright 1991, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

