ldfilter(3)

LIBRARY ROUTINE
ldfilter - filters signals according to a transfer function

LIBRARY CALL
#include "vinclude.h"
int ldfilter(image,poly,proc_dir)
    struct xvimage *image;
    struct poly_struct *poly;
    int proc_dir;

INPUT

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

poly
    polynomial structure containing polynomial that represents the transfer function to be used as a filter.

procdir
    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 17 Feb 1992 11:43 MST
    Fixed problem with sign of autoregressive terms of filter.

Jeremy Worley 17 Feb 1992 11:55 MST
    Made implicit function type of poly_info() explicit.

Jeremy Worley 05 Mar 1992 09:17 MST
    Fixed up autoregressive case of transfer function processing in ldzfilter().

DESCRIPTION
filters time domain signals by applying a time domain difference equation or a z-domain transfer function. The equations are supplied to ldfilter in a poly_struct structure.

Typically, the difference equations will be causal, i.e. there will be no terms like y(n+1). If a noncausal difference equation is input, then dlfilter will attempt to delay the system sufficiently to create a causal system. If it is not able to find a y(n) term at that point, then it will abort.

If the calling program passes in a noncausal system, then ldfilter will attempt to delay it sufficiently to create a causal system. If, at that point, it is unable to find a term from which it can create a y(n) term when it performs an inverse z-transform, then it will issue an error message and bail out. Because of the nature of the internal representation of the equation, care should be taken when designing filters to ensure that there is a constant term in the denominator of each stage, otherwise a delay is inserted into the result.

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

RESTRICTIONS

AUTHOR
Jeremy Worley

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