lvqerr(3)

LIBRARY ROUTINE
lvqerr - Compute the quantization error between a quantized image and the original.

LIBRARY CALL
#include "vinclude.h"
int
lvqerr(img1,img2,img3,mflg,rms)
struct xvimage *img1, *img2, *img3;
int   mflg;
double *rms;

INPUT

img1
    quantized VIFF image structure

img2
    original VIFF image structure

img3
    gating mask image

mflg
    a flag set (equal 1) if gating mask available

rms pointer to a DOUBLE to receive the RMS error

OUTPUT

rms is modified to contain the RMS quantization error

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS

DESCRIPTION
lvqerr computes the RMS quantization error between a quantized image and the original image.

The first input image is the quantized image and should have maps attached. The data type of the first image should be BYTE or INT. The map should be of the same data type as the data in the second image (the original). The original image should have no maps attached.

The mask image must be the same data storage type and size as the first input image.

The number of columns in the map of the first input image should match the number of bands in the second (original) input image.

The output is in text format, with the RMS quantization error printed in using the %e format.

SEE ALSO
vqerr(1), intro(3), vipl(3), verror(3), vutils(3)
vipl(3),lvquant(3),lvgamut(3)

RESTRICTIONS
lvqerr will not operate on VFF_TYP_BIT, VFF_TYP_COMPLEX, or VFF_TYP_DOUBLE data storage types.

AUTHOR

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