RETRO commands


PROGRAM NAME

vfht - Compute 2-D Fast Hadamard Transform (K1)

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 algorithm 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. Gonzalez
Paul Wintz
Addison-Wesley Publishing Company, Reading Massachusetts, 1987

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

REQUIRED ARGUMENTS

-i
type: infile
desc: input image (viff file)
-o
type: outfile
desc: output image (viff 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

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.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.