dcc ‘99 - adaptive prediction lossless image coding adaptive linear prediction lossless image...

30
DCC ‘99 - Adaptive Prediction Lossless Image Coding DCC ‘99 - Adaptive Linear Prediction Lossless Image Coding DCC ‘99 - Adaptive Linear Prediction Lossless Image Coding Adaptive Linear Prediction Lossless Image Coding Giovanni Motta, James A. Storer Brandeis University Volen Center for Complex Systems Computer Science Department Waltham MA-02454, US {gim, storer}@cs.brandeis.edu Bruno Carpentieri Universita' di Salerno Dip. di Informatica ed Applicazioni "R.M. Capocelli” I-84081 Baronissi (SA), Italy [email protected]

Upload: marshall-kennedy

Post on 17-Dec-2015

232 views

Category:

Documents


4 download

TRANSCRIPT

DCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Prediction Lossless Image Coding

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Adaptive Linear Prediction Lossless Image Coding

Giovanni Motta, James A. Storer

Brandeis UniversityVolen Center for Complex Systems

Computer Science DepartmentWaltham MA-02454, US

{gim, storer}@cs.brandeis.edu

Bruno Carpentieri

Universita' di SalernoDip. di Informatica ed Applicazioni

"R.M. Capocelli”I-84081 Baronissi (SA), Italy

[email protected]

ProblemProblem

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Graylevel lossless image compression addressed from the point of view of the achievable

compression ratio

OutlineOutline

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

Past Results / Related WorksPast Results / Related Works

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Until TMW, the best existing lossless digital image compressors (CALIC, LOCO-I, etc..) seemed unable to improve compression by using image-by-image optimization techniques or more sophisticate and complex algorithms

A year ago, B. Meyer and P. Tischer were able, with their TMW, to improve some current best results by using global optimization techniques and multiple blended linear predictors.

Past Results / Related WorksPast Results / Related Works

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

In spite of the its high computational complexity, TMW’s results are in any case surprising because:

Linear predictors are not effective in capturing image edginess;

Global optimization seemed to be ineffective; CALIC was thought to achieve a data rate close

to the entropy of the image.

MotivationsMotivations

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Multiple Adaptive Linear Predictors

Pixel-by-pixel optimization

Local image statistics

Investigation on an algorithm that uses:

Main IdeaMain Idea

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Explicit use of local statistics to: Classify the context of the current pixel; Select a Linear

Predictor; Refine it.

Prediction WindowPrediction Window

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Statistics are collected inside the window Wx,y(Rp)

Not all the samples in Wx,y(Rp) are used to refine the predictor

Window Wx,y(Rp)

Rp+12Rp+1

Current Pixel I(x,y)

Encoded Pixels

Current Context

Prediction ContextPrediction Context

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

6 pixels fixed shape weights w0,…,w5 change to

minimize error energy inside Wx,y(Rp)

w1 w2 w3

-1w5w4

w0

Prediction: I’(x,y) = int(w0 * I(x,y-2) + w1 * I(x-1,y-1) + w2 * I(x,y-1) + w3 * I(x+1,y-1) + w4 * I(x-2,y) + w5 * I(x-1,y))

Error: Err(x,y) = I’(x,y) - I(x,y)

Predictor RefinementPredictor Refinement

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

minw0 ,...,w5

E(x, y) = minw0 ,...,w5

(ERR(x',y' ))2I (x', y')∈W'x,y(Rp )

wi(t +1)=wi(t)−μ∂E∂wi

Gradient descent is used to refine the predictor

Window Wx,y(Rp)

Rp+12Rp+1

Current Pixel I(x,y)

Encoded Pixels

Current Context

AlgorithmAlgorithm

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

for every pixel I(x,y) do begin

/* Classification */Collect samples Wx,y(Rp)Classify the samples in n clusters (LBG on the

contexts)Classify the context of the current pixel I(x,y)

Let Pi={w0, .., w5} be the predictor that achieves

the smallest error on the current cluster Ck

/* Prediction */

Refine the predictor Pi on the cluster Ck

Encode and send the prediction error ERR(x,y)

end

Results SummaryResults Summary

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Compression is better when structures and textures are present

Compression is worse on high contrast zones

Local Adaptive LP seems to capture features not exploited by existing systems

Test ImagesTest Images

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

downloaded from the ftp site of X. Wu:”ftp:\\ftp.csd.uwo.ca/pub/from_wu/images”

9 “pgm” images,720x576 pixels, 256 greylevels (8 bits)

Balloon Barb Barb2 Board Boats

Girl Gold Hotel Zelda

OutlineOutline

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

File Size vs. Number of Predictors. (Rp=6)Using an adaptive AC

# of predictors 1 2 4 6 8

Balloon 154275 150407 150625 150221150298Barb 227631 223936 224767 225219 225912Barb2 250222 250674 254582 256896 258557Board 193059 190022 190504 190244 190597Boats 210229 208018 209408 209536 210549Girl 204001 202004 202326 202390 202605Gold 235682 237375 238728 239413 240352Hotel 236037 236916 239224 240000 240733Zelda 195052 193828 194535 195172 195503

Total (bytes) 1906188 1893180 1904699 1909091 1915106

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

