In the name of Allah the compassionate, the merciful Digital Image - - PowerPoint PPT Presentation

in the name of allah
SMART_READER_LITE
LIVE PREVIEW

In the name of Allah the compassionate, the merciful Digital Image - - PowerPoint PPT Presentation

In the name of Allah the compassionate, the merciful Digital Image Processing S. Kasaei Kasaei S. Room CE307, SUT E-Mail: skasaei@sharif.ed Home Page: http://ce.sharif.edu http://ipl.ce.sharif.edu http://sharif.edu/~skasaei Kasaei 3


slide-1
SLIDE 1
slide-2
SLIDE 2

In the name of Allah

the compassionate, the merciful

slide-3
SLIDE 3

3 Kasaei

S.

  • S. Kasaei

Kasaei

Room CE307, SUT E-Mail: skasaei@sharif.ed Home Page: http://ce.sharif.edu http://ipl.ce.sharif.edu http://sharif.edu/~skasaei

Digital Image Processing

slide-4
SLIDE 4

4 Kasaei

Chapter 11

Image Data Compression

slide-5
SLIDE 5

5 Kasaei

Introduction (cntd)

slide-6
SLIDE 6

6 Kasaei

Introduction (cntd)

slide-7
SLIDE 7

7 Kasaei

Introduction (cntd)

  • Different types of redundancy to be

removed/decreased in the compression algorithm include:

1.

Interpixel redundancy,

2.

Psychovisual redundancy,

3.

Coding redundancy,

4.

Temporal redundancy, &

5.

Spectral redundancy.

slide-8
SLIDE 8

8 Kasaei

Introduction (cntd)

Model

Components of a coding system.

slide-9
SLIDE 9

9 Kasaei

Introduction (cntd)

A general compression system model (the codec).

slide-10
SLIDE 10

10 Kasaei

Introduction (cntd)

An encoder system (compressor).

slide-11
SLIDE 11

11 Kasaei

Introduction (cntd)

A decoder system (decompressor).

slide-12
SLIDE 12

12 Kasaei

Introduction (cntd)

General Image Coder Structure.

slide-13
SLIDE 13

13 Kasaei

Introduction (cntd)

slide-14
SLIDE 14

14 Kasaei

Introduction (cntd)

slide-15
SLIDE 15

15 Kasaei

Introduction (cntd)

slide-16
SLIDE 16

16 Kasaei

Introduction (cntd)

slide-17
SLIDE 17

17 Kasaei

Introduction (cntd)

slide-18
SLIDE 18

18 Kasaei

Introduction (cntd)

slide-19
SLIDE 19

19 Kasaei

Introduction (cntd)

A compression system model (the codec).

slide-20
SLIDE 20

20 Kasaei

Introduction (cntd)

A source encoder and decoder system.

slide-21
SLIDE 21

21 Kasaei

Introduction (cntd)

slide-22
SLIDE 22

22 Kasaei

Introduction (cntd)

slide-23
SLIDE 23

23 Kasaei

Introduction (cntd)

slide-24
SLIDE 24

24 Kasaei

Introduction (cntd)

slide-25
SLIDE 25

25 Kasaei

Introduction (cntd)

slide-26
SLIDE 26

26 Kasaei

Introduction (cntd)

slide-27
SLIDE 27

27 Kasaei

Introduction (cntd)

slide-28
SLIDE 28

28 Kasaei

Introduction (cntd)

slide-29
SLIDE 29

29 Kasaei

Introduction (cntd)

slide-30
SLIDE 30

30 Kasaei

Introduction (cntd)

slide-31
SLIDE 31

31 Kasaei

Introduction (cntd)

slide-32
SLIDE 32

32 Kasaei

Introduction (cntd)

slide-33
SLIDE 33

33 Kasaei

Introduction (cntd)

slide-34
SLIDE 34

34 Kasaei

Pixel Coding

slide-35
SLIDE 35

35 Kasaei

Pixel Coding (cntd)

slide-36
SLIDE 36

36 Kasaei

Pixel Coding (cntd)

slide-37
SLIDE 37

37 Kasaei

Pixel Coding (cntd)

Types of entropy coding schemes:

FLC to VLC:

Huffman Coding, [1952]; used in JPEG98, WSQ. Golomb-Rice coding.

VLC to FLC:

