An Efficient Vector Quantization Method for Image Compression with Codebook generation using Modified K-Means

Document Sample
An Efficient Vector Quantization Method for Image Compression with Codebook generation using Modified K-Means Powered By Docstoc
					                                                           (IJCSIS) International Journal of Computer Science and Information Security,
                                                           Vol. 8, No. 8, November 2010




   An Efficient Vector Quantization Method for
Image Compression with Codebook generation using
                Modified K-Means
 S. Sathappan, Associate Professor of Computer Science, Erode Arts and Science College, Erode-638 009.
                         Tamil Nadu. India. E-Mail : devisathappan@yahoo.co.in

Abstract— With the growth of internet and multimedia,                        the codebook and produces the quantized image, called as
compression techniques have become the thrust area in the fields of          reconstructed image. In order to attain low bit rate, many VQ
computers. Image compression is a technique of efficiently coding            schemes, have been used in the past literature such as side-
digital image to reduce the number of bits required in representing          match VQ (SMVQ) [6], classified SMVQ (CSMVQ) [7] and
image. Many image compression techniques presently exist for the
                                                                             Gradient based SMVQ (GSMVQ) [8].
compression of different types of images. In this paper Vector
Quantization based compression scheme is introduced. In this
                                                                                                                   Codebook
scheme a low bit rate still image compression is performed by
compressing the indices of Vector Quantization and residual                                                       C={c1,c2..cn}
codebook is generated. The indices of VQ are compressed by
exploiting correlation among image blocks, which reduces the bit per
index. A residual codebook similar to VQ codebook is generated that
                                                                                                  LBG / Modified
represents the distortion produced in VQ. Using this residual                                       K-Means
codebook the distortion in the reconstructed image is removed,                                                        VQ                        Indices
thereby increasing the image quality. The proposed technique                  Image Blocks
combines these two methods and by replacing the Modified k-means                                                    Encoder
algorithm for LBG in the codebook generation. Experimental results
on standard image Lena show that the proposed scheme can give a
reconstructed image with a higher PSNR value than all the existing                                          (a)
image compression techniques.
                                                                                                      Codebook
Keywords—Image compression, Vector Quantization, Residual
Codebook, Modified K-Means                                                                          C={c0,c2..cN-1}

                        I.    INTRODUCTION                                              LBG / Modified
                                                                                          K-Means

I MAGE compression is a method of efficiently coding
  digital image, to reduce the number of bits required in
representing image. Its purpose is to decrease the storage
                                                                              Indices
                                                                                                          VQ
                                                                                                       Decoder
                                                                                                                               Reconstructed Image

space and transmission cost while maintaining good quality.
VECTOR Quantization [1] has been found to be an efficient                                                   (b)
technique for image compression in the past decade. VQ
compression system mainly contains two components: VQ                                    Fig. 1 (a) VQ Encoder (b) VQ Decoder
encoder and decoder as shown in Fig.1.
   In VQ technique [2] [3], the input image is partitioned into                 Even though, SMVQ, CSMVQ, GSMVQ and JSPVQ are
a set of non-overlapping image blocks                                        the low bit rate schemes, they require high encoding time than
                                                                             that of VQ method. In this paper, an efficient low bit rate
of size 4x4 pixels each and a clustering algorithm, for example
                                                                             image compression scheme is proposed based on VQ that
Linde–Buzo–Gray (LGB) algorithm [5] and Modified K-
                                                                             makes use of compression of indices of VQ and residual
Means [2]. The Modified K-Means algorithm is used in the
                                                                             codebook with modified k-means clustering instead of LGB.
proposed      technique,     to     generate     a    codebook
                                                                             This scheme attains low bit rate and better image quality than
                       for the given set of image blocks. The
                                                                             previous VQ methods.
