ldsubsamp(3)

LIBRARY ROUTINE
ldsubsamp - Subsamples 1-D vector(s).

LIBRARY CALL
#include "vinclude.h"
int
ldsubsamp(image, skip, start, process_dir)
struct xvimage  *image;         /* input/output image */
int             skip,           /* skip value */
                start,          /* insert point */
                process_dir;    /* direction of processing 0=vect, 1= band */

INPUT

*image
    (struct xvimage) - pointer to the input/output xvimage structure

skip
    (int) - subsampling skip value

start
    (int) - first sample point

process_dir
    (int) - data processing direction. 0 = vector, 1 = band.

OUTPUT

*image
    (struct xvimage) - pointer to the input/output xvimage structure

MODIFICATIONS

Donna Koechner 7 Jun 1990 22:53:23 MDT
    updated to use ghostwriter.

Jeremy Worley 19 Feb 1992 09:21 MST
    made implicit declaration of dunload_vector() explicit.

DESCRIPTION
ldsubsamp subsamples 1-dimensional vector(s) from the input data file (image). The position where the first sample is taken can be specified by the start parameter. Start = 0 = will start subsampling with the first point in each vector. The number of points skipped between each sample is specified by the skip parameter. A skip value of 0 will cause no skipping to occur.

image
    The input/output file (image) must be of data storage type VFF_TYP_FLOAT or VFF_TYP_COMPLEX, be of dimension = 0, and have implicit location types. The output file (image) will contain the same number of vectors and be of the same data storage type as is in the input file. The vector dimension of the output file will be the determined by the skip value.

skip
    The skip parameter is an integer which describes how many points should be skipped between samples. For example, a skip value of 2 would result in the following points being sampled from the input sequence: 0, 3, 6, 9 ... .

start
    The first subsample point (start) specifies a constant offset into the input data vector(s) where the first sample point is taken.

process_dir
    Data can be processed with either band or vector orientation. If process_dir = DSP_VECTOR = 0, the 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 process_dir = DSP_BAND = 1.

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

RESTRICTIONS
Dsubsamp works only on VFF_TYP_COMPLEX and VFF_TYP_FLOAT.

AUTHOR
Donna Koechner

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