rotate input output rotation
input
List of images to be rotated.
output
List of output images.
rotation
Angle of rotation of the image in degrees. Positive angles will rotate
the image counter-clockwise from the x axis.
xin = INDEF, yin = INDEF
The origin of the rotation in pixels. Xin and yin default to the center of
the input image.
xout = INDEF, yout = INDEF
The origin of the output image. Xout and yout default to the center of the
output image.
ncols = INDEF, nlines = INDEF
The number of columns and rows in the output image. The default is to
keep the dimensions the same as the input image. If ncols and nrows is
less then or equal to zero the program will compute the number of columns
and rows needed to include the whole image, excluding the effects of
any origin shifts.
interpolant = linear
The interpolant. The options are the following:
nearest
Nearest neighbour.
linear
Bilinear interpolation in x and y.
poly3
Third order polynomial in x and y.
poly5
Fifth order polynomial in x and y.
spline3
Bicubic spline.
boundary = nearest
The choices are:
nearest
Use the value of the nearest boundary pixel.
constant
Use a constant value.
reflect
Generate a value by reflecting around the boundary.
wrap
Generate a value by wrapping around to the opposite side of the image.
constant = 0.
The value of the constant for constant boundary extension.
nxblock = 256, nyblock = 256
If the dimensions of the output image are less than nxblock and nyblock
then the entire image is rotated at once. Otherwise nxblock by nyblock
segments of the image are rotated.
ROTATE rotates the list of images in input by rotation degrees and writes the output to the images specified by output. The origins of the input and output images may be specified by setting xin, yin, xout and yout. The transformation is described below.
xt = (x - xin) * cos (rotation) - (y - yin) * sin (rotation) + xout yt = (x - xin) * sin (rotation) + (y - yin) * cos (rotation) + yout
The output image gray levels are determined by interpolating in the input image at the positions of the transformed output pixels. ROTATE uses the routines in the 2-D interpolation package.
1. Rotate an image 45 degrees around its center. cl> rotate m51 m51r45 45.0 2. Rotate an image by 45 degrees around (100., 100.) and shift the orgin to (150., 150.0) using bicubic interpolation. cl> rotate m92 m92r45 45.0 xin=100. yin=100. xout=150. yout=150. >>> interp=poly3 3. Rotate an image 90 degrees around the center. Note the use of intranspose and the image section notation. cl> imtranspose m92[*,-*] m92d90
It requires approximately 70 and 290 cpu seconds to rotate a 512 by 512 real image using bilinear and biquintic interpolation respectively (Vax 11/750 fpa).
The interpolation operation is done in real arithmetic. However the output type of the pixels is set equal to the input type. This can lead to truncation problems for integer images.
Simple 90, 270 etc degree rotations are best performed using the intranspose task and/or image section notation.
intranspose, imshift, magnify, lintran, geotran, geomap,