codebook C comprises a set of representative image blocks
called codewords. The VQ encoder discovers a closest match                      The rest of the paper is presented as follows: in section II,
codeword in the codebook for each of the image block and the                 the literature survey is presented. In section III the proposed
index of the codeword is transmitted to VQ decoder. The                      compression scheme is described. Performance of the
decoder phase has the following functionalities. VQ decoder                  proposed system is evaluated in section IV and section V
replaces the index values with the respective codewords from                 concludes the paper.

                                                                       206                               http://sites.google.com/site/ijcsis/
                                                                                                         ISSN 1947-5500
                                                       (IJCSIS) International Journal of Computer Science and Information Security,
                                                       Vol. 8, No. 8, November 2010



                  II.    LITERATURE SURVEY                              et al. applied IVQ to image restoration [13], where the encoder
                                                                        does not need a codebook except for some parameters. The
   Somasundaram et al, [1] presented a novel vector                     codebook at decoder is learned on image pairs consisting of an
quantization approach and also explained various VQ                     original image and its diffraction-limited counterpart. Several
schemes, such as side-match VQ (SMVQ), classified SMVQ                  follow-up work is reported in [14][15].
(CSMVQ) and Gradient based SMVQ (GSMVQ). In which
SMVQ uses the high correlation existing between neighboring                  The goal of quantization is to encode the data from a
blocks to achieve low bit rate and master codebook C is used            source, with some loss, so that the best reproduction is
to encode image blocks in the first column and first row in             obtained. Vector quantization (VQ) achieves more
advance. The other image blocks are encoded, utilizing the              compression then scalar quantization [14], making it useful for
correlation with the neighboring encoded image blocks. Let x            band-limited channels. The algorithm for the design of optimal
be the input image block for the compression system, and u              VQ is commonly referred to as the Linde-Buzo-Gray (LBG)
and l be the upper and left neighboring codewords                       algorithm, and it is based on minimization of the squared-error
respectively. Let the size of the given image block size be k =         distortion measure. The LBG algorithm starts with an initial
m× n. The side-match distortion of a codeword Y can be                  codebook and iteratively partitions the training sequence into
defined as:                                                             the Voronoi regions to obtain a new codebook that produces a
                                                              (1)       lower distortion. Once the final codebook is got, it can be used
                                                                        on new data outside the training sequence with the optimum
                                                                        nearest neighbor rule. If the training sequence is sufficiently
                                                                        long, it yields good performance for future data produced by
   According to their side-match distortions of all codewords
                                                                        the source.
SMVQ sorts the codewords and then selects NS codewords
with smallest side-match distortions from the master book C
                                                                            In the paper by M.Antonini, et al. [18], images have been
of size N to form the state codebook SC, where NS < N. A
                                                                        coded using two-level wavelet decomposition with VQ of the
best-match codeword Yi is selected to encode an image block
                                                                        resulting coefficients. A multiresolution codebook has been
x from NS codewords and the corresponding index is coded in
                                                                        designed with noise-shaping bit allocation among the various
log2NS bits. Thus, the SMVQ reduces the bit rate of VQ. Since
                                                                        subbands. The test image has been coded at a rate of 0.78bpp,
mean square error caused by state codebook is higher than that
                                                                        achieving a PSNR of 32.1dB. In the paper by Gersho and
of master codebook, SMVQ degrades the image quality and
                                                                        Ramamurthy [19], images have been compressed using
also it requires long encoding time. Classified side-match
                                                                        unstructured VQ, achieving a bitrate of 0.5 – 1.5bpp. Ho and
vector quantization [7] (CSMVQ) is an efficient low bit rate
                                                                        Gersho [19] have used multistage VQ for progressive image
image compression technique which produces relatively high
                                                                        coding, with a PSNR of 30.93dB at 0.36bpp using 4 stages.
quality image. It is a variable rate SMVQ and makes use of
                                                                        R.L.Claypoole et al. [21] have coded images using nonlinear
variable sized state codebooks to encode the current image
                                                                        wavelet transform via lifting and obtained 30.5dB at 0.6bpp.
block. The size of the state codebook is decided based on the
                                                                        An adaptive lifting scheme with perfect reconstruction has
variances of left codewords and upper codewords that predict
                                                                        been used in [21].
the block activity of the input blocks. Also, CSMVQ uses two
master codebooks, one for low detail blocks and another for
high detail blocks. Another variant, gradient-based SMVQ [8]
                                                                                            III.    METHODOLOGY
(GSMVQ) has been proposed, in which gradient values are
used instead of variance values to predict the input vector.
                                                                          The compression scheme consists of two components,
