A Lagrangian Cost Model for a Fractal Transform Compressor

37
A Lagrangian Cost A Lagrangian Cost Model for a Fractal Model for a Fractal Transform Compressor Transform Compressor Lyman P. Hurd Iterated Systems, Inc. January 19, 2001

description

A Lagrangian Cost Model for a Fractal Transform Compressor. Lyman P. Hurd Iterated Systems, Inc. January 19, 2001. Introduction. Image compression is a trade-off between achieving the optimal rate and the resultant quality. - PowerPoint PPT Presentation

Transcript of A Lagrangian Cost Model for a Fractal Transform Compressor

Page 1: A Lagrangian Cost Model for a Fractal Transform Compressor

A Lagrangian Cost A Lagrangian Cost Model for a Fractal Model for a Fractal Transform CompressorTransform Compressor

Lyman P. HurdIterated Systems, Inc.

January 19, 2001

Page 2: A Lagrangian Cost Model for a Fractal Transform Compressor

IntroductionIntroduction

Image compression is a trade-off between achieving the optimal rate and the resultant quality.

Propose a design (unimplemented) for a fractal still image compressor based on an affine video compression system.

Page 3: A Lagrangian Cost Model for a Fractal Transform Compressor

OutlineOutline

• The “classical” fractal transformThe “classical” fractal transform

• Rate-distortion theory and Rate-distortion theory and Lagrangian costingLagrangian costing– Optimal codebook generationOptimal codebook generation

• Quad-tree partitioningQuad-tree partitioning

• De-blocking technique (Fuzzy Pixels)De-blocking technique (Fuzzy Pixels)

Page 4: A Lagrangian Cost Model for a Fractal Transform Compressor

The Classical Fractal The Classical Fractal TransformTransform

Page 5: A Lagrangian Cost Model for a Fractal Transform Compressor

Fractal TransformFractal Transform

• Image is partitioned into (square) Image is partitioned into (square) domain blocksdomain blocks

• To each domain associate:To each domain associate:– a range block of twice the sizea range block of twice the size

– an additive (brightness) adjustment an additive (brightness) adjustment qq

– a multiplicative (contrast) adjustment a multiplicative (contrast) adjustment pp

– A dihedral symmetry operationA dihedral symmetry operation

Page 6: A Lagrangian Cost Model for a Fractal Transform Compressor

SimplificationsSimplifications

• Will assume:Will assume:

• pp is held to be constant (= 3/4) is held to be constant (= 3/4)– all that is required for convergence is |all that is required for convergence is |pp| |

< 1< 1

– can assume that range screen is can assume that range screen is computed oncecomputed once

• The identity symmetryThe identity symmetry

Page 7: A Lagrangian Cost Model for a Fractal Transform Compressor

Image is recovered by:Image is recovered by:

• Set all pixels to a known initial state Set all pixels to a known initial state (such as neutral gray)(such as neutral gray)

• Iterate:Iterate:– Replace domain pixels by range pixelsReplace domain pixels by range pixels

• downsampled spatially by 2downsampled spatially by 2

• multiplied by pmultiplied by p

• added to q (q varies block by block)added to q (q varies block by block)

Page 8: A Lagrangian Cost Model for a Fractal Transform Compressor

Fractal TransformFractal Transform

Page 9: A Lagrangian Cost Model for a Fractal Transform Compressor

Collage TheoremCollage Theorem

• As long as |As long as |pp| < 1 for all blocks, the | < 1 for all blocks, the above procedure converges to a above procedure converges to a fixed pointfixed point

• Distance from a transformed range Distance from a transformed range block to the corresponding block in block to the corresponding block in the original is the “collage error”the original is the “collage error”

Page 10: A Lagrangian Cost Model for a Fractal Transform Compressor

DependenciesDependencies

• Collage error is not the same as Collage error is not the same as final decompressed errorfinal decompressed error

• High correlationHigh correlation

• The measure under our direct The measure under our direct controlcontrol

Page 11: A Lagrangian Cost Model for a Fractal Transform Compressor

Information Theory and Information Theory and CostingCosting

Page 12: A Lagrangian Cost Model for a Fractal Transform Compressor

R-D CurveR-D Curve

Page 13: A Lagrangian Cost Model for a Fractal Transform Compressor

