LUT -- Image Enhancement via Lookup Table

Enhances imagery on disk by passing it through an 8-bit Lookup Table segment (LUT) and writing the resulting imagery back to disk. This allows bulk radiometric enhancement of image data.

Note: LUT works only for 8-bit data. Use MODEL to perform lookup table operations on 16-bit and 32-bit data.

Progress of this program can be monitored. See MONITOR section.

See Also: STR, FUN, LUTREAD, DCP, MODEL

PARAMETERS

LUT is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBIC     Database Input Channel List             1-1024    Int
DBLUT    Database Lookup Table                   1-1024    Int
DBOC     Database Output Channel List            1-1024    Int
MASK     Area Mask (Window or Bitmap)            0-4       Int

FILE

Specifies the name of the PCIDSK image file to be enhanced with lookup tables.

 EASI>FILE="filespec"

DBIC

Specifies the image channels to be enhanced with lookup tables.

 EASI>DBIC=i,j,...,p

DBLUT

Specifies the database segments that contain the lookup tables (LUT: type 170).

EASI>DBLUT=i,j,...,p

DBOC

Specifies the channels to receive the output lookup table enhanced images.

 EASI>DBOC=i,j,...,p

MASK

Specifies the area in the input channel in which to perform the lookup table enhancement. This can be one of the following:

 EASI>MASK=xoff,yoff,xsize,ysize        | process window
 EASI>MASK=b                            | process only under bitmap
                                        | stored in segment b
 EASI>MASK=                             | process entire channel

DETAILS

Typically in remote sensing applications the intensity values of the original raw data are left unchanged. Enhancements (usually performed to help users make visual interpretations) are done using Lookup Tables on the display system.

However it sometimes becomes necessary to permanently enhance the data by physically passing it through the Lookup Table and writing it back to disk. This removes the need for the Lookup Table. Typically this is done in preparation to export the data to another system, or for creating a finished product which will be printed.

LUT transforms a set of image channels via a set of lookup tables stored in lookup table segments (Segment type 170). The transformed image data is stored in a set of output image channels.

The MASK parameter specifies the area within the input channel which will be processed. Only the area under mask will be processed and the rest of the image will be unchanged. If a single value is specified, then this value points to a bitmap segment, which defines the area to be processed (this is useful, for instance, in enhancing water data while leaving land unchanged, by using a bitmap to mask all areas of water). When four values are specified, these values define the x,y offsets and x,y dimensions of the rectangular window within the image to be processed. If defaulted (no values specified), the entire database is processed.

ALGORITHM

An example of the actual operation performed by LUT transform is given below:

                         level  Output
    1   3   1   1          0      9            6   0   6   6
    3   3   3   0          1      6            0   0   0   9
    0   1   0   0          2      1            9   6   9   9
    3   3   0 255          3      0            0   0   9   0
                           :      :
                         255      0             

        Input                LUT                  Output

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"           | turn monitor ON  (default)
 EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                             | running in batch/background mode)

EXAMPLE

Transfer an image channel to the display, and using DCP, create a custom-made lookup table to enhance the image. Transfer the lookup table to the database, then perform bulk lookup table enhancement of the image channel database data.

 EASI>FILE="filename"
 EASI>DBIC=1            | transfer channel 1 to display
 EASI>VDOC=1            | image plane 1 displays channel 1
 EASI>DBOW=             | transfer entire image
 EASI>VDOW=             | use entire display window
 EASI>RUN IVI           | transfer image to display
 EASI>RUN DCP "L?"      | alter lookup table memory using one
                          of the lookup table commands
 EASI>VDLUT=1           | select lookup table 1 for transfer
 EASI>DBSN="Lookup"     | assign database segment name
 EASI>RUN VIL           | transfer LUT to database
 EASI>DBIC=1            | select channel 1 for LUT enhancement
 EASI>DBLUT=LASC        | select LUT segment for enhancement
 EASI>DBOC=2            | store enhanced image in channel 2
 EASI>MASK=             | use entire channel
 EASI>RUN LUT
Note: we take advantage of the fact that when a new segment is created, the segment number is saved in LASC (Last Segment Created).


About PCI Help Gateway