Another low bit rate VQ, called Jigsaw-puzzle vector
                                                                        compression of indices and generation of residual codebook.
quantization (JPVQ) [9] was proposed,in which an input block
                                                                        These two are explained in this section.
can be coded by the super codebook, the dynamic codebook or
the jigsaw-puzzle block. The jigsawpuzzle block is
                                                                        3.1. Compression of Indices
constructed dynamically using four-step side match prediction
                                                                             The Index compression step has the following procedure.
technique.
                                                                        When the image blocks are vector quantized, there likely to
                                                                        exist high correlation among the neighboring blocks and hence
   Interpolative vector quantization, first proposed explicitly
                                                                        among the corresponding codeword indices. Therefore, if
by Gersho in [12], introduces dimension reduction to
                                                                        indices are coded by comparing with the previous indices,
traditional VQ. The codebook in the encoder is learned on
                                                                        further reduction in the bit rate can be achieved. In Search
downsampled vectors and the codebook in the decoder on
                                                                        Order Coding (SOC) [11], a simple searching scheme is
high-dimension vectors. Except for the difference on
                                                                        followed to find a match for the current index from the
dimension, the two codebooks have the same number of
                                                                        previous indices. The search order SO is defined as the order
representative vectors and structure. VQ encoder maps down
                                                                        in which the current index is compared with the previous
the sampled inputs to a set of scalar indices and VQ decoder
                                                                        indices.
reproduces high-dimension inputs by received indices. David


                                                                  207                               http://sites.google.com/site/ijcsis/
                                                                                                    ISSN 1947-5500
                                                       (IJCSIS) International Journal of Computer Science and Information Security,
                                                       Vol. 8, No. 8, November 2010




                 8      6     9     12                                   1 Get the first index generated by the VQ encoder and transmit
                                                   Current
                                                   index                 as such.
          7      3      2     4     10
                                                                         2. Get the next index generated by VQ Encoder. Compare this
          5      1                                                       index with the previous indices according SO
                                                                         3. if SO = 1, code it as “00” and go to the step 2
                                                                                   else
                                                                                   if SO = 2, code it as “01” and go to the step 2
                                                                                   else go to the next step.
                                                                         4 if index value ≤ (ind_val (SO = 1) + J) and
                                                                                   index value ≥ ─ (ind_val (SO = 1)+J)
                     Fig. 2 Searching Order                                        { if ind_val (SO =1) = ind_val (SO=2)
                                                                                   code it as “10” followed by log (2 * ) 2 J bits
   The SO used in [11] is given in Fig.2. The label “1”                            else
indicates the highest searching priority, “2” denotes the second                   code it as “100” followed by log (2 * ) 2 J
highest priority and so on. In order to limit comparisons of the                   bits. }
current index with previous indices, the searching range (SR)                      go to step 2.
is fixed. The SR is defined as the number of previous indices                      else
to be compared with current index. In this paper Search Order                      if index value ≤ (ind_val (SO = 2) + J) and
[11], SR is taken as 10, which gives the lower bit rate than                       index value ≥ ─ (ind_val (SO = 2)+J)
other SR.                                                                          code it as “101” followed by log (2 * ) 2 J bits
   In this method, the index of the codeword of a block is                         and go to step 2.
encoded exploiting the degree of the similarity of the block                       else
with previously encoded upper or left blocks. When the degree                      code it as “11” followed by its original index and
of similarity of the current block with one of the two                             goto step 2.
previously encoded blocks is high, the index of the codeword
of the block is encoded using the index of the neighboring               Decoding of the compressed indices is done by reversing the
codeword. I.e. the codeword index of the current block and               above coding steps.
that of the neighboring blocks are same. If the degree of
similarity of the block with the neighboring blocks is not high,         3.2. Construction of Residual Codebook (RC)
it is assumed that the closest match codeword of the current                The    residual     codebook    can    be    represented
block may be nearer to the codewords of the neighboring                  as                            .  Residual    codebook     is
blocks. For example, if one of the two neighboring blocks
                                                                         constructed using absolute error values caused by VQ method,
codeword’s index is ‘N’, the closest match codeword of the
                                                                         in the residual codebook construction, the image blocks that
