Download presentation
Presentation is loading. Please wait.
PublishErna Lenaerts Modified over 5 years ago
1
JPEG-LS -- The new standard of lossless image compression
School of Computer Science, University of Central Florida, VLSI and M-5 Research Group May, 1999
2
Predictive encoding Original sequence 20 21 125 126 30 31 32
Q: why prediction? A: to produce a more “skewed” set of sequence for entropy encoder Original sequence 20 21 125 126 30 31 32 Prediction errors 1 104 -96 Prediction example
3
Predictive encoding Lossless JPEG JPEG-LS CALIC ……
4
What’s wrong with Lossless JPEG ?
C B A X Lossless JPEG uses “static” predictor. The prediction model is determined before the compression starts
5
JPEG-LS is better because…
“Dynamic” predictor. The predictor is determined dynamically Simple edge detection algorithm is introduced to determine the predictor. Prediction refinement
6
JPEG-LS: initial prediction
c b d a X Prediction algorithm: If c max(a, b) X^ = min(a, b) Else { If c min(a, b) X^ = max(a, b) X^= a + b- c } X is the pixel being encoded a, b and c used for initial prediction
7
JPEG-LS: initial prediction example
103 100 d 99 100 d 102 X 102 X X is predicted as 100 since a vertical edge is detected X is predicted as 102 since a horizontal edge is detected
8
JPEG-LS: refine the prediction
JPEG-LS maintains 365 contexts. it is used to describe the local “characteristics” of pixels. Context of X is computed from a, b and d Each context maintains a bias, which can be considered as an evaluation of the predictor’s performance for that particular context. The bias is used for refinement of the initial prediction X’’ = X’ – B[q] where X’ is the initial prediction, X’’ is the refined prediction, q is the context of X and B is the bias
9
JPEG-LS: prediction refinement example
103 100 d 102 X X’ = 100 Suppose X is in context q and B[q] = -1, then X’’ = 100 – (-1) = 101
10
JPEG-LS: compute the prediction error, update the bias
Compute the prediction error as: Prediction Error = X – X’’ Update the context-dependent bias
11
Ready for entropy encoding? Wait……
12
JPEG-LS: Re-mapping example
If the pixel value is in range [0, 255], the prediction error is in range [-255, 255] A larger range means more bits to represent the prediction error We need to re-map the prediction errors to [0, 255], is it possible? Yes. Since the prediction error always in range [-x”, 255-x’’]
13
JPEG-LS: Re-map residuals
The following example assumes pixel value is in [0, 7] -3 -2 -1 1 2 3 4 6 5 7 Mistake in David Salomon’s book? X’’’ = 2x’’ if x’’>=0 X’’’ = 2|x’’|-1 otherwise -3 -2 -1 1 2 3 4 5 6 8
14
JPEG-LS: entropy encoding
Finally entropy encoder is applied.
15
Summary of the basic steps of JPEG-LS
Find the initial prediction X^ Refine prediction by considering the bias of the context Compute the prediction error (residual) and update the bias of that context Re-map residuals Encode residuals using Golomb-Rice coder
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.