Run-Length Coding (RLC) for b/w, [1977]; used in JPEG98, WSQ. Bitplane-RLC for gray. Lempel-Ziv-Welch (LZW), [1977], requires no a priori knowledge of the

probability of occurrence of symbols; used in GIF, TIFF, UNIX gzip.

VLC to VLC:

Arithmetic Coding, [1975]. Adaptive arithmetic coding; used in JPEG2000, MPEG-4, H264.

Fixed-Length Coding: FLC Variable-Length Coding: VLV

slide-38
SLIDE 38

38 Kasaei

Pixel Coding (cntd)

slide-39
SLIDE 39

39 Kasaei

Huffman Coding

Idea: more frequent symbols shorter

codewords.

Algorithm:

  • Huffman coding generates prefix code. ☺
  • Can be applied to one symbol at a time (scalar coding), or a group of symbols

(vector coding), or one symbol conditioned on previous symbols (conditional coding).

slide-40
SLIDE 40

40 Kasaei

Pixel Coding (cntd)

slide-41
SLIDE 41

41 Kasaei

Pixel Coding (cntd)

slide-42
SLIDE 42

42 Kasaei

Pixel Coding (cntd)

slide-43
SLIDE 43

43 Kasaei

Pixel Coding (cntd)

slide-44
SLIDE 44

44 Kasaei

Pixel Coding (cntd)

slide-45
SLIDE 45

45 Kasaei

Pixel Coding (cntd)

slide-46
SLIDE 46

46 Kasaei

Pixel Coding (cntd)

slide-47
SLIDE 47

47 Kasaei

Arithmetic Coding

Basic idea:

Represent a sequence of symbols by an interval with length

equal to its probability.

The interval is specified by its lower boundary (l), upper

boundary (u), & length d (=probability).

The codeword for the sequence is the common bits in binary

representations of l & u.

The interval is calculated sequentially starting from the

first symbol:

The initial interval is determined by the first symbol. The next interval is a subinterval of the previous one, determined

by the next symbol.

slide-48
SLIDE 48

48 Kasaei

Pixel Coding (cntd)

slide-49
SLIDE 49

49 Kasaei

Pixel Coding (cntd)

slide-50
SLIDE 50

Encoding: Decoding:

/2

3/8 - 1/4 = 1/8 1/8 / 2 = 1/16 1/4 + 1/16 = 5/16 Binary Representation:

slide-51
SLIDE 51

51 Kasaei

Huffman coding:

Converts a fixed number of symbols into a variable length

codeword.

Efficiency:

To approach entropy rate, must code a large number of symbols

together.

Used in all image and video coding standards.

Arithmetic coding:

Converts a variable number of symbols into a variable length

codeword.

Efficiency:

Can approach the entropy rate by processing one symbol at a time. Easy to adapt to changes in source statistics. Integer implementation is available. Used as advanced options in image and video coding standards.

Huffman vs. Arithmetic Coding

slide-52
SLIDE 52

52 Kasaei

Pixel Coding (cntd)

slide-53
SLIDE 53

53 Kasaei

Pixel Coding (cntd)

slide-54
SLIDE 54

54 Kasaei

Pixel Coding (cntd)

slide-55
SLIDE 55

55 Kasaei

Predictive Techniques

A lossy feed-forward prediction coding model.

slide-56
SLIDE 56

56 Kasaei

Predictive Techniques (cntd)

A lossy feed-backward prediction coding model.

slide-57
SLIDE 57

57 Kasaei

Predictive Techniques (cntd)

slide-58
SLIDE 58

58 Kasaei

Predictive Techniques (cntd)

slide-59
SLIDE 59

59 Kasaei

Predictive Techniques (cntd)

slide-60
SLIDE 60

60 Kasaei

Predictive Techniques (cntd)

slide-61
SLIDE 61

61 Kasaei

Predictive Techniques (cntd)

slide-62
SLIDE 62

62 Kasaei

Predictive Techniques (cntd)

slide-63
SLIDE 63

63 Kasaei

Predictive Techniques (cntd)

slide-64
SLIDE 64

64 Kasaei

Transform Coding

A transform coding system.

slide-65
SLIDE 65

65 Kasaei

Transform Coding (cntd)

slide-66
SLIDE 66

66 Kasaei

Transform Coding (cntd)

slide-67
SLIDE 67

67 Kasaei