block to be encoded may lie between (N-J) th codeword and
                                                                         are less similar to their closest match codewords found in the
(N+J) th codeword in the codebook, where J is any arbitrary
                                                                         codebook are taken into account. Less similarity blocks will
number. So the index can be coded in log2( 2*J ) bits. This
                                                                         increase distortion than high similarity blocks in the
idea is based on the property existing in the codebook design
                                                                         reconstructed image. Residual codeword (RYi) for a less
using LBG algorithm with splitting technique. In the splitting
                                                                         similarity image block is constructed by comparing it with its
technique, bigger size codebook is generated by splitting each
                                                                         closest match codeword. The collection of residual codewords
codeword of the smaller codebook into two. The size of the
                                                                         RYi, RYi+1… is called residual codebook. Similarity of an
codebook is always in powers of two (2M → 2(M+1)). Hence,
                                                                         image block x with its closet match codeword Yi is determined
relatively similar two image blocks may have same closest
                                                                         based on minimum distortion rule (α) between them. If the
match codeword in Jth position at codebook of size 2M and at
                                                                         mean square error (α) of an image block is greater than a
codebook of size 2(M+1), one of the two image blocks may have
                                                                         predefined threshold value (σ), then the block is taken as less
its closest match codeword at Jth place in the codebook and
                                                                         similarity block.
other block’s codeword may be in (J+1)th place. The other
                                                                            Let                         be a k-pixels image block and
non-similar blocks are encoded using their original index
value. In this scheme, examining the resemblance of a block                                    be a k-pixels closest match codeword,
with its left and upper blocks is not required to encode the
                                                                         then the α is defined as:
index of the block. The above description is the idea behind
                                                                                                                                            (2)
our VQ indices compression scheme. In order to implement
this idea, the index to be coded is compared with previous
indices according to the SO given in Fig.2 and SR is fixed as 2
in this scheme. Let 1, 2,..,12 be the SO and ind_val (1),                    The steps used for constructing residual codebook are
ind_val (2),..ind_val(12) be the indices values of the SO =              given below.
1,2,…12. The following steps is used to encode VQ index.

                                                                   208                               http://sites.google.com/site/ijcsis/
                                                                                                     ISSN 1947-5500
                                                         (IJCSIS) International Journal of Computer Science and Information Security,
                                                         Vol. 8, No. 8, November 2010



    Step 1: An image which is to be compressed is
decomposed into a set of non-overlapped image blocks of 4x4
pixels.
    Step 2: A codebook is generated for the image blocks
using LBG algorithm.
    Step 3: Pick up the next codeword Yt from the codebook
C and find its all closest match less similarity image blocks(X)              where pv (*) is the pre assigned value of the corresponding
found out using (2) from the given set of image blocks and                 bit in the residual sign bit plane and rrv (*) is the respective
construct residual codeword RYt using the following equation.              reconstructed residual value of the bit in the residual sign bit
                                                             (3)           plane.


     where k represents the number of elements in the
codeword Yt and the image block Xi respectively and m
denotes the number of less similarity image blocks that are
closer to the codeword Yt.
   Repeat the step 3 until no more codeword exists in the
