[ieee 2009 international workshop on local and non-local approximation in image processing (lnla...
TRANSCRIPT
978-1-4244-5167-8/09/$25.00©2009 IEEE 145
DESIGN OF ORTHOGONAL TRANSFORMS BASED ON PARTITION OF UNITY METHOD AND THEIR APPLICATION TO
IMAGE COMPRESSION
Samvel Khachatryan and Lilit Minasyan
State Engineering University of Armenia (SEUA) email: {skachatryan, lilit_min}@yahoo.com
ABSTRACT
In this work a new complete system of trigonometric functions for representation of finite continuous functions is defined. New discrete orthogonal transforms are synthesized by discretization and orthonormalization of the proposed system of functions. An image compression algorithm using the synthesized transform is developed. The proposed algorithm illustrates high compression ratio and good reconstruction quality as confirmed by a numerous of experiments.
1. INTRODUCTION Digital image compression techniques have been at the focus of both academic and industrial research associated with digital cameras, Internet applications, bioengineering, etc. The most popular image compression techniques are based on spectral methods, where the image rows and columns considered as discrete functions are approximated by a few functions from a complete system of functions.
Typical lossy image compression algorithms for digital image compression utilizing the well-known (classical) discrete orthogonal transforms (Haar, Walsh, Hadamard, Discrete Cosine transform (DCT), wavelet (in JPEG2000, SPIHT) are described in, e.g. [1]-[3]. Local cosine [7-9], lapped transforms [10], and especially wavelet transforms [11] have also been attracting an increasing interest in image compression during the last decades.
It is recently noticeable a trend in using adaptive techniques for improving the performance of image compression techniques. In such techniques, different transforms of different sizes are applied to different blocks (of different sizes). In [5], an efficient adaptive image compression algorithm is proposed that uses classical transforms. Application of the algorithm to the real images gives good result.
In this work, a new algorithm for adaptive image compression is proposed based on a new method for synthesizing discrete orthogonal transforms.
The new method is based on discretizing and orthonormalizing a new windowed system of continuous functions that form a partition of unity and can be used for representing any continuous function. The resulting transform is orthogonal and has similarities with both local cosine transforms and
wavelet transforms. Therefore, its good performance in image compression can be expected.
Experiments were conducted to study the performance of the proposed image compression algorithm. Obtained results illustrate the strong potential of the proposed algorithm to improve the quality of image compression. It was in particular shown that a hybrid application of the newly proposed transforms along with DCT appears better compared to the application of only DCT.
2. THE PROPOSED TRANSFORM DESIGN In this section we present the design of discrete orthogonal transforms based on smooth and compact on [ ]0,1 segment trigonometric functions forming partition of unity.
Let consider the following system of functions:
[ ]
( )
20,1 1,1
21,2
2
,1
( ) 1, ( ) cos ,2
( ) sin , 0,1 ,2
1sin 2 1 , 0, ,2 2( ) (1)
10, 0, ,2
mm
m
m
w x w x x
w x x x
x xw x
x
π
π
π
⎛ ⎞≡ = ⎜ ⎟⎝ ⎠
⎛ ⎞= ∈⎜ ⎟⎝ ⎠
⎧ ⎡ ⎤⎡ ⎤− ∈⎪ ⎢ ⎥⎢ ⎥⎣ ⎦⎪ ⎣ ⎦= ⎨⎡ ⎤⎪ ∉ ⎢ ⎥⎪ ⎣ ⎦⎩
( )( )2 1
1 1,
1 1
2sin 2 , , ,2 2 2
20, , ,2 2
mm m
m i
m m
i ix i xw x
i ix
π−− −
− −
⎧ −⎡ ⎤⎡ ⎤− ∈⎪ ⎢ ⎥⎢ ⎥⎣ ⎦⎪ ⎣ ⎦= ⎨−⎡ ⎤⎪ ∉ ⎢ ⎥⎪ ⎣ ⎦⎩
( )( )2 1
1 1
,2 1
1 1
2 1sin 2 , , ,2 2 2
2 10, , ,2 2
m
mm m
m
m m
i ix i xw x
i ix
π−− −
+
− −
⎧ − −⎡ ⎤⎡ ⎤− ∈⎪ ⎢ ⎥⎢ ⎥⎣ ⎦⎪ ⎣ ⎦= ⎨− −⎡ ⎤⎪ ∉ ⎢ ⎥⎪ ⎣ ⎦⎩
for 2,3,..., 2,3,..., 2 .mm i= = The plots of the first eleven functions 0,1( )w x and
146
Figure 1. The plots of the first eleven functions 0,1( )w x and , ( )m nw x for 11,2,3, 1, , 2 1.mm n −= = +
, ( )m nw x for 11,2,3, 1,..., 2 1,mm n −= = + are illustrated in Figure 1.
Notice that these functions are continuously differentiable on R and they form a partition of unity on the segment [0,1] for each ,m that is
( ), 1, [0,1], 0,1,2,...m nn
w x x m≡ ∈ =∑ .
Therefore, any continuous on [0,1] function ( )f x can be represented as:
( ) ( ) ( ) ( ), , ,m n m n
n nf x f x w x f x m N= ≡ ∈∑ ∑ .
Let ( )f x be any continuous on [0,1] function. Designate by
( ) ( )12 1
, ,1
, 1,2,... .m
m m n m nn
f x a w x m− +
== =∑
where
( ) ( )1,1 , ,2 10 , , 1 ,2
mm m n mmna f a f a f− +
⎛ ⎞= = =⎜ ⎟⎝ ⎠
11,2,...,2 1.mn −= + It is clear, that
2 2
m m mn nf f⎛ ⎞ ⎛ ⎞=⎜ ⎟ ⎜ ⎟
⎝ ⎠ ⎝ ⎠.
In [6] it is proved that ( )mf x converges uniformly to ( )f x function on the segment [0, 1].
The system of functions { }, ( )m nw x is a system of
function’s representation, but it is not a basis. The functions of this system are not linearly independent. Let us construct a basis of functions based on the system
{ } 1, 0 0( ) , , 1,..., 1,2,...,2 1m
m nw x m m m n −= + = + .
Then, let's exclude from this system those functions the maximum points of which coincide with the maximum points of at least one of the previous functions.
The further consideration will be for the case when 0 2.m = In this case the system of linearly independent
functions will be:
( ) ( ) ( ) ( ) ( ) ( )0,1 2,1 0,2 2,2 0,3 2,3
, , .x w x x w x x w xψ ψ ψ= = =
( )( )2
,
1sin 2 , , ,2 2 (2)
10 , , , 2 2
mm m
m i
m m
i ix xx
i ix
πψ
⎧ −⎡ ⎞∈⎪ ⎟⎢⎪ ⎣ ⎠= ⎨
−⎡ ⎞⎪ ∉ ⎟⎢⎪ ⎣ ⎠⎩
for 1,2,..., 1, 2,..., 2 .mm i= = Аt this point
( ) ( ) ( ) ( ) ( ) ( )0,1 0,2 2 0,30 1, , x x x x x xϕ ψ ϕ ψ ϕ ψ= = = ,
( ) ( ),n m ix xϕ ψ= , 2 , 1,2,..., 1, 2,..., 2m mn i m i= + = = , correspond to 2,3,4,...,m = in (1). The plots of the first nine functions , ( )m n xψ for 0,1,2m = are illustrated in Figure 2 (a).
147
Figure 2. (a) Plot of functions , ( ), for 0,1,2.m n x mψ = (b) Plot of 1st five orthogonalized functions
Assume that
( ) ( )0
, n nn
f x a xϕ∞
== ∑ (3)
where ( )f x is a finite function defined on segment
[ ]0,1 and
( ) ( )0
NN n n
nS x a xϕ
== ∑ ,
where
( ) ( )
( ) ( )
0 1 2
1
10 , , 1 ,2
, (4)n n n n
a f a f a f
a f x S x−
⎛ ⎞= = =⎜ ⎟⎝ ⎠
= −
where nx is a point that is defined from the following condition: ( ) 1n nxϕ = .
Notice that for any function ( )f x defined on binary points of segment [0,1] (that is, on points
, , 0,1,..., 0,1,..., 22
kj k k
jx k j= = = ), the sum of series
with coefficients (4) in these points coincides with the values of function ( )f x . Besides, in each such point the series contains just finite number of addends.
It follows from (4) that ( )0
0,n
j jj
a xϕ=
≡∑
0,1,...,n = on [ ]0,1 if and only if 0, 0,1,..., .ja j n= =
Therefore, the functions 1 2( ), ( ),..., ( )nx x xϕ ϕ ϕ are linearly independent. If all the coefficients of series (3) corresponding to a continuous on [0,1] function ( )f x are equal to zero, then the function ( )f x identically equals to zero on that segment [0,1]. At the same time, the values of
function ( )f x are uniquely defined by coefficients of series (3) defined by formula (4). This follows from the continuity of function ( )f x and from binary set density on segment [0,1].
Denote by { } 0( )n nxϕ ∞= the system of functions,
obtained from functions defined by formula (2), for any fixed m after orthonormalization according to Gramm-Schmidt method [4]. Figure 2(b) illustrates plots of first five orthogonalized functions corresponding to the case where three functions form partition of unity.
Let NR be the ( )N N× matrix ( 2kN = ), which is derived after uniform discretization of the first N basis functions defined by formula (2). Instead of the matrix
NR one can take a matrix NT where
N ijT t= ,
( ), ,
0,1,..., 1, 1,2,..., , 2 .
ij i j j
k
jt x xN
i N j N N
ϕ= =
= − = =
and NT matrix is obtained from NR by orthonormalization according to Gramm-Schmidt method.
Let us note that the basis functions used in the matrix NT are obtained as linear combinations of the
discretized functions { } 10( ) N
n nxϕ −= , which have
similarities with local cosines in that they are formed from harmonics restricted on a pre-specified support intervals and are smooth at the ends of the intervals. On the other hand transforming with this system of functions is similar to wavelet transforms (with harmonic functions) in that they provide multi-resolution decomposition thanks to the special choice of the support intervals. As both local cosines and
148
wavelets demonstrated very good performance in image compression one can expect even a better performance with the proposed transform which combines the useful features of the both. The efficiency of the proposed transform in image coding is studied in the next sections.
3. IMAGE COMPRESSION ALGORITHM Let A be the matrix of luminance values in an image block of size ( )N N× , and B be the spectral matrix of the block A , that is: '
,N NB T A T= ⋅ ⋅
where 'N
T is the matrix transposed to NT . Below we describe the proposed compression
algorithm for one image block of size ( )N N× . In [6], a similar algorithm was described for a particular case where functions , ( ),m n xϕ with 1m = were used. The proposed algorithm is schematically presented in Figure 3 and may briefly be described by implementing the following steps: 1. Apply 2D discrete transform to the input image
block A . The result is the spectral matrix ( ) , , 1,2,..., .ijB b i j N= =
2. Quantization: The spectral matrix B is quantized either uniformly, that is, each element of spectral matrix is divided by a number, constant for given matrix and then, it is rounded off towards the closest integer number, that is:
, i jij
bb round c const
c⎛ ⎞
= =⎜ ⎟⎜ ⎟⎝ ⎠
,
or it is quantized with a certain quantization
matrix according to formula: ,ijij
ij
bb round
u
⎛ ⎞= ⎜ ⎟⎜ ⎟
⎝ ⎠
where ijb are elements of spectral matrix B ,
iju are elements of quantization matrix .U As the
result, we get the matrix B , where the significant spectral elements (with large absolute values) are located in the left top corner. In addition, the larger is the number or ,ijc u the larger is the compression ratio, that is, the more will be the number of zero elements after quantization. Next, we replace by zeros all the elements ijb of matrix
B with indices ,i j k> and denote the obtained matrix by .S In the description of this algorithm below we use the case 3k = .
11 12
21 22 2
1 2
0 0
0 0
0 00 0 0 0 0
0 0 0 0 0
kk
k
k k kk
b b b
b b b
S b b b
⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥
= ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦
3. Dequantization: The elements of the matrix S are dequantized, that is, are multiplied by quantization coefficient c or by the corresponding elements
iju where in result we get a matrix S . Then, after applying an inverse 2D transform to the obtained matrix S , we’ll get the reconstructed matrix:
' .N NA T ST=
Now let us denote by ( , )MSE A A the mean squared distortion of reconstructed image block from original image block, and by ( , )PSNR A A the peak-signal-to-noise ratio. If the values
( , )MSE A A and ( , )PSNR A A are good enough or of the desired values, i.e. PSNR ≥ P* (where P* is a pre-specified desired PSNR level, e.g. P*=35), then we go to Step 4. Otherwise, we continue processing of the current image block starting from Step1 but preliminary splitting it
onto four blocks of size 2 2N N× . If, however, the
size of the block is already 8 8× , we interrupt further block size reduction and implement either the proposed transform or a classical transform (e.g. DCT-II) of size 8.
4. Matrix S is scanned and in result we get the vector-row
11 21 22 12 13 23 33 32 31 .b b b b b b b b b⎡ ⎤⎣ ⎦
5. The obtained vector-row is coded and kept. The reconstruction of the image is implemented
in reversed order.
4. EXPERIMENTS The proposed method was tested on many digital images. We show here the results of applying proposed method to image Cameraman. For image Lena we got close results. It should be noted that no statistical loss-less coding of the quantized image coefficients was implemented in the experiments. The results should significantly be improved with use of a statistical lossless coding (e.g. arithmetic coding or Huffman coding). In Figure 4 the original Cameraman and its compressed version, obtained after processing are illustrated.
Out of 16 blocks of sizes 64x64, two blocks in top left and right corners are reconstructed from 1/455’th part, that is from 9 spectral coefficients (without taking
149
into account statistical coding). It should be noted, that if we consider these blocks separately, then after reconstruction the peak-signal-to-noise-ratio values for these blocks will be PSNR=39.3 and PSNR=40, respectively. In addition, if we do not bound the PSNR value from below, then the third block will be reconstructed from 1/455-th part of spectra with PSNR=32.3.
There are thirteen blocks of sizes 32x32 reconstructed from 1/114-th part of spectral coefficients, that is from 9 spectral coefficients, without taking into account coding.
For those blocks after reconstruction, one can get 37<PSNR<43. Twenty five blocks are reconstructed from approximately 1/29-th part of spectra for which 36<PSNR<44 and so on. For all of those blocks we obtain 35<PSNR<45. The number of coefficients belonging to the blocks processed in this way is 61% out of total number of coefficients. The remaining 39% of coefficients are processed by classical algorithms. In the considered example, the compression ratio is equal to 15.6 and PSNR=35. In the case of corresponding statistical coding one may get better results.
Now we describe shortly the hybrid DCT-based algorithm for image compression. The steps from 1 to 3 are repeated also for DCT transform. Let matrix D be the matrix reconstructed after Step 3 of described above algorithm with exploiting the DCT transform. The processing of a certain block is done by the transform, for which the reconstructed block has the largest PSNR value.
It should be noticed that, for the reconstructed after the 3rd step image blocks, the 38% - 43% processed blocks have larger PSNR values when processing them with our proposed synthesized transforms, compared to only DCT-based processing.
The proposed local cosine transform was tested also in combination with SPIHT algorithm [11] (without arithmetic coding) where the corresponding wavelet transform was replaced by proposed new transform. The new transform was applied to the whole image.
The performance results for original images Barbara (see Figure 6(a)) and Patterns (Figure 5(a)) are given in Table 1 in terms of number of bits/pixel (bpp) and PSNR values, and it is compared with the SPIHT compression technique. As one can see, the performance of proposed method is better in the sense of PSNR value for the same number of bits/pixel. Figures 5, 6 illustrate the improvement of proposed approach over SPIHT. It should also be noted that the performance may significantly be increased by adaptively splitting the image into blocks as well as by using arithmetic coder after the SPIHT.
Table1: Results of bpp and PSNR values for images Patterns and Barbara
5. CONCLUSION A new system of functions for representation of continuous limited functions that is a partition of unity is proposed. Discretized and orthonormalized version
Method BPP PSNR(dB) SPIHT (Patterns)
0.5 17.93
Prop.Tr+SPIHT(Pattertns) 20.14 SPIHT (Patterns) 0.75 21.89
Prop.Tr+SPIHT (Patterns) 23.17 SPIHT (Patterns)
1 25.77
Prop.Tr+SPIHT (Patterns) 25.72 SPIHT (Barbara)
0.25 26.88
Prop.Tr+SPIHT (Barbara) 27.38 SPIHT (Barbara)
0.32 28.01
Prop.Tr+SPIHT (Barbara) 28.35 SPIHT (Barbara)
0.4 29.31
Prop.Tr+SPIHT (Barbara) 29.42 SPIHT (Barbara)
0.44 29.93
Prop.Tr+SPIHT (Barbara) 30.18
- +
-
+
proposed discrete orthogonal transform
quantization of spectral
matrix
scanning statist. coding
output data
PSNR≥P*
N>8 Split block into 4 subblocks (N=N/2)
image block
Figure 3. The block-diagram of the image block compression algorithm
150
of this system of functions is shown to be very efficient for digital image compression application. Specifically, new efficient image compression algorithms based on the proposed new discrete orthogonal transform are proposed.
6. REFERENCES [1] N.Ahmed, K.R.Rao, Orthogonal Transforms for Digital
Signal Processing, Springer Verlag, 1975. [2] D.F.Elliot,K.R.Rao, Fast Transforms: algorithms,
analysies, applications, London, Academic Press Inc., 1982.
[3] G.K.Wallace,“The JPEG algorithm fro image compression standard,” Comm. ACM, v.34, n4, pp. 30-44, 1991.
[4] S.V.Kolmogorov-Fomin, Elements of theory of functions and functional analysis, Moscow, 1976.
[5] L.G.Minasyan,S.G.Khachatryan,“On image compression algorithm based on a discrete orthogonal transform,” Sbornik materialov godichnoi nauchnoi konferencii, pp.15-18, Yerevan, 2006.
[6] S.G.Khachatryan, L.G.Minasyan, “Synthesis and application of an orthogonal transform for image compression,” Vestnik Inzhenernoi Akademii Armenii, Yerevan, 2007.
[7] P.Auscher, G.Weiss, M.V.Wickerhauser, Local sine and cosine bases of Coifman and Meyer, in Wavelets-A Tutorial, 1992, Academic Press.
[8] F.G. Meyer, “Image compression with adaptive local cosines: a comparative study,” IEEE Trans.Signal Processing, vol. 11, no.6, pp. 616-629, 2002.
[9] Y. Huang, I. Pollak, “Image compression with best local cosine bases,” Proceedings of 13th IEEE Workshop on Statistical Signal Processing, pp. 905-908, 2005.
[10] H.S. Malvar, “Lapped transforms for efficient transform/subband coding,” IEEE Trans. Acoust. Speech Signal Process. vol.38, pp. 969–978, 1990.
[11] A.Said, W.A.Pearlman, “A New, Fast and Efficient Image Codec based on Set Partitioning in Hierarchical Trees,” IEEE Trans. Circuits Syst.Video Technol., vol.6, pp. 243-250, 1996.
151
(a) (b)
Figure 4. Image Cameraman. (a) Original Image. (b) Reconstructed image.
(a) (b)
(c) (d)
Figure 5 Image Pattern.
(a) Original Image Pattern. (b) Spectrum of image using prop. transform (values multiplied by 5) (c) Reconstructed image with SPIHT, bpp= 0.75, PSNR=21.89dB. (d) Reconstructed image with
Prop.Tr+SPIHT, bpp=0.75, PSNR=23.17dB.
152
(a) (b)
(c) (d)
Figure 6. Image Barbara. (a) Original Image. (b) Spectrum of Barbara using prop.transf.(values multiplied by 5).
(c) Reconstructed image with SPIHT, bpp=0.44, PSNR=29.93dB. (d) Reconstructed image with Prop.Tr+SPIHT, bpp=0.44, PSNR=30.18dB.