Multispectral Image Compression using Median Predictive Coding and Wavelet Transform
2.3 Median Predictive Coding
In predictive coding, the correlation of the neighboring pixel values is used to form a prediction for each pixel. The most common approach of predictive coding is DPCM (Veldhuis, 1993). In DPCM, the prediction is subtracted from actual pixel value to form a differential image that is much less correlated than the original image data, as shown in Figure 1. The pixel value is usually predicted with linear combination of its thee nearest pixels value such as :

Figure 1: DPCM encoding
The median predictors can also be used inDPCM (Salo, 1988). The prediction was chosen as the median value of three different predictions, i.e. the predictions are ranked in order of increasing value, and the middle value, and the middle value is chosen, as illustrated by Figure 2. In this study, the predictor is defined as:
predictor 1 (x,y) = pixel (x,y-1) (2)
predictor 2 (x,y) = pixel (x,1-y) (3)
predictors 3 (x,y) = 0.75 pixel (x,y-1) + 0.75 pixel (x-1,y)-(0.50pixel (x-1,y-1)) (4)
medianpredictors (x;y) = median (predictor1, predictors2,predictors3) (5)

Figure 2: Medium predictor.
2.4 Hybrid Median Predictive Coding and Wavelet Transform
The hybrid technique used in study is by applying median-predictor DPCM (MDPCM) to wavelet coefficients. Particular attention has to be paid to the lowest-frequency subband as introduced error could propagate in the reconstruction phase, resulting in a worse image quality. Therefore, the lossless MDPCM is applied to this subband, while the lossy MDPCM is used to code all remaining subbands, as illustrated in Figure 3 which is the case of 2-level wavelet decomposition. In lossy MDPCM, the differential image is subject to a quantization process, which determines the resulting bit rate and image quality. The Lloyd-Max quantizer (Gonzalex, 1992) was used in this study.

Figure 3: Application of median-predictor DPCM to wavelet coefficients