codebook. Since residual codeword RYi is constructed only                            Fig. 3 Bits encircled are used for prediction
for less similarity image blocks, some of the codewords Yi
may not have their respective residual codewords, i.e; these                  After reconstructing the residual codeword, each value of
codewords may not have less similarity image blocks. In                    the residual codeword is added to respective value of the
residual codebook construction, only absolute values of the                closest match codeword of the block Since the residual sign
residuals of the less similarity image blocks are used. The sign           bit plane for each image block has only eight bits, alternate
information for each less similarity image block is preserved              residual values in the residual codeword RYt are dropped and
and is called residual sign bit plane. In encoding phase, for              it also reduces the cost of storing residual codebook. The
each less similarity image block, pixels of the block are                  dropped residual values are predicted from the neighboring
subtracted from the corresponding pixel values of the                      residual values as given above.
codeword Yi, then sign values (positive or negative) of the
residual values of that block, called residual sign bit plane, are         3.3. Modified K-Means Algorithm to Replace LBG
preserved. To reduce the bits needed for residual sign bit                 Initial Cluster Centers Deriving from Data Partitioning
plane, only alternate bits are stored and others are dropped                  The algorithm follows a novel approach that performs data
based on the assumption that there exists correlation among                partitioning along the data axis with the highest variance. The
neighboring bits. The bits used for prediction is shown in                 approach has been used successfully for color quantization [9].
Fig.3. In the decoding process, the bits of the residual sign bit          The data partitioning tries to divide data space into small cells
plane of a block are replaced with the respective residual                 or clusters where intercluster distances are large as possible
values of the residual codeword from the residual codebook                 and intracluster distances are small as possible.
(RC) with appropriate sign. The residual values of the dropped                For instance, Suppose ten data points in 2D data space are
bits are predicted from neighboring residual values using                  given. The goal is to partition the ten data points into two
following steps.                                                           disjoint cells where sum of the total clustering errors of the
                                                                           two cells is minimal. Suppose a cutting plane perpendicular to
                                                                           X-axis will be used to partition the data. Let C1 and C2 be the
                                                                           first cell and the second cell respectively and    and    be the
                                                                           cell centroids of the first cell and the second cell, respectively.
                                                                           The total clustering error of the first cell is thus computed by:
                                                                                                                                       (4)


                                                                             and the total clustering error of the second cell is thus
                                                                           computed by:
                                                                                                                                (5)


                                                                              Where ci is the ith data in a cell. As a result, the sum of total
                                                                           clustering errors of both cells is minimal.
                                                                              The partition could be done using a cutting plane that passes
                                                                           through m. Thus

                                                                     209                                http://sites.google.com/site/ijcsis/
                                                                                                        ISSN 1947-5500
                                                          (IJCSIS) International Journal of Computer Science and Information Security,
                                                          Vol. 8, No. 8, November 2010




                                                                            Fig. 4 Graphs depict the total clustering error, lines 1 and 2 represent
                                                                            the total clustering error of the first cell and second cell, respectively,
                                                                              Line 3 represents a summation of the total clustering errors of the
                                                           (6)                                      first and the second cells

                                                                               A parabola curve shown in Fig. 4 represents a summation of
         Thus
                                                                            the total clustering error of the first cell and the second cell,
                                                                            represented by the dash line 2. Note that the lowest point of
                                                                            the parabola curve is the optimal clustering point (m). At this
                                                            (7)             point, the summation of total clustering error of the first cell
                                                                            and the second cell are minimum.
                                                                               Since time complexity of locating the optimal point m is
                                                                            O(n2), the distances between adjacent data is used along the X-
   m is called as the partitioning data point where |C1| and |C2|           axis to find the approximated point of n but with time of O(n).
are the numbers of data points in cluster C1 and C2                            Let                    be the squared Euclidean distance of
respectively. The total clustering error of the first cell can be           adjacent data points along the X-axis.
minimized by reducing the total discrepancies between all data                If i is in the first cell then                           . On the one
in first cell to m, which is computed by:
                                                           (8)              hand, if i is in the second cell then
                                                                              The task of approximating the optimal point (m) in 2D is
The same argument is also true for the second cell. The total               thus replaced by finding m in one-dimensional line.
clustering error of second cell can be minimized by reducing
the total discrepancies between all data in second cell to m,
which is computed by:

                                                            (9)             Fig. 5 Illustration of the ten data points on a one-dimensional
                                                                                                 line and the relevant Dj

                                                                               The point (m) is therefore a centroid on the one dimensional
   where d(ci,cm) is the distance between m and each data in                line (as shown in Fig. 5), which yields
each cell. Therefore the problem to minimize the sum of total                                                                       (10)
clustering errors of both cells can be transformed into the
problem to minimize the sum of total clustering error of all
data in the two cells to m.
                                                                            Let                       and a centroidDist can be computed
   The relationship between the total clustering error and the
