Presentation on Image Compression

28
IMAGE COMPRESSION Presented By:- Surovit Roy, Rahul Virmani, Honey Soni, Under the guidance of Prof. Sachin Sonawane

Transcript of Presentation on Image Compression

Page 1: Presentation on Image Compression

IMAGE COMPRESSION

Presented By:-

Surovit Roy, Rahul Virmani, Honey Soni,

Under the guidance of

Prof. Sachin Sonawane

Page 2: Presentation on Image Compression

IMAGE COMPRESSION

The process of coding that will reduce the total number of bits

needed to represent certain information.

Objective of image compression is to reduce irrelevance and

redundancy of the image.

In other words we can say that it is the compression of graphics

for storage or transmission, so that the image can be stored or

transmitted in an efficient form.

Page 3: Presentation on Image Compression

CONTI…

original image

262144 Bytes

image

encoder

Compressed bit stream

00111000001001101…

(2428 Bytes)

image

decoder

compression ratio (CR) = 108:1

Page 4: Presentation on Image Compression

COMPRESSION RATIO

The compression ratio is given by:-

Page 5: Presentation on Image Compression

WHY IMAGE COMPRESSION?

Image compression techniques are of prime importance for

reducing the amount of information needed for the picture

without losing much of its quality.

To reduce the size of stored or transmitted files to manageable

sizes, or to reduce the time it would take to transmit these files to

another computer.

To reduce the real-time bandwidth required to transmit time-

sensitive video data across a communication link.

Page 6: Presentation on Image Compression

NEED FOR IMAGE COMPRESSION

An image, 1024 pixel x 1024 pixel x 24 bit, without compression, would require 3 MB of storage and 7 minutes for transmission.

If the image is compressed at a 10:1 compression ratio, the storage requirement is reduced to 300 KB and the transmission time drops to under 6 seconds.

Compression is an important component of the solutions available for creating file sizes of manageable and transmittable dimensions.

Page 7: Presentation on Image Compression

CONTI…

Increasing the bandwidth is another method, but the cost

sometimes makes this a less attractive solution.

Page 8: Presentation on Image Compression

TYPES IMAGE COMPRESSION

Image compression can be performed by two ways:-

Lossy Compression

Lossless Compression

Lossless Compression the data is compressed without any loss

of data.

Lossy Compression it is assumed that some loss of information

is acceptable. Is suitable for natural image.

Page 9: Presentation on Image Compression

LOSSLESS COMPRESSION

With lossless compression, data is compressed without any

loss of data.

It assumes you want to get everything back that you put in i.e., we

can reconstruct a perfect reproduction of the original from the

compression.

Critical financial data files are examples where lossless

compression is required.

Page 10: Presentation on Image Compression

CONTI…

Lossless compression ratios usually only achieve a 2:1

compression ratio.

Useful for text, numerical data, use of scanners to locate details in

images, etc. where there is a precise meaning for the data.

Even for images or other perceived signals, lossless

compression is sometimes required, particularly for legal

documents, medical images,

Page 11: Presentation on Image Compression

TYPES OF LOSSLESS COMPRESSION

Lossless coding techniques types are:-

Run length encoding:- Very simple form of data compression in

which runs of data are stored as a single data value and count,

rather than as the original run.

Huffman encoding:-This is a general technique for coding

symbols based on their statistical occurrence frequencies

(probabilities).

The pixels in the image are treated as symbols. The symbols that

occur more frequently are assigned a smaller number of bits, while

the symbols that occur less frequently are assigned a relatively

larger number of bits.

Page 12: Presentation on Image Compression

CONTI…

Dictionary Codes:- Dictionary based data compression

algorithms are based on the idea of substituting a repeated pattern

with a shorter token.

Dictionary codes are compression codes that dynamically

construct their own coding and decoding tables “on the fly” by

looking at the data stream itself

Page 13: Presentation on Image Compression

LOSSY COMPRESSION

With lossy compression, it is assumed that some loss of

information is acceptable.

When we reconstruct the information from the compressed

data, we get something close to but not exactly the same as the

original.

Lossy compression can provide compression ratios of 100:1 to

200:1, depending on the type of information being compressed.

