Page 126 - Digital Analysis of Remotely Sensed Imagery
P. 126

Storage of Remotely Sensed Data       97

                    •  Second, each reduced value is recoded, starting from the
                      smallest to the original one, in a backward sequence. The two
                      remaining probabilities are assigned the simplest codes of 0
                      and 1 arbitrarily to distinguish them from each other. If 0 is
                      assigned to the value of a lower probability, it has to remain
                      unchanged in subsequent operations in which more codes
                      are added to the front of the existing code(s).
                    •  Third, repeat the process until the original source is reached.
                      All codes for the source values end up having a varying
                      length. The original pixel values are decoded by examining
                      the string of codes from left to right in a lookup table manner.
                      This string of codes is uniquely decodable.

                   For 8-bit remote sensing imagery, there are 256 possible pixel
               values. The construction of the optimal binary Huffman code (i.e.,
               254 source reductions and 254 code assignments) is a daunting task.
               It is hence necessary to simplify code construction at the expense of
               coding efficiency.
                   In lossless predictive coding, interpixel redundancies of closely
               spaced pixels are eliminated through extraction and coding of only
               the difference between the actual and predicted value in each pixel.
               The degree of data compression achievable with this method is related
               directly to the entropy reduction.

               3.4.2 Run-Length Coding
               It is quite common to encounter a long string of the same pixel value
               in a row, especially if the image is binary. Binary images can be created
               through a process called bit-plane coding. An original image of either
               grayscale or color is decomposed into binary ones in the form of the
               base 2 polynomial. For instance, the tone of an image changes little
               across the same hayfield. In this case, the run-length coding method
               can be adopted to reduce image data. In this coding, two values are
               used to code a particular value, say zero. Whenever this value is
               encountered in a row from left to right, it is coded by two values in
               the output file. The first is the value of the first run, and the second
               describes the number of times it is encountered or successive runs
               (Fig. 3.7). Thus, a high efficiency of data compression is expected if a
               long contiguous string of pixels have the same value. The input data
               can be treated as individual bytes, or groups of bytes that represent
               something more elaborate, such as floating point numbers. Although
               this method is an effective means of data compression, run-length


               Original data stream: 25 34  4  4  4  32 28 34  4

               Run-length codes:    25  1  34  1  4  3  32  1  28  1  34  1  4  1
               FIGURE 3.7  An example of run-length coding.
   121   122   123   124   125   126   127   128   129   130   131