clustering point is illustrated in Fig. 4, where the horizontal-
axis represents the partitioning point that runs from 1 to n                                                                                   (11)
where n is the total number of data points and the vertical-axis
represents the total clustering error. When m=0, the total
clustering error of second cell equals to the total clustering
error of all data points while the total clustering error of first             It is probable to choose either the X-axis or Y-axis as the
cell is zero. On the other hand, when m=n, the total clustering             principal axis for data partitioning. However, data axis with
error of the first cell equals to the total clustering error of all         the highest variance will be chosen as the principal axis for
data points, while the total clustering error of the second cell is         data partitioning. The reason is to make the inter distance
zero.                                                                       between the centers of the two cells as large as possible while
                                                                            the sum of total clustering errors of the two cells are reduced
                                                                            from that of the original cell. To partition the given data into k
                                                                            cells, it is started with a cell containing all given data and
                                                                            partition the cell into two cells. Later on the next cell is
                                                                            selected to be partitioned that yields the largest reduction of
                                                                            total clustering errors (or Delta clustering error). This can be
                                                                            described as Total clustering error of the original cell – the
                                                                            sum of Total clustering errors of the two sub cells of the
                                                                            original cell. This is done so that every time a partition on a
                                                                            cell is performed, the partition will help reduce the sum of
                                                                            total clustering errors for all cells, as much as possible.

                                                                      210                                   http://sites.google.com/site/ijcsis/
                                                                                                            ISSN 1947-5500
                                                          (IJCSIS) International Journal of Computer Science and Information Security,
                                                          Vol. 8, No. 8, November 2010



   The partitioning algorithm can be used now to partition a                     5. if (α ≤σ ), the current block is encoded as “0”.
given set of data into k cells. The centers of the cells can then                else
be used as good initial cluster centers for the K-means                          the current block is encoded as “1” followed by
algorithm. Following are the steps of the initial centroid                  interpolated residual sign bitplane which is computed as
predicting algorithm.                                                       described in section 3.2.
   1. Let cell c contain the entire data set.                                    6. Repeat the step 4 until no more blocks exist in the
   2. Sort all data in the cell c in ascending order on each                image.
attribute value and links data by a linked list for each attribute.         The decoding of the compressed images is done by reversing
   3. Compute variance of each attribute of cell c. Choose an               the above said steps and residual block to be added is
attribute axis with the highest variance as the principal axis for          reconstructed for each less similarity block as described in
partitioning.                                                               section 3.2.
   4. Compute squared Euclidean distances between adjacent
data along the data axis with the highest variance                                         IV.          EXPERIMENTAL RESULTS
                   and compute the                                            To evaluate the proposed technique experiments are carried
  5. Compute centroid distance of cell c:                                   out on standard gray scale images using a Pentium-IV
                                                                            computer running at 1.60 GHz under Windows XP. Three
                                                                            images of 512 x 512 pixels in size are used. Codebook is
                                                                            generated using Modified K-Means algorithm for all the
   Where dsumi is the summation of distances between the                    methods. Codebook is also generated with LBG [5] for
adjacent data.                                                              comparison. For this scheme, a codebook of size 64 is used.
   6. Divide cell c into two smaller cells. The partition                   Performances of the above algorithms are evaluated in terms
boundary is the plane perpendicular to the principal axis and               of bit rate (bits per pixel) and peak signal-to-noise ratio
passes through a point m whose dsumi approximately equals                   (PSNR) given by:
to centroidDist. The sorted linked lists of cell c are scanned
and divided into two for the two smaller cells accordingly
   7. Calculate Delta clustering error for c as the total
clustering error before partition minus total clustering error of
its two sub cells and insert the cell into an empty Max heap                    where MSE (mean squared error) is defined as:
with Delta clustering error as a key.
   8. Delete a max cell from Max heap and assign it as a
current cell.
   9. For each of the two sub cells of c, which is not empty,
perform step 3 - 7 on the sub cell.                                              where xi and yi denote the original and the encoded pixel
   10. Repeat steps 8 - 9. Until the number of cells (Size of               values and n is the total number of pixels in an image. Bit rate
heap) reaches K.                                                            including overhead bits (i.e bits need to store codebook) for
   11. Use centroids of cells in max heap as the initial cluster            different threshold values ranging from 50 to 2000 for Lena,
centers for K-means clustering                                              Camera man and Pepper.

3.4. The Proposed Algorithm                                                      The performance of proposed scheme is evaluated with
     The proposed scheme combines compression of VQ                         the existing techniques for different gray- scale images of size