How do we compressHow do we compress

• Choose a fixed distortion metric Choose a fixed distortion metric such as SSE (sum of squared errors)such as SSE (sum of squared errors)

• Pick domain block and Pick domain block and qq to to minimize this metricminimize this metric

Page 14: A Lagrangian Cost Model for a Fractal Transform Compressor

Information TheoryInformation Theory

• Everything to date has been solely Everything to date has been solely geometricgeometric

• Encoding method completely Encoding method completely independent of cost of sending independent of cost of sending descriptiondescription

Page 15: A Lagrangian Cost Model for a Fractal Transform Compressor

To encode:To encode:

• Choose range block from a discrete set of Choose range block from a discrete set of candidatescandidates– usually locally determined around blockusually locally determined around block

– Choose Choose qq from a fixed set of intensity from a fixed set of intensity displacements (usually -255 to 255)displacements (usually -255 to 255)

• Classically, representation requires -Classically, representation requires -loglog22ff bits where bits where ff is the probability is the probability (normalized frequency)(normalized frequency)

Page 16: A Lagrangian Cost Model for a Fractal Transform Compressor

Lagrangian CostingLagrangian Costing

• Choose a positive Choose a positive > 0 > 0

• Pick candidate which optimizes cost: Pick candidate which optimizes cost: C = D + C = D + R R– C = costC = cost

– D = distortionD = distortion

– R = rateR = rate

Page 17: A Lagrangian Cost Model for a Fractal Transform Compressor

R-D Curve with costingR-D Curve with costing

Page 18: A Lagrangian Cost Model for a Fractal Transform Compressor

How do we establish rate?How do we establish rate?

• Circular (rate determines probability Circular (rate determines probability determines rate)determines rate)

• Set probability distribution to uniformSet probability distribution to uniform

• Compute optimal codes via formulaCompute optimal codes via formula

• Observe probabilitiesObserve probabilities

• Iterate with new probabilitiesIterate with new probabilities

Page 19: A Lagrangian Cost Model for a Fractal Transform Compressor

ObservationsObservations

• Problem does not depend on Problem does not depend on simplifying assumptions abovesimplifying assumptions above

• In presence of costing, adding In presence of costing, adding parameters always improves parameters always improves compression (while increasing compression (while increasing complexity)complexity)

Page 20: A Lagrangian Cost Model for a Fractal Transform Compressor

ProblemsProblems

• Calculation is dependent on lambdaCalculation is dependent on lambda– ““Solution” is to use a typical lambdaSolution” is to use a typical lambda

• Calculations can converge to a local Calculations can converge to a local minimumminimum– Simulated AnnealingSimulated Annealing

• Use simplified variables such as x and y Use simplified variables such as x and y displacementdisplacement

Page 21: A Lagrangian Cost Model for a Fractal Transform Compressor

Can improve Performance Can improve Performance via Deterministic via Deterministic AnnealingAnnealing

• Keep track of expected values Keep track of expected values rather than tracking a discrete rather than tracking a discrete histogramhistogram

Page 22: A Lagrangian Cost Model for a Fractal Transform Compressor

Quad-tree PartitioningQuad-tree Partitioning

Page 23: A Lagrangian Cost Model for a Fractal Transform Compressor

Partial QuadtreePartial Quadtree

• To each block assign a To each block assign a decomposition taken from one of 16 decomposition taken from one of 16 possibilitiespossibilities

• Shape determines how many child Shape determines how many child blocks with respect to this parentblocks with respect to this parent

Page 24: A Lagrangian Cost Model for a Fractal Transform Compressor

ShapesShapes

Page 25: A Lagrangian Cost Model for a Fractal Transform Compressor

OptimizationOptimization

• Two basic approaches:Two basic approaches:– Top-downTop-down

– Bottom-upBottom-up

• The latter is optimalThe latter is optimal

Page 26: A Lagrangian Cost Model for a Fractal Transform Compressor

Bottom-Up CompressionBottom-Up Compression

• Assign a cost-optimal code to each Assign a cost-optimal code to each smallest subblocksmallest subblock

• For each group of four quadrants For each group of four quadrants decide on optimal shape (possibly decide on optimal shape (possibly merging subblocks)merging subblocks)

