image compression using dpcm with lms algorithm ranbeer
TRANSCRIPT
IMAGE COMPRESSION USING DPCM WITH LMS ALGORITHM
Guided by Prof. Mr. Shekhar Sharma
Prof. Dr. B. Sarkar
Presented byRanbeer Tyagi
M.E. Final Sem.(E&TC)
11
Contents Introduction What is an Image Image Representation Basic step of an Image Compression Image Compression Problem and Solution Working of DPCM with LMS algorithm DPCM Quantization Adaptive Filtering Algorithm Simulation Results Conclusion Future Work References 22
IntroductionIn general the reduction of image data is achieved by the removal of redundant data. In mathematics, compression may be defined as transforming the two-dimensional pixel array into a statistically uncorrelated data set. Usually image compression is applied prior to the storage or transmission of the image data. Later the compressed image is decompressed to get the original image or close to original image. The LMS algorithm may be used to adapt the coefficients of an adaptive prediction filter for image source encoding. Results are presented which show LMS may provide almost 2 bit per pixel reduction in transmitted bit rate compare to DPCM fixed coefficient when distortion levels are approximately the same for both methods.
33
An image is an array, or a matrix, of square pixels (picture elements) arranged in columns and rows.
Original Image
50 100 150 200 250
50
100
150
200
250
F(x, y)
What is an Image
(0, 0)
x
y
44
Image Representation An image defined in the "real world" is considered to be a function of two real
variables, for example, f(x, y) with f as the amplitude (e.g. brightness) of the image at the real coordinate position (x, y).
The 2D continuous image f(x, y) is divided into N rows and M columns. The intersection of a row and a column is called as pixel. The value assigned to the integer coordinates [m, n] with{m=0,1, 2,...,M-1} and {n=0,1,2,...,N-1}is f[m, n].In fact, in most cases f(x, y) which we might consider to be the physical signal that impinges on the face of a sensor. Typically an image file such as BMP, JPEG, TIFF, PNG etc.
Figure shows the Each pixel has a value from 0 (black) to 255 (white).
43
31
32
50
96
103
83
60
55
99
53
32
32
38
68
85
85
69
52
86
119
46
31
33
45
83
109
87
52
74
166
90
42
34
40
80
111
102
70
68
190
147
64
37
45
93
127
122
90
79
166
144
68
37
65
127
143
137
103
78
64
75
44
39
48
79
123
141
113
82
58
46
37
39
40
51
90
126
126
87
41
41
36
39
49
89
116
127
127
84
27
34
37
40
54
96
121
134
126
74
45
38
39
41
54
92
120
128
109
84
46
39
41
42
57
89
110
114
101
137
47
40
40
45
71
92
109
100
130
179
60
40
41
43
69
96
95
117
176
181
42
38
41
54
75
84
102
170
181
179
35
37
44
61
70
84
163
186
172
173
37
44
53
60
70
149
189
173
167
161
49
55
52
59
137
191
174
159
146
134
62
59
57
128
190
169
153
139
131
129
65
60
133
188
164
146
132
127
134
142
67
135
183
166
153
142
138
149
167
174
142
187
171
166
161
161
171
181
180
170
191
174
172
171
179
183
184
179
166
156
180
179
179
183
188
181
171
165
158
148
184
186
187
187
181
170
160
152
148
161
189
182
176
173
166
157
148
145
160
153
170
165
164
159
152
146
153
171
138
85
159
158
157
153
147
159
168
124
76
85
55
Basic step of an Image Compression
1. Specifying the rate (bits available) and distortion (tolerable error) parameters for the target image.
2. Dividing the image data into various classes, based on their importance.
3. Dividing the available bit budget among these classes, such that the distortion is a minimum.
4. Quantize each class separately using the bit allocation information derived in step 3.
5. Encode each class separately.
66
Image Compression Problem and Solution
Image compression with the help of DPCM for 3 bit .In this method less reduction and more distortion . It is problem of Image compression.
Solution is to develop an algorithm for reducing the number of bit and distortion.
LMS may provide almost 2 bit per pixel reduction in transmitted bit rate compare to DPCM when distortion levels are approximately the same for both method.
77
Working of DPCM with LMS algorithm
( )e n
∑ Q
LMSPredictor ∑
Predict and compare loop
Predict and correct loop
Figure : Block Diagram of image compression using DPCM with LMS Algorithm 88
e(n)
y(n)
+
+
+
-
DPCM Quantization
The estimation residual
The quantized to yield
Where q(n) is the quantization error , quantized signal.And
In DPCM we transmit not the present sample x(n), but e(n) is the difference between x(n) and its predicted value y(n).
e(n)
99
Here b is number of bit is an image signal.
The prediction output y(n) is fed back to its input so that the predictor input is
Adaptive Filtering Algorithm
In an image processing a model of the N taps predictor may vary continuously hence the model needs to be updated continuously. This is done by means of adaptive filtering algorithms. The adaptive algorithm adjusts the weight coefficients in the filter to minimize the estimation error .
Common adaptive algorithms include the Least Mean Square (LMS) Algorithm.
1010
LMS Algorithm
The LMS algorithm minimizes the expected value of the squared error and Distortion.
µ is known as the step size parameter and is a small positive constant.
For stability
T
T
0 < µ <
1111
Flow Chart of the DPCM System
Quantization
1212
Initialization of the fixed two-tap-weight
Get the value of
Filter according to
Compute the error
Compute the quantize signal
+
Flow Chart of DPCM with LMS AlgorithmGet the value of
Quantization
1313
Get the value of
Filter according to
Compute the error
Compute the quantize signal
Initialization of N - tap - weight
Updating the coefficient
+
Necessity for Better Performance of Image Compression
The selection of step size should be done carefully to achieve More compression and less steady state error.
The number of Taps in the filter should be large enough to cover the image path.
1414
Simulation Setup Mat lab 7.5 Parameter use in Simulation
Average square distortion
Prediction mean square error
1515
Simulation ParametersParameter valueImage Matrix size 256×256Original Image size 96.5 kB (98,915 bytes)DPCM 1bit/pixel reconstructed Image size 83.0 kB (85,075 bytes)DPCM 3bit/pixel reconstructed Image size 88.1 kB (90,243 bytes)DPCM fixed Tap’s 2 DPCD weight coefficient value W=[0.495, .456]No of Bit’s 1, 2, 3 bit’sQuantization level 2, 4, 8 level
TABLE-1parametervalue/ Configuration of DPCM
Parameter ValueImage Matrix size 256×256Original Image size 96.5 kB (98,915 bytes)LMS 1bit/pixel reconstructed Image size 73.2 kB (74,960 bytes)LMS 3bit/pixel reconstructed Image size 85.5 kB (87,618 bytes)No of Filter Tap’s 420LMS adaptive weight coefficient W=[ones(1,tap’s)]No of Bit’s 1, 2, 3 bit’sQuantization level 2, 4, 8 levelLMS Parameter µ=.0005
TABLE-2 parameter value /Configuration of using DPCM with LMS Algorithm
1616
0
100
200
300
400
500
600
700
800
Original Image histogram
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
oimg
1717
0
200
400
600
800
1000
1200
1400
histogram using DPCM
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1 bit/pixel
1818
0
100
200
300
400
500
600
700
800
histogram using DPCM
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
3 bit/pixel
1919
0
200
400
600
800
1000
1200
1400
1600
histogram using DPCM with LMS
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1bit/pixel
2020
0
100
200
300
400
500
600
700
800histogram using DPCM with LMS
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
3bit/pixel
2121
1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3-23.4
-23.2
-23
-22.8
-22.6
-22.4
-22.2
-22
-21.8
-21.6
-21.4Average square distortion versus transmitted bit rate
Ave
rage
Squ
are
Dis
torti
on[d
B]
bit/pixel
DPCMLMS
2222
Compressed image
(a) 3 bit/pixel LMS (DL= -22.4dB)50 100 150 200 250
50
100
150
200
250
Compressed image
(b) 3 bit/pixel DPCM (DL=- 22.25dB)
50 100 150 200 250
50
100
150
200
250
Compressed image
(c) 1 bit/pixel LMS (DL= -23.3dB)50 100 150 200 250
50
100
150
200
250
Compressed image
(d) 1 bit/pixel DPCM (DL= -21.75dB)50 100 150 200 250
50
100
150
200
250
Figure: Visual results for processing Lena image with LMS and DPCM 2323
Original Image
50 100 150 200 250
50
100
150
200
250
0 50 100 150 200 250 300-50
-45
-40
-35
-30
-25Comparision of PMSE
PM
SE
[dB
]
sample number
1bit/pixelLMS1bit/pixelDPCM
2424
0 50 100 150 200 250 300-75
-70
-65
-60
-55
-50
-45
-40
-35
-30
-25Comparision of PMSE
PM
SE
[dB
]
sample number
3bit/pixelLMS3bit/pixelDPCM
2525
Conclusion
A comparison on using DPCM and using DPCM with LMS algorithm with respect to image compression has been carried out based on their coefficient and the number of bits. The results show that the LMS algorithm has the least computational complexity.
Results are presented which show LMS may provide almost 2 bits/pixel reduction in transmitted bit rate compared to DPCM when distortion levels are approximately the same for both methods.
2626
Future Work
The test of the algorithm was performed totally ‘off-line’. The testing image was saved before as input to the algorithm and the output was looked over after simulation. Therefore, the real-time application for testing purpose could be the most interesting future work.
Besides that, the image compression can be done with the help of other adaptive filtering algorithm such as NLMS and RLS. This work carried out in future.
2727
Reference S.Haykin and T.Kailath “Adaptive Filter Theory ” Fourth Edition.
Prentice Hall, Pearson Education 2002. . S. ANNADURAI and R. SHANMUGALAKSHMI “Fundamentals of
digital image processing” Published by Dorling Kindersley (India) 2007.
A. Habbi, “Comparison of Nth-order DPCM encoder with linear transformation and block quantization techniques,” IEEE Trans. Commun., vol. COM-19, pp. 948-956, Dec. 1971.
S. T. Alexander and S. A. Rajala, “Analysis and simulation of an adaptive image coding system using the LMS algorithm,” in Proc. 1982 IEEE Int. Conf. Acoust., Speech Signal Processing, Paris, France, May 1982.
KMM et al., Design and Fabrication of Color Scanner, Indian Journal of Technology, Vol 15, Apr 1997. 28
2828
Fundamentals Of Digital Image Processing - Anil K. Jain, Prentice-Hall, 1989.
Digital Image Processing - R.C. Gonzalez Woods, Addison Wesley, 1992
B. P. Lathi and Zhi ding “Modern Digital and Analog Communication Systems” International Fourth Edition. New York Oxford University Press-2010, pp.292.
J. R. Zeidler et al., “Adaptive enhancement of mulyiple sinusoids in uncorrelated noise,” IEEE Trans. Acoust., Speech, Signal Processing, vol. ASSP-26, pp. 240-254, June 1978.
J. E. Modestino, and D. G. Daut, “Source-channel coding of images,” IEEE Trans. Commun., vol. COM-27, pp. 1644-1659, Nov. 1979.
W. K. Pratt, Digital Image Processing. New York: Wiley, 1978. M. D. Paez, and T. H. Glission, “Minimum mean square error
quantization in speech PCM and DPCM system,” IEEE Trans. Commun. Vol. COM-20, pp. 225-230, Apr. 1972.
2929
Thank You
3030