ldmpp(3)

LIBRARY ROUTINE
ldmpp - Magnitude, Power, or Phase of 1-D signal(s)

LIBRARY CALL
#include "vinclude.h"
int
ldmpp (image,mode,output,phase,min_phase,direction)
   struct xvimage  *image;
   int             output,mode,phase,min_phase,direction;

INPUT

image
    pointer to VIFF structure containing image data to be processed.

mode
    determines type of data desired (0 = magnitude, 1 = power, 2 = phase).

output
    magnitude or power output option: 0 = magnitude or power; 1 = log(magnitude or power); 2 = log(magnitude or power +1); 3 = ln(magnitude or power); 4 = ln(magnitude or power +1).

phase
    phase output option: 0 = radians; 1 = degrees.

direction
    process direction: 0 indicated vector oriented processing, 1 indicates band oriented processing.

OUTPUT

image
    pointer to VIFF structure containing image data after processing.

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS

Jeremy Worley 19 Dec 1990 18:18 MST
    Modified phase calculation to explicitly check for the (0,0) and set the phase at those points to 0. This prevents the dreaded "SQRT domain error"

Jeremy Worley 05 Mar 1992 10:52 MST
    Added a missing declaration for the argument output in ldmpp(). Added an explicit declaration of propertype() to ldmag().

DESCRIPTION
determines the magnitude, power, or phase of each 1-D data point in the input data file.

ldmpp will find the 1-D magnitude, power, or phase of each data point. If magnitude or power is selected, it can generate the log or natural log of the result, or the log or natural log of the result +1.

If phase is selected, then ldmpp can generate either the radian or degree result.

dmpp does not work on explicit location data and will return an error when such a file is encountered. No output file will be created. dmpp works only on VFF_TYP_FLOAT or VFF_TYP_COMPLEX data files.

Input/Output Files

The input file must be of type VFF_TYP_FLOAT or VFF_TYP_COMPLEX. The output file returned will be the same size of the input file and the type will be VFF_TYP_FLOAT. *********************************************************************

Process direction

Data can be processed with either band or vector orientation (-d option). The default data processing direction is in the vector direction (-d = 0). 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
dmpp(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
ldmpp works only on VFF_TYP_COMPLEX and VFF_TYP_FLOAT.

ldmpp does not work on explicit location data and will return an error when such a data file is encountered. -bugs_end

AUTHOR
Ramiro Jordan, Jeremy Worley

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