A Novel Method for Burst Error Recovery of Images S. Talebi and F. Marvasti Electronic Engineering Department King’s College London Strand, London WC2R 2LS, UK E-mail: farokh.marvasti@kcl.ac.uk Abstract-- A new method to recover bursts of errors for images, is proposed. This technique is an extension of our previous work for the 1-D signal [1-2]. The problem of signal reconstruction with bursty louses is transferred to a two-dimensional difference equation by using a new transform technique. The simulation results show the feasibility of this method. The sensitivity analysis of the proposed method shows that the proposed method is robust against additive and quantization noise. I. Introduction Pixels of an image signal can be lost in an erasure channel or due to cell losses in an ATM network. Cell losses due to buffer overflow in ATM environments result in bursts of errors rather than isolated errors. Also losing a few bits of a compressed image is equivalent to bursty losses for the original image. Many schemes have been proposed to 1 recover the missing samples from the remaining samples of the signal. Some of these schemes implement iterative and non-linear techniques in the recovery process [6 - 9]. But none of them is able to recover the missing samples when large bursts of errors are lost. Also most of the previous methods need much computational effort. In this paper a new technique is proposed to recover these bursts of losses in an erasure channel by oversampling the original image before packetization, this technique is based on the generalization of the one-dimensional method presented in [1-2]. The paper is organised as follows: In section II, a new algorithm for burst error recovery of an image is presented. In section III and IV, simulation results and the sensitivity of the simulated technique to additive and quantization noise are presented. Finally, this paper is concluded in section V. II. The Proposed Technique Based on the one-dimensional algorithm presented in [1-2], a robust error recovery technique is proposed for bursts of real and complex samples. For the sake of clarity, square images are considered, but the technique can be also applied to rectangular images. Let us assume that a 2-D signal such as an image is sampled at the Nyquist rate yielding a discrete signal (xorg(i,k), i,k=1,..,U). We use a new transform such that the kernel of the transform is equal to exp( j 2 2 m i q1 j n k q 2 ) , where q1 and q2 N N are positive prime integers with respect to N. It can be shown that this kernel is a sorted kernel of DFT. The transform of the image is called Xorg(m,n) for m, n=1,..,U. For the sake of clarity, we shall call this transform the Sorted Discrete Fourier Transform 2 (SDFT). The Xorg(m,n) can be expanded by inserting rows and columns of zeros around it to achieve a new SDFT matrix Xover(m,n) m,n=1,..,(N=U+ ). An inverse SDFT will lead to an over-sampled version of the original signal xover(i,k) i,k=1,..,N with (NN ) complex samples. This (U, N) code is capable of correcting a block of matrix () where = N-U. The missing part of the over sampled signal is denoted by e (im, ln) = x (im, kn), where (im, kn) specifies the positions of the lost pixels. The value of e (i, k) for any position except (im, kn) is zero. For the () lost pixels, the polynomial error locator is H ( si , p k ) ( si exp( m 1 h j 2im q1 j 2k n q 2 )) ( p k exp( )) N N n 1 si t pk f t, f (1) t 0 f 0 m, n 1, , H ( sm , p n ) 0 , (2) where si exp( s m exp( j 2 ii q1 ), N j 2 im q1 ), N p k exp( pn exp( j 2 k k q 2 ), N j 2 k n q2 ), N i, k 1,, N m, n 1, , The polynomial coefficients (ht,f , t,f=0,..,) can be found from the product in (1). For the DSP implementation, it is easier to find ht,f by obtaining the inverse DFT of H(s,p). Multiplication of (2) by e(im,kn).(sm)r.(pn)d and summation over m,n yield ht , f ( e(im , kn ) sm r t pn d f ) 0 t 0 f 0 m1 n 1 3 (3) The inner summation is the DFT of the missing samples e(im,kn), hence h t, f E ( r t , d f ) 0 , (4) t 0 f 0 where (r,d)= +1,..,N- -1 and E(r,d) is the SDFT of e(i,k). 2 2 The reason for defining the variable (s,p) to be a root of unity is to convert the inner summation in (3) to the SDFT of the missing samples. The received pixels, d(i,k), can be thought of as the original over-sampled signal, xover(i,k), minus the missing pixels e(im,kn). The error signal, e(i,k), is the difference between the corrupted and the original oversampled signal. Hence, it is equal to the values of the missing pixels for (i,k) = (im,kn) and is equal to zero otherwise. The corresponding relationship in the frequency domain is E(i,k) = Xover(i,k)-D(i,k) for (i,k) = 1,..,N. (5) The 2-D difference equation (4) with non-zero initial condition can be solved by a recursive method provided that the boundary conditions are given only in an L-shaped region [5]. This can be achieved by inserting zeros in the original SDFT matrix. Considering that the Xorg(m,n), m,n=1,..,k is a bi-periodic SDFT matrix, the zeros are inserted around the original matrix Xorg(m,n) as shown in Fig. 1. From now on, Xover(m,n) denotes this special over-sampled SDFT matrix. In equation 5, considering that Xover(i,k) = 0 1, , 2 , and for k 1, , N & i also N 1, , N 2 4 1,, , and 2 i 1, , N & k 2 2 N 1,, N 2 we have E ( i, k ) D( i, k ) 1 , , , and 2 for k 1, , N & i also N 1, , N 2 1 , , , and 2 i 1, , N & k 2 2 N 1,, N 2 (6) The remaining values of E(r,d) can be found from (4) by the following recursion E(r, d ) 1 ht , f E ( r t , d f ) , h0, 0 t 0 f 0 (7) where ( r , d ) 1, , N . 2 2 After solving (7), Xover(m,n) can be found from (5). By removing the inserted zeros in Xover(m,n) and inverting this SDFT, the original image is then recovered. To determine suitable values for q1 and q2 and their effects on the behaviours of the algorithm, at first we choose q1=q2=1. For this choice the SDFT is identical to DFT. In many problems, the number of pixels are large, so that bursty losses produce large dynamic range in the error locator polynomial H(s,p) as well as the polynomial coefficients ht,f. For example, Fig.2 shown the behaviour of H(s,p) and ht,f for an image of size (6464) and losses of size (3232). The large dynamic ranges are due to the concentration of zeros on one side of the semi-sphere. H(si,pj) values are zero for (i,j 5 =1,..,32) and very large around (i,j =48). This can be verified by calculating the value of the H(s,p) which is equal to the product of all the (3232) vectors emanating from the position (i,j =48) on the upper half of the unit sphere. Fig. 3 represents the location of zeros of the error locator polynomial for a (3232) bursty losses in an image of size (6464). The minimum magnitude of each of the (3232) vectors is 21/2 and the maximum magnitude is 2. Thus, magnitude of the product vector is estimated to be between 2(32*32)*.5 and 2(32*32). This creates a large dynamic range for the value of ht,f starting from 1 for h0,0 and peaking at h/2,/2 as shown in Fig. 2. For the case of isolated losses (every other losses), the locations of the zeros of the error locator polynomial are symmetrically distributed on the unit sphere as shown in Fig. 4 and hence H(si,pl) and ht1,t2 values have very small dynamic range. In fact, H(si,pl) values are periodic while ht,f values are all zeros except for (t,f =0,) which is equal to 1. For the case of bursty losses, ht1,t2 has a large dynamic range that creates a large computational error in (7). Therefore, the implementation of the algorithm for a large block size of losses is impossible. Since the coefficient of ht,f have a very small dynamic range in the case of isolated losses; it would be beneficial to transform the bursty losses in to isolated losses by proper choices of q1 and q2. Therefore to determine the coefficients q1 and q2, two points should be considered. Firstly, q1 and q2 have to be prime with respect to N. Secondly, based on the size of the block losses, the q1 and q2 values must be chosen such that the locations of the zeros of the error locator polynomial are approximately distributed symmetrically around the unit sphere. For example for an even number of N, when the block size of losses is equal to (N/2,N/2), the best choice for q1 6 and q2 is (N/2-1). The values of the polynomial error locator H(s,p) and the ht,f values for N=512 , =256 and q1=q2=255 are given in Figs. 5 and 6. The SDFT is actually derived from DFT and the fast algorithm can still be used. Because the SDFT transform can be handled by DFT and sorting; the sorting of the elements is as follows aSDFTm , n a DFTmod(q m , N ), mod(q 1 2 n , N ) for m,n =1,..,N that aSDFT is the element of the SDFT transform matrix and aDFT is the element of the DFT transform matrix. The inverse transform of the frequency coefficients is equivalent to the inverse sorting and the inverse DFT, respectively. A small dynamic range of the coefficient ht,f, shown as Fig. 6 justifies this algorithm for a large image size and a large number of losses. The proposed technique is very efficient in recovering bursts of errors with a performance better than the other techniques such as the method of Conjugate Gradient (CG) using adaptively chosen weights and block Toeplitz matrices [6-15] which is referred to as the ABC technique in [6]. In this manner to computational complexity exact review in the case of 1-D in [2] is done. That shows the CG technique requires above 10 times the number of multiplications and additions required by the proposed technique. But we should consider that to recovery of losses of size (), the proposed technique need more added zeros in the frequency domain in compare to the CG method. In the best situation the ratio between the recovery pixels and the added zeros is 1/3. III. Simulation A (256256) image is used for the simulation of the algorithm Fig. 7-a. The image is transformed using SDFT. A number of zeros are inserted in the rows and columns of the 7 SDFT matrix and a new matrix of size of (512512) is derived. By taking an inverse SDFT, the over-sampled image is produced Fig. 7-b. This image does not appear to have any similarity with the original image. According to the algorithm, the block size of the losses is limited to (256256) in this case. Therefore, a block of this size is erased from the image as shown in Fig. 7-d. The corresponding image of Fig. 7-d prior to the recovery is shown in Fig. 7-c. The over-sampled signal after reconstruction and its corresponding image are shown in Figs. 7-f and 7-e respectively. The Mean Squared Error for this simulation is equal to 1.0910-15. None of the previous methods [7-8] are able to recover the block size of (N/2×N/2). IV. Noise Sensitivity The sensitivity analysis for the 1-D signals based on DFT proves to be sensitive to additive and quantization noise [2,12]. No record of such a study for 2-D signals has been reported. For our proposed method, the sensitivity of the algorithm is simulated as follows. The over-sampled image is quantized to 8 bits before the transmission. The Signal to Noise Ratio is defined as x(i, k ) SNR 10 log( x(i, k ) y(i, k ) 2 2 ), (8) where x(i,k) is the original image and y(i,k) is the quantized image. The corresponding SNRs before the transmission and after reconstruction of this simulation are equal to 38.2 8 dB and 35.02 dB, respectively. A white random noise of uniform distribution with an approximate amplitude of 1/20 of the transmitted image (SNR=28.6dB) is added to the over-sampled image. The SNR after the recovery of the original image is equal to 28.193dB. The result for this case is shown in Fig. 8. The SNR values show that the new method is robust against additive and quantization noise. This can be attributed to the low dynamic range of the coefficients ht,f ,which results in small amount of accumulated round off error in the solution of the difference equation (4). The solution for this difference equation is equivalent to the zero input response of an IIR filter with the initial conditions given in (6). The 2-D unilateral Z-transform of this IIR filter has poles identical to the zeros of the error locator polynomial and the initial conditions affect only the zeros of the filter. The solution of (7) is thus the inverse transform of this 2-D Ztransform, which has the same shape as the eigenfunctions of the impulse response of the IIR filter. For q1=q2=1, taking the 2-D unilateral Z-transform of the difference equation (4) with the initial conditions given in (6), we can write Eˆ ( z1 , z 2 ) h k 1 0 k 2 0 r 1 d 1 k 1, k 2 E (r , d ) z1k1 r z 2k 2 d , h k 1 0 k 2 0 k 1, k 2 z z k1 1 (9) k2 2 where Eˆ ( z1 , z 2 ) is the Z-transform of E(r,d). Based on the analysis in [10-11] offers an alternative explanation for the sensitivity to noise of the proposed technique. From [11], we can define the zeros of Eˆ ( z1 , z 2 ) in (9) to be 9 ( z1l z1l , z 2 f z 2 f ) where (l,f) = 1 ... , and (z1l , z 2 f ) is the error in the (l,f)th zero due to the quantization and additive noise in the E(r,d). The numerator of (9) is A( z1 , z 2 ) h k 10 k 2 0 r 1 d 1 k 1, k 2 k 1 r 1 E (r , d ) z z k 2 d 2 (1 z1i z ) (1 z 2 j z 21 ) 1 1 i 1 (10) j 1 The error in the zeroes of Eˆ ( z1 , z 2 ) , (z1l , z 2 f ) , can be expressed in terms of the error in the E(r,d) as (z1l , z 2 f ) ( z1l , z 2 f ) E (r , d ) r 1 d 1 E (r , d ) . (11) Using the two forms of A(z1,z2) in (10) and the fact that A( z , z ) 1 2 ( z1i , z 2 ) j ( z1 , z 2 ) ( z1 , z 2 ) ( z1l , z 2 f ) A( z1 , z 2 ) , E (r , d ) E (r , d ) ( z , z ) ( z , z ) 1 2 1l 2 f i j (12) we get ( z1 , z 2 ) i j E ( r , d ) h k 1, k 2 k 1r 1 k 2d 1 z1l z2 f h , k 11 k 2 1 (z i 1, i l 1l z1i ) ( z 2 f z 2 j ) , (13) j 1, j f for (l,f) = 1 … and (r,d) = 1 …. From (10) and (13), the error in the zeros of Eˆ ( z1 , z 2 ) , (z1l , z 2 f ) , can be written as h k 1, k 2 z1k 1r 1 z 2k 2d 1 l f h , k 11 k 2 1 E ( r, d ) , (z1l , z 2 f ) = r 1 d 1 ( z1l z1i ) ( z 2 f z 2 j ) i 1, j 1, i l j f 10 (14) As mentioned earlier for the case of consecutive losses (q1=q2=1), the values of ht,f increases to very high values around h , and hence the inner summation in (14) becomes 2 2 very large. This means that any small changes in the values of E(r,d) due to the quantization or additive noise cause drastic variations in the locations of the zeros of (9) which change the behaviour of the IIR filter representing the recursion in (4). We also observed from our simulations that the zeros of (9), which are represented as poles in (14), are clustered together for the case of consecutive losses. This observation further enhances the zero displacement in (14) in case of additive or quantization noise. Similarly, we can show that the sensitivity of the poles of (9) to the round-off errors in ht,f, can be written as ( z1p , z 2q ) t 1 f 1 t 1 z1 p z2q f 1 ht , f ( z1 p z1i ) ( z 2q z 2 j ) j 1, i 1, j q i p , (15) As mentioned earlier choosing the suitable coefficients q1 and q2 are due to separate the poles of (9) and a small dynamic range of the coefficients ht,f. Then the sensitivity of the proposed method reduces to additive and quantization of the values of E(r,d) and to the round-off errors in ht,f. The simulation is shown this fact perfectly. V. Conclusion 11 We have shown that the new algorithm has three advantages. Firstly, it is ideal to recover the missing pixels for large blocks of bursty errors. Secondly, in terms of complexity, it is simpler than other techniques; thirdly, it is very robust in correcting bursts of errors with respect to additive and quantization noise. Application of this method in the case of compressed image and the extension of the method to recover randomly distributed pixel losses are currently under investigation. References [1] F. Marvasti, M. Hasan, M. Echhart, ‘‘An Efficient technique for Burst Error Recovery,’’ Proceding of the International Workshop on Sampling Theory and Applications (SAMPTA ‘97), Aveiro, Portugal, pp. 161-168, June 1997. [2] F. Marvasti, M. Hasan, M. Echhart and S. Talebi, “Efficient Algorithms for Burst Error Recovery using FFT and other transform kernels,’’ IEEE Trans. on Signal Processing, April 1999. [3] R. E. Blahut, Algebraic Methods for Signal Processing and Communications Coding, Springer-Verlag, 1992. [4] J.B. Anderson and S. Mohan, Source and Channel Coding, pp. 171-174, Kluwer 1991. [5] Dan E. Dudgeon and Russell M. Mersereau, Multidimensional Digital Signal Processing, Prentice-Hall, 1984. [6] T. Strohmer, “Computationally Attractive Reconstruction of Bandlimited Images from Irregular Samples,” IEEE Trans. on Image Processing, vol. 6, no. 4, April 1997. [7] F. A. Marvasti, C. Liu, and G. Adams, “Analysis and recovery of multidimensional signals from irregular samples using non-linear and iterative techniques,” signal processing, vol. 36, pp. 13-30, 1994 [8] K. D. Sauer and J. P. Allebach, “Iterative reconstruction of band-limited images from nonuniformly spaced samoles,” IEEE Trans. Circuits Syst., vol. 34, no. 12, pp. 14971506, 1987. 12 [9] H. G. Feichtinger and T. Strohmer, “Fast iterative reconstruction of band-limited images from irregular sampling values,“ in Proc. Conf. CAIP, Computer Analysis of Images and Patterns, D. Chetvertikov and W. Kropatsch, Eds. Budapest, 1993, pp. 82-91. [10] H. Feichtinger and T. Strohmer, “Recovery of missing segments and lines in images,” Opt. Eng.: Issue Digital Image Recov. Synth, vol. 33, no. 10, pp. 3283-3289, 1994. [11] H. Feichtinger, “Iterative Methods for Scattered Data Approximation of Smooth Signals,” Proceding of the International Workshop on Sampling Theory and Applications (SAMPTA ‘97), Aveiro, Portugal, pp. 16-31, June 1997. [12] S. Talebi, F. Marvasti and M. Hassan, ‘‘Sensitivity of the Burst Error Recovery to Additive Noise,’’ Proceedings Communication Theory and Systems, The 7th Iranian Conference On Electrical Engineering, Tehran, Iran, pp. 19-25, May 1999. [13] F.F. Kuo and J.F. Kaiser, System Analysis by Digital Computers, chapter 7, John Wiley and Sons, New York, 1966. [14] Alan V. Oppenheim and Ronald W. Schafer, Discrete-Time Signal Processing, PrenticeHall, Inc., 1989. [15] H.G. Feichtinger, K. Grochenig and T. Strohmer, “Efficient Numerical Methods in Nonuniform Sampling Theory,” Numerische Mathematik, 69:423-440, 1995. 13 14 15 16 17 18