vsamp(1)

PROGRAM
vsamp - Sample an image along an arbitrary line.

SYNTAX

vsamp

-i  input image

-o  output image

-x1 starting x coordinate for line

-x2 ending x coordinate for line

-y1 starting y coordinate for line

-y2 ending y coordinate for line

-n  number of samples

[-V]
    Gives the version for vsamp

[-U]
    Gives the usage for vsamp

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called vsamp.ans or file1

[-a [file1]]
    Uses vsamp.ans or file1 as the answer file

DESCRIPTION
Given an image of arbitrary size and a line through that image, sample the image along the line. The sampling interval is independent of image size and line orientation. The value at each sample point is obtained by bilinear interpolation.

The first sample point is precisely at the starting point and the final sample is precisely at the ending point.

REQUIRED ARGUMENTS

-i  type: infile
    desc: input image

-o  type: outfile
    desc: output image

-x1 type: integer
    desc: starting x coordinate for line

-x2 type: integer
    desc: ending x coordinate for line

-y1 type: integer
    desc: starting y coordinate for line

-y2 type: integer
    desc: ending y coordinate for line

-n  type: integer
    desc: number of samples

OPTIONAL ARGUMENTS
none

EXAMPLES
vsamp -i diffract.xv -o line_data.xv -x1 0 -y1 0 -x2 0 -y2 0 -n 400

Will sample the image diffract.xv to obtain a one dimensional data array in line_data.xv. The line goes from the top left corner to the bottom right. 400 evenly spaced samples will be obtained via bilinear interpolation.

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvsamp(3)

RESTRICTIONS
vsamp will only work on images of type FLOAT.

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