
dfht(1)                      Khoros                       dfht(1)

PROGRAM
     dfht - Take the 1-D Fast Hadamard Transform of a signal.

SYNTAX
     dfht

     -i             input signal (xviff file)

     -o             output signal (xviff file)

     [-d]           data processing direction (n=vectors,y=bands)

     [-s]           scale fft by 1, 1/N or 1/sqrt(N):
                    0 (Do not scale the output data),
                    1 (Scale output data by 1/N),
                    or 2 (Scale output data by 1/sqrt(N))
                       [default = 0]

     [-V]           Gives the version for dfht

     [-U]           Gives the usage for dfht

     [-P]           Prompts for command line options

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

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

DESCRIPTION
     dfht performs a 1-D Fast Hadamard Transform on a signal.
     The Hadamard Transform uses a series of pulses as its basis
     functions.  This program uses the successive doubling algor-
     ithim to implement a Fast Transform.  The output coeffi-
     cients are, by definition, in sequency order.

     The output data may be scaled by 1/N, 1/sqrt(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.

     Signals may be processed either across bands or in the vec-
     tor direction.  The default data processing direction is
     across bands.

          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 Mas-
          sachusetts, 1987

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

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input signal (xviff file)

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

OPTIONAL ARGUMENTS
     -d     type: boolean
            desc: data processing direction (n=vectors,y=bands)
            default: true

     -s     type: integer
            desc: scale fft by 1, 1/N or 1/sqrt(N)
            allowed values:
            0 (Do not scale the output data),
            1 (Scale output data by 1/N),
            or 2 (Scale output data by 1/sqrt(N))

EXAMPLES
     dfht -i input.signal -o hadamard.domain.signal

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

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

                      input signal = { 1, 1, 1, 1 }

     The output would be this

                      output signal = { 1, 0, 0, 0 }

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

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), ldfht(3)
     vfwt2d(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 input image (signal) must have a vector dimen-
     sion that is a non-zero power of two. Images using 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 1992, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

