sujith4u87
Newbie level 3
While computing dct of 512 * 512 image,on the 8th block [the row from 0 to 7, and col from 56 to 63], i come across a problem
R = 227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
225 220 220 209 200 197 185 176
224 218 216 208 203 198 182 175
225 221 214 209 202 196 185 182
G = 118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
120 118 112 96 89 85 76 79
120 118 107 98 87 94 73 74
120 122 104 101 91 88 82 77
B = 98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
104 111 109 92 93 93 93 93
94 107 99 99 88 99 86 97
105 115 96 97 85 96 92 88
Then luminance value will be
y = 0.2990R + 0.587G +0.114B
y = 20.31 20.48 26.50 12.68 1 .96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
21.157 19.69 15.54 1.33 -5.35 -8.5 -17.4 -18.40
20.13 18.64 10.67 3.60 -6.20 -2.33 -20.92 -21.172
21 .63 22.80 7.99 4.83 -4.89 --6.79 -14.46 -18.35
After dct i got the matrix, 2dDct compute by the formula dct = TYT'(where T is the dct matrix)
val = 28.26 122.34 -14.40 -7.96 -12.47 5.32 2.63 5.32
13.42 4.20 -12.23 -10.05 -2.47 7.86 -1.50 10.74
-4.84 -2.36 4.80 5.19 1.36 -3.08 -1.16 -5.80
-2.88 0.58 1.43 -0.34 -0.35 -1.3 3.5 0.76
5.43 0.27 -2.63 -2.15 -0.007 2.71 -4.14 2.08
-2.93 0.45 -0.47 2.03 -0.23 -1.28 3.00 -2.34
-0.683 -0.27 3.82 -0.70 0.54 -0.75 -1.33 1.44
.178 .365 -3.65 -0.096 -0.47 1.23 0.26 -0.23
Here i had one of the ac coefficient is higher than the dc value,Whether it is wrong? How it would be happened ? All other blocks are seems to be good( Dc had higher value).
R = 227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
227 221 219 213 203 202 187 174
225 220 220 209 200 197 185 176
224 218 216 208 203 198 182 175
225 221 214 209 202 196 185 182
G = 118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
118 120 127 110 98 82 86 74
120 118 112 96 89 85 76 79
120 118 107 98 87 94 73 74
120 122 104 101 91 88 82 77
B = 98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
98 105 127 109 103 91 98 92
104 111 109 92 93 93 93 93
94 107 99 99 88 99 86 97
105 115 96 97 85 96 92 88
Then luminance value will be
y = 0.2990R + 0.587G +0.114B
y = 20.31 20.48 26.50 12.68 1 .96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
20.31 20.48 26.50 12.68 1.96 -9.09 -10.43 -22.04
21.157 19.69 15.54 1.33 -5.35 -8.5 -17.4 -18.40
20.13 18.64 10.67 3.60 -6.20 -2.33 -20.92 -21.172
21 .63 22.80 7.99 4.83 -4.89 --6.79 -14.46 -18.35
After dct i got the matrix, 2dDct compute by the formula dct = TYT'(where T is the dct matrix)
val = 28.26 122.34 -14.40 -7.96 -12.47 5.32 2.63 5.32
13.42 4.20 -12.23 -10.05 -2.47 7.86 -1.50 10.74
-4.84 -2.36 4.80 5.19 1.36 -3.08 -1.16 -5.80
-2.88 0.58 1.43 -0.34 -0.35 -1.3 3.5 0.76
5.43 0.27 -2.63 -2.15 -0.007 2.71 -4.14 2.08
-2.93 0.45 -0.47 2.03 -0.23 -1.28 3.00 -2.34
-0.683 -0.27 3.82 -0.70 0.54 -0.75 -1.33 1.44
.178 .365 -3.65 -0.096 -0.47 1.23 0.26 -0.23
Here i had one of the ac coefficient is higher than the dc value,Whether it is wrong? How it would be happened ? All other blocks are seems to be good( Dc had higher value).