Page 14: Presentation on Image Compression

CONTI…

Lossy compression techniques are often "tunable" in that you can

turn the compression up to improve throughput, but at a loss in

quality.

Lossy compression is very useful for images, audio signals, or

other information that is perceived through our senses.

Page 15: Presentation on Image Compression

TYPES OF LOSSY COMPRESSION

There are three major types of lossy data compression technique:-

Lossy transform code:-The lossy transform codec's compression

is generally used for JPEG images only. In this case samples of the

picture is taken, they are then choped into smaller segments and

then transformed into a new image.

Lossy predictive code:-In predictive codec's, previous and/or

subsequent decoded data is used to predict the compressed image

frame

Page 16: Presentation on Image Compression

CONTI…

Chroma sub sampling:-It’s commonly used in video encoding

schemes and in JPEG images. It drops or make an average of

some chroma (colour) information while maintaining luma

(brightness) information.

Page 17: Presentation on Image Compression

DIFFERENCE BETWEEN LOSSLESS & LOSSY

IMAGES

Lossless Image Lossy Image

Page 18: Presentation on Image Compression

RUN LENGTH ENCODING

Is a very simple form of data compression in which, runs of data

are stored as a single data value and count, rather than as the

original run.

This is most useful on data that contains many such runs: for

example, simple graphic images such as icons, line drawings, and

animations.

Does not assume a memory less source.

Page 19: Presentation on Image Compression

CONTI…

Example Of RUN LENGTH ENCODING :-

For example, consider a screen containing plain black text on a

solid white background. There will be many long runs of white

pixels in the blank space, and many short runs of black pixels

within the text. Let us take a hypothetical single scan line, with B

representing a black pixel and W representing white:

WWWWWWWWWWWWBWWWWWWWBBBWWWWWB

If we apply the run-length encoding (RLE) data compression

algorithm to the above hypothetical scan line, we get:

12W1B8W3B5W1B

This is to be interpreted as twelve Ws, one B, eight Ws, three Bs, five

Ws and one B.

Page 20: Presentation on Image Compression

CONTI..

The run-length code represents the original 29 characters in only

13.

RLE schemes are simple and fast, but their compression efficiency

depends on the type of image data being encoded.

Page 21: Presentation on Image Compression

ADVANTAGES OF RLE

Very useful in case of repetitive data

Easy storage and retrieval of image

Environmental friendly

Page 22: Presentation on Image Compression

DISADVANTAGES OF RLE

The minimum useful run-length size is increased from three

characters to four. This could affect compression efficiency with

some types of data.

High initial cost

Need for standardization

Page 23: Presentation on Image Compression

ALGORITHM FOR RUN LENGTH ENCODING

Step 1. Set the previous symbol equal to an unmatchable value.

Step 2. Read the next symbol from the input stream.

Step 3. If the symbol is an EOF exit.

Step 4. Write out the current symbol.

Step 5. If the symbol is an does not match the previous symbol,

set the previous symbol to the current symbol, and go to step 2.

Step 6. Read and count additional symbols until a non-matching

symbol is found. This is the run length.

Page 24: Presentation on Image Compression

CONTI…

Step 7. Write out the run length.

Step 8. Write out the non-matching symbol.

Step 9. Set the previous symbol to the non-matching symbol, and

go to step 2.

Page 25: Presentation on Image Compression

APPLICATION

Run-length encoding performs lossless data compression and is

well suited to palette-based bitmapped images such as computer

icons.

Run-length encoding is used in fax machines (combined with

other techniques into Modified Huffman coding). It is relatively

efficient because most faxed documents are mostly white space,

with occasional interruptions of black.

Page 26: Presentation on Image Compression

ADVANTAGES OF IMAGE COMPRESSION

Less disk space (more data in reality).

Faster writing and reading.

Faster file transfer.

Variable dynamic range.

Byte order independent.

Page 27: Presentation on Image Compression

DISADVANTAGES OF IMAGE COMPRESSION

Added complication.

Effect of errors in transmission.

Slower for sophisticated methods (but simple methods can be

faster for writing to disk).

Need to decompress all previous data.

Page 28: Presentation on Image Compression

THANK YOU