You are on page 1of 7

rd search alg

D.Ghosh
A. P. S hiva prasad

Indexing terms: Adaptive vector quantisation, Optimal codebook design, Mean value, Sum of the absolute dgfeerences, Euclidean distance

xi = (xil, xi2, ..., xLk)is the input vector for i = 1, 2, ...,


Abstract: Adaptive vector quantisation is used in N
image sequence coding where the code-book is
updated continuously to keep track with the
,
y . 0. ,1, yj2, ..., yjk) is the codeword for j = 1, 2, ..., C
N = number of input vectors obtained from the input
changing source statistics. Hence, for real-time image
video coding applications, both the processes of
quantising the input vectors and updating the C = number of codewords in the codebook, i.e. the size
codebook are required to be fast. Since the of the codebook
nearest codeword search is involved in both these If a fixed length coder is used to encode the addresses
processes, a fast codeword search algorithm can of the codewords, the average bit rate is given as
make the coding process time efficient. The 1
authors describe a proposed codeword search BR = [log, Cl bits/pixel
algorithm with reduced search space. The k
algorithm uses the mean value and the sum of the The distance between the input vector xi and the code-
word y j is given by the second Euclidean norm as
absolute differences as the two criteria to reject
unlikely codewords, thereby saving a great deal of
computational time, while introducing no more
distortion than the conventional full search
algorithm. Simulation results obtained confirm
d(XZ,Yj)= 1% - YjII =
L
k

The image is reconstructed by replacing each input vec-


Yjn) y2 (2)

the effectiveness of the proposed algorithm in


