written 6.2 years ago by |
The main advantage of JPEG-LS over JPEG2000 is that JPEG-LS is based on a low-complexity algorithm. IPEG-LSis part of a larger ISO effort aimed at better compression of medical images.
JPEG-LS is in fact the current ISOI lTU standard for lossless or "near lossless" compression of continuous-tone images. The core algorithm in JPEG-LS is called low Complexity lossless compression for Images (LOCO-I), proposed by Hewlett-Packard.
LOCO-I exploits a concept called context modeling. The idea of context modeling is to take advantage of the structure in the input source - conditional probabilities of what pixel values follow from each other in the image.
As a simple example, suppose we have a binary source with P(0) = 0.4 and P(1) = 0.6.Then the Oth-order entropy H(S) = -0.4log2 (0.4) – 0.6log2(0.6) = 0.97. Now suppose we also know that this source has the property that if the previous symbol is 0, the probability of the current symbol being 0 is 0.8, and if the previous symbol is 1, the probability of the current symbol being 0 is 0.1.
If we use the previous symbol as our context, we can divide the input symbols into two sets, corresponding to context 0 and context I, respectively. Then the entropy of each of the two sets is H(S_1)=-0.8log_2(0.8) - 0.2log_2(0.2) = 0.72
$H(S_2)=-0.1log_2(0.1) - 0.9log_2(0.9) = 0.47$
The average bit-rate for the entire source would be 0.4 x 0.72 +0.6 x 0.47 = 0.57, which is substantially less than the Oth-order entropy of the entire source in this case.
LOCO-I uses a context model shown in Figure 9.14. In raster scan order, the context pixels a, b, c, and d all appear before the current pixel x. Thus, this is called a causal context.
LOCO-I can be broken down into three components: Prediction. Predicting the value of the next sample x' using a causal template
Context determination. Determining the context in which x' occurs.
Residual coding. Entropy coding of the prediction residual conditioned by the context of x'