A hybrid quantization scheme for im Source Image
A hybrid quantization scheme for im Source : Image and Vision Computing, Vol: 22, Issue: 3, pp. 203 -213, March 1, 2004 Author : Paul Shelley, Xiaobo Li, Bin Han Speaker : Chang-Chu Chen Date : 5/25/2004
Outline l Wavelet Transform l SPIHT l Mod. LVQ l Proposed scheme l Results l Conclusions 2
Discrete Wavelet Transform -Haar(cont. ) Example Phase 1) Horizontal: Level one Phase 2) Vertical: 20 15 30 20 35 50 5 10 68 103 6 19 17 16 31 22 33 53 1 9 76 79 -4 -7 15 18 17 25 33 42 -3 -8 2 -3 4 1 21 22 19 18 43 37 -1 1 -10 5 -2 -9 (Level one is done) Phase 1) Horizontal: Level two Phase 2) Vertical: 68 103 6 19 171 -35 6 19 326 -38 6 19 76 79 -4 -7 155 -3 -4 -7 16 -32 -4 -7 2 -3 4 1 -10 5 -2 -9 (Level two is done) 4
Discrete Wavelet Transform -Haar(cont. ) Example LL 2 1” 2” Wavelet HL 2 LL 1 LH 2 HL 1 LH 1 HH 1 5
Subband LL 3 HL 3 LH 3 HH 3 LL 3 HL 2 HL 1 LH 2 HH 2 LH 1 LH 3 HH 3 LL 1 HH 1 HL 2 HL 1 HH 2 LH 1 HH 1 6
Subband Quadtree X LL 2 X LH 2 Y HL 2 X HL 1 LH 2 Y LH 1 HH 2 Y HH 1 LH 1 7
Zerotree DWT coefficients Tk : kth threshold Tk+1 = Tk / 2 , T 0 > T 1 > T 2 > … 8
Scan order 9
SPIHT Set Partitioning in Hierarchical Trees, a technique for image compression l Notations n: H : Set of coordinates of all spatial orientation tree roots LSP : List of significant pixels LIP : List of insignificant pixels LIS : List of insignificant Sets type A : Set of coordinates of all descendants of a node type B : Set of coordinates of all descendants of a node, but not include this node l 10
SPIHT algorithm Output: n= 5 H=(0, 0), (1, 0), (0, 1), (1, 1) // 25=32 (threshold T 0 ) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1) LIS: LSP: 11
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 10(+) 11(-) 0 0 n= 5 H=(0, 0), (1, 0), (0, 1), (1, 1) // 25=32 (threshold T 0 ) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1) X X R R LIS: A(0, 1)→A(1, 0)→A(1, 1) LSP: (0, 0) (0, 1) 12
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 10(+) 11(-) 0 0 1 10 0 n= 5 H=(0, 0), (1, 0), (0, 1), (1, 1) // 25=32 (threshold T 0 ) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1) →(0, 2) →(0, 3) →(1, 2) →(1, 3) X X R R R LIS: A(0, 1)→A(1, 0)→A(1, 1) →B(0, 1) X LSP: (0, 0) (0, 1) (0, 2) 13
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 10(+) 11(-) 0 0 1 10 0 1 0 0 n= 5 H=(0, 0), (1, 0), (0, 1), (1, 1) // 25=32 (threshold T 0 ) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1) →(0, 2) →(0, 3) →(1, 2) →(1, 3) →(2, 0) →(2, 1) →(3, 0) →(3, 1) X X R R R R R LIS: A(0, 1)→A(1, 0)→A(1, 1) →B(0, 1) →B(1, 0) X X LSP: (0, 0) (0, 1) (0, 2) 14
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 A(1, 1) 10(+) 11(-) 0 0 1 10 0 1 0 0 0 n= 5 // 25=32 (threshold T 0 ) H=(0, 0), (1, 0), (0, 1), (1, 1) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1) →(0, 2) →(0, 3) →(1, 2) →(1, 3) →(2, 0) →(2, 1) →(3, 0) →(3, 1) X X R R R R R LIS: A(0, 1)→A(1, 0)→A(1, 1) →B(0, 1) →B(1, 0) X X R LSP: (0, 0) (0, 1) (0, 2) 15
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 A(1, 1) 10(+) 11(-) 0 0 1 10 0 1 0 0 0 B(0, 1) 0 n= 5 H=(0, 0), (1, 0), (0, 1), (1, 1) // 25=32 (threshold T 0 ) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1)→(0, 2)→(0, 3)→(1, 2)→(1, 3)→(2, 0)→(2, 1)→(3, 0)→(3, 1) X X R R R R R LIS: A(0, 1)→A(1, 0)→A(1, 1)→B(0, 1) X X R R LSP: (0, 0) (0, 1) (0, 2) 16
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 A(1, 1) 10(+) 11(-) 0 0 1 10 0 1 0 0 0 B(0, 1) B(1, 0) 0 1 n= 5 H=(0, 0), (1, 0), (0, 1), (1, 1) // 25=32 (threshold T 0 ) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1)→(0, 2)→(0, 3)→(1, 2)→(1, 3)→(2, 0)→(2, 1)→(3, 0)→(3, 1) X X R R R R R LIS: A(0, 1)→A(1, 0)→A(1, 1)→B(0, 1)→B(1, 0)→A(2, 1)→A(3, 0)→A(3, 1) X X R R R LSP: (0, 0) (0, 1) (0, 2) 17
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 A(1, 1) 10(+) 11(-) 0 0 1 10 0 1 0 0 0 B(0, 1) B(1, 0) A(2, 0) 0 1 0 n= 5 // 25=32 (threshold T 0 ) H=(0, 0), (1, 0), (0, 1), (1, 1) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1)→(0, 2)→(0, 3)→(1, 2)→(1, 3)→(2, 0)→(2, 1)→(3, 0)→(3, 1) X X R R R R R LIS: A(0, 1)→A(1, 0)→A(1, 1)→B(0, 1)→B(1, 0)→A(2, 1)→A(3, 0)→A(3, 1) X X R R LSP: (0, 0) (0, 1) (0, 2) 18
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 A(1, 1) 10(+) 11(-) 0 0 1 10 0 1 0 0 0 B(0, 1) B(1, 0) A(2, 1) 0 1 – 1 47 – 3 – 2 0 10 0 0 n= 5 // 25=32 (threshold T 0 ) H=(0, 0), (1, 0), (0, 1), (1, 1) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1)→(0, 2)→(0, 3)→(1, 2)→(1, 3)→(2, 0)→(2, 1)→(3, 0)→(3, 1)→ X X R R R R R (4, 2)→(4, 3)→(5, 2)→(5, 3) R X R R LIS: A(0, 1)→A(1, 0)→A(1, 1)→B(0, 1)→B(1, 0)→A(2, 1)→A(3, 0)→A(3, 1) X X R R X LSP: (0, 0) (0, 1) (0, 2) (4, 3) 19
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 A(1, 1) 10(+) 11(-) 0 0 1 10 0 1 0 0 0 B(0, 1) B(1, 0) A(2, 1) – 1 47 – 3 – 2 A(3, 0) 0 1 0 10 0 n= 5 // 25=32 (threshold T 0 ) H=(0, 0), (1, 0), (0, 1), (1, 1) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1)→(0, 2)→(0, 3)→(1, 2)→(1, 3)→(2, 0)→(2, 1)→(3, 0)→(3, 1)→ X X R R R R R (4, 2)→(4, 3)→(5, 2)→(5, 3) R X R R LIS: A(0, 1)→A(1, 0)→A(1, 1)→B(0, 1)→B(1, 0)→A(2, 1)→A(3, 0)→A(3, 1) X X R R X R LSP: (0, 0) (0, 1) (0, 2) (4, 3) 20
SPIHT algorithm (cont. ) Output: 63 – 34 – 31 23 A(0, 1) 49 10 14 – 13 A(1, 0) 15 14 – 9 -7 A(1, 1) 10(+) 11(-) 0 0 1 10 0 1 0 0 0 B(0, 1) B(1, 0) A(2, 1) – 1 47 – 3 – 2 A(3, 0) A(3, 1) 0 1 0 10 0 0 n= 5 // 25=32 (threshold T 0 ) H=(0, 0), (1, 0), (0, 1), (1, 1) // head (roots of trees) LIP: (0, 0)→(0, 1)→(1, 0)→(1, 1)→(0, 2)→(0, 3)→(1, 2)→(1, 3)→(2, 0)→(2, 1)→(3, 0)→(3, 1)→ X X R R R R R (4, 2)→(4, 3)→(5, 2)→(5, 3) R X R R LIS: A(0, 1)→A(1, 0)→A(1, 1)→B(0, 1)→B(1, 0)→A(2, 1)→A(3, 0)→A(3, 1) X X R R LSP: (0, 0) (0, 1) (0, 2) (4, 3) 21
SPIHT algorithm (cont. ) Refine the set LSP (0, 0) (0, 1) (0, 2) (4, 3) according to the refinement of EZW and generate 1010 Output: 10 11 0 0 1 10 0 1 0 10 0 000 1010 22
Mod. LVQ l Modified lattice vector quantization 23
Compare SPIHT and Mod. LVQ Smooth image Detailed image 24
Compare SPIHT and Mod. LVQ(cont. ) Smooth image Detailed image 25
Proposed Scheme l Hy-Q (Hybrid Quantization) Smooth image SPIHT divide image to subimages Mod. LVQ Detailed image 26
Proposed Scheme 27
Results 28
Results (cont. ) 29
Results (cont. ) l For uniformly smooth or uniformly detailed images, Hy-Q provides over 85% of the time. l For some feature quadrants are mostly smooth and the others are mostly detailed, Hy-Q provides over 77% of the time. 30
Conclusions l Proposed a new algorithm Hy-Q for the quantization step of wavelet image compression. l Proposed scheme mixes two quantization strategies : SPIHT is used for quantize the smooth regions. l Mod. LVQ is used for quantize the detailed regions. l 31
- Slides: 31