User's Guide

ABS

Computes the absolute value of the pixels in an image

Function:

Forms a new output image from the absolute value of an input image where out(x,y)=absolute value(in(x,y)). The output image has the same data type as the input image.

Parameters:

IN
Input image. IN may be a single- or multi-band image and may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 pixel data. Window and/or band options may be specified. The window size of all input images are required to be the same. If the input image is BYTE, it is copied to OUT. See User Note #1.

OUT
Output image. Each output value is the absolute value of the corresponding input value.

Example:

  1. LAS> abs in=myimg out=newimg

    This takes the absolute values of the input image, MYIMG;IMG, and writes them to the output image, NEWIMG;IMG.

Description/Algorithm:

The absolute value of each element in the input image is taken to build the output image. The output image will have the same data type as the input image.

Nonfatal Error Messages:

  1. [abs-warn] Nonfatal error encountered

    A nonfatal error was encountered during processing. The message that is displayed immediately preceding this message is the specific error that was encountered. Processing continues.

  2. [abs-type] Input image is a BYTE image

    The user specified an input image containing BYTE data. Since all values in a BYTE image are already > 0, the only processing performed is a copy to the output image.

Fatal Error Messages:

  1. [abs-fatal] Fatal error encountered

    A fatal error was encountered during processing. The error message displayed immediately preceding this message is the specific error that was encountered. Processing was terminated.

  2. [abs-alloc] Error allocating dynamic memory

    An error occurred while allocating dynamic memory for processing. Rerun the function. If the error reoccurs, notify the system manager.

  3. [abs-window] Input images do not have same window sizes

    Error occurs if multiple input images are specified with different window sizes. Rerun specifying the window sizes the same for each image.

User Note:

  1. If the input image is BYTE data, the image is copied to the the output image. This allows ABS to be used in procedure PDF's where the data type of the input image is not always known.