CHAPTER 2: LITERATURE REVIEW
4.20 RGB Quadtree Decomposition and Parametric
4.20.2 Non-uniform Threshold Variation
67
68
Figure 66: Decoded Image Peppers.tiff Threshold (0.3, 0.7, 0.5)
Figure 67: Decoded Image Peppers.tiff Threshold (0.5, 0.3, 0.7)
Figure 68: Decoded Image Peppers.tiff Threshold (0.5, 0.7, 0.3)
69
Figure 69: Decoded Image Peppers.tiff Threshold (0.7, 0.3, 0.5)
Figure 70: Decoded Image Peppers.tiff Threshold (0.7, 0.5, 0.3)
Figure 71: Decoded Image Peppers.tiff Threshold (0.8, 0.3, 0.3)
70
Figure 72: Decoded Image Peppers.tiff Threshold (0.3, 0.8, 0.3)
Figure 73: Decoded Image Peppers.tiff Threshold (0.3, 0.3, 0.8)
Figure 74: Decoded Image Peppers.tiff Threshold (0.8, 0.8, 0.3)
71
Figure 75: Decoded Image Peppers.tiff Threshold (0.3, 0.8, 0.8)
Figure 76: Decoded Image Peppers.tiff Threshold (0.8, 0.3, 0.8)
Baboon.tiff
Figure 77: Decoded Image Baboon.tiff Threshold (0.3, 0.5, 0.7)
72
Figure 78: Decoded Image Baboon.tiff Threshold (0.3, 0.7, 0.5)
Figure 79: Decoded Image Baboon.tiff Threshold (0.5, 0.3, 0.7)
Figure 80: Decoded Image Baboon.tiff Threshold (0.5, 0.7, 0.3)
73
Figure 81: Decoded Image Baboon.tiff Threshold (0.7, 0.3, 0.5)
Figure 82: Decoded Image Baboon.tiff Threshold (0.7, 0.5, 0.3)
Figure 83: Decoded Image Baboon.tiff Threshold (0.8, 0.3, 0.3)
74
Figure 84: Decoded Image Baboon.tiff Threshold (0.3, 0.8, 0.3)
Figure 85: Decoded Image Baboon.tiff Threshold (0.3, 0.3, 0.8)
Figure 86: Decoded Image Baboon.tiff Threshold (0.8, 0.8, 0.3)
75
Figure 87: Decoded Image Baboon.tiff Threshold (0.3, 0.8, 0.8)
Figure 88: Decoded Image Baboon.tiff Threshold (0.8, 0.3, 0.8)
Airplane.tiff
Figure 89: Decoded Image Airplane.tiff Threshold (0.3, 0.5, 0.7)
76
Figure 90: Decoded Image Airplane.tiff Threshold (0.3, 0.7, 0.5)
Figure 91: Decoded Image Airplane.tiff Threshold (0.5, 0.3, 0.7)
Figure 92: Decoded Image Airplane.tiff Threshold (0.5, 0.7, 0.3)
77
Figure 93: Decoded Image Airplane.tiff Threshold (0.7, 0.3, 0.5)
Figure 94: Decoded Image Airplane.tiff Threshold (0.7, 0.5, 0.3)
Figure 95: Decoded Image Airplane.tiff Threshold (0.8, 0.3, 0.3)
78
Figure 96: Decoded Image Airplane.tiff Threshold (0.3, 0.8, 0.3)
Figure 97: Decoded Image Airplane.tiff Threshold (0.3, 0.3, 0.8)
Figure 98: Decoded Image Airplane.tiff Threshold (0.8, 0.8, 0.3)
79
Figure 99: Decoded Image Airplane.tiff Threshold (0.3, 0.8, 0.8)
Figure 100: Decoded Image Airplane.tiff Threshold (0.8, 0.3, 0.8)
Lena.png
Figure 101: Decoded Image Lena.png Threshold (0.3, 0.5, 0.7)
80
Figure 102: Decoded Image Lena.png Threshold (0.3, 0.7, 0.5)
Figure 103: Decoded Image Lena.png Threshold (0.5, 0.3, 0.7)
Figure 104: Decoded Image Lena.png Threshold (0.5, 0.7, 0.3)
81
Figure 105: Decoded Image Lena.png Threshold (0.7, 0.3, 0.5)
Figure 106: Decoded Image Lena.png Threshold (0.7, 0.5, 0.3)
Figure 107: Decoded Image Lena.png Threshold (0.8, 0.3, 0.3)
82
Figure 108: Decoded Image Lena.png Threshold (0.3, 0.8, 0.3)
Figure 109: Decoded Image Lena.png Threshold (0.3, 0.3, 0.8)
Figure 110: Decoded Image Lena.png Threshold (0.8, 0.8, 0.3)
83
Figure 111: Decoded Image Lena.png Threshold (0.3, 0.8, 0.8)
Figure 112: Decoded Image Lena.png Threshold (0.8, 0.3, 0.8)
For all of the images with the twelve variation of threshold, the quantitative analysis have been made including MSE, RMSE, PSNR, File size and CR. The analysis has been arranged in the table on the next page as followed:
84
Peppers.tiffTable 5: MSE, RMSE and PSNR for Peppers.tiff
No. Threshold MSE RMSE PSNR
R G B R G B R G B R G B
1 0.3 0.5 0.7 62 111 145 7.874 10.536 12.042 30.2069 27.6776 26.5171 2 0.3 0.7 0.5 62 157 112 7.874 12.53 10.583 30.2069 26.1718 27.6386 3 0.5 0.3 0.7 107 71 128 10.3441 8.4261 11.314 27.837 29.6182 27.0587 4 0.5 0.7 0.3 107 157 68 10.3441 12.53 8.2462 27.837 26.1718 29.8057 5 0.7 0.3 0.5 134 71 99 11.5758 8.4261 9.9499 26.8598 29.6182 28.1745 6 0.7 0.5 0.3 134 112 63 11.5758 10.583 7.9373 26.8598 27.6386 30.1374 7 0.8 0.3 0.3 148 71 63 12.1655 8.4261 7.9373 26.4282 29.6182 30.1374 8 0.3 0.8 0.3 62 157 66 7.874 12.53 8.124 30.2069 26.1718 29.9354 9 0.3 0.3 0.8 56 68 128 7.4833 8.2462 11.314 30.6489 29.8057 27.0587 10 0.8 0.8 0.3 158 158 68 12.5698 12.57 8.2462 26.1442 26.1442 29.8057 11 0.3 0.8 0.8 62 163 161 7.874 12.767 12.689 30.2069 26.0089 26.0625 12 0.8 0.3 0.8 148 71 128 12.1655 8.4261 11.314 26.4282 29.6182 27.0587
Table 6: File Size and CR for Peppers.tiff
No. Threshold File Size CR
R G B Original Decoded R G B
1 0.3 0.5 0.7 35.7 KB 33.3 KB 1.43 2.00 3.33 2 0.3 0.7 0.5 35.7 KB 33.2 KB 1.43 3.33 2.00 3 0.5 0.3 0.7 35.7 KB 33.2 KB 2.00 1.43 3.33 4 0.5 0.7 0.3 35.7 KB 33.4 KB 2.00 3.33 1.43 5 0.7 0.3 0.5 35.7 KB 33.4 KB 3.33 1.43 2.00 6 0.7 0.5 0.3 35.7 KB 33.3 KB 3.33 2.00 1.43 7 0.8 0.3 0.3 35.7 KB 33.7 KB 5.00 1.43 1.43 8 0.3 0.8 0.3 35.7 KB 33.9 KB 1.43 5.00 1.43 9 0.3 0.3 0.8 35.7 KB 33.6 KB 1.43 1.43 5.00 10 0.8 0.8 0.3 35.7 KB 33.0 KB 5.00 5.00 1.43 11 0.3 0.8 0.8 35.7 KB 32.4 KB 1.43 5.00 5.00 12 0.8 0.3 0.8 35.7 KB 33.0 KB 5.00 1.43 5.00
85 Baboon.tiff
Table 7: MSE, RMSE and PSNR for Baboon.tiff
No. Threshold MSE RMSE PSNR
R G B R G B R G B R G B
1 0.3 0.5 0.7 60 101 132 7.746 10.0499 11.4891 30.3493 28.0876 26.9251 2 0.3 0.7 0.5 58 109 103 7.6158 10.4403 10.1489 30.4965 27.7565 28.0024 3 0.5 0.3 0.7 97 60 121 9.8489 7.746 11 28.2631 30.3493 27.3029 4 0.5 0.7 0.3 97 104 61 9.8489 10.198 7.8102 28.2631 27.9605 30.2775 5 0.7 0.3 0.5 105 60 102 10.247 7.746 10.0995 27.9189 30.3493 28.0448 6 0.7 0.5 0.3 114 98 62 10.6771 9.8995 7.874 27.5618 28.2185 30.2069 7 0.8 0.3 0.3 105 56 57 10.247 7.4833 7.5498 27.9189 30.6489 30.5721 8 0.3 0.8 0.3 54 84 61 7.3485 9.1652 7.8102 30.8069 28.888 30.2775 9 0.3 0.3 0.8 54 60 108 7.3485 7.746 10.3923 30.8069 30.3493 27.7966 10 0.8 0.8 0.3 140 135 62 11.8322 11.619 7.874 26.6695 26.8275 30.2069 11 0.3 0.8 0.8 60 136 153 7.746 11.6619 12.3693 30.3493 26.7954 26.2839 12 0.8 0.3 0.8 105 60 121 10.247 7.746 11 27.9189 30.3493 27.3029
Table 8: File Size and CR for Baboon.tiff
No. Threshold File Size CR
R G B Original Decoded R G B
1 0.3 0.5 0.7 54.7 KB 45.3 KB 1.43 2.00 3.33 2 0.3 0.7 0.5 54.7 KB 46.2 KB 1.43 3.33 2.00 3 0.5 0.3 0.7 54.7 KB 48.1 KB 2.00 1.43 3.33 4 0.5 0.7 0.3 54.7 KB 47.9 KB 2.00 3.33 1.43 5 0.7 0.3 0.5 54.7 KB 48.1 KB 3.33 1.43 2.00 6 0.7 0.5 0.3 54.7 KB 48.0 KB 3.33 2.00 1.43 7 0.8 0.3 0.3 54.7 KB 49.7 KB 5.00 1.43 1.43 8 0.3 0.8 0.3 54.7 KB 49.6 KB 1.43 5.00 1.43 9 0.3 0.3 0.8 54.7 KB 48.7 KB 1.43 1.43 5.00 10 0.8 0.8 0.3 54.7 KB 47.7 KB 5.00 5.00 1.43 11 0.3 0.8 0.8 54.7 KB 45.0 KB 1.43 5.00 5.00 12 0.8 0.3 0.8 54.7 KB 48.1 KB 5.00 1.43 5.00
86 Airplane.tiff
Table 9: MSE, RMSE and PSNR for Airplane.tiff
No. Threshold MSE RMSE PSNR
R G B R G B R G B R G B
1 0.3 0.5 0.7 61 107 81 7.8102 10.3441 9 30.2775 27.837 29.046 2 0.3 0.7 0.5 61 134 107 7.8102 11.5758 10.3441 30.2775 26.8598 27.837 3 0.5 0.3 0.7 99 63 88 9.9499 7.9373 9.3808 28.1745 30.1374 28.686 4 0.5 0.7 0.3 98 109 58 9.8995 10.4403 7.6158 28.2185 27.7565 30.4965 5 0.7 0.3 0.5 99 63 63 9.9499 7.9373 7.9373 28.1745 30.1374 30.1374 6 0.7 0.5 0.3 95 102 58 9.7468 10.0995 7.6158 28.3536 28.0448 30.4965 7 0.8 0.3 0.3 99 63 58 9.9499 7.9373 7.6158 28.1745 30.1374 30.4965 8 0.3 0.8 0.3 61 105 58 7.8102 10.247 7.6158 30.2775 27.9189 30.4965 9 0.3 0.3 0.8 56 63 58 7.4833 7.9373 7.6158 30.6489 30.1374 30.4965 10 0.8 0.8 0.3 118 121 58 10.863 11 7.6158 27.412 27.3029 30.4965 11 0.3 0.8 0.8 61 137 107 7.8102 11.7047 10.3441 30.2775 26.7636 27.837 12 0.8 0.3 0.8 99 63 91 9.9499 7.9373 9.5394 28.1745 30.1374 28.5404
Table 10: File Size and CR for Airplane.tiff
No. Threshold File Size CR
R G B Original Decoded R G B
1 0.3 0.5 0.7 33.7 KB 30.6 KB 1.43 2.00 3.33 2 0.3 0.7 0.5 33.7 KB 30.6 KB 1.43 3.33 2.00 3 0.5 0.3 0.7 33.7 KB 30.9 KB 2.00 1.43 3.33 4 0.5 0.7 0.3 33.7 KB 28.6 KB 2.00 3.33 1.43 5 0.7 0.3 0.5 33.7 KB 30.9 KB 3.33 1.43 2.00 6 0.7 0.5 0.3 33.7 KB 28.3 KB 3.33 2.00 1.43 7 0.8 0.3 0.3 33.7 KB 30.9 KB 5.00 1.43 1.43 8 0.3 0.8 0.3 33.7 KB 30.7 KB 1.43 5.00 1.43 9 0.3 0.3 0.8 33.7 KB 30.9 KB 1.43 1.43 5.00 10 0.8 0.8 0.3 33.7 KB 28.0 KB 5.00 5.00 1.43 11 0.3 0.8 0.8 33.7 KB 30.6 KB 1.43 5.00 5.00 12 0.8 0.3 0.8 33.7 KB 30.9 KB 5.00 1.43 5.00
87 Lena.png
Table 11: MSE, RMSE and PSNR for Lena.png
No. Threshold MSE RMSE PSNR
R G B R G B R G B R G B
1 0.3 0.5 0.7 63 99 91 7.9373 9.9499 9.5394 30.1374 28.1745 28.5404 2 0.3 0.7 0.5 63 130 99 7.9373 11.4018 9.9499 30.1374 26.9914 28.1745 3 0.5 0.3 0.7 92 62 73 9.5917 7.874 8.544 28.4929 30.2069 29.4976 4 0.5 0.7 0.3 106 133 66 10.296 11.5326 8.124 27.8777 26.8923 29.9354 5 0.7 0.3 0.5 92 62 73 9.5917 7.874 8.544 28.4929 30.2069 29.4976 6 0.7 0.5 0.3 124 106 66 11.136 10.2956 8.124 27.1966 27.8777 29.9354 7 0.8 0.3 0.3 92 61 66 9.5917 7.8102 8.124 28.4929 30.2775 29.9354 8 0.3 0.8 0.3 63 99 66 7.9373 9.9499 8.124 30.1374 28.1745 29.9354 9 0.3 0.3 0.8 63 62 73 7.9373 7.874 8.544 30.1374 30.2069 38.8142 10 0.8 0.8 0.3 124 133 66 11.136 11.5326 8.124 27.1966 26.8923 29.9354 11 0.3 0.8 0.8 63 130 99 7.9373 11.4018 9.9499 30.1374 26.9914 28.1745 12 0.8 0.3 0.8 92 62 73 9.5917 7.874 8.544 28.4929 30.2069 29.4976
Table 12: File Size and CR for Lena.png
No. Threshold File Size CR
R G B Original Decoded R G B
1 0.3 0.5 0.7 34.3 KB 30.1 KB 1.43 2.00 3.33 2 0.3 0.7 0.5 34.3 KB 30.1 KB 1.43 3.33 2.00 3 0.5 0.3 0.7 34.3 KB 31.6 KB 2.00 1.43 3.33 4 0.5 0.7 0.3 34.3 KB 30.7 KB 2.00 3.33 1.43 5 0.7 0.3 0.5 34.3 KB 31.6 KB 3.33 1.43 2.00 6 0.7 0.5 0.3 34.3 KB 30.5 KB 3.33 2.00 1.43 7 0.8 0.3 0.3 34.3 KB 31.7 KB 5.00 1.43 1.43 8 0.3 0.8 0.3 34.3 KB 31.2 KB 1.43 5.00 1.43 9 0.3 0.3 0.8 34.3 KB 31.6 KB 1.43 1.43 5.00 10 0.8 0.8 0.3 34.3 KB 30.4 KB 5.00 5.00 1.43 11 0.3 0.8 0.8 34.3 KB 29.9 KB 1.43 5.00 5.00 12 0.8 0.3 0.8 34.3 KB 31.6 KB 5.00 1.43 5.00
88
In this non-uniform threshold variation, we want to find which colour channel most contribute to the error. We will compare the average MSE and threshold value. By knowing this, we will consider that the threshold for that colour channel (highest average MSE) should be the lowest compared to other colour channels to get the better quality of image. So, the average MSE for each variation of threshold for each images have been calculated as followed:
Table 13: Comparison of Threshold and Average MSE
No. Threshold Average MSE
R G B Peppers.tiff Baboon.tiff Airplane.tiff Lena.png
1 0.3 0.5 0.7 106 98 83 84
2 0.3 0.7 0.5 110 90 101 97
3 0.5 0.3 0.7 102 93 83 76
4 0.5 0.7 0.3 166 87 88 102
5 0.7 0.3 0.5 101 89 75 76
6 0.7 0.5 0.3 103 91 85 99
7 0.8 0.3 0.3 94 73 73 73
8 0.3 0.8 0.3 95 66 75 76
9 0.3 0.3 0.8 84 74 59 66
10 0.8 0.8 0.3 128 112 99 108
11 0.3 0.8 0.8 129 116 102 97
12 0.8 0.3 0.8 116 95 84 76
Then, we analyze the comparison between threshold and average MSE for each images; Peppers.tiff, Baboon.tiff, Airplane.tiff and Lena.png. The average MSE being arranged in descending order, so we can observe the highest threshold belongs to which colour channel.
89 Peppers.tiff
R G B Average MSE
0.5 0.7 0.3 166
0.3 0.7 0.5 110
0.3 0.5 0.7 106
0.7 0.5 0.3 103
0.5 0.3 0.7 102
0.7 0.3 0.5 101
R G B Average MSE
0.3 0.8 0.8 129
0.8 0.8 0.3 128
0.8 0.3 0.8 116
R G B Average MSE
0.3 0.8 0.3 95
0.8 0.3 0.3 94
0.3 0.3 0.8 84
- For Peppers.tiff, the Green channel contributes the highest error when its threshold value is highest.
- So, to obtain better quality of image, the threshold value for Green channel should be lowest compared with Red and Blue channel.
90 Baboon.tiff
R G B Average MSE
0.3 0.5 0.7 98
0.5 0.3 0.7 93
0.7 0.5 0.3 91
0.3 0.7 0.5 90
0.7 0.3 0.5 89
0.5 0.7 0.3 87
R G B Average MSE
0.3 0.3 0.8 74
0.8 0.3 0.3 73
0.3 0.8 0.3 66
R G B Average MSE
0.3 0.8 0.8 116
0.8 0.8 0.3 112
0.8 0.3 0.8 95
- For Baboon.tiff, the Blue channel contributes the highest error when its threshold value is highest.
- So, to obtain better quality of image, the threshold value for Blue channel should be lowest compared with Red and Green channel.
91 Airplane.tiff
R G B Average MSE
0.3 0.7 0.5 101
0.5 0.7 0.3 88
0.7 0.5 0.3 85
0.5 0.3 0.7 83
0.3 0.5 0.7 83
0.7 0.3 0.5 75
R G B Average MSE
0.3 0.8 0.3 75
0.8 0.3 0.3 73
0.3 0.3 0.8 59
R G B Average MSE
0.3 0.8 0.8 102
0.8 0.8 0.3 99
0.8 0.3 0.8 84
- For Airplane.tiff, the Green channel contributes the highest error when its threshold value is highest.
- So, to obtain better quality of image, the threshold value for Green channel should be lowest compared with Red and Blue channel.
92 Lena.png
R G B Average MSE
0.5 0.7 0.3 102
0.7 0.5 0.3 99
0.3 0.7 0.5 97
0.3 0.5 0.7 84
0.5 0.3 0.7 76
0.7 0.3 0.5 76
R G B Average MSE
0.3 0.8 0.3 76
0.8 0.3 0.3 73
0.3 0.3 0.8 66
R G B Average MSE
0.8 0.8 0.3 108
0.3 0.8 0.8 97
0.8 0.3 0.8 76
- For Lena.png, the Green channel contributes the highest error when its threshold value is highest.
- So, to obtain better quality of image, the threshold value for Green channel should be lowest compared with Red and Blue channel.
93
From the analyses that have been made for non-uniform threshold variation, we also can determine the best non-uniform threshold combination. We can do the comparison between threshold combination and RMSE and also PSNR.
The average values of RMSE and PSNR have been calculated to determine the best non-uniform threshold combination.
As we know, the values of MSE and RMSE are directly proportional between each other’s and the values of MSE and PSNR are inversely proportional between each other’s. From the quantitative analysis, the quality of images being determined by the lowest values of MSE and RMSE and highest value of PSNR.
The average MSE and PSNR values with the respective threshold combination are as followed:
Table 14: Comparison of Threshold and Average RMSE, PSNR
No. Threshold Peppers.tiff Baboon.tiff Airplane.tiff Lena.png R G B RMSE PSNR RMSE PSNR RMSE PSNR RMSE PSNR 1 0.3 0.5 0.7 10.15 28.13 9.76 28.45 9.05 29.05 9.14 28.95 2 0.3 0.7 0.5 10.33 28.01 9.40 28.76 9.91 28.33 9.76 28.43 3 0.5 0.3 0.7 10.03 28.17 9.53 28.64 9.09 29.00 8.67 29.40 4 0.5 0.7 0.3 10.37 27.94 9.29 28.83 9.32 28.82 9.98 28.24 5 0.7 0.3 0.5 9.98 28.07 9.36 28.77 8.61 29.84 8.67 29.40 6 0.7 0.5 0.3 10.03 28.21 9.48 28.66 9.15 28.97 9.85 28.34 7 0.8 0.3 0.3 9.51 28.73 8.43 29.71 8.50 29.60 8.51 29.57 8 0.3 0.8 0.3 9.54 28.77 8.11 30.00 8.56 29.56 8.67 29.42 9 0.3 0.3 0.8 9.01 29.17 8.50 29.65 7.68 30.43 8.12 33.05 10 0.8 0.8 0.3 11.13 27.37 10.44 27.90 9.83 28.40 10.26 28.01 11 0.3 0.8 0.8 11.11 27.43 10.60 27.81 9.95 28.29 9.76 28.43 12 0.8 0.3 0.8 10.64 27.70 9.66 28.52 9.14 28.95 8.67 29.40
The graph of threshold combination versus RMSE & PSNR is plotted as in the next page. From the plotted graph, we can observe the best combination of non-uniform threshold.
94 Peppers.tiff
Figure 113: Threshold Combination versus RMSE & PSNR for Peppers.tiff
Baboon.tiff
Figure 114: Threshold Combination versus RMSE & PSNR for Baboon.tiff
0 5 10 15 20 25 30 35
1 2 3 4 5 6 7 8 9 10 11 12
RMSE & PSNR
Threshold Combination
RMSE PSNR
0 5 10 15 20 25 30 35
1 2 3 4 5 6 7 8 9 10 11 12
RMSE & PSNR
Threshold Combination
RMSE PSNR
95 Airplane.tiff
Figure 115: Threshold Combination versus RMSE & PSNR for Airplane.tiff
Lena.png
Figure 116: Threshold Combination versus RMSE & PSNR for Lena.png
0 5 10 15 20 25 30 35
1 2 3 4 5 6 7 8 9 10 11 12
RMSE & PSNR
Threshold Combination
RMSE PSNR
0 5 10 15 20 25 30 35
1 2 3 4 5 6 7 8 9 10 11 12
RMSE & PSNR
Threshold Combination
RMSE PSNR
96
From the plotted graph in the previous pages, for the Peppers.tiff image, from Figure 113, we can see the threshold combination which achieves lowest RMSE and highest PSNR is the ninth combination, which is 0.3, 0.3, 0.8. For the Baboon.tiff image, from Figure 114, we can see the threshold combination which achieves lowest RMSE and PSNR is the eighth combination, which is 0.3, 0.8, 0.3. For the Airplane.tiff image, from Figure 115, we can see the threshold combination which achieves lowest RMSE and PSNR is the ninth combination, which is 0.3, 0.3, 0.8. For the Lena.png image, from Figure 116, we can see the threshold combination which achieves lowest RMSE and PSNR is the ninth combination, which is 0.3, 0.3, 0.8.
For the RGB Quadtree Decomposition and Parametric Line Fitting method for image compression, from the analysis and output images of variation threshold in uniform and non-uniform patterns, we can see the quality of image Baboon.tiff is better than others even all the Red, Green and Blue channels are at high threshold. The Baboon.tiff image looks clear and less blur. The reason is we can see the pure colours of the image Baboon.tiff itself which contains all of the RGB colour components.
97