Digital Image Compression: Huffman Coding, Run-Length Coding, and Transform Image Coding, Lecture notes of Embedded Systems

An in-depth analysis of various digital image compression techniques, including huffman coding, run-length coding, and transform image coding. The principles, advantages, and applications of each method. Huffman coding uses entropy coding to compress image data by assigning shorter codes to more frequently occurring symbols. Run-length coding represents image data as sequences of repeated symbols and their lengths. Transform image coding concentrates image energy in a few transform coefficients for efficient compression. The document also discusses the importance of compression factors, lossless and lossy compression techniques, and the role of predictive coding.

Typology: Lecture notes

2017/2018

Uploaded on 07/30/2018

mounika-kankipati-1
mounika-kankipati-1 🇮🇳

1 document

1 / 38

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
. Pitas Digital Image Processing Algorithms
Digital Image Compression
4.1
CHAPTER 4
DIGITAL
IMAGE COMPRESSION
DIGITAL IMAGE PROCESSINGDIGITAL IMAGE PROCESSING
DIGITAL IMAGE PROCESSING
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26

Partial preview of the text

Download Digital Image Compression: Huffman Coding, Run-Length Coding, and Transform Image Coding and more Lecture notes Embedded Systems in PDF only on Docsity!

É. Pitas Digital Image Processing Algorithms

CHAPTER 4

DIGITAL

IMAGE COMPRESSION

DIGITAL IMAGE PROCESSING DIGITAL IMAGE PROCESSINGDIGITAL IMAGE PROCESSING

É. Pitas Digital Image Processing Algorithms

Contents ContentsContents

u Introduction

u Huffman coding

u Run-length coding

u Modified READ coding

u LZW compression

u Predictive coding

u Transform image coding

É. Pitas Digital Image Processing Algorithms

Introduction IntroductionIntroduction

Lossless compression techniquesLossless compression techniques These are used when raw image data are difficult to obtain or contain vital information that may be destroyed by compression, e.g. in medical diagnostic imaging.

Lossy compression techniques Lossy compression techniques These can be used when raw image data can be easily reproduced or when the information loss can be tolerated at the receiver site, e.g. in Digital Television, Teleconferencing.

É. Pitas Digital Image Processing Algorithms

Huffman coding Huffman codingHuffman coding

u Pulse Coding Modulation (PCM) using B bits/pixel. u The average number of bits per pixel can be reduced by assigning binary codes of different bit length to the various image intensities. u The pdf (probability density function) p(i) can be estimated by calculating the digital image histogram. u Assignment of short codewords to intensities having a hgh probability of occurrunce and larger codewords to less frequent image intensity levels.

Entropy Coding Entropy Coding

É. Pitas Digital Image Processing Algorithms

Huffman coding Huffman coding u The image intensity levels are coded by using variable length codewords. u No codeword can be the prefix of another codeword.

Average codeword length: ( ) ≤ ≤ ( )+ 1

H B L H B

Huffman coding Huffman codingHuffman coding

É. Pitas Digital Image Processing Algorithms

(a) (b) Figure1: (a) Construction of Huffman code tree, (b) tree rearrangement.

Huffman coding Huffman codingHuffman coding

É. Pitas Digital Image Processing Algorithms

Huffman coding combination with other coding Huffman coding combination with other coding schemesschemes

uWith predictive coding.

uWith transform coding of greyscale images.

uWith run-length coding of binary images.

Huffman coding Huffman codingHuffman coding

É. Pitas Digital Image Processing Algorithms

Run- Run-length codingRun-length codinglength coding

Each image line can be represented as follows:

( x 1 (^) ,K , xM ) → ( g 1 , l 1 ),( g 2 , l 2 ),K,( gk , lk )

g 1 = x 1 , gk = x M

l M

k

i

∑ i =

= 1

where:

Each couple ( gi,li ) is called graygray--level run.level run.

Run- Run-length codingRun-length codinglength coding

É. Pitas Digital Image Processing Algorithms

uThe resulting compression is considerable if the grey-level runs are relatively large.

uThe savings are even larger when the image is binary.

uAn end of line (EOL) codeword indicates the start of an image and the end of a line.

Run- Run-length codingRun-length codinglength coding

É. Pitas Digital Image Processing Algorithms

Figure 3: Format of an image coded by a run-length code.

u The run-length coding has been standardized by CCITT.

u It has been included in Group 3 coding schemes (FAX transmission).

Run- Run-length codingRun-length codinglength coding

É. Pitas Digital Image Processing Algorithms

Modified READ coding Modified READ codingModified READ coding

Run-Run-length codinglength coding It is a one-dimensional scheme that cannot take into account vertical correlations among run transitions in consecutive image lines.

Modified READ coding (Relative Element Address Modified READ coding (Relative Element Address Designate)Designate) It is a two-dimensional coding scheme that codes a binary image line with reference to the previous line.

É. Pitas Digital Image Processing Algorithms

Figure 5: Transition elements in modified READ coding.

Modified READ coding Modified READ codingModified READ coding

É. Pitas Digital Image Processing Algorithms

LZW compression LZW compressionLZW compression

u General-purpose compression scheme proposed by Lempel-Ziv and Welch.

u It can be used for the compression of any binary data file.

u It is incorporated in several de facto image storage standards (e.g. TIFF, GIF).

LZW compression LZW compressionLZW compression

É. Pitas Digital Image Processing Algorithms

u It is a lossless, fast and effective algorithm and can operate on images of any bit depth.

u LZW compression is based on the construction of a code table that maps frequently encountered bit strings to output codewords.

u The digital image as well as the coded one is treated as a one-dimensional bit string.

LZW compression LZW compressionLZW compression