Professional Documents
Culture Documents
Institute for Signals and Information Processing, Lanzhou University, Lanzhou 730000, China
Lanzhou Jiaotong University, Lanzhou 730070, China
a r t i c l e
i n f o
Article history:
Received 12 May 2010
Accepted 27 August 2010
Keywords:
Block truncation coding
Quantization
K-means algorithm
Image content correlation
a b s t r a c t
Block truncation coding (BTC) is an efcient image compression method which nds application in diverse
elds. The basic problem can be viewed as a two-level quantization process. However, efcient ways for
optimal threshold determination have not been discovered so far. We propose a fast BTC algorithm
based on a truncated K-means algorithm, utilizing the image inter-block correlation and the fact that Kmeans algorithm converges very fast in this case. This produces near-optimum solution with signicantly
improved speed over other methods. Simulation results conrm such advantages.
2010 Elsevier GmbH. Open access under CC BY-NC-ND license.
1. Introduction
Since its introduction [1], BTC has enjoyed continued improvement and applications due to its implementation efciency (e.g.
[24]).
The push for higher compression ratio requires the use of large
coding blocks in BTC besides the subsequent coding effort (e.g.,
entropy coding). However, large coding blocks introduces visual
blocky artifacts in the nal displayed image. Dithered quantization is one means to improve the subjective visual effect [46]
where random noise is rst added before the quantization process. Recently in [7] an ordered dither array is used which achieves
similar result without explicitly adding noise. In this algorithm, a
homogeneous ordered dither array is rst generated by the method
in [8], then this array is scaled to the range of [min, max] where
min and max are the minimum and maximum values of the current image block to be coded, afterwards each pixel in the block is
coded as 1 if its value is greater than the corresponding scaled array
value or coded as 0 otherwise. Because the ordered dither array is
independent of image feature and the fact that max and min are
used to denote 1 and 0 respectively, there can be high impulsive
noise in the nal processed image.
It has long been recognized that BTC is essentially a two-level
quantization process. Currently the closed form expression for the
optimal threshold has not been found. In [9] an exhaustive search
is carried out, which slows down the coding speed signicantly.
Recently an improvement is made in [10] for faster optimal thresh-
Corresponding author. Tel.: +86 931 891 4182; fax: +86 931 891 5153.
E-mail addresses: wanyi@lzu.edu.cn, t91yangyan@sohu.com (Y. Wan).
1434-8411 2010 Elsevier GmbH. Open access under CC BY-NC-ND license.
doi:10.1016/j.aeue.2010.08.004
2. Review of BTC
In traditional BTC [1,14], an image is subdivided into blocks of
size M M and coding is performed on each block, which is essentially a two level quantization process. For each block, there are
three numbers needed, the threshold xth , and two quantized values a and b. If xth is chosen to be the block mean value, and the nal
coded block is to maintain the same rst and second moments,1
M 2 1
i=0
xik .
577
Fig. 1. Histogram of PSNRj,o PSNRj,i for the cameraman test image of size 512 512. Block size is 8 8. (a) i = 2, (b) i = 3, and (c) i = 4.
a = m1
b = m1 +
and
q
M2 q
(1)
M2 q
,
q
(2)
(3)
M 2 1
E=
(4)
m=0
1
M2 q
xj,m
(i)
xj,m < x
th
xj,m ,
(6)
(i)
where xj,m is the mth pixel value in j block, q is the number of pixels
(i)
(i)
{xj,m } in image block j (of size M M) such that xj,m xth and xth is
the threshold used at iteration i. Then the optimal threshold used
for iteration i + 1 is updated as
m2 m21
1
q
xj,m x
th
b(i) =
(5)
(i+1)
xth
a(i) + b(i)
.
2
(7)
(0)
578
Fig. 2. Visual comparison of quantization block in the cameraman test image for i = 2. (a) Quantized block. (b) Optimally quantized block. (c) Original block.
Table 2
Computational complexity and memory consumption comparison.
Fig. 3. A block scanning method where each block uses the threshold already computed from an adjacent block.
Table 1
The ABTC algorithm.
(0)
(0)
For block j, set Ij = 2 and the initial threshold xth,j to be the one from
block, then use its mean value as the threshold.
(i)
(i)
(i)
xth,j )
(i+1)
xth,j
Multiplications
Square root
Memory
3 M2
256 (2 M2 )
2M2 log M
4 M2
4 M2
M2
256 3
9M2
0
6
2
256 2
0
0
0
0
0
M2
256 M2
0
multiplications to compute the upper mean and lower mean values, and 1 addition and 1 multiplication to update the threshold.
So we need 2 M2 + 1 additions and 3 multiplications in each iteration, ignoring the small number of blocks whose initial threshold
need to be computed using the block mean. In Table 2 we compare the computational complexity of the proposed method with
the traditional BTC, the optimal BTC (OBTC) proposed in [9], the
fast optimal AMBTC (OAMBTC) proposed in [10] and the ODBTC in
[7].3 We see that the proposed ABTC algorithm enjoys very efcient
computational complexity compared to most other algorithms. The
only comparable algorithm is the ODBTC, which consumes much
more memory and, as will be shown later, tends to produce results
with much poorer PSNR values. The extra memory of size 256 M2
needed by the ODBTC is to store the 256 different scaled versions
of the dither array.
(i)
(i)
+b
j
j
(i)
(i)
(i+1)
(Ij 1)
.
xth,j
(i)
(i)
+b
j
j
N2
N1
N1
2
We count each comparison of two numbers as an addition/subtraction, as is the
case in current computers.
(p)
(xi,j
(8)
(o) 2
xi,j )
i=0 j=0
(i)
(3)
Additions
BTC
OBTC
OAMBTC
ODBTC
ABTC
4. Experiments
(Ij1 )
adjacent block already coded (e.g., xth,j1
). If the block is the rst
(1)
Method
where N = 512,
(p)
xi,j
(o)
xi,j
and
that in the original image.
In the ODBTC, we generate the dither array of needed size
according to the method used in [7,8].
In Table 3 we present the PSNR values for processing
4 test images. Results from the traditional BTC, the recent
3
The numbers presented here for ODBTC are different from those reported in [7],
since we count each comparison as an addition/subtraction, as is done in computers.
Therefore, for the ODBTC in [7], in computing (7), 2 M2 additions are needed for
nding the maximum and minimum of the block and M2 additions are needed for
comparisons.
579
Fig. 4. Visual quality comparison. The rst row: original image. The second row: block size of 8 8. The third row: block size of 16 16. The last row: block size of 32 32.
ODBTC, the proposed ABTC, plus the optimal BTC (OBTC), which
obtains the optimal threshold by carrying out an exhaustive search, are presented. We see that although the ABTC
algorithm uses only 2 iterations, its PSNR value is generally
580
Table 3
PSNR comparison of different BTC methods (regular expression (8))
Block size
BTC
ODBTC
ABTC
OBTC
Cameraman
88
16 16
32 32
42.30
39.86
37.94
34.39
31.26
28.48
42.83
40.66
38.90
43.31
41.02
39.31
28.15
26.31
24.52
Barbara
88
16 16
32 32
40.62
38.71
36.97
31.48
28.69
26.37
40.89
39.01
37.26
41.33
39.49
37.71
30.90
27.51
24.75
31.42
28.11
25.29
Pepper
88
16 16
32 32
43.63
40.06
37.20
35.37
31.24
27.69
44.09
40.71
37.95
44.61
41.30
38.48
24.96
24.08
23.23
25.21
24.28
23.47
Baboon
88
16 16
32 32
37.65
36.60
35.96
27.86
25.75
24.11
38.14
37.27
36.44
38.39
37.47
36.68
Block size
BTC
ODBTC
ABTC
OBTC
Cameraman
88
16 16
32 32
29.12
26.69
24.77
21.21
18.09
15.30
29.66
27.48
25.72
30.14
27.84
26.13
Barbara
88
16 16
32 32
27.44
25.53
23.79
18.30
15.51
13.19
27.71
25.83
24.08
Pepper
88
16 16
32 32
30.44
26.87
24.01
22.18
18.05
14.51
Baboon
88
16 16
32 32
24.46
23.39
22.73
14.67
12.57
10.93
wm,n =
N2
N1 3
3
N1
2 (x(p)
wm,n
i+m,j+n
where
,
2
(o)
xi+m,j+n )
(9)
with
= 1.3
3
3
and
the
(10)
normalizing
constant
such
that
wm,n = 1.
m=3n=3
Fig. 5. Image detail comparison between OBTC and ABTC for image processing block size of 8 8. All regions are enlarged 4 times by the bilinear interpolation method.
4
The PSNR values presented here are different from those reported in [7], perhaps
because it uses the printed image (150 dpi) while we use only the digital data.
581