(i) **To find the 3 bit IGS coded image**

Size of i/p image = 9 pixels = 9 bytes

BPP = 6 bits for 3 bit IGS coded image

Therefore, Size= 9 x 6 bytes

IGS coded image:

001 | 111 | 001 |
---|---|---|

010 | 001 | 111 |

001 | 001 | 010 |

Size of IGS coded image =27 bits

Compression ratio=50%

(ii) **To find decoded image, MSE and PSNR.**

To find decoded image:

IGS coded pixel value | Decoded pixel in binary | Output pixel value |
---|---|---|

001 | 001000 | 8 |

111 | 111,000 | 56 |

001 | 001,000 | 8 |

010 | 010,000 | 16 |

001 | 001,000 | 8 |

111 | 111,000 | 56 |

001 | 001,000 | 8 |

001 | 001,000 | 8 |

010 | 010,000 | 16 |

Decoded image:

8 | 56 | 8 |
---|---|---|

16 | 8 | 56 |

8 | 8 | 16 |

**To find MSE (Mean Square Error):**

$MSE = \frac{1}{MxN} \sum_{x=0}^{M-1} \sum_{y=0}^{N-1} [f(x,y) - \hat f(x,y)]^2 \\ MSE = \frac{1}{9} [(5)^2+(-2)^2+(4)^2+(-3)^2+(3)^2+(1)^2+(3)^2+(2)^2+(-4)^2] \\ MSE= \frac{1}{9} [25+4+16+9+9+1+9+4+16] \\ MSE= 10.33$

**To find SNR (Signal to Noise Ratio):**

$SNR = \frac{\sum_{x=0}^{M-1} \sum_{y=0}^{N-1} [f(x,y)]^2}{\sum_{x=0}^{M-1} \sum_{y=0}^{N-1} [f(x,y) - \hat f(x,y)]〗^2} \\ Signal = [(13)^2+(54)^2+(12)^2+(13)^2+(11)^2+(57)^2+(11)^2+(10)^2+(12)^2] \\ Signal = 7133 \\ Noise = [(5)^2+(-2)^2+(4)^2+(-3)^2+(3)^2+(1)^2+(3)^2+(2)^2+(-4)^2] \\ Noise = 93 \\ SNR = \frac{7133}{93} = 76.698$

**To find PSNR (Peak Signal to Noise Ratio):**

$PSNR = \frac{(Peak signal value)^2}{MSE} \\ For 6 bit image Peak value = [111 111] = 63 \\ PSNR = \frac{(63)^2}{10.33} = 384.22$

How did you get size of igs coded image as 27 bits?

0