Quantized Block-Based Image Compression Using DPCM and DPCM With LMS Adaptive Algorithm for 1-3 Bit’s Comparison

DOI : 10.17577/IJERTV1IS10207

Download Full-Text PDF Cite this Publication

Text Only Version

Quantized Block-Based Image Compression Using DPCM and DPCM With LMS Adaptive Algorithm for 1-3 Bit’s Comparison

Dr. Mamta Sood

HOD, Electronics Communication Dept., TITC, Bhopal

Devendra Sharma

Asst. Prof. Monika Cheema Electronics&Communication Dept.,St Francis Institute of technology(Engineering college)

Abstract

DPCM is coupled with uniform scalar quantization to provide block-based quantized compressed sensing of images. The differential pulse code modulation (DPCM) may be used to remove the unused bit in the image for image compression. In this paper, we compare the compressed image for 1, 3 bit and also compare the estimation error. LMS-filtering methods as particularly attracted our special attention due to its high performance and relatively simple hardware implementation. The LMS algorithm may be used to adapt the coefficients of an adaptive prediction filter for image source coding. Estimation error is reduced as much as 7-8 db using DPCM with LMS algorithm. Rate-distortion performance is superior to that of alternative quantized-compressed-sensing techniques.

Index terms

Adaptive filter, Compressed sensing, LMS algorithm, DPCM, Halftone circuit, Inverse halftone circuit, Quantization.

  1. Introduction

    A two-layer image compression device is disclosed with a halftone circuit, an inverse halftone circuit, and a quantization circuit. In these circuits, the

    halftone circuit converts the input gray-scale image into a binary image and rearranges the binary image output sequence to serve as a base layer of the input of the gray scale image. The inverse halftone circuit recovers a predicted image from the binary image using the LMS algorithm. In DPCM, a prediction of the next, sample value is formed from past values. This prediction can be through of as instruction for quantization to conduct its search for the next sample value in a particular interval. By using the redundancy in the signal to form a prediction, the region of uncertainty is reduced and the quantization can be performed with a reduced number of decisions (or bits) for a given quantization level or with reduced quantization levels for a given number of decisions(or bits). In a communication environment, the difference between adjacent time samples for image is small, coding techniques have involved based on transmitting sample-to-sample differences

    rather than actual sample value. Successive differences are in fact a special case of a class of non- instantaneous converters called N-tap linear predictive coders. These coders, sometimes called predictor-corrector coders, predict the next input sample value based on the previous input sample values. This structure is shown in figure 1. In this type of converter, the encoder forms the prediction error (or the residue) as the difference between the next measured sample value and the predicted sample value. The equation for prediction error, the reduction in redundancy is realized by subtracting the prediction from the next sample value. This difference is called the prediction error.

    e(n) = x(n) y(n)

    In figure 1, where Q=quantize, x(n) is the nth input sample, y(n) is the predicted value, and e(n) is the associated prediction error. This is performed in the predict-and-compare loop, the loop shown in

    50

    100

    150

    200

    250

    50 100 150 200 250

    Figure: 2 Original images

    figure 1. Its prediction by forming the sum of its prediction and the prediction error.

    eq n = quant [e(n)]

    The quantization circuit then compares the input gray-scale image with the predicted image and encodes the difference between them to obtain an enhancement layer of the input gray-scale image. Where quant (.) represents the quantization operation, eq n is the quantization version of the prediction error, and xs(n) is the corrected and quantized version of the input sample. This is performed in the predict-and-correct loop.

    +

    Q

    () () ()

    Predict and compare loop

    The communication task is that of transmitting the difference (the error signal) between the prediction and the actual data sample. For this reason, this class of coder is often called a differential pulse code modulator (DPCM). If the prediction model forms predictions that are close to the actual sample values, the residues variance (relative to the original signal).

  2. Image compression using DPCM and LMS algorithm

    A block diagram of the LMS adaptive image compression system is shown in figure 1. It is seen that the image prediction y(n) is formed in a linear manner at the output of the LMS filter.

    k=0

    y n = M1 wk (n) xs(n k)

    y n = w0xs n + w1xs n 1 + wM1xs n M + 1

    ()

    +

    LMS

    Predictor

    ()

    +

    Predict and correct loop

    y n = wT (n)xs(n)

    wk n , N adaptive predictor coefficients, xs(n) is reconstructed image data, and k is 1, 2.N integer values which select the previous image pixel on which base the current prediction. At each scanned pixel a prediction residual (error), e(n) is computed.

    e n = x n y(n)

    This quantized residual is send to the receiver. The quantization residual is determined,

    eq n = e n + q(n)

    Figure 1: Basic block diagram of DPCM with LMS algorithm image compression system.

    This residual is then quantized to form eq (n) and the quantized residual is also used to update the predictor coefficient for the next iteration by the well known least mean squares (LMS) algorithm.

    w n + 1 = w n + µeq n xs(n)

    The parameter µ is known as the step size parameter and is a small positive constant, which control

    Initialization of n – tap-weight vector w (n)

    steady-state and convergent mean-square residual characteristics of the predictor.

    The distortion between the original discrete image x

    ()

    (n) and the reconstructed value y (n) at the receiver is given by

    d(n) = y(n) x(n) = eq n e(n)

    Get value of () and ()

    (Assuming the no channel-induced errors)

    =0

    = 1 ( )

    Filter () according to

    Therefore, if the goal of the system is an accurate reconstruction of the image, then an algorithm is desired which will form an accurate y(n), so that e(n) will have smaller variance and the quantizer levels may be adjusted to give a smaller quantization error. Hence, a lower reconstruction error, or distortion, will be present at the receiver. The quantize levels themselves may be fixed or may vary as some function of the residual sequence eq n .

    If the goal of the system is to reduce the bit rate over the channel subject to some distortion criteria. Hence,

    produce shorter code words per level. In this situation +

    the LMS adaptive predictor reduces the average

    Quantization

    Compute the error

    = ()

    number of bits per image while maintaining an acceptable visual appearance at the receiver.

    Compute the error

    = + ()

    Updating coefficient

    + 1 = + µ ()

    Figure 3: Flow chart of image compression using DPCM with LMS algorithm.

  3. Simulation result

    The LMS algorithm was simulated using matlab7.5 with respected to the application of image compression comparison using DPCM with LMS algorithm. LMS algorithm is easy to implement and computationally inexpensive. This feature makes the LMS algorithm attractive for image compression.

    Simulation invoving real image input signal consists of 256 sample points. Filter length was taken to be 420 taps. The parameter of LMS algorithm µ was set

    -20.5

    -21

    Average Square Distortion[dB]

    -21.5

    -22

    -22.5

    -23

    -23.5

    -24

    Average square distortion versus transmitted bit rate

    DPCM LMS

    to be .001.

    The 256×256 original image is shown in figure 2. This image size is 96.5 kb (98,915bytes). This original image passed with the residual quantize (Q) consisting of b=1, and 3 bits (2 and 8 quantization levels, respectively) using DPCM with LMS

    1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3

    bit/pixel

    Figure 4: Average square distortion versus transmission bit rate.

    algorithm adaptive coefficient w. The characteristics of quantize follow the laplacian density model. The coefficients of the fixed DPCM predictor were chosen in accordance with the globally optimum model and fixed coefficient value taken by w=[.595

    .479]. The dynamic range of the data was eight bits from grey level 0 to 255. The simulation result shown in Plots. The average square distortion versus transmitted bit rate for Lena image, all values of average squared error in db referenced to the performance of the 1 bit/pixel fixed coefficient predictor. The bit rate is in bits/pixel and is controlled by the number of levels in quantize. The top graph is for the fixed DPCM predictor and the lower is for LMS with µ=.001 value. The LMS filter was initialized at the beginning of the picture reception. In fact, the DPCM at 3 bit/pixel has approximately the same distortion than LMS 1 bit/pixel. The lena images more compress 1bit/pixel.

    LMS compare to 3bit/pixel DPCM with approximately same distortion level. The difference of 1 bit/pixel LMS to 3 bit/pixel DPCM is 10.8kb (7,442bytes) more in 1 bit/pixel LMS.

    Lastly, the visual characteristics of LMS distortion are displaying the results for 3 bit/pixel and 1 bit/pixel transmission. At 3 bit/pixel, comparing the LMS predictor and the DPCM prediction, shows

    50

    100

    150

    200

    250

    50

    100

    150

    200

    250

    Compressed image

    50 100 150 200 250

    1 bit/pixels

    Compressed image

    50 100 150 200 250

    3 bit/pixels

    50

    100

    150

    200

    250

    50

    100

    150

    200

    250

    Compressed image

    50 100 150 200 250

    1 bit/pixel DPCM

    Compressed image

    50 100 150 200 250

    3 bit/pixels DPCM

    there is no significant visual different between both method and original lena image.

    Figure 5: Visual results for processing Lena image with LMS and

    DPCM.

    -25

    -30

    -35

    -40

    PMSE [dB]

    -45

    -50

    -55

    -60

    -65

    -70

    -75

    Comparision of PMSE

    3bit/pixelLMS 3bit/pixelDPCM

    0 50 100 150 200 250 300

    sample number

    800

    700

    600

    gray level

    500

    400

    300

    200

    100

    0

    Comparision of histogram plot

    3bit/pixelLMS 3bit/pixelDPCM

    0 50 100 150 200 250 300

    sample number

    Figure 6: Comparison of PMSE using 3 bit/pixel DPCM and LMS.

    Figure 8: Comparison of histogram plot.

    x 10

    4 Comparision of histogram plot

    -25

    Comparision of PMSE

    2

    1bit/pixelLMS 1bit/pixelDPCM

    1.8

    1.6

    1bit/pixelLMS 1bit/pixelDPCM

    -30

    PMSE [dB]

    -35

    -40

    1.4

    gray level

    1.2

    1

    0.8

    0.6

    0.4

    -45

    0.2

    0

    0 50 100 150 200 250 300

    sample number

    -50

    0 50 100 150 200 250 300

    sample number

    Figure 7: Comparison of PMSE using 1 bit/pixel DPCM and LMS.

    Figure 9: Comparison of histogram plot.

  4. Conclusion

    The LMS is a simple and robust adaptive algorithm and DPCM use the LMS for prediction. At last the distortion is reduced for 1, 3 bits and also reduces the estimation mean square error. The distortion and the estimation mean square error is very less. We compare the estimation mean square error in db. This difference is 7-9 db respectively for 1, 3 bits as shown in figure 6 and Figure 7, the reduce image shown in figure 5 respectively this work carried out in future also.

  5. References

[1]. KMM etal, Design and fabrication of color scanner, Indian journal of technology, vol. 15, Apr. 1997.

[2]. A. Habit, Comparison of Nth-order DPCM encoder with linear transformation and block quantization techniques, IEEE Trans. Commune. Vol. COM-19, pp. 948-956, Dec. 1971.

[3]. S. Hay kin and T. Kailath, Adaptive filter theory fourth edition. Prentice hall, Pearson education 2002

[4]. S. T. Alexander and S. A. Rajala, Analysis and simulation of an adaptive image coding systems are using the LMS algorithm, inProc. 1982 IEEE Int. Conf. acoustic. Speech signal processing, Paris, France, May 1982

[5]. J. G. Prokis, digital communications. New York: McGraw-Hill, 1983.

[6]. Digital image processing – Kenneth R. Castle man, Prentice-hall, 1996.

Leave a Reply