ADAPT -- Make Adaptive PCT

Generates a pseudocolour table (PCT) which can be used to optimally represent a provided RGB image. The 24-bit image is translated to an 8-bit pseudocolour table using an adaptive PCT algorithm.

See Also: PCTMAKE, PCTREP, ERRDIFF, CMPRSS8

PARAMETERS

ADAPT is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBIC     Database Input Channel List             3         Int
DBPCT    Database Pseudocolour Segment           0-1       Int
DBSN     Database Segment name                   0-8       Char
DBSD     Database Segment Descriptor             0-64      Char

FILE

Specifies the name of the PCIDSK image file containing the imagery and theme channels.

 EASI>FILE="filespec"

DBIC

Specifies the three 8-bit channels containing the RGB image.

 EASI>DBIC=r,g,b
If r, g, and b are all the same channel number then this is equivalent to specifying a black and white image. Ranges of channels can be specified with negative values. For example, {2,-4} is internally expanded to {2,3,4}.

DBPCT

Optionally specifies the database pseudocolour table (PCT) segment to receive data. If no segment number is specified, then a new segment is created.

 EASI>DBPCT=n                     | overwrite PCT segment n
 EASI>DBPCT=                      | create a new segment
If a new segment is created, then the LASC parameter is updated with the segment number.

DBSN

Specifies a 1 to 8 character quick identifier for the pseudocolour table.

 EASI>DBSN="string"
This value is only used if a new pseudocolour segment is created.

DBSD

Specifies a 1 to 64 character descriptor of the contents or origins of the pseudocolour table.

 EASI>DBSD="string"
This value is only used if a new pseudocolour segment is created.

DETAILS

ADAPT creates a pseudocolour table (PCT, segment type 171) using as input three channels (DBIC) representing an RGB (colour) image. The PCT can then be used as input to the ERRDIFF program which converts an RGB image to a pseudocoloured image based on a provided PCT.

Input RGB channels (DBIC) should be 8-bit. This restriction is due to the 8-bit nature of a pseudocolour table. While any type of image channel can be used, values are internally converted to 8-bit data. Using non 8-bit data may result in unexpected or poor results.

IMAGE COMPRESSION (24 T0 8-BIT)

It is occasionally necessary to compress 24-bit RGB (colour) imagery to 8-bit. The result of the compression is an 8-bit image and a pseudocolour table. When the 8-bit image is shown using the pseudocolour table, a reasonable approximation of the original 24-bit image is achieved.

ADAPT is commonly used to compress 24-bit imagery to 8-bit PCTs for export to other formats. Since 8-bit display hardware is far more common than 24-bit, many software packages and workstations (for example PCs with VGA cards) work exclusively with this type of data.

The following compression technique can also be used:

The programs PCTMAKE and CMPRSS8 give alternative methods of compressing images to 8-bit.

EXAMPLE

A user wishes to convert a 24-bit image into a pseudocoloured image, before exporting as a TIFF file.

 EASI>FILE="map100.pix"         
 EASI>DBIC=1,2,3
 EASI>DBPCT=
 EASI>RUN ADAPT                 | Compute Optimal PCT

 EASI>DBPCT=LASC
 EASI>DBIC=1,2,3
 EASI>DBOC=1
 EASI>RUN ERRDIFF               | Convert 24bit to 8bit

 EASI>DBIC=1
 EASI>FILI="map100.pix"
 EASI>FILO="map100.tif"
 EASI>FTYPE="TIF
 EASI>RUN FEXPORT               | Write to TIFF file

About PCI Help Gateway