Transform Coding (cntd)

slide-68
SLIDE 68

68 Kasaei

Transform Coding (cntd)

slide-69
SLIDE 69

69 Kasaei

Transform Coding (cntd)

slide-70
SLIDE 70

70 Kasaei

Transform Coding (cntd)

A wavelet transform coding system.

slide-71
SLIDE 71

71 Kasaei

Transform Coding (cntd)

slide-72
SLIDE 72

72 Kasaei

Transform Coding (cntd)

slide-73
SLIDE 73

73 Kasaei

Transform Coding (cntd)

slide-74
SLIDE 74

74 Kasaei

Transform Coding (cntd)

A basic DPCM/DCT encoder for motion compensated video coding.

slide-75
SLIDE 75

75 Kasaei

slide-76
SLIDE 76

76 Kasaei

The JPEG Standard

DCT Q Q-table Zigzag scan differential VLC VLC entropy table entropy table Offset (128) image compressed image data AC DC

slide-77
SLIDE 77

77 Kasaei

JPEG Example

  • 139 144 149 153 155 155 155 155
  • 144 151 153 156 159 156 156 156
  • 150 155 160 163 158 156 156 156
  • 159 161 162 160 160 159 159 159
  • 159 160 161 162 162 155 155 155
  • 161 161 161 161 160 157 157 157
  • 162 162 161 163 162 157 157 157
  • 162 162 161 161 163 158 158 158
  • 1260 -1 -12
  • 5 2 -2 -3 1
  • 23 -17 -6
  • 3 -3 0 0 -1
  • 11 -9 -2

2 0 -1 -1 0

  • 7 -2 0 1 1 0 0 0
  • 1 -1 1 2 0 -1 1 1
  • 2 0 2 0 -1 1 1 -1
  • 1 0 0 -1 0 2 1 -1
  • 3 2 -4 -2 2 1 -1 0

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 79 0 -1 0 0 0 0 0

  • 2 -1 0 0 0 0 0 0
  • 1 -1 0 0 0 0 0 0
  • 1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

slide-78
SLIDE 78

78 Kasaei

JPEG Example

79

  • 2
  • 1
  • 1
  • 1
  • 1

EOB

79 0 -1 0 0 0 0 0

  • 2 -1 0 0 0 0 0 0
  • 1 -1 0 0 0 0 0 0
  • 1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

slide-79
SLIDE 79

79 Kasaei

JPEG (Com.)

كﻮﻠﺑ ﻚﻳ8×8 كﻮﻠﺑ ﻚﻳ8×8

كﻮﻠﺑ8×8 لﺎﻤﻋا ياﺮﺑ ﻩدﺎﻣﺁ DCT

ﺮهراﺪﻘﻣ ار ﻞﺴﻜﻴﭘ زا128 ﻢآ ﻢﻴﻨآ ﻲﻣ

Compressed data DCT ﻞﻳﺪﺒﺗرﺰﻳﺎﺘﻧاﻮآ

يﺎﻬآﻮﻠﺑ زا يا ﻪﺘﺷر8× 8ﻲﻠﺴﻜﻴﭘ

يدورو ﺮﻳﻮﺼﺗ

slide-80
SLIDE 80

80 Kasaei

JPEG (Decom.)

رﺰﻳﺎﺘﻧاﻮآ يد

IDCT ﻞﻳﺪﺒﺗ كﻮﻠﺑ8×8 ياﺮﺑ ﻩدﺎﻣﺁ لﺎﻤﻋا IDCT

ﺮهراﺪﻘﻣ ﻪﺑ ﻞﺴﻜﻴﭘ128 ﻲﻣ ﻪﻓﺎﺿا ﻢﻴﻨآ Compressed data ﻩﺪﺷ يزﺎﺳزﺎﺑ يﺎه كﻮﻠﺑ زا يا ﻪﺘﺷر ﻩﺪﺷ يزﺎﺳزﺎﺑ ﺮﻳﻮﺼﺗ

slide-81
SLIDE 81

81 Kasaei

JPEG at 0.125 bpp (192:1) JPEG2000 at 0.125 bpp (192:1)

JPEG VS JPEG 2000

slide-82
SLIDE 82

82 Kasaei

Lossy Techniques (WT-Based)

Original Image Reconstructed; 56:1, PSNR: 23.98

slide-83
SLIDE 83

The End