0
1.8kviews
Find the Huffman coded image of the following encoder.

Given $\begin{bmatrix} \ 10 & 10 & 40 & 40 \\ \ 20 & 20 & 20 & 30 \\ \ 30 & 30 & 40 & 40 \\ \ 50 & 50 & 60 & 80 \\ \end{bmatrix}$

(i) Calculate Bits per pixel (BPP) and percentage of compression of compressed image. Do not consider payload of Huffman Table.

1 Answer
0
13views

$$F= \begin{bmatrix} \ 10 & 10 & 40 & 40 \\\ \ 20 & 20 & 20 & 30 \\\ \ 30 & 30 & 40 & 40 \\\ \ 50 & 50 & 60 & 80 \\ \end{bmatrix} $$

Size of input image = 16 pixels = 16 bytes = 128 bits

To find Huffman Coded image:

Symbols probability
10 2/16
20 3/16
30 3/16
40 4/16
50 2/16
60 1/16
80 1/16

enter image description here

Symbol Codeword’s:

enter image description here

Huffman Coded Image:

enter image description here

To find Bits Per Pixel of compression ratio:

$BPP = \frac{Size \ of \ compressed \ image}{Total \ number \ of \ pixels} \\ BPP = \frac{43 \ bits}{16 \ pixel} \\ BPP = 2.687$

To find compression ratio:

$Compression Ratio = {(Original \ size\ - \ Compression \ Size)}{Original \ size} \\ Compression Ratio = \frac{128-43}{128} X 100 \\ Compression Ratio=66.40%$

Please log in to add an answer.