File Size vs. window radius RP (# pred.=2)Using an adaptive AC

Rp 6 8 10 12 14

Balloon 150407 149923 149858 150019150277Barb 223936 223507 224552 225373 226136Barb2 250674 249361 246147 247031 246265Board 190022 190319 190911 191709 192509Boats 208018 206630 206147 206214 206481Girl 202004 201189 201085 201410 201728Gold 237375 235329 234229 234048 234034Hotel 236916 235562 235856 236182 236559Zelda 193828 193041 192840 192911 193111

Total (bytes) 1893180 1884861 1881625 1884897 1887100

Prediction ErrorPrediction Error

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

2.50

3.00

3.50

4.00

4.50

5.00

5.50

baloon barb barb2 board boats girl gold hotel zeldaImage

LOCO-I (Error Entropy after Context Modeling)

LOCO-I (Entropy of the Prediction Error)

2 Predictors, Rp=10, Single Adaptive AC

Prediction ErrorPrediction Error

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

2.50

3.00

3.50

4.00

4.50

5.00

5.50

baloon barb barb2 board boats girl gold hotel zelda

Image

LOCO-I (Error Entropy after Context Modeling)

LOCO-I (Entropy of the Prediction Error)

2 Predictors, Rp=10, Single Adaptive AC

2.50

3.00

3.50

4.00

4.50

5.00

5.50

baloon barb barb2 board boats girl gold hotel zelda

Image

LOCO-I (Error Entropy after Context Modeling)

LOCO-I (Entropy of the Prediction Error)

2 Predictors, Rp=10, Single Adaptive AC

Prediction Error (histogram)Prediction Error (histogram)

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Test image “Hotel”

Prediction Error (magnitude and sign)Prediction Error (magnitude and sign)

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Test image “Hotel”

SignMagnitud

e

Prediction Error (magnitude and sign)Prediction Error (magnitude and sign)

DCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Losless Image CodingDCC ‘99 - Adaptive Linear Prediction Losless Image CodingDCC ‘99 - Adaptive Linear Prediction Losless Image CodingDCC ‘99 - Adaptive Linear Prediction Losless Image Coding

Test image “Board”

Magnitude

Sign

OutlineOutline

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

Entropy CodingEntropy Coding

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

AC model determined in a window Wx,y(Re)

Two different ACs for typical and non typical symbols(for practical reasons)

Global determination of the cutting point

Compressed File Size vs. error window radius ReCompressed File Size vs. error window radius Re

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

(# of predictors = 2 and Rp=10)

Re 8 10 12 14 16 18

balloon 147227 147235 147341 147479 147620 147780barb 216678 216082 215906 215961 216135 216370barb2 234714 233303 232696 232455 232399 232473board 186351 186171 186187 186303 186467 186646boats 202168 201585 201446 201504 201623 201775girl 197243 197013 197040 197143 197245 197356gold 230619 229706 229284 229111 229026 229012hotel 229259 228623 228441 228491 228627 228785zelda 189246 188798 188576 188489 188461 188469

Total (bytes) 1833505 1828516 1826917 1826936 1827603 1828666

OutlineOutline

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

Motivations

Main Idea

Algorithm

Predictor Assessment

Entropy Coding

Final Experimental Results

Conclusion

ComparisonsComparisons

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Compression rate in bit per pixel.

(# of predictors = 2, Rp=10)

balloon barb barb2 board boats girl gold hotel zelda Avg.

SUNSET 2.89 4.64 4.71 3.72 3.99 3.90 4.60 4.48 3.79 4.08LOCO-I 2.90 4.65 4.66 3.64 3.92 3.90 4.47 4.35 3.87 4.04UCM 2.81 4.44 4.57 3.57 3.85 3.81 4.45 4.28 3.80 3.95Our 2.84 4.16 4.48 3.59 3.89 3.80 4.42 4.41 3.64 3.91CALIC 2.78 4.31 4.46 3.51 3.78 3.72 4.35 4.18 3.69 3.86TMW 2.65 4.08 4.38 3.61 4.28 3.80

ComparisonsComparisons

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

2.50

3.00

3.50

4.00

4.50

5.00

balloon barb barb2 board boats girl gold hotel zelda

Image File

LOCO-I

UCM

SUNSET

CALIC

TWM

2 Predictors, Rp=10, EC with Re

2.50

3.00

3.50

4.00

4.50

5.00

balloon barb barb2 board boats girl gold hotel zelda

Image File

LOCO-I

UCM

SUNSET

CALIC

TWM

2 Predictors, Rp=10, EC with Re

ConclusionConclusion

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Compression is better when structures and textures are present

Compression is worse on high contrast zones

Local Adaptive LP seems to capture features not exploited by existing systems

Future ResearchFuture Research

DCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image CodingDCC ‘99 - Adaptive Linear Prediction Lossless Image Coding

Compression Better context classification (to improve on

high contrast zones) Adaptive windows MAE minimization (instead of MSE min.)

Complexity Gradient Descent More efficient entropy coding

Additional experiments On different test sets

DCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Prediction Lossless Image CodingDCC ‘99 - Adaptive Prediction Lossless Image Coding