vfht(1)

PROGRAM
vfht - Take the 2-D Fast Hadamard Transform of an image.

SYNTAX

vfht

-i  input image (xviff file)

-o  output image (xviff file)

[-s]
    scale output by 1/N (0 = no scale, 1 = scale)

[-V]
    Gives the version for vfht

[-U]
    Gives the usage for vfht

[-P]
    Prompts for command line options

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

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

DESCRIPTION
vfht performs a 2-D Fast Hadamard Transform on an image. The Hadamard Transform uses a series of pulses as its basis functions. This program uses the successive doubling algorithim and the separability property to implement a Fast Transform. The output coefficients are, by definition, in sequency order.

The output data may be scaled by 1/N, or not scaled at all. The default is to not scale the data at all. The only difference between a forward and a reverse Hadamard Transform is the scaling factor, so this routine functions as both a forward and reverse transform provided that one of the transforms (forward OR reverse) is set to scale by 1/N and the other performs no scaling.

    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

REQUIRED ARGUMENTS

-i  type: infile
    desc: input image (xviff file)

-o  type: outfile
    desc: output image (xviff file)

OPTIONAL ARGUMENTS

-s  type: boolean
    desc: scale output by 1/N (0 = no scale, 1 = scale)
    default: false

EXAMPLES
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.

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvfht(3) dfht(1)

RESTRICTIONS
The input data type may be byte (VFF_TYP_1_BYTE), short (VFF_TYP_2_BYTE), int (VFF_TYP_4_BYTE) or float (VFF_TYP_FLOAT), but the output coefficients will always be float. The dimensions of the input image must both be non-zero powers of two. Images with maps are not allowed. The input viff file must contain only one image with a single band. Data with explicit locations is not accepted.

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