lvfht(3)

LIBRARY ROUTINE
lvfht - Take the 2-D Fast Hadamard Transform of an image.

LIBRARY CALL
#include "vinclude.h"
int lvfht (img, inv_flag)
struct xvimage *img;
int inv_flag;

INPUT

    1. img - a pointer to an xvimage structure containing the image to be transformed

    2. inv_flag - if set this flag indicates that an inverse transform should be performed, otherwise a forward transform is executed.

OUTPUT

    1. img - the input image is overwritten and the output is returned in its place. Be careful not to overwrite important data.

    lvfht returns 1 upon success and 0 on failure.

MODIFICATIONS

DESCRIPTION
lvfht vfht -i input.image -o hadamard.domain.image

This command performs a fast hadamard transform on the image contained in the viff file "input.image" and returns the output in another viff file called "hadamard.domain.image".

If your input image had dimensions 4 row by 4 columns, and the image had a constant value as shown below

                 input image = { 1, 1, 1, 1,
                        1, 1, 1, 1,
                        1, 1, 1, 1,
                        1, 1, 1, 1 }

The output would be this

                 output image = { 1, 0, 0, 0,
                        0, 0, 0, 0,
                        0, 0, 0, 0,
                        0, 0, 0, 0 }

Because the input image was simply the first of the Hadamard basis functions with magnitude = 1.

    The Following references were used in creating this program :

    1. "Digital Image Processing, Second Edition"
        Rafael C. Gonzalex
        Paul Wintz
        Addison-Wesley Publishing Company, Reading Massachusetts, 1987

    2. "The C User's Journal", July 1989, "The Fast Walsh Transform", p101 .br
        Ian AshDown

SEE ALSO
vfht(1), intro(3), vipl(3), verror(3), vutils(3) ldfht(3)

RESTRICTIONS
lvfht only works on images of type VFF_TYP_FLOAT. The dimensions of the input image must both be non-zero powers of two. Images with maps or explicit location data are not allowed.

AUTHOR
Per Lysne

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