Gamma DIFF&GEO: Reference Manual


rotate_image

ANSI-C program: resamp_image.c

NAME
rotate_image -  Rotate an image about the image center by a specified angle.

SYNOPSIS
rotate_image <data_in> <width_in> <angle> <data_out> <width_out> <nlines_out> [interp_mode] [format_flag]

<data_in> (input) data file (format as specified by format_flag parameter)
<width_in> width of input data file
<xscale> x coordinate scaling factor (0 < xscale <= 100)
<yscale> y coordinate scaling factor (0 < yscale <= 100)
<data_out> (output) output data file
<width_out> output image width, (enter - for default)
<nlines_out> number of lines in the output image, (enter - for default)
[interp_mode] interpolation mode:
    0: nearest-neighbor
    1: bicubic spline (default)
    2: bicubic spline log(x)
    3: bicubic spline sqrt(x)
[format_flag] input and output data format
    0: FLOAT (default)
    1: FCOMPLEX
    2: SUN raster/BMP format
    3: UNSIGNED CHAR
    4: SHORT

EXAMPLES:

resample_image diff_ts_009 600 2. 2.  diff_ts_009_2 - - 1 0

Scale the floating point image of unwrapped phase diff_ts_009 by a factor of 2 in x and y. The input image had a width of 600 samples and contained 600 lines.  The output image dimensions are scaleed to 1200x1200. Bicubic spline interpolation is used as the interpolation method. 

DESCRIPTION
resamp_image is program that scales images by linear scale factors in x and y. The output image size can either be calculated from the input image or specified on the command line.  The user  enters "-" for the size of the output image size parameters to select that these be calculated from the image bounds.  

Valid input/output data formats are float, fcomplex, unsigned char, and raster image (SUN or BMP) format. Either  cubic spline  or a nearest neighbor interpolation can be selected. In the case of complex-valued data the real and imaginary part are interpolated independently. In the case of unsigned char and SUN raster format only the nearest-neighbor resampling algorithm is available.

The bicubic spline of the log(data) or  bicubic spline of the sqrt(data) interpolation transforms the input values, performs the  interpolation, and converts the interpolated data back to linear scale. For interpolation of  SAR intensity, data converted to log scale or using sqrt()  has the advantage that no negative values are generated in the interpolation, even for very noisy data. The output is the interpolated values converted back to linear scale. In order to avoid problems with negative values (log or sqrt not defined) the absolute value of the input values is used.

SEE ALSO
typedef_ISP.h, typedef_DIFF.h.


© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2015.
UW, CW, last change 2-Jul-2015.