ldhart1d(3)

LIBRARY ROUTINE
ldhart1d - Performs the 1D forward Hartley transform of a data sequence.

LIBRARY CALL
#include "vinclude.h"
int
ldhart1d (image,trans_dir,center_opt,scale_opt,process_dir )
struct xvimage *image;
int             center_opt,
                trans_dir,
                scale_opt,
                process_dir;

INPUT

image
    contains the signal data to be transformed.

trans_dir
    specifies the transform direction. 0 indicates the inverse transform, 1 indicates the forward transform. This is only useful when center_opt is set to 1 (center).

center_opt
    centering choice: 1 for centered, 0 for not centered.

scale_opt
    scaling choice: 0 for no scaling, 1 for multiplying by 1/n, 2 for multiplying by 1/sqrt(n), where n is the number of data points.

process_dir
    processing direction: 0 for vector processing or 1 for band oriented processing.

OUTPUT

image
    holds the result of the transform.

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS

Jeremy Worley 25 Oct 1990 11:09 MDT
    Changed internal function log2 to k_log2 to prevent compile errors.

Jeremy Worley 05 Mar 1992 10:36 MST
    Fixed up numerous implicit declarations of functions in ldhart1d() and hart1d(). Fixed a couple of fprintf calls that were incorrect. Changed permute()'s return type to void.

DESCRIPTION
1D Forward Hartley Transform. Performs the 1D forward Hartley transform of a sequence. It can operate on Real data.

The transform can be centered about its N/2 term by setting the -c option to 1. (This is the default setting.) If -c is set to 0, the transform will not be centered.

The output data can be scaled by 1/N or by 1/sqrt(N) if desired by using the -s option. The default setting is to leave the output data unscaled (-s = 0). If -s is set to 1, the output data is scaled by 1/N, where N in the number of points in the data sequence. The output can be scaled by 1/sqrt(N) by setting -s to 2.

The default data processing direction for dfft1d is in the vector direction. This means that data stored in multiband format will be processed as a set of data sequences, where each sequence corresponds to a pixel location, and the points of each sequence are defined by the bands corresponding to that pixel location. The direction of processing can be changed so that each band is processed as a signal (instead of each vector being a signal) by setting the -d option to 1.

SEE ALSO
dhart1d(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS

AUTHOR
Jeremy Worley

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