image compression
Download
Skip this Video
Download Presentation
Image Compression

Loading in 2 Seconds...

play fullscreen
1 / 28

Image Compression - PowerPoint PPT Presentation


  • 201 Views
  • Uploaded on

Image Compression. อ.รัชดาพร คณาวงษ์ วิทยาการคอมพิวเตอร์ คณะวิทยาศาสตร์ มหาวิทยาลัยศิลปากรวิทยาเขตพระราชวังสนามจันทร์. Image Compression. Reducing the size of image data files While retaining necessary information. Original Image. Compressed Image file. extracted Image file. compress.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Image Compression' - phylicia


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
image compression

Image Compression

อ.รัชดาพร คณาวงษ์

วิทยาการคอมพิวเตอร์ คณะวิทยาศาสตร์

มหาวิทยาลัยศิลปากรวิทยาเขตพระราชวังสนามจันทร์

image compression1
Image Compression
  • Reducing the size of image data files
  • While retaining necessary information

Original Image

Compressed Image file

extracted Image file

compress

decompress

terminology
Terminology
  • refer relation between original image and

the compressed file

  • Compression Ratio
  • Bits per Pixel

A larger number implies a better compression

A smaller number implies a better compression

compression ratio
Compression Ratio

(1)

Ex Image 256X256 pixels, 256 level grayscale can be compressed file size 6554 byte.

Original Image Size = 256X256(pixels) X 1(byte/pixel)

= 65536 bytes

bits per pixel

(2)

Bits per Pixel

Ex Image 256X256 pixels, 256 level grayscale can be compressed file size 6554 byte.

Original Image Size = 256X256(pixels) X 1(byte/pixel)

= 65536 bytes

Compressed file = 6554(bytes)X8(bits/pixel)

= 52432 bits

why we want to compress
Why we want to compress?

To transmit an RGB 512X512, 24 bit image

via modem 28.2 kbaud(kilobits/second)

key of compression
Key of compression
  • Reducing Data but Retaining Information

DATA are used to convey information.

Various amounts of data can be used to represent the same amount of information. It’s “Data redundancy”

Relative data redundancy

entropy
Entropy
  • Average information in an image.
  • Average number of bits per pixel
redundancy
Redundancy
  • Coding Redundancy
  • Interpixel Redundancy
  • Psychovisual Redundancy
coding redundancy
Coding Redundancy
  • Occurred when data used to represent image are not utilized in an optimal manner
coding redundancy cont
Coding Redundancy(cont)
  • An 8 gray-level image distribution shown in Table
coding redundancy cont1
Coding Redundancy(cont)
  • Original Image 8 possible gray level = 23
interpixel redundancy
Interpixel Redundancy
  • Adjacent pixel values tend to be highly correlated
psychovisual redundancy
Psychovisual Redundancy
  • Some information is more important to the human visual system than other types of information
compression system model

Compressed

File

Preprocessing

Encoding

Input

Compressed

File

Decoding

Postprocessing

Output

Compression System Model
  • Compression
  • Decompression
types of compression
Types of Compression

There are 2 types of Compression

  • Loseless Compression
  • Lossy Compression
loseless compression
Loseless Compression
  • No data are lost
  • Can recreated exactly original image
  • Often the achievable compression is mush less
huffman coding
Huffman Coding
  • Using Histogram probability
  • 5 Steps
    • Find the histogram probabilities
    • Order the input probabilities(smalllarge)
    • Addition the 2 smallest
    • Repeat step 2&3, until 2 probability are left
    • Backward along the tree assign 0 and 1
huffman coding cont

40

30

20

10

0 1 2 3

Huffman Coding(cont)
  • Step 1 Histogram Probability

p0 = 20/100 = 0.2

p1 = 30/100 = 0.3

p2 = 10/100 = 0.1

p3 = 40/100 = 0.4

  • Step 2 Order

p3 0.4

p1 0.3

p0 0.2

p2 0.1

huffman coding cont1
Huffman Coding(cont)
  • Step 3 Add 2 smallest
huffman coding cont2
Huffman Coding(cont)
  • The original Image :average 2 bits/pixel
  • The Huffman Code:average
run length coding
Run-Length Coding
  • Counting the number of adjacent pixels with the same gray-level value
  • Used primarily for binary image
  • Mostly use horizontal RLC
run length coding cont
Run-Length Coding(cont)

Binary Image 8X8

horizontal

run length coding cont1

1

0

1

Run-Length Coding(cont)
  • Extending basic RLC to gray-level image by using bit-plane coding
  • It will better if change the natural code into gray code

00

01

10

11

00

01

11

10

Natural

Gray Code

lempel ziv weich coding lzw
Lempel-Ziv-Weich Coding(LZW)
  • Assign fixed-length code words to variable
  • GIF,TIFF,PDF
lossy compression
Lossy Compression
  • Allow a loss in the actual image data
  • Can not recreated exactly original image
  • Commonly the achievable compression is mush more
  • JPEG
fidelity criteria
Fidelity Criteria
  • Objective fidelity criteria
    • RMS Error
    • RMS Signal-To-Noise Ratio
  • Subjective fidelity criteria
ad