User's Guide

RESIZE

Copy an image iteratively skipping user specified lines and/or samples.

Function:

Copies a LAS image into another LAS image. Every Yth line and Xth sample in the input image(s) will be skipped when copying to the output image, thereby reducing the size of the image. 'Y' and 'X' are specified by the user. The input image(s) can be subwindowed and subbanded when copying to the output image. The output image is always the same data type as the input image(s).

Parameters:

IN
Input image. IN may be a single- or multi-band image and may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 data. Window and/or band options may be specified. The window size of all of the input images are required to be the same. The data type of all of the input images are required to be the same.

OUT
Output image. The data type of the output image will be the same as that of the input image(s).

SCALFACT
Scale reduction factor. Specifies an iterative skipping factor for the lines and samples in an image. Every Yth line and Xth sample will be skipped, thereby reducing the size of the output image.

Examples:

  1. LAS> resize in=ny out=outimg scalfact=(4,3)

    Copies image NY into image OUTIMG. Every fourth line in NY is skipped when copying to OUTIMG. Every third sample in NY is skipped when copying to OUTIMG.

  2. LAS> resize in="image1(:1,3) + image2(100,200,500,512:4)" out=outimg scalfact=(2,2)

    Copies bands one and three of image IMAGE1 and band four of image IMAGE2 to image OUTIMG. It is assumed that IMAGE1 is a 500 line by 512 sample image. OUTIMG is a three band, 250 line by 256 sample image. The data type of OUTIMG is the same as IMAGE1 and IMAGE2.

Description/Algorithm:

RESIZE alters images by deleting pixels based on user-input scale factors for the line and sample axes. The input image is copied to the output image skipping every Y'th line and every X'th sample. The first line to be skipped is not the first line in the input image, but rather the Y'th line in the input image (likewise in the samples direction).

Error checking is performed on the input image(s) to ensure that only one window size has been specified. The data type of the input images must be the same (assuming more than one image has been specified). The data type of the output image will be the same as the data type of the input image(s).

Nonfatal Error Messages:

  1. [resize-warn] Nonfatal error encountered

    A nonfatal error was encountered during processing. The image data is valid; processing will continue.

Fatal Error Messages:

  1. [resize-fatal] Fatal error encountered

    A fatal error was encountered. The message displayed immediately preceding this error message is the specific error encountered.

  2. [resize-window] Input images do not have the same window size

    The input images do not have the same window size. Correct the input image specification.

  3. [resize-alloc] Error allocating dynamic memory

    An error was encountered while trying to allocate memory. Try running again when more system resources are available.

  4. [resize-dtype] Input images are not the same data type

    Input images were specified that are not of the same data type. Input images must have the same data type because data type conversion is not supported by RESIZE.

User Notes:

  1. When subsampling an image, the output image origin is reset to (1,1) in the DDR.