User's Guide

ZOOM

Changes the scale of an image by replicating or deleting pixels.

Function:

Changes the scale of an image by deleting or replicating pixels from the input image and producing the zoomed output image. The image may be scaled independently in the line and sample direction.

Parameters:

Subcommand -EXPAND:
Enlarges input image(s). If subcommand -EXPAND is specified, the scale of the image is increased. For a given input image line, each pixel will be replicated by a factor of SCALFACT(2). After performing the SCALFACT(2) replication, each line will then be replicated by a factor of SCALFACT(1). If the resulting image is displayed, it will appear "closer."

IN
Input image(s). The input image(s) may be BYTE, INTEGER*2, INTEGER*4, or REAL*4.

OUT
Output image. Data type will be the same as the input.

SCALFACT
Scale factor(s). Scaling factors in the line and sample directions. They must be nonzero integers.
Subcommand -REDUCE:
Decreases input image(s). If subcommand -REDUCE is specified, the scale of the image is reduced. For a given input image line, every SCALFACT(2) pixel, beginning with the starting pixel, is retained and all other pixels are deleted. Every SCALFACT(1) line, beginning with the first line, is then retained and all other lines are deleted. The minimum output image size possible is 1 X 1. If the resulting image is displayed, it will appear to be "further away."

IN
Input image(s). The input image(s) may be BYTE, INTEGER*2, INTEGER*4, or REAL*4.

OUT
Output image. Data type will be the same as the input.

SCALFACT
Scale factor(s). Scaling factors in the line and sample directions. They must be nonzero integers.

Examples:

  1. LAS> zoom-expand in=in.img(200,200,100,100) out=z.dat scalfact=4,2

    This performs an expansion of the input image IN.IMG using a window of 100 lines and 100 pixels centered at the input file coordinates (250,250) specified by the window used. The zoom is performed by a factor of 4 in the line direction and a factor of 2 in the sample direction. The image Z.DAT will be 400 x 200 with the starting pixel of the input image at 200,200.

  2. LAS> zoom-reduce in=wash.dat(1,1,512,512) out=zoom.dat scalfact=2,2

    This performs a scale reduction on image file WASH.DAT. The input window is 512 x 512 and the image WASH.DAT is reduced by 2 in the line and sample directions. The image ZOOM.DAT will be 256 x 256 with the starting pixel of the input image at 1,1.

Description/Algorithm:

ZOOM alters images by replicating and deleting pixels based on user-input scale factors for the line and sample axes.

If subcommand -EXPAND is specified, the scale of the image is increased. For a given input image line, each pixel will be replicated by a factor of SCALFACT(2). After performing the replication, each line will then be replicated by a factor of SCALFACT(1). If the resulting image is displayed, it will appear "closer."

If subcommand -REDUCE is specified, the scale of the image is reduced. For a given input image line, every SCALFACT(2) pixel, beginning with the starting pixel, is retained and all other pixels are deleted. Every SCALFACT(1) line, beginning with the first line, is then retained and all other lines are deleted. The minimum output image size possible is 1 X 1. If the resulting image is displayed, it will appear to be "further away."

Nonfatal Error Messages:

  1. [zoom-histry] Error creating history file

    An error occurred when creating the history file.

  2. [zoom-minmax] Error creating minmax file

    The minmax file could not be created.

  3. [zoom-warn] Nonfatal error encountered

    A nonfatal error was encountered during processing. The image data is probably valid.

Fatal Error Messages:

  1. [zoom-fatal] Fatal error encountered

    A fatal error was encountered during processing. The output image file is not deleted, and processing is terminated. The message that is displayed immediately preceding this error message is the specific error that was encountered.

  2. [zoom-input] Input images are not of the same data type

    The input images are not of the same data type. Use COPY to change the data types so they are the same.

  3. [zoom-open] Cannot open <XXXXXX> file

    The <XXXXXX> file could not be opened and processing is terminated. Verify that the image named in the <XXXXXX> parameter exists.

  4. [zoom-sizerr] Output image size is invalid

    The calculated size of the output image is less than one. Do not reduce the input image by such a large factor or increase the size of the input image.

  5. [zoom-window] Input images do not have the same window size

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

User Notes:

  1. If a window is specified, the size of the window is the size of the input image, not the output image. The size of the output image will be the number of lines of the input image times or divided by the SCALFACT(1), by the number of samples of the input image times or divided by the SCALFACT(2).