indices and residual codebook. The steps used in this                       512x512 and is given in the table I. J is set to 4 for the
compressor are as follows                                                   proposed scheme. From table I, it can be observed note that
     1. An image which is to be compressed is decomposed                    proposed method with the modified k-means instead of LBG
into a set of non-overlapped image blocks of size 4x4 pixels.               has an improvement in coding the VQ indices.
     2. A codebook is generated for the image blocks using
Modified K-Means algorithm.                                                                           TABLE I
     3. Construct a Residual Codebook (as described in section                PERFORMANCE OF PROPOSED METHOD VQ WITH CODEBOOK
3.4) for those image blocks (less similarity blocks) whose α is                SIZE 64 USING LBG, K-MEANS AND MODIFIED K-MEANS IN
greater than σ .                                                              CODING STANDARD GRAY SCALE IMAGES OF SIZE 512 X 512
     4. Pick the next image block (current block) and find its                                               EACH
closest match codeword in the codebook. Calculate mean                                                                                    Modified
                                                                                             VQ           LBG             K-Means
square error α for the image block using equation (2) and                     Images                                                      K-Means
                                                                                           bits/index     (bits/index)   (bits/index)
index of the codeword is encoded using VQ indices                                                                                         (bits/index)
compression scheme presented in section 3.1.                                   Lena            6             3.92            3.88            3.47
                                                                            Cameraman          6             4.08            3.99            3.32
                                                                             Peppers           6             3.72            3.66            3.20


                                                                      211                                  http://sites.google.com/site/ijcsis/
                                                                                                           ISSN 1947-5500
                                                        (IJCSIS) International Journal of Computer Science and Information Security,
                                                        Vol. 8, No. 8, November 2010



                                                                                                       REFERENCES
    Table II shows the comparison of the PSNR values for the
Lena, Camera man and Pepper images of 512x512 bits when                 [1]    K.Somasundaram, and S.Domnic, "Modified Vector Quantization
                                                                               Method for Image Compression", World Academy of Science,
compressed with combine VQ method and Codebook using
                                                                               Engineering and Technology 19 2006, pp:128-134
LBG, K-Means and Modified k-Means algorithm.                            [2]    S. Deelers, and S. Auwatanamongkol, "Enhancing K-Means Algorithm
                                                                               with Initial Cluster Centers Derived from Data Partitioning along the
                                                                               Data Axis with the Highest Variance", International Journal of
                                                                               Computer Science Volume 2 Number 4, pp:247-252
                        TABLE II
                                                                        [3]    R. M. Gray, “Vector quantization,” IEEE Acoustics, speech and Signal
      COMPARISON OF PSNR VALUES FOR THREE STANDARD                             Processing Magazine, pp. 4-29, 1984.
                              IMAGES
                                           K-         Modified          [4]    M. Goldberg, P. R. Boucher and S. Shlien, “Image Compression using
                   VQ           LBG                                            adaptive vector quantization,” IEEE Transactions on Communication,
  Images                                  Means       K-Means
                bits/index      (dB)                                           Vol. 34, No. 2, pp. 180-187, 1986.
                                          (dB)          (dB)            [5]    Y. Linde, A. Buzo and R. M. Gray, “An algorithm for vector quantizer
  Lena               6          31.60     32.51        34.65                   design,” IEEE Transactions on Communication, Vol. 28, No. 1, 1980,
                                                                               pp. 84 – 95.
