LOW-COMPLEXITY PREDICTIVE LOSSY COMPRESSION OF HYPERSPECTRAL AND ULTRASPECTRAL IMAGES Andrea Abrardo, Mauro Barni
Enrico Magli
Universit`a di Siena Dipartimento di Ingegneria dell’Informazione (barni,abrardo)@dii.unisi.it
Politecnico di Torino (Italy) Dipartimento di Elettronica
[email protected]
ABSTRACT
In this paper we develop a low-complexity technique for onboard lossy compression of hyperspectral and ultraspectral images. Very effective low-complexity approaches based on distributed source coding ideas have been proposed for lossy [1] compression. We build on [1], which shows that efficient lossy compression can be achieved using spectral prediction, as opposed to a spectral transform, greatly reducing memory and computational requirements. However, the algorithm proposed in this paper does not employ distributed source coding principles. Rather, it aims at improving rate-distortion (RD) performance even further, with only a marginal complexity increase with respect to [1]. It does so by employing a prediction-based scheme, with optimized quantization and RD optimization. It should be noted that, albeit based on prediction, the proposed scheme is not of the near-lossless type. Therefore, it does not suffer from performance loss at low bit-rates, and can cover all range of bit-rates of interest, from less than 1 bpp up to lossless compression when quantization is turned off. The lossless part has been presented in [2]; in the present work we focus on the development of the lossy compression stage, which has been accepted for compression of the micrOmega spectrometer onboard Exomars.
Lossy compression of hyperspectral and ultraspectral images is traditionally performed using 3D transform coding. This approach yields good performance, but its complexity and memory requirements are unsuitable for onboard compression. In this paper we propose a low-complexity lossy compression scheme based on prediction, uniformthreshold quantization, and rate-distortion optimization. Its performance is competitive with that of state-of-the-art 3D transform coding schemes, but the complexity is immensely lower. The algorithm is able to limit the scope of errors, and is amenable to parallel implementation, making it suitable for onboard compression at high throughputs. 1. INTRODUCTION Onboard compression of hyperspectral and ultraspectral images is a very active research area. Due to their fine spectral resolution, imaging spectrometers generate high data rates that call for the use of compression. Lossy compression has to be considered for large compression ratios, wherein the 3D transform coding approach has largely been prevalent. A transform such as the wavelet or Karhunen-Lo`eve Transform can be employed in the spectral dimension, followed by spatial decorrelation. For example, the use of the multicomponent transformation feature of JPEG 2000 part 2 has been very popular, as well as approaches based on set partitioning. While these techniques achieve extremely good performance, their complexity and buffering/memory requirements are far too demanding for onboard compression. An alternative is represented by near-lossless compression, in which the maximum absolute error between the original and decoded image is bounded to a user-defined value. Near-lossless compression is typically based on prediction and has low complexity, but its performance is typically poor at low bit-rates.
2. PROPOSED LOSSY COMPRESSION ALGORITHM 2.1. Prediction In the following we denote as x m,n,i the pixel of an hyperspectral image X in m-th line, n-th pixel, and i-th band, with i = 0, . . . , B − 1. The algorithm compresses independent non-overlapping spatial blocks of size N × N , with N typically equal to 16; each block is processed separately. This approach entails a small performance penalty, as all the prediction and entropy coding operations have to be reset at the end of each block. However, it has two important advantages. Firstly, it allows parallelization, as each spatial block (with all bands) can be encoded as a completely independent data unit. Secondly, it provides error resilience,
This work has been sponsored by ESA-ESTEC under project 20035CCN02 “Lossy compression for Exomars”.
978-1-4577-0539-7/11/$26.00 ©2011 IEEE
797
ICASSP 2011
as erroneous decoding of a block has no effect on the decoding of other blocks in different spatial positions. Moreover, additional spectral error resilience and spectral parallelization can be obtained by periodically encoding a band without spectral prediction (i.e., intra-mode). The group of bands contained between two intra-coded bands, including the first and excluding the last, can be encoded and decoded independently and will generate an independent error containment segment. For the first band (i = 0), 2D compression is performed. The choice of the 2D predictor is not critical, and several reasonably good predictors will work. The one we have xm−1,n,0 + x m,n−1,0 ) >> used is defined as x m,n,0 = ( 1, where x and x respectively denote the predictor and the decoded value, and >> denotes right-shift. Except for the first sample of the block, all prediction error samples are mapped to nonnegative values as 2|e| − 1 e > 0 S= (1) 2|e| e≤0
compression does not work well at low bit-rates because the predictor is too much degraded from quantization. A quantizer with deadzone is known to work well at low bitrates as it creates long sequences of zeros, but is suboptimal at high rate. A uniform-threshold quantizer (UTQ), i.e. a quantizer that has of equal size, but reconstruction values taken as the centroids of each bin, has uniformly good performance at low and high bit-rates. In this paper, we employ the UTQ quantizer in [4], with no deadzone, as this provides uniformly good performance over the whole RD curve. Letting the quantization step size be equal to 2Δ, the reconstructed value can be written as |em,n,i | em,n,i = sign(em,n,i ) max 0, 2Δ + 0.5 . 2.3. Rate-distortion optimization As described so far, the proposed algorithm is very similar to a near-lossless compression scheme, except for the use of a UTQ as opposed to a uniform quantizer. To retain low complexity and at the same time make the algorithm truly lossless, we perform a simple but very powerful RD optimization. The idea is similar to the “SKIP” mode in video compression. If, for a given block, the predictor is “good enough”, then we might as well avoid encoding the prediction error, raising a flag that indicated to the decoder to simply replace the block with its predictor. This works well at low bit-rate, where this mode provides a favorable tradeoff between the distortion incurred by setting the prediction error to zero, and the corresponding rate saving. In particular, the algorithm first predicts a block and quantizes it, as described above. Once this has been done, the reconstruction distortion D associated with skipping this N 2 block is computed as D = N12 i=0 e2m,n,i . This distortion is then compared with a threshold, that is, the condition 2 2 D > γ Δ3 is verified, where Δ3 is the distortion yielded by a scalar uniform quantizer applied to the prediction error. If the distortion exceeds the threshold, then the prediction error has too much energy, so that skipping would yield poor RD performance. On the contrary, if D is below the threshold, the block is skipped, and only the predictor parameters are written in the compressed file for the block. Signaling block skips requires one bit per block. We have found that taking γ = 3 consistently yields very good results.
where e is the prediction error value, and S is the corresponding mapped value. This mapping function is also used bands I > 0. For all other bands, the samples x m,n,i belonging to the block (with m, n = 0, . . . , N − 1), are predicted from the decoded samples x m,n,i−1 of the previous band. In order to make x m,n,i−1 globally as “similar” as possible to x m,n,i in minimum mean-squared error sense, a least-squares esαN timator [3] is computed over the block as α = αD , with αN = [( xm,n,i−1 − μi−1 )(xm,n,i − μi )] and αD = m,n [( xm,n,i−1 − μi−1 )( xm,n,i−1 − μi−1 )]. μi and μi−1 m,n
are the average values of the co-located decoded blocks in bands i and i − 1. Quantized versions of α and μ i , denoted as α and μi , are generated using a uniform scalar quantizer in the range [0, 2) with 10 bits for α, and [0, 2 16 − 1) with has been computed, the predicted 16 bits for μi . Once α values within the block are computed for all m = 0, . . . , N ( xm,n,i−1 − μi−1 ). and n = 0, . . . , N as x m,n,i = μi + α The prediction error can be calculated for all m = 0, . . . , N and n = 0, . . . , N as em,n,i = xm,n,i − x m,n,i . 2.2. Quantization The proposed scheme is based on quantization of the prediction error in the DPCM loop; we restrict to scalar quantization to limit the complexity. Selecting the proper scalar quantizer is less obvious than it may seem at a first glance. The vast majority of remote image compression algorithms based on prediction employ a scalar uniform quantizer. This leads to near-lossless compression, as the magnitude of the error introduced in each reconstructed sample is bounded by half the quantization step size. However, near-lossless
2.4. Entropy coding The proposed algorithm employs Golomb codes with power-of-two parameters. The N xN mapped prediction residuals of a block are encoded in raster order using a Golomb code, except for the first sample of the block that is encoded using an exp-Golomb code of order 0 [5]. The Golomb code parameter k j for the j-th sample of the block is computed from a running count R j of the sum of the mag-
798
nitude of the last 32 unmapped residuals of the block; for samples with index less than 32, only the available values are used. The parameter k j is computed using the wellknown C-language one-liner [6]:
90
for(kj=0;(J