342 IEEE SIGNAL PROCESSING LETTERS, VOL. 7, NO. 12, DECEMBER 2000
A Simple Improved Full Search for Vector
Quantization Based on Winograd’s Identity
Kuo-Liang Chung, Wen-Ming Yan, and Jung-Gen Wu
Abstract—Vector quantization (VQ) technique is a well known
method in image compression. Employing Winograd’s identity, this letter presents a simple improved method in order to cut the computation time in the full search method for VQ nearly 50%. Some experiments are carried out to confirm the theoretical analysis.
Index Terms—Full search, image compression, vector
quantiza-tion, Winograd’s identity.
I. INTRODUCTION
V
ECTOR quantization (VQ) [2] has a long history in lossy image compression. In VQ, the sender encodes an image using an encoder, and the receiver decodes the compressed image using a decoder. For both the sender and receiver, they have the same codebook, which can be constructed using many algorithms, for example, the Linde, Buzo, and Gray (LBG) algorithm [4]. The image is first partitioned into many blocks. Suppose each block is a 4 4 subimage viewed as a sixteen-dimensional (16-D) vector, then a 512 512 image can be decomposed into 128 128 blocks. Given a block, i.e., input vector, it is an important research topic to design a search algorithm for finding the closest codeword in the codebook.Let the input vector be -dimensional and be denoted by . Let the size of the codebook be , i.e., there are codewords, , each codeword being -dimensional. The th codeword for
is denoted by . Given an input vector ,
finding the closest codeword in the codebook is equal to finding such that the squared Euclidean distance is minimal, i.e., . In the full search method (FS for short), we examine all the codewords in the codebook. Commonly, this distance is also called the dis-tortion between the input block and the resulting reproduction
Manuscript received July 17, 2000. This work was supported in part by Grants NSC89-2213-E011-061, NSC87-2119-M002-006, and NSC89-2614-H-003-001-F20, National Science Council, Taiwan, R.O.C. The associate editor coordinating the review of this manuscript and approving it for publication was Prof. R. L. de Queiroz.
K.-L. Chung is with the Department of Information Management, Institute of Computer Science and Information Engineering, National Taiwan Uni-versity of Science and Technology, Taipei, Taiwan 10672, R.O.C. (e-mail: [email protected]).
W.-M. Yan is with the Department of Computer Science and Information Engineering, National Taiwan University, Taipei, Taiwan, R.O.C. (e-mail: [email protected]).
J.-G. Wu is with the Department of Information and Computer Education, National Taiwan Normal University, Taipei, Taiwan 10764, R.O.C. (e-mail: [email protected]).
Publisher Item Identifier S 1070-9908(00)10181-6.
of the block and is used to measure the quality of the compres-sion. Although VQ is an efficient method for low bit rate image compression, it is time consuming for high-dimensional vectors in the search phase. Many researchers [1], [2], [5], [6], [3] have developed different kinds of efficient search algorithms. How-ever, without any preprocessing overhead, FS has advantages such as simplicity and global optimal solution.
Employing Winograd’s identity [7], this letter presents a simple improved FS (IFS for short) in order to cut the com-putation time in FS for VQ nearly 50%. Some experiments are carried out to confirm the theoretical analysis. In fact, plugging other data structures such as a -dimensional tree [5] and the other coordinate formulation such as spherical distance coordinate formulation [6] into the proposed IFS can improve the search time more, but the detailed discussion is beyond the scope of this paper.
II. THEPROPOSEDIFS
Let and be two given subsets of , where and can be viewed as the set of input vectors and the codebook,
respec-tively. In FS, for each input vector ,
we want to find a such that
Given a codeword
the squared Euclidean distance between the input vector and the codeword is written as
(1)
Employing Winograd’s identity, the second summation term at the right side of (1) can be written as
1070–9908/00$10.00 © 2000 IEEE
CHUNG et al.: SIMPLE IMPROVED FULL SEARCH FOR VECTOR QUANTIZATION 343
Hence, the squared Euclidean distance in (1) becomes
For any and
, we define
and
and we then have
If satisfies
then we have
(2)
TABLE I
ENCODINGTIME FOR THE2562 16 CODEBOOK
From (2), since will not affect the search re-sult, the concerning computation will be dominated by , which constitutes the main body of the proposed IFS. First, the values of all the ’s can be calculated in the preprocessing step easily. Once all the values have been calculated, they can be used repeatedly. The formal algorithm for implementing the proposed IFS is listed as follows. for to end for for to min for to if min then min end if end for Now satisfy encode by the index end for
Using straightforward computation for calculating (1), it takes subtractions, 1 additions, and multiplications for the input vector and one codeword . Since there are codewords to be examined, in total, subtractions,
additions, and multiplications are needed for computing (1). In the proposed IFS, we first calculate the values of ’s for all ’s. Since the size of the codebook is small and can be used repeatedly, this preprocessing time is negligible. Afterward, for each and , calculating the value
of needs only one subtraction,
additions, and multiplications. In total, subtractions, additions, and multiplications are needed for each input vector . For any modern computer, the time required for a multiplication is much larger than that for an addition (or a subtraction). Therefore, the proposed improved method cuts the computation time to nearly half.
III. EXPERIMENTALRESULTS
Four popular 512 512 images are used as the benchmark to evaluate the performance of the proposed method. The four
344 IEEE SIGNAL PROCESSING LETTERS, VOL. 7, NO. 12, DECEMBER 2000
adopted images are Lena, baboon, F16, and pepper. The ma-chine used is the IBM compatible personal computer with 350 MHz Pentium III microprocessor.
The execution time (in seconds) needed in our IFS and the FS is listed in Table I. Here, the codebook has 256 codewords, and the block size is 4 4, i.e., the size of the codebook is 256 16. The codebook is generated from the Lena image by using the LBG algorithm [4]. The experimental results show that the proposed method cuts computation time nearly 50%, as expected.
REFERENCES
[1] C. D. Bei and R. M. Gray, “An improvement of the minimum distortion encoding algorithm for vector quantization,” IEEE Trans. Commun., vol. COM-33, pp. 1132–1133, Oct. 1985.
[2] A. Gersho and R. M. Gray, Vector Quantization and Signal Compres-sion. Boston, MA: Kluwer, 1992.
[3] R. M. Gray and D. L. Neuhoff, “Quantization,” IEEE Trans. Inform. Theory, vol. 44, pp. 2325–2383, Nov. 1998.
[4] Y. Linde, A. Buzo, and R. M. Gray, “An algorithm for vector quantizer design,” IEEE Trans. Commun., vol. COM-28, pp. 84–95, Jan. 1980. [5] V. Ramasubramanian and K. K. Paliwal, “Fastk-dimensional tree
algo-rithms for nearest neighbor search with application to vector quantiza-tion encoding,” IEEE Trans. Signal Processing, vol. 40, pp. 518–531, Mar. 1992.
[6] , “An efficient approximation elimination algorithm for fast nearest-neighbor search based on a spherical distance coordinate formulation,” Pattern Recognit. Lett., vol. 13, pp. 471–480, 1992. [7] S. Winograd, “A new algorithm for inner product,” IEEE Trans.
Comput., vol. 17, pp. 693–694, July 1968.