Title: Basic Image Compression Concepts Presenter: Guan-Chen Pan Research Advisor: Jian-Jiun Ding , Ph. D. Assistant professor Digital Image and Signal Processing Lab Graduate Institute of Communication Engineering National Taiwan University
1Basic Image Compression ConceptsPresenterGuan-
Chen PanResearch AdvisorJian-Jiun Ding , Ph.
D.Assistant professorDigital Image and Signal
Processing LabGraduate Institute of
Communication EngineeringNational Taiwan
University
2Outlines
- Introductions
- Basic concept of image compression
- Proposed method for arbitrary-shapeimage segment
compression - Improvement of the boundary region by morphology
- JPEG2000
- Triangular and trapezoid regions and modified
JPEG image compression
3Introduction
- Lossless or lossy(widely used)
4YCbCr
- Ythe luminance of the image which represents
the brightness - Cbthe chrominance of the image which
represents the difference between the
gray and blue - Crthe chrominance of the image which
represents the difference between the
gray and red
5Chrominance Subsampling
- The name of the format is not always related to
the subsampling ratio.
6 7 8Reduce the Correlation between Pixels
- Transform coding
- Coordinate rotation
- Karhunen-Loeve transform
- Discrete cosine transform
- Discrete wavelet transform
- Predictive coding
9Coordinate rotation
Weight
Height
10- do the inverse transform to get the data and
reduce the correlation
11Karhunen-Loeve transform(KLT)
12 13Discrete cosine transform
- The DCT is an approximation of the KLT and more
widely used in image and video compression. - The DCT can concentrate more energy in the low
frequency bands than the DFT.
14Discrete wavelet transform
- Wavelet transform is very similar to the
conventional Fourier transform, but it is based
on small waves, called wavelet, which is composed
of time varying and limited duration waves. - We use 2-D discrete wavelet transform in image
compression.
15 16Predictive Coding
- Predictive coding means that we transmit only the
difference between the current pixel and the
previous pixel. - The difference may be close to zero.
- However, the predictive coding algorithm is more
widely used in video. - EX. Delta modulation (DM), Adaptive DM. DPCM
,Adaptive DPCM (ADPCM)
17Quantization
18- Luminance quantization matrix
- Chrominance quantization matrix
- Removes the high frequencies
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
19Entropy Coding Algorithms
- Huffman Coding
- Difference Coding (DC)
- Zero Run Length Coding (AC)
- Arithmetic Coding
- Golomb Coding
20Huffman Coding
- Huffman coding is the most popular technique for
removing coding redundancy. - Unique prefix property
- Instantaneous decoding property
- Optimality
- JPEG(fixed, not optimal)
21(No Transcript)
22Difference Coding
23Zero Run Length Coding
- Encode each value which is not 0, than add the
number of consecutive zeroes in front of it - EOB (End of Block) (0,0)
- Only 4-bit value
- 57,45,0,0,0,0,23,0,-30,-16,0,,0
- ?(0,57)(0,45)(4,23)(1,-30)(0,16)EOB
- Eighteen zeroes, 3 ?(15,0) (2,3)
- where (15,0) is 16 consecutive zeroes
24(No Transcript)
25Arithmetic Coding
26(No Transcript)
27Symbol Probability Sub-interval
k 0.05 0.00,0.05)
l 0.2 0.05,0.25)
u 0.1 0.25,0.35)
w 0.05 0.35,0.40)
e 0.3 0.40,0.70)
r 0.2 0.70,0.90)
? 0.1 0.90,1.00)
28Symbol Probability Sub-interval
k 0.05 0.00,0.05)
l 0.2 0.05,0.25)
u 0.1 0.20,0.35)
w 0.05 0.35,0.40)
e 0.3 0.40,0.70)
r 0.2 0.70,0.90)
? 0.1 0.90,1.00)
Symbol Probability Sub-interval
k 0.05 0.05,0.06)
l 0.2 0.06,0.1)
u 0.1 0.1,0.12)
w 0.05 0.12,0.13)
e 0.3 0.13,0.19)
r 0.2 0.19,0.23)
? 0.1 0.23,0.25)
29Golomb Coding
30 31 32- Decode 101111
- q 1, r 9
- ? a 1019 19
Encoding of quotient part q output
bits 0 0 1 10 2 110 3 1110 4 11110 5 111110 6 1111
110 N ltN repetitions of 1gt0
Encoding of remainder part r offset binary output
bits 0 0 0000 000 1 1 0001 001 2 2 0010 010 3 3 00
11 011 4 4 0100 100 5 5 0101 101 6 12 1100 1100 7
13 1101 1101 8 14 1110 1110 9 15 1111 1111
33 Without codeword table Flexibility and adaptation
Huffman NO GOOD
Golomb YES MIDDLE
Adaptive Golomb YES GOOD
34Proposed Method for Arbitrary-Shape Image Segment
Compression
- An arbitrary-shape image segment f and its shape
matrix.
35- Standard 8x8 DCT bases with the shape of f
36- The 37 arbitrary-shape orthonormal DCT bases by
Gram-Schmidt process
37Quantization
38Improvement of the Boundary Region by Morphology
39JPEG2000
- JPEG 2000 is a new standard and it can achieve
better performance in image compression. - Advantages
- Efficient lossy and lossless compression
- Superior image quality
- Additional features such as spatial scalability
and region of interest. - Complexity
40- Embedded Block Coding with Optimized
Truncation(EBCOT) Tier-1Tier-2
41(No Transcript)
42Irreversible component transform (ICT)
43Reversible component transform (RCT)
- Reversible and integer-to-integer
44(No Transcript)
45- Irreversible , Daubechies 9/7 filter
Analysis Filter Coefficients Analysis Filter Coefficients Synthesis Filter Coefficients Synthesis Filter Coefficients
n Lowpass Filter Highpass Filter Lowpass Filter Highpass Filter
0 0.602949018236 1.115087052456 1.115087052456 0.6029490182363
1 0.266864118442 -0.059127176311 0.591271763114 -0.2668641184428
2 -0.078223266528 -0.057543526228 -0.057543526228 -0.0782232665289
3 -0.0168641184428 0.091271763114 -0.0912717631142 0.0168641184428
4 0.026748757410 0.0267487574108
46(No Transcript)
47Tier-1 Encoder
- Each Fractional Bit-plane coding will generate
the Context (CX) and the Decision (D), which are
used for arithmetic coding. - zero coding
- sign coding
- magnitude refinement coding
- run length coding
48Bit-plane Conversion
- Converts the quantized wavelet coefficients into
several bit-planes - First bit-plane is the sign plane
- The other planes are the magnitude plane, from
MSB to LSB
4917 22 33 48 64 80 96 112
22 28 38 52 67 81 96 112
33 38 48 62 75 86 100 116
48 52 62 70 83 96 110 125
64 67 75 83 96 108 118 132
80 81 86 96 108 117 128 142
96 96 100 110 118 128 140 150
112 112 116 125 132 142 150 160
- 17 000100012
- 160 101000002
50Stripe and Scan Order
51Zero Coding
d v d
h D h
d v d
- D current encode data, binary 0 or 1
- h 02 v 02 d 04
52Sign Coding
v
h D h
v
53Magnitude Refinement Coding
- s'x,y is initialized to 0, and it will become 1
after the first time of the magnitude refinement
coding is met at x,y
54Run-Length Coding
- For four zeros (CX,D) is (0,0)
- Else is (0,1), and use 2 uniform(CX18) to
record the 1s position - (0110)
- The first nonzero position is (01)2
- ?(0,1), (18,0), (18,1)
55 D (0,1)
Arithmetic encoder
Compressed data
CX (total 19)
56Why Called Fractional?
57Tier-2 Encoder
- Rate/Distortion optimized truncation
58Triangular and Trapezoid Regions and Modified
JPEG Image Compression
- Divide an image into 3 parts
- Lower frequency regions
- Traditional image blocks and
- The arbitrarily-shaped image blocks
59- 1 sections
- 1 sections
- 1 sections
- 1 sections
- 2 sections
- 2 sections
- 1 sections
- 1 sections
1 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 0 0
0 0 1 1 0 1 1 1 1 0
0 0 1 0 0 1 1 1 0 0
0 0 0 0 0 0 1 1 0 0
0 0 0 0 0 0 1 1 0 0
60 61- Corner too close
- Trapezoid inside the zone
62N 10
63 64Reference
- J.D Huang "Image Compression by Segmentation and
Boundary Description, " 2008. - G. Roberts, "Machine Perception of
Three-Dimensional Solids," in Optical and
Electro- Optical Information Processing, J. T. T.
e. al., Ed. Cambridge, MA MIT Press, 1965, pp.
159-197. - J. Canny, "A Computational Approach to Edge
Detection," IEEE Trans. Pattern Analysis and
Machine Intelligence, vol. 8, pp. 679-698, Nov.
1986. - D. Comaniciu and P. Meer, "Mean Shift A Robust
Approach toward Feature Space Analysis, " IEEE
Trans. Pattern Analysis and Machine Intelligence,
vol. 24, pp. 603-619, 2002. - J.J Ding, P.Y Lin, S.C Pei, and Y.H Wang, "The
Two-Dimensional Orthogonal DCT Expansion in
Triangular and Trapezoid Regions and Modified
JPEG Image Compression, ",VCIP2010 - J.J Ding, S.C Pei, W.Y Wei, H.H Chen, and T.H
Lee, "Adaptive Golomb Code for Joint
Geometrically Distributed Data and Its
Application in Image Coding", APSIPA 2010 - W.Y Wei, "Image Compression", available in
http//disp.ee.ntu.edu.tw/tutorial.php - K. R. Rao and P. Yip, Discrete Cosine Transform,
Algorithms, Advantage, Applications, New York
Academic, 1990. - S.S. Agaian, Hadamard Matrices and Their
Applications, New York, Springer-Verlag, 1985. - H. F. Harmuth, Transmission of information by
orthogonal functions, Springer, New York, 1970.
65- R. Koenen, Editor, Overview of the MPEG-4
Standard, ISO/IEC JTC/SC29/WG21, MPEG-99-N2925,
March 1999, Seoul, South Korea. - T. Sikora, MPEG-4 very low bit rate video, IEEE
International Symposium on Circuits and Systems,
ISCAS 97, vol. 2, pp. 1440-1443, 1997. - T. Sikora and B. Makai, Shape-adaptive DCT for
generic coding of video, IEEE Trans. Circuits
Syst. Video Technol., vol. 5, pp. 59-62, Feb.
1995. - W.K. Ng and Z. Lin, A New Shape-Adaptive DCT for
Coding of Arbitrarily Shaped Image Segments,
ICASSP, vol. 4, pp. 2115-2118, 2000. - S. C. Pei, J. J. Ding, P. Y. Lin and T. H. H.
Lee, Two-dimensional orthogonal DCT expansion in
triangular and trapezoid regions, Computer
Vision, Graphics, and Image Processing, Sitou,
Taiwan, Aug. 2009. - D. A. Huffman, "A method for the construction of
minimum-redundancy codes," Proceedings of the
IRE, vol. 40, no. 9, pp. 1098-1101, 1952. - S. W. Golomb, "Run length encodings," IEEE Trans.
Inf. Theory, vol. 12, pp. 399-401, 1966. - R. Gallager and D. V. Voorhis, "Optimal source
codes for geometrically distributed integer
alphabets," IEEE Trans. Information Theory, vol.
21, pp. 228230, March 1975. - R. F. Rice, "Some practical universal noiseless
coding techniquespart I," Tech. Rep. JPL-79-22,
Jet Propulsion Laboratory, Pasadena, CA, March
1979. - G. Seroussi and M. J. Weinberger, "On adaptive
strategies for an extended family of Golomb-type
codes," Proc. DCC97, pp. 131-140, 1997. - C. J. Lian JPEG2000 , DSP/IC design lab, GIEE,
ntu