lvquant(3)

LIBRARY ROUTINE
lvquant - Perform N-dimensional vector quantization or classification

LIBRARY CALL
#include "vinclude.h"
int
lvquant(i,nvecs,mapflg,ccimage,ccflg,cvimage,cvflg,sp,axis)
struct xvimage *i,**ccimage,**cvimage;
int nvecs,mapflg,ccflg,cvflg,sp,axis;

INPUT

i   pointer to vector image to be quantized.

nvecs
    number of vectors to generate

mapflg
    output image map enable

ccimage
    cluster center output image structure

cvimage
    cluster variance output image structure

sp  split point method: 0 is mid-span, 1 is mean

axis
    split axis: 1 is max-span axis, 2 is max variance axis, 3 is principal eigenvector

OUTPUT

i   the image pointed to by i on input is modiifed to contain the single-band classification pixel plane and the map is modified so that it contains the representative vectors.

MODIFICATIONS
23-Jul-91 Scott Wilson Fixed uninitialized next pointer (Tom Lane)

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.

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.

Inputs:

i   pointer to vector image to be quantized.

nvecs
    number of vectors to generate

mapflg
    output image map enable

ccimage
    cluster center output image structure

cvimage
    cluster variance output image structure

s   split point method: 0 is mid-span, 1 is mean

axis
    split axis: 1 is max-span axis, 2 is max variance axis, 3 is principal eigenvector

Outputs:

i   the image pointed to by i on input is modiifed to contain the single-band classification pixel plane and the map is modified so that it contains the representative vectors.

SEE ALSO
vquant(1), intro(3), vipl(3), verror(3), vutils(3)

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 vgamut does; see vgamut(1) for more details.

AUTHOR
Scott Wilson

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