shiftlines input output shift
PARAMETERS
input
List of images to be shifted. Image sections are allowed.
output
List of output image names. If the output image name is the same as the input
image name then the shifted image replaces the input image.
shift
Shift in pixels.
interp_type = linear
Interpolation function. The minimum match abbreviated choices are:
nearest
Nearest neighbor interpolation.
linear
Linear interpolation.
poly3
Third order divided differences.
poly5
Fifth order divided differences.
spline3
Cubic spline interpolation.
boundary_type = nearest
Boundary condition for shifts outside the input image.
The minimum match abbreviated choices are:
nearest
Use the values of the nearest boundary pixel.
wrap
Generate a value by wrapping around to the opposite boundary.
reflect
Generate a value by reflecting around the boundary
constant
Use a user supplied constant pixel value.
constant = 0.0
The constant for constant boundary extension.
The list of images in input is shifted by the amount shift and copied to the list of output images output. The number of output image names must be the same as the number of input images. An output image name may be the same as the corresponding input image in which case the shifted image replaces the input image.
The shift is defined by the following relation.
xout = xint + shift
Features in the input image are moved to higher columns when the shift is positive and to lower columns when the shift is negative. For example, to shift a feature at column 10 to column 12 the shift is 2.0. The task has been optimized for integral pixel shifts.
There are five choices for the one dimensional image interpolation which is selected with the parameter interp_type. The value of the output pixels corresponding to input pixel positions outside the boundaries of the image is determined by the parameter boundary_type.
1. Shift the lines of an image by 0.25 pixels to the right.
cl> shiftlines imagein imageout 0.25
2. Shift the lines of an image by -.3 pixels using cubic spline interpolation and replace the input image by the output image.
cl> shiftlines image image -.3 interp=spline3
It requires approximately 28 and 59 seconds to shift a 512 square image using linear and cubic spline interpolation respectively (Vax 11/750 with fpa).
imshift, magnify, rotate, imlintran, blkrep, blkav, geotran,