terms of computational complexity. tor by the codeword used to represent it. This implies
that in order to achieve a good quality of reconstructed
image with minimum mean square error (MSE), &(xi,
yj), i = 1, 2, ..., N , should be as small as possible when
1 Introduction Q(xJ = yj. Hence, the coding efficiency in terms of the
quality of the reconstructed image depends upon the
I. I Overview of vector quantisation choice of codewords in the codebook. The process of
Vector quantisation (VQ) plays a critical role as an choosing codewords in the codebook is referred to as
important building block of many lossy data compres- the codebook design.
sion systems [l]. In VQ for image compression, the
input image is divided into several rectangular blocks 1.2 Optimal codebook design
which form vectors of fixed dimension. A codebook When any input vector v is reproduced as G, the distor-
containing several codevectors (codewords) is used to tion is given by d(v, V). A system will be good if it
encode the input vectors. The codeword closest to an yields a small average distortion. For a quantiser to be
input vector, i.e. one having the minimum Euclidean optimal there are two necessary conditions [l] as fol-
distance with respect to the input vector, is used to rep- lows:
resent that input vector. Compression is achieved by (1) For a given decoder in a memoryless vector quan-
transmitting the binary address of the selected code- tiser the best encoder is a nearest neighbour mapper,
word in the codebook. Thus, VQ can be defined as a i.e. if Q(xJ = y,, then
mapping from the set of k-dimensional input vectors X
min d(XZ,Yl) = d(Xi,Y,)= dmin(Xi) (3)
to the set of k-dimensional codevectors Y (codebook), YlEY
that is (2) For a given encoder the best reproduction for all
Q:X+Y the input vectors contained in a given Voronoi region
is the centroid of that region in the vector space.
where X = {xl,x2, ..., xNy>C Rk Thus, a quantiser in VQ is optimal if it minimises the
y= {Yl, Y2, "., Yc> c R" average distortion given as
0IEE, 1997
IEE Proceedings online no. 19971393
Paper received 17th September 1996
The authors are with the Department of Electrical Communication Engi- In designing a codebook we take a set of input vectors
neering, Indian Institute of Science, Bangalore, India 560 012 X as the training vectors and the design is based on
218 IEE Proc.-Vis Image Signal Pvocess., Vol. 144, No 5, October 1997
minimisation of the average distortion measure method for codeword search is inappropriate, necessi-
between the training vectors and the codebook vectors tating the development of computationally efficient fast
used to represent them. One possible approach for the codeword search algorithms.
minimisation of average distortion is the C-means algo-
rithm (CM) or the generalised Lloyd algorithm where 1.4 Fast codeword search algorithms
the criterion function D given in eqn. 4 is iteratively Various fast codeword search algorithms had been
minimised. An initial codebook consisting of C random developed [7-151. In [7],the partial distortion elimina-
codewords is taken and the training vectors are tion (PDE) algorithm is introduced where a codeword
mapped to these codewords on the basis of nearest yJ is rejected from consideration as a representative
neighbour rule. Thus the training vectors are parti- codeword for the input vector x,if the accumulated dis-
tioned into C clusters and the centroids of every cluster tortion for the first k (1 Ik < k ) entities is larger than
form the new set of codewords. If the average distor- (or equal to) d,&, i.e.
tion function is small enough, the process is stopped.
Else, the process of clustering and subsequent updating
of the codewords is performed iteratively until a mini- (5)
n=l
mum for D is obtained. A variation of the C-means
algorithm, known as the LBG algorithm [2], is widely where d,,, = d(x,,yl), yl is the current best match for x,
and k is the dimensionality of the vectors.
used in VQ. Each step of the LBG algorithm must
either reduce average distortion or leave it unchanged. An algorithm based on PDE search can be very
The algorithm is usually stopped when the relative dis- effective if the first codeword chosen is the minimum
lortion decrease falls below some threshold. distortion codeword or at least very close to it. If the
current d,,, value is very close to the minimum distor-
tion, most of the remaining codewords will result in a
1.3 Adaptive vector quantisation
As follows from the discussion above, an optimal code- premature exit and once the best match is obtained the
rest of the codewords always result in a premature exit.
book should completely reflect the statistics of the
Hence, it is necessary to find a probable nearest code-
input vectors. However, the codebook is locally opti-
word and take it as the initial best match. This may be
mised for the particular training set, chosen as the rep-
accomplished by prediction. Since spatial correlation
resentative of the input images. In video applications,
exists in an image, it may be assumed that the current
the sources are generally nonstationary. Thus, vector
input vector and the preceding vectors in the neigh-
quantisation of an image sequence using a universal
bourhood are usually similar. Codewords that repre-
(fixed) codebook requires a large codebook which is u
sent the neighbouring vectors are used for prediction;
priori able to encode the entire sequence effectively. A
the one among them which gives the minimum distor-
different approach to this that uses a small size code-
tion is taken. This is the predictive partial distance
book is uduptive vector quantisation (AVQ) where the
search (PPDS) algorithm [8].
codebook is updated continuously to keep track of the
local frame statistics [3-61. The basic idea of AVQ is to Now it follows that, if the prediction is made appro-
generate a new set of codewords with the vectors priately, the initial best match codeword will be very
obtained from the current input frame as the set of close to the minimum distortion codeword. Moreover,
training vectors, and to replace some of the codewords as the search process continues, the current best match
in the old codebook with codewords from the set of codeword yl will be closer and closer to the minimum
new codewords. Thus, part of the codebook is updated distortion codeword. When the current best match yI is
with the changing source statistics. Therefore, the steps very close to the minimum distortion codeword, most
involved in coding the current input frame using AVQ of the remaining codewords will result in a premature
are: exit. Thus, further computational efficiency can be
achieved if the partial distortion calculations for these
(1) Formation of the input vector set. unlikely codewords is avoided. This means that it is
(2) Generation of a set of new codewords, i.e. a new required to identify the unlikely codewords and reject
codebook. them beforehand. The triangle inequality elimination
(3) Updating of the old codebook. (TIE) algorithm [9] and the fast nearest neighbour
search (FNNS) algorithm [lo] reject unlikely code-
(4) Quantisation (encoding) of the input vectors. words on the basis of a triangle inequality relation. A
The main task involved in the second and fourth steps codevector yl is eliminated from consideration as a can-
(codebook generation and vector quantisation) is the didate for the closest codeword if
search for the closest codeword in the codebook for d(Y,,Yd > 2 4 " (6)
each input vector. For a codebook of size C and vector In [Ill, Li and Salari have shown that a codevector y,
dimension k , the conventional full-search algorithm [2] can be a candidate for the closest codeword only if it
for closest codeword search requires C x k multiplica- satisfies the relation
tions, C x (2k - 1) additions and C - 1 comparisons.
For low distortion coding, the codebook should be d(x,,Z ) - dmZ, I ~ ( Y ZJ ), 5 ~ ( x Z , Z ) + dmzn ( 7 )
large enough to accommodate codewords for various where z is a control vector. More than one control vec-
possible input vectors. High compression in VQ can be tor may be taken for further reduction of the range of
achieved if the dimensionality of the vector is YJ.
increased. Generally, high quality or high compression In these algorithms [9-111, the search space is gradu-
can be attained only at the expense of the other. In ally confined to the minimum distortion codeword only
order to achieve both quality and compression in VQ at the cost of memory and excessive preprocessing. In
coding, both C and k should be large, thus making the the TIE and FNNS algorithms, after each iteration
VQ computationally inefficient. Hence, for real-time involving the processes of clustering of training vectors
coding of video signals, the conventional full-search and subsequent updating of the codewords, the dis-
IEE Proc -Vis. h u g e Signul Process. Vol. 144, No. 5, October 1997 279
tances between all the pairs of codewords in the current the search is restricted within the space between two
codebook are calculated and stored in a table of size C equal-average hyperplanes, using the mean value crite-
x (C - 1). In the algorithm by Li and Salari, after each rion, making the search process faster than the full-
iteration, the distances between the codewords in the search algorithm. Thus, the codebook contains a table
current codebook and the control vector(s) are calcu- for mean values of all the codewords. In an Euclidean
lated and stored in a table of size C x Nc,, where NC,,is space Rk, the coordinates of any point on the central
the number of control vectors. line 1 have the same value. Each point on a fixed hyper-
The memory and preprocessing cost is reduced to plane orthogonal to 1 has the same mean value and
some extent in the partial search partial distortion such a hyperplane is called an equal-average hyper-
(PSPD) algorithm [12], where only the mean of each plane.
codeword in the codebook is calculated and stored The search procedure is as follows:
after each iteration involving clustering and codeword (1) The ENNS algorithm first calculates the mean of
updating. The mean value of a k-dimensional vector p input vector xi as given by eqn. 8.
is given as
k (2) Next the algorithm finds a codeword yll such that
1 lmx,,- m-,,ll\is minimum and the current minimum dis-
mp=+h (8) tortion dmin = d(x, yn) is calculated. Any other code-
n=l
word y j closer to xi must satisfy the condition d ( ~ yj),
The codeword with the minimum mean difference from < dmin and so should be located inside the hypersphere
the input vector x, is taken as the probable nearest centred at xi with radius dmin.The hypersphere can be
codevector yll and PDE is applied only to codewords bounded by two equal-average hyperplanes intersecting
with mean differences from yll less than a predeter- 1 at L,,, and Lmin, where L,,, ("ax, mmax,..., mmax)
mined threshold T. However, sometimes the closest and L,, = (inmin, ..., nzmin),nz,, and i?zmin are
codeword may not be included within this search given by eqns. 9 and 10, respectively.
range, thereby introducing more distortion compared
to the full-search algorithm. This problem was resolved (3) Now, it is only necessary to search for the nearest
by Poggi [13], where the search range includes those codeword only among the codewords located between
codewords whose mean value ranges from mmax to these two hyperplanes, i.e. codewords with mean values
mmm,where mmaxand mmlnare given as ranging from mminto m,,. Fig. 1 illustrates this for k
= 2.
"aa: = mea +d m t n / h (9)
(10)
The PDE algorithm is applied to the codewords
included in the search range to select the best code-
word.
A similar algorithm was developed by Guan and
Kamel [14] called the equal average nearest neighbour
search (ENNS) algorithm, where the search is restricted
within the space between two equal-average hyper-
planes. Further reduction in search space was proposed
by Lee and Chen [15]. In this algorithm the ENNS
algorithm is modified by rejecting those codewords,
although included in the space between the two hyper-
planes, whose variances differ from that of xi by an
amount greater than (or equal to) dmin.Here, after each
iteration involving clustering and codeword updating, XI
the variances of all the updated codewords are calcu- Fig. 1 ENNS algorithm
lated and stored, in addition to their mean values.
Hence, the search space is reduced only at the cost of
additional memory and preprocessing costs. Therefore,
the modified ENNS algorithm, although useful for
quantising an input vector, is inappropriate for real- Two vectors with the same mean value may be far
time codebook generationlupdating. apart from each other. As in Fig. 1, yo is a codeword
To overcome the problem posed by the modified that has a mean value well within the specified range
ENNS algorithm introduced by Lee and Chen we pro- but is quite unlikely to be a true representation of the
vector xi. This problem is taken care of in the search
posed a different modification to the ENNS algorithm
algorithm given by Lee and Chen in [15] using both the
in [16]. This algorithm reduces the memory and pre-
processing costs and at the same time reduces the mean and variance of a vector to sort out possible rep-
search space compared to that of Lee and Chen. resentative codewords, thereby reducing the search
Hence, our proposed algorithm may be used for real- space further. The algorithm is described below.
time codebook updating and subsequent vector quanti-
sation of the input vectors in image sequence coding 2. I Modified ENNS algorithm 1151
using AVQ. The variance of a k-dimensional vector p is given as

2 ENNS algorithm

In [14], Guan and Kamel proposed an equal-average


nearest neighbour search (ENNS) algorithm in which
280 IEE Proc.-Vis. Image Signal Process., Vol. 144, No. 5, October 1991
where L,, = (in,,, rn,,, ..., mp)is the projection point of p k-dimensional vector, then it can be written as a linear
on line 1. It can be shown [15] that for any codeword y t combination of the k orthonormal bases, i.e.
d ( x , , y t ) 2 IVA - y/tl (12) p = ( P l , P 2 , . . , P k ) = PlVl+PZV2+...+PkVk (14)
We see that once the initial guess for yn is made, any Any vector contained in the vector space Rk can be
other codeword y,, located between the two equal-aver- represented as a point in an imaginary special coordi-
age hyperplanes, closer to x, must satisfy nate system defined by the k orthonormal bases with
4x,,Y J ) < d,, =+ IKt - V,, I < dmt, the null vector 0 as the origin. The bases lie along the
(13)
coordinate axes with the nth basis along the nth axis.
Therefore, the distance calculation is necessary only for Hence, the nth component of p (i.e. p,) is the compo-
those codewords which satisfy the inequality eqn. 13. nent of p along the nth coordinate axis.
The search space for a two-dimensional case IS shown Now, following the k-dimensional geometry [ 171 we
in Fig. 2. have
Dejinition 1: A hyperplane in Rk is defined to be the set
of points
P = {plcpT = zj (15)
with c z 0 being a given k-component row vector, pT is
the transpose of vector p and z is a given scalar.
Definition 2: Given the hyperplane cpT = z in Rk (c # 0)
then c is a vector normal to the hyperplane. Any vector
Ac is also normal to the hyperplane (A z 0). The two
vectors of unit length c///cJI, -c/llc/l are the unit normals
to the hyperplane.
The following can be deduced for a hyperplane given
by eqn. 15:
(1) Two hyperplanes are parallel if they have the same
unit normal.
(2) The distance of the hyperplane from the origin is
Fig.2 Modified ENNS al,orithm /15/ given by Izl/licll.
( 3 ) If z > 0, then c points towards the hyperplane. If z
< 0, then c points away from the hyperplane. If z = 0,
2.2 Drawbacks of the algorithm the hyperplane passes through the origin. From this it
Although here the search space is reduced to a great follows that, for a given z (z z O), the two hyperplanes
extent it suffers from the following drawbacks: cpT = z and cpT = -z are parallel to each other and lie
(1) 'The codebook design process is inefficient because on the two opposite sides of the origin.
of added preprocessing involving (2k - 1) additions, k Definition 3: Given a boundary point w of a convex set
multiplications and one syuare-root operation for vari- P;then cpT = z is called a supporting hyperplane at w if
ance calculation of each codeword after each iteration, cwT = z and if all of P lies in one closed half-space pro-
hence, not useful for real-time codebook generation. duced by the hyperplane, that is, cuT 2 z for all U E P
(2) The memory requirement is increased by an amount or cuT 5 z for all U E P.
N to store N number of variances for the N codewords. Definition 4: A hypersphere in Rk with centre at a and
(3) The search space, although reduced to a great radius c > 0 is defined as the set of points
extent, still includes some unlikely codewords, e.g. yo in p = {PJIIP- all = E ) (16)
Fig. 2.
A solution to the above problems was given in [16]. Definition 5: The inside of a hypersphere with centre at
The fast equal average nearest neighbour search algo- a and radius E > 0 is the set of points
rithm may bc used for real-timc codcbook generation/ p = {YlllP - all €1 (17)
updating in AVQ. This is described in detail in this
paper. The ENNS algorithm is modified using the sum Definition 6: An E neighbourhood about the point a is
of absolute difference (SAD) criterion in addition to defined as the set of points inside the hypersphere with
the mean value criterion. This means that some extra centre at a and radius E 0.
additions are required in our algorithm, while there is Let us now consider a set
no need to compute the variances of the codewords. c = {CplCp =(CpI,Cp,Z,..-,Cpk);
Since addition is simpler than multiplication, the pro-
posed search method is computationally more efficient ICpLn/ = 1,vn = 1 , 2 , . . . , k } (18)
than that in [15]. Thus, the search algorithm can be A total of 2k distinct vectors can be obtained that sat-
used for rcal-time codebook design and cncoding with isfy lhe above set relation C. This means that the cardi-
a reduced search space in which the overall overhead nality of set C is 2", Therefore, as follows from the
computation and memory costs are minimised to a definition of normals to a hyperplane, we observe that
great extent only at the cost of some extra additions. for a given z , 2k number of hyperplanes can be con-
structed with normals to each of them given by c , (~p =
3 Proposed algorithm 1, 2, ..., 2k). The equation to the hyperplane with nor-
mal c , ~thus,
, is given by
Let us consider a set of orthonormal bases V = {v,, v2,
..., vk} for the Euclidcan vector spacc Rk. If p is any cppT = z (19)
IEE Puoc: Vis. Imuge Signul Process., Vol. 144, No. 5, October I997 28 1
If we take z such that (zl/lIc,ll = d,,, (d,,,, > 0) then the any point p in the d,, neighbourhood about the origin
hyperplane given by eqn. 19 is at a distance d,,, from must satisfy the inequality eqn. 24.
the origin. Therefore, the hyperplane will be tangential With the above results in hand, we now describe our
to the hypersphere with centre at the origin and radius proposed algorithm. For an input vector x,, a probable
d,,,, and, hence, is the only supporting hyperplane for nearby codeword yll is found and is taken to be the
the hypersphere at the point where it touches the current best match yI. A vector yJ will be nearer to x,
hypersphere. It thus follows that there can be 2k sup- than yl if y, is in the d,,, neighbourhood about x,,
porting hyperplanes that are tangential to the hyper- where dnt,,* = d(x,, yl). The first step is the same as in
sphere. Now, the ENNS algorithm where we select only those code-
words whose mean values range from m,,, (eqn. 10) to

\1Cc;,
k
VZ,,,~(eqn. 9). Following the discussion above we see
/ z /= d m i n ~ / c p=/ ~d,,n =hdmtn (20) that the hypersphere centred at x, with radius dmlncan
n=l be enclosed by 2k hyperplanes given as
Since z may be dkd,,,, or -dkdmln, for every c , ~we
, can
cp(p- x , ) = ~ f i d m z n , V p = 1 , 2 , . . . ,2'" (25)
have two hyperplanes parallel to each other and lying
on the two opposite sides of of the origin that form a and any point y j in the dmin neighbourhood about x,
pair of supporting hyperplanes. But, for any vector c, must satisfy
(1 5 p 2 2k) we can find one and only one vector cy (1 I k

y 5 2k, y z p) such that cy = -cy. Therefore,


n=l
cppT -&dmtn
Thus, in the second step we can reject those codewords
which do not satisfy the above inequality. If yJ is not
rejected, d(x,, yi) is calculated in the third step. If d(x,,
yJ) z dmm, yJ is rejected. Else yJ is taken as the current
Hence, we observe that the vectors in set C can form best match, and all the above steps are repeated. This
exactly 2" supporting hyperplanes that are tangential to guarantees the progressive confinement of the search
the hypersphere at the origin with radius d,,,. The space.
equation to the family of these hyperplanes is given as Now, the term Iy,, - x,I in inequality eqn. 26 is the
absolute value of the difference between the nth entities
c P p T = Ad,,,, Mp = 1 , 2 . .. ., 2 (22u) of the vectors yJ and x,. Therefore, Z,i.=, Iy,, - x,,I may
or be termed as the 'sum of the absolute differences'
(SAD) between yJ and x,, and we can write
k
Since cpt is either +1 or -1 (Va = 1, 2, ..., k), we can
say that a point pi that satisfies
n= I
k This means that, in the second step, codewords are
= Ad,,, selected on the basis of the sum of the absolute differ-
n=l ences (SAD) criterion. A codeword yj is selected if it
must lie on at least one of these supporting hyper- satisfies the inequality
planes. For example, if

Pzn { <2O forn=u,u,l<u,u<k


0 otherwise
where
SAD,,, = V%dmin (29)
and cB is a vector such that
-1 f o r n = u , u , l S u , u _ < k
cz, =
{
+1 otherwise
then, following the definition of set C (eqn. IS),
cp Ec
and we have
k

n=l
The above relation gives the equation for one of the
supporting hyperplanes. Hence, the vector pi is located
on one of the hyperplanes defined by eqn. 22a and b.
Therefore, a point pJ that satisfies
k V
Fig.3 Proposed search algorithm
n= 1
must be located in the space enclosed by these support-
ing hyperplanes. 3.7 The algorithm
Hence, we conclude that the hypersphere at the ori- (1) In the first step of our algorithm a probable nearby
gin with radius d,, is enclosed by 2" hyperplanes and codeword yn is guessed based on the minimum mean
difference criterion or by prediction; dWin,mmin,m,,, (2) Only the mean values of the codewords are calcu-
and SAD,,, are calculated. lated and stored. This implies savings in computation
(2) For each codeword y j we check if myj is between in the codebook preprocessing stage, as no multiplica-
mnZinand mmux.If not then yj is rejected, else we pro- tion operation is involved, and also savings in the
ceed to the next step. memory requirement.
(3) Next we check if S A D ( x , yj) < SAD,,,. If not then 3.3 Methods of further improvement
y, is rejected, thus discarding those codevectors which In order to achieve further efficiency in speed, the idea
are far away from xi, resulting in a reduced search of early termination may be incorporated in the second
space containing the hypersphere centred at xi with and third steps as discussed below:
radius dmin. For k = 2, the search space is a square
enclosing the circle centred at xi with radius d, as (1) While calculating SAD(x,, yj) in the second step if
shown in Fig. 3 . R
(4) If y j is not rejected in the third step, then d(x,,yj) is
calculated. If d(xi, y,) < dmiu, then the current closest
,xI - Yjn/ 2 hd,,, for 1 5 i$ <k
n=l
codeword to xi is taken as yj with d,niu set to d(x, yj),
and m,,,x, mminand SAD,,, are updated accordingly. i.e. the accumulated difference for the first k entities is
The procedure is repeated until we arrive at the best larger than (or equal to) dkd,,,, reject yl.
match for xi. (2) While calculating the Euclidean distance d(xI,y,) if
3.2 Merits of the algorithm k
The performance of the algorithm is the same as that
of the full-search LBG algorithm, although the search
C(x,n- Yjn)
2
2 d,,2 for 1 5 <
n=l
space is reduced to a great extent, since the search
space encloses the hypersphere that contains the best i.e. the accumulated distortion for the first k entities is
match codeword. Hence, there is considerable saving in larger than (or equal to) dmLu2,
reject yl.
search time without any added degradation to the
reconstructed picture quality. Table 1: Computational efficiency of the four search
The merits of this algorithm over that described in algorithms
[15] are:
Codebook Search Number of operations
(1) The search space is confined within the region DlST
enclosed by 2k hyperplanes tangential to the hyper- size algorithm Mult. Add. Comparisons
sphere, thus reducing the search space to a great extent. 128 LBG 128 512 896 127
From Figs. 2 and 3, we observe that, for a two-dimen- ENNS 8.2 32.8 57.4 25.6
sional case, the search space in our method is exactly
Modified ENNS 5.3 21.2 44.2 31.5
half of that in the Lee and Chen method.
Proposed 3.0 12.0 71.0 27.6
256 LBG 256 1024 1792 255
ENNS 9.6 38.4 67.2 29.8
Modified ENNS 5.7 22.8 46.1 32.9
Proposed 3.2 12.8 83.0 32.0
512 LBG 512 2048 3584 511
ENNS 10.2 40.8 71.4 32.1
Modified ENNS 6.3 25.2 44.6 33.2
Prooosed 3.3 13.2 87.4 34.4

a b Table 2: Comparison when vector quantising the ‘girl’


image
Fig. 4 Images usedfor simulation
U Girl ~

h Elephant
Codebook Search Number of operations
DlST
size algorithm Mult. Add. Comparisons
128 LBG 128 512 896 127
ENNS 7.4 29.6 51.8 23.9
Modified ENNS 4.5 18.0 38.4 28.8
Proposed 2.7 10.8 64.1 25.7
256 LBG 256 1024 1792 255
ENNS 8.6 34.4 60.2 27.8
Modified ENNS 5.0 20.0 42.5 31.6
Proposed 2.9 11.6 73.7 29.8
512 LBG 512 2048 3584 511
a b ENNS 7.6 30.4 53.2 26.7
Fig. 5 Images used for simulation Modified ENNS 4.9 19.6 42.3 32.8
U Cheetah
h Train Proposed 3.0 12.0 67.4 28.7

IEE Proc.-Vi.s. Image Signal Process., Vol. 144, No. 5, October 1997 283
4 Simulation results values of the codewords in the codebook are stored,
there is a considerable saving in the memory require-
The computational efficiency of the proposed algo- ment in our proposed algorithm.
rithm in codebook design, in comparison to LBG,
ENNS and modified ENNS (by Lee and Chen) algo-
6 References
rithms, was evaluated. The set of training vectors were
extracted from four monochrome images (‘girl’, ‘chee- 1 GRAY, R.M.: ‘Vector quantization’, IEEE ASSP Mag., 1984, 1,
tah’, ‘elephant’ and ’train’) with size 128 pixels x 128 pp. 4-29
lines and 8 bits per pixel (Figs. 4 and 5). The vector 2 LINDE, Y., BUZO, A., and GRAY, R.M.: ‘An algorithm for
vector quantizer design’, IEEE Trans., 1980, COM-28, pp. 84-95
dimension was taken as 4 (image blocks of size 2 pixels 3 GERSHO, A., and YANO, M.: ‘Adaptive vector quantisation by
x 2 lines) and the distortion threshold as 0.0001. The progressive codevector replacement’. Proceedings of the IEEE
comparison was done in terms of the average number ICASSP, 1985, Vol. 1, pp. 133-136
4 GOLDBERG, M., and SUN, H.: ‘Image sequence coding using
of distance calculations (DIST) and various operations vector quantization’, IEEE Trans., 1986, COM-34, pp. 703-710
involved in the search process per input vector, for 5 GOLDBERG, M., and SUN, H.: ‘Frame adaptive vector quanti-
codebooks of different sizes, as shown in Table 1. zation for image sequence coding’, ZEEE Trans., 1988, COM-36,
pp. 629-635
Table 2 shows the comparison when vector quantising 6 CHEN, 0.T.-C., SHEU, B.J., and ZHANG, Z.: ‘An adaptive
the ‘girl’ image using the generated codebooks. It is vector quantizer based on the gold-washing method for image
seen that the number of distance calculations in our compression’, IEEE Trans. Circuits Syst. Video Technol., 1994, 4,
pp. 143-157
case is significantly reduced at the cost of some extra 7 BEI, C.D., and GRAY, R.M.: ‘An improvement of the minimum
additions only. The coding quality remains the same distortion encoding algorithm for vector quantisation’, IEEE
for all the algorithms since they are full-search equiva- Trans., 1985, COM-33, pp. 1132-1133
8 NGWA-NDIFOR, J., and ELLIS, T.: ‘Predictive partial search
lent, as mentioned earlier. algorithm for vector quantization’, Electron. Lett., 1991, 27, pp.
1722-1 723
5 Conclusions 9 HUANG, S.H., and CHEN, S.H.: ‘Fast encoding algorithm for
VO-based image coding’. Electron. Lett.. 1990., 26. DV. 1618-1619
10 OgCHARD, &I.T,: ‘i fast nearest-neighbour search algorithm’.
The fast equal-average nearest neighbour search algo- Proceedings of the IEEE ICASSP, 1991, pp. 2297-2300
rithm for vector quantisation presented here uses the 11 LI, W., and SALARI, E.: ‘A fast vector quantization encoding
method for image compression’, ZEEE Trans. Circuits Syst. Video
Euclidean distance, the sum norm (sum of the absolute Technol., 1995, 5, pp. 119-123
differences) and the mean as the three measures for 12 HSIEH, C.H., LU, P.C., and CHANG, J.C.: ‘Fast codebook
searching for the best representation of an input vector generation algorithm for vector quantization of images’, Pattern
Recognit. Lett., 1991, 12, pp. 605-609
in a small search region in the codebook. Once an ini- 13 POGGI, G.: ‘Fast algorithm for full-search VQ encoding’, Elec-
tial guess for the probable nearest codeword is made tron. Lett., 1993, 29, pp. 1141-1142
and codewords which are closer to the input vector are 14 GUAN, L., and KAMEL, M.: ‘Equal-average hyperplane parti-
tioning method for vector quantization of image data’, Pattern
obtained in the subsequent stages, the search is reduced Recognit. Lett., 1992, 13, pp. 693-699
significantly in comparison to other existing fast code- 15 LEE, C.-H., and CHEN, L.-H.: ‘Fast closest codeword search
word search algorithms, without the introduction of algorithm for vector quantization’, IEE Proc. Vis. Image Signal
Process., 1994, 141,pp. 143-148
any extra distortion compared to the full-search algo- 16 GHOSH, D., and SHIVAPRASAD, A.P.: ‘Fast equal average
rithm. Simulation results show that the algorithm per- nearest neighbour codeword search algorithm for vector quantiza-
forms better than LBG, ENNS and the modified tion’. Proceedings of the National Conference on Communication
(NCC’961, 1996. Bombay, India, DP. 154157
ENNS algorithms in terms of speed, and preprocessing 17 HADLEY, G.: ‘Linear algebra’ (Narosa Publishing House, New
cost. Also, as pointed out earlier, since only the mean Delhi, India, 1987)

284

You might also like