subregion
Outputs
which are mapped to avs parameters, inputs, and outputs, are for the
khoros library routine.
*********************************************************************************
Documentation for avs module vextcent
Input
OUTPUT
Description
Extracts the center of an image and places the result in the specified
output image. The dimensions of the extracted area are specified by the
height (-h) and width (-w) arguments. The dimensions of the resulting
output image correspond to the extracted area.
If subimage is larger than the original image, the routine will fail.
See also
intro(1), verror(3), vgparms(3), vutils(3)
RESTRICTIONS
Will not operate on BIT, and transform data storage types.
COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.
*********************************************************************************
Documentation for avs module vextract
INPUT
img1 the input xvimage structure
xoff the x offset from the upper left hand corner
of the input image.
yoff the y offset from the upper left hand corner
of the input image.
width the row_size of the output image
height the col_size of the output image
copymapflag copy map only if set
OUTPUT
*img2 holds the result of the extract operation.
DESCRIPTION
vextract removes a rectangular piece from an image to pro-
duce a subimage. The output image has the same characteris-
tics as the input image except for a subset of the data and
the subimage parameters are set.
The location data will always be preserved from the original
image. The map data may or may not be copied to the new
subimage.
struct xvimage *img1
img1 is used as the input xvimage structure.
struct xvimage **img2
img2 will be the resulting image. img1 is not touched.
Memory for img2 will be allocated.
int xoff
xoff specifies the X offset in the input image for the
upper left corner of the subimage.
int yoff
yoff specifies the Y offset in the input image for the
upper left corner of the subimage.
int width
width specifies the row_size of the resulting subimage.
int height
height specifies col_size of the resulting subimage.
int copymapflag
copymapflag if set to TRUE will copy the map data. If
set to FALSE will not copy the map data.
The subimage parameters are set to reflect where the subim-
age was taken from the origonal image.
If the subimage specification extends beyond the image boun-
dary, the largest possible subimage is returned. If the
subimage is larger than the original image, the routine will
fail.
vextract returns a zero upon failure and a one upon suc-
cess.
SEE ALSO
vextract(1), intro(3), vipl(3), verror(3), vutils(3)
Author
John Rasure, Mark Young
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vinsert
INPUT
img1 input xvimage structure
img2 input xvimage structure for subimage
xoff specifies the upper left X coordinate for the
placement of the subimage.
yoff specifies the upper left Y coordinate for the
placement of the subimage.
real specifies the real value for padding
imag specifies the imaginary value for padding
with COMPLEX
OUTPUT
img1 holds the result of the insert operation.
The output data type is the same as the input
data type.
DESCRIPTION
vinsert inserts a subimage into the input image to form the
output image. The subimage is placed at the same coordi-
nates is was extracted from unless the xoffset and yoffset
of the upper left corner of the target location are speci-
fied.
If the subimage does not completely fit into the input
image, then the input image will be padded to a larger size
to encompass the subimage. The real variable specifies the
padding value for the larger size image. In the event that
images are of data storage type COMPLEX, the imag variable
specifies the imaginary pad value.
For byte type images:
If the level value specified by user is greater than 255,
the level value will be scaled down to 255. If the level
specified by user is less than 0, the level value will by
scaled up to 0.
There are no restrictions to the input image (img1) and the
subimage (img2) size. It is possible to input a large image
into a small image, thus the small image will no longer
exist.
This routine will work on multiple band images. But both
input images must contain the same number of data bands.
The input image and subimage must be of the same data
storage type. The output image is the same data storage
Type
as the input image.
img1 is used for both the input xvimage structure and the
output result xvimage structure. This is done to save
space, but you must be careful not to overwrite impor-
tant data. img2 should contain a smaller subimage.
xoff and yoff
specify the location at which the subimage should be
placed.
real specifies the padding value for real data, and in the
case of COMPLEX data imag specifies the padding value
for the imaginary part.
vinsert returns a zero upon failure and a one upon success.
SEE ALSO
vinsert(1), intro(3), vipl(3), verror(3), vutils(3)
AUTHOR
John Rasure, Tom Sauer, Mark Young
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vpad
INPUT
OUTPUT
DESCRIPTION
Performs the padding of a data sequence. Specifying an offset
other than zero generates a border around the original image.
If the input image type is not complex, the imaginary pad
value will be ignored. For byte images, pad values greater than
255 will be reduced to 255.
SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3)
RESTRICTIONS
Will not operate on transformed or BIT type images
COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.
*********************************************************************************
Documentation for avs module vsamp
INPUT
image pointer to image to be sampled
line pointer to image pointer to receive the out-
put image
x1 X coordinate of start point
y1 Y coordinate of start point
x2 X coordinate of end point
y2 Y coordinate of end point
n number of samples to generate between the
endpoints
OUTPUT
line xvimage pointer indicated by line is attached
to the new image
DESCRIPTION
Given an image of arbitrary size and a line through that
image, sample the image along the line. The sampling inter-
val is independent of image size and line orientation. The
value at each sample point is obtained by bilinear interpo-
lation.
The first sample point is precisely at the starting point
and the final sample is precisely at the ending point.
SEE ALSO
vsamp(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
vsamp will only work on images of type FLOAT.
AUTHOR
Richard Krukar
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************