written 8.5 years ago by
teamques10
★ 68k
|
•
modified 8.5 years ago
|
$$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 |
Symbol Codeword’s:
Huffman Coded Image:
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%$