Cameraman            6          30.24     31.25        33.84            [6]    T.Kim, “Side match and overlap match vector quantizers for images,”
 Peppers             6          31.44     32.26        34.20                   IEEE Trans. Image. Process., vol.28 (1), pp.84-95, 1980.
                                                                        [7]    Z.M.Lu, J.S Pan and S.H Sun, “Image Coding Based on classified
                                                                               sidematch vector quantization,” IEICE Trans.Inf.&Sys., vol.E83-D(12),
                                                                               pp.2189-2192, Dec. 2000.
                                                                        [8]    Z.M.Lu, B.Yang and S.H Sun, “Image Compression Algorithms based
                                                                               on side-match vector quantizer with Gradient-Based classifiers,” IEICE
                                                                               Trans.Inf.&Sys., vol.E85-D(9), pp.1414- 1420, September. 2002.
                                                                        [9]    Chia-Hung Yeh, “Jigsaw-puzzle vector quantization for image
                                                                               compression” , Opt.Eng Vol.43, No.2, pp. 363-370, Feb-2004.
                                                                        [10]   C.H.Hsieh, and J.C Tsai, “Lossless compression of VQ index with
                                                                               search order Coding,” IEEE Trans. Image Processing, Vol.5, No. 11, pp.
                                                                               1579- 1582, Nov. 1996.
                                                                        [11]   Chun-Yang Ho, Chaur-Heh Hsieh and Chung-Woei Chao, “Modified
                                                                               Search Order Coding for Vector Quantization Indexes,” Tamkang
                                                                               Journal of Science and Engineering, Vol.2, No.3, pp. 143- 148, 1999.
                                                                        [12]   Gersho, “Optimal nonlinear interpolative vector quantization”, IEEE
                                                                               trans. on communication, vol. 38, pp 1285-1287, 1990.
                                                                        [13]   D. G. Sheppard, A. Bilgin, M. S. Nadar, B. R. Hunt, M. W. Marcellin,
                                                                               “A vector quantization for image restoration”, IEEE trans. on Image
   Fig. 6 Comparison of PSNR values for three standard images                  Processing, vol. 7, pp119-124, 1998.
                                                                        [14]   R. Nakagaki, A. K. Katsaggelos, “A VQ-based blind image restoration
   From Fig. 6 it is observed that this scheme gives PSNR
                                                                               algorithm”, IEEE trans. on Image Processing, vol. 12, pp 1044-1053,
values of 34.65db, 33.84db and 34.20 db for Lena, Camera                       2003.
man and Peppers respectively. From this it can be observed              [15]   Y. C. Liaw, W. Lo, Z. C. Lai, “Image restoration of compressed image
that the proposed approach produces better result than all the                 using classified vector quantization”, Pattern Recognition, vol. 35,
                                                                               pp329-340, 2002.
existing methods.
                                                                        [16]   M.A. Cody, The Fast Wavelet Transform, Dr. Dobb’s Journal, pp. 16-
                                                                               28, April 1992.
                         V.    CONCLUSION                               [17]   R.C. Gonzalez, R.E. Woods, Digital Image Processing, Pearson
                                                                               Education Pvt. Ltd., New Delhi, 2nd Edition.
   The rapid increase in the range and use of electronic                [18]   M. Antonini, M. Barlaud, P. Mathieu, I. Daubechies, Image Coding
imaging justifies attention for systematic design of an image                  using Wavelet Transform, IEEE Transactions on Image Processing, Vol.
compression system and for providing the image quality                         1, No. 2, pp. 205-220, April, 1992.
                                                                        [19]   A.Gersho, B.Ramamurthy, Image Coding Using Vector Quantization,
needed in different applications. There are a lot of techniques
                                                                               Proceedings of IEEE International Conference On Acoustics, Speech
available for image compression. In this paper, a new gray                     and Signal Processing, pp. 428-431, May 1982.
scale image compression scheme is proposed which gives                  [20]   Y.Ho, A.Gersho, Variable-Rate Multistage VQ for Image Coding,
better image quality and low bit rate. This scheme is based on                 Proceedings of IEEE International Conference On Acoustics, Speech
                                                                               and Signal Processing, pp.1156-1159, 1988.
VQ method and employs residual codebook to improve image
                                                                        [21]   R.L.Claypoole, Jr., G.M.Davis, W.Sweldens, R.G.Baraniuk, Nonlinear
quality and compression of VQ indices to lower the bit rate.                   Wavelet Transforms for Image Coding via Lifting, IEEE Transactions
Experimental results on standard images show that the                          on Image Processing, Vol. 12, No.12, pp. 1449 –1459, Dec. 2003.
proposed scheme gives better PSNR values and low bit rate
than previous methods with codebook generation using LBG
and kmeans. Since this scheme uses smaller codebook, it gives
faster compression than the other two schemes.




                                                                  212                                     http://sites.google.com/site/ijcsis/
                                                                                                          ISSN 1947-5500