PCE -- Pseudocolour Encoding

Encodes an input channel into three output channels (i.e., red, green, and blue components) using a pseudocolour table held in a database segment.

PARAMETERS

PCE is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
ENCODING Encoding Mode:  NORM/OVER               4         Char
DBIC     Database Input Channel List             1         Int
DBPCT    Database Pseudocolour Segment           1         Int
DBOC     Database Output Channel List            3         Int
DBIW     Database Input Window                   0-4       Int

FILE

Specifies the name of the PCIDSK image file containing the channel to be pseudocoloured.

 EASI>FILE="filespec"

DBIC

Specifies the database channel to be encoded.

 EASI>DBIC=i
The input channel should be 8-bit.

DBPCT

Specifies the database segment (type 171) which holds the pseudocolour table.

 EASI>DBPCT=i

DBOC

Specifies the three output channels to receive the encoding results.

 EASI>DBIC=red channel,green channel,blue channel

DBIW

Optionally specifies a rectangular subset of the imagery to be pseudocoloured.

 EASI>DBIW=Xoffset,Yoffset,Xsize,Ysize

ENCODING

  Valid Values:   NORM,OVER
  Default:        NORM
Specifies the pseudocolour encoding mode.

 OVER           | only encodes non-zero input pixels
                | into the 3 output channels, giving an
                | 'overlay' effect with the background
                | showing through

 NORM           | completely encodes the input channel
                | into the 3 output channels

DETAILS

PCE is used to encode an input channel (DBIC) into three output channels (DBOC, where DBOC(1) = red output channel, DBOC(2) = green, and DBOC(3) = blue) using a pseudocolour table held in a database segment (DBPCT). This encoding is done over the window specified in (DBIW).

Pseudocolour tables are usually created using one of the P? commands in the program DCP and saved to database segments using the program VIP.

A special feature of PCE is that pixel values of zero in the input channel (DBIC) are NOT encoded into the three output channels if ENCODING is set to "OVER". This leaves the underlying values unaltered, thus allowing the input channel to be overlaid on the original data already in the output channels. For example, given that the channels specified in (DBOC) contain image data and the input channel (DBIC) is a classification from the program MLC, only the `classified' pixels would be encoded, since unclassified (or null class) pixels have a value of zero. The result would be a false colour image with classified regions embedded in the image.

The primary use of PCE is to create red, green, and blue colour channels for output to a video display or hardcopy output. Often, these channels can be written to tape and sent to other installations for photographic or colour plotter reproduction.

For example, given the following pseudocolour table and 4 by 4 initial data channels:

 Pseudocolour table
 input   output        DBIC       DBOC(1)     DBOC(2)     DBOC(3)
 level   R  G  B                  (Red)       (Green)     (Blue)

   0     7  7  7      0 0 0 0     1 1 1 5     4 4 4 3     3 3 2 3
   1     8  3  0      1 1 0 0     1 1 1 1     1 1 1 1     9 9 9 9
   2     8  5  1      2 3 0 0     1 1 1 1     1 1 1 1     9 9 9 9
   3     2  0  1      0 0 0 0     1 1 1 1     1 1 1 1     9 9 9 9
   4     9  9  9
  ...
  255    .  .  .
With ENCODING="NORM", output for the three DBOC channels would be as follows:

            DBOC(1)        DBOC(2)        DBOC(3)

            7 7 7 7        7 7 7 7        7 7 7 7
            8 8 7 7        3 3 7 7        0 0 7 7
            8 2 7 7        5 0 7 7        1 1 7 7
            7 7 7 7        7 7 7 7        7 7 7 7
With ENCODING="OVER", output for the three DBOC channels would be as follows:

            DBOC(1)        DBOC(2)        DBOC(3)

            1 1 1 5        4 4 4 3        3 3 2 3
            8 8 1 1        3 3 1 1        0 0 9 9
            8 2 1 1        5 0 1 1        1 1 9 9
            1 1 1 1        1 1 1 1        9 9 9 9
Note: The R,G,B values for the zero grey level in the pseudocolour table are not ignored in this case.

PCE functionality is based on a program submitted by Mit Tilkov of Cominco Ltd., developed using B.C. Research facilities.

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

Example 1.

Assume that the file "PCETEST.PIX" contains the following:

 Channels 1,2,4:  raw imagery data
 Channel  6    :  classification result from MLC
 Segments 7,8,9:  lookup tables for channels 1,2,4
 Segment  10   :  pseudocolour table for channel 6
We wish to embed the classification results in channel 6 into the raw imagery (for later output to hard copy). First we use the LUTs for the raw channels 1,2,4 to bulk enhance them so they will show up well; then we encode in the classification results.

 EASI>FILE="PCETEST.PIX"
 EASI>DBIC=1,2,4
 EASI>DBLUT=7,8,9
 EASI>DBOC=1,2,4
 EASI>DBIW=
 EASI>DBIB=
 EASI>RUN LUT                   | bulk enhancement

 EASI>ENCODING="OVER" 
 EASI>DBIC=6
 EASI>DBPCT=10
 EASI>DBOC=4,2,1                | LANDSAT 2 RGB false-colour
 EASI>RUN PCE                   | encode classification
Example 2

We want to completely encode database input channel 6, which contains USGS Land Use/Land Cover data using the associated pseudocolour segment 15, with the output going into 3 output channels (red=7,green=8,blue=9).

 EASI>FILE="IRVINE.PIX"
 EASI>ENCODING="NORM" 
 EASI>DBIW=
 EASI>DBIC=6
 EASI>DBPCT=15
 EASI>DBOC=7,8,9
 EASI>RUN PCE

About PCI Help Gateway