Page 27: A Lagrangian Cost Model for a Fractal Transform Compressor

DetailsDetails

• If distortion is SSE (sum squared If distortion is SSE (sum squared errors) the calculation can be done errors) the calculation can be done independent of independent of qq by change of by change of variables.variables.

• By making range address the outer By making range address the outer loop, one can optimize shape for loop, one can optimize shape for each choice of range block.each choice of range block.

Page 28: A Lagrangian Cost Model for a Fractal Transform Compressor

Hiding block boundariesHiding block boundaries

Page 29: A Lagrangian Cost Model for a Fractal Transform Compressor

Fuzzy PixelsFuzzy Pixels

• Instead of pasting range block, add itInstead of pasting range block, add it

• Range is multiplied by a 3x3 mask Range is multiplied by a 3x3 mask

• By adding copies of mask, can obtain By adding copies of mask, can obtain mask for any blocksizemask for any blocksize

• Generalization of Overlapped Block Generalization of Overlapped Block Motion Compensation (OBMC) used in Motion Compensation (OBMC) used in H.263 (video standard)H.263 (video standard)

Page 30: A Lagrangian Cost Model for a Fractal Transform Compressor

3x3 Mask (for 1x1 block)3x3 Mask (for 1x1 block)

2/25 3/25 2/25

3/25 5/25 3/25

2/25 3/25 2/25

Page 31: A Lagrangian Cost Model for a Fractal Transform Compressor

6x6 Mask (for 4x4 block)6x6 Mask (for 4x4 block)

2/25 5/25 7/25 7/25 5/25 2/25

5/25 13/25 18/25 18/25 13/25 5/25

7/25 18/25 1 1 18/25 7/25

7/25 18/25 1 1 18/25 7/25

5/25 13/25 18/25 18/25 13/25 5/25

2/25 5/25 7/25 7/25 5/25 2/25

Page 32: A Lagrangian Cost Model for a Fractal Transform Compressor

AdvantagesAdvantages

• Applicable at all length scalesApplicable at all length scales

• Deblocking explicitly calculated in Deblocking explicitly calculated in distortion measuredistortion measure

Page 33: A Lagrangian Cost Model for a Fractal Transform Compressor

ConclusionsConclusions

Page 34: A Lagrangian Cost Model for a Fractal Transform Compressor

ConclusionsConclusions

• Lagrangian costing cleanly makes Lagrangian costing cleanly makes decisions between coding methodsdecisions between coding methods

• Major advantage is guarantee of a Major advantage is guarantee of a point on convex hull of R-D curvepoint on convex hull of R-D curve

• Disadvantage is uncertainty of exact Disadvantage is uncertainty of exact rate (can be approached iteratively)rate (can be approached iteratively)

Page 35: A Lagrangian Cost Model for a Fractal Transform Compressor

RemarksRemarks

• Optimization all based on collage Optimization all based on collage errorerror

• Local activity measure can be Local activity measure can be handled by changing lambda locallyhandled by changing lambda locally

Page 36: A Lagrangian Cost Model for a Fractal Transform Compressor

To be done…To be done…

• Implement a fractal compressor Implement a fractal compressor according to design outlinedaccording to design outlined

• Evaluate versus existing fractal Evaluate versus existing fractal compressorscompressors

Page 37: A Lagrangian Cost Model for a Fractal Transform Compressor

Main ReferenceMain Reference

• S. Calzone, K. Chen, C.-C. Chuang, A. S. Calzone, K. Chen, C.-C. Chuang, A. Divakaran, S. Dube, L. Hurd, J. Kari, G. Divakaran, S. Dube, L. Hurd, J. Kari, G. Liang, F.-H. Lin, J. Muller, H. K. Rising IIILiang, F.-H. Lin, J. Muller, H. K. Rising III

• ““Video Compression by Mean-Corrected Video Compression by Mean-Corrected Motion Compensation of Partial Motion Compensation of Partial Quadtrees”Quadtrees”– IEEE Trans. On Circuits and Systems for Video IEEE Trans. On Circuits and Systems for Video

Technology, Feb 1997, Vol. 7, No. 1 pp 86-96Technology, Feb 1997, Vol. 7, No. 1 pp 86-96