Edge Defection Prediction by Using Wavelet Compression

: Digital image have been expanding in usage. The importance of image compression algorithms have been increased, to produce smaller file size with a lower computational requirement. The wavelet transform offers a natural decomposition of images at multiple resolutions, since the wavelet transform can decompose images into various multiresolution subbands, where the correlation exists. A novel technique for image compression by taking advantage of correlation is addressed. It is based on predictive edge detection from the LL band of the lowest resolution level to predict the edge in the LH, HL and HH bands in the higher resolution level. If the coefficient is predictive as an edge it is preserved, otherwise it is discarded. In the decoder, the location of the preserved coefficients can also be found as in the encoder. Results showed that photo images give a higher degree of compression compared with the satellite images, due to the information in the satellite images is higher than in the photo images.


INTRODUCTION
The image compression involves reducing the typically massive amount of data needed to represent an image. This is done by eliminating data that are visually unnecessary and by taking advantage of the redundancy, that is inherent in most images. When images need to be compressed so as to be examined by people, understanding exactly what part of the image data is important for human perception, by taking advantage of the physiological and psychological aspects of the human visual system [1,2]. Digital image compression techniques are necessary for applications in communications, multimedia, medical systems, consumer electronics, remote surveillance, facsimile transmission … etc. The discrete wavelet transform (DWT) is fast, linear operation that operates on a data vector whose length is an integer power of two, transforming it into a numerically different vectors of the same length.
Wavelet Transform: Wavelet transform has been extensively studied in various fields. The multiresolution architecture is very suitable for image analysis. Figure 1a shows the tree of the 10 subbands decomposed by two-dimensional wavelet transform. Figure 1b shows the data structure for these subbands. The original image of N*N dimension is decomposed into 4 sub images of (N/2*N/2) in the sub band decomposition of level 1. Which are LL, LH, HL and HH bands. The sub image of the LL band is the coarse image of the original image. Similarly, the LL band is  into the LL, LH, HL and HH bands of (N/4*N/4) in level 2. Finally, the LL band in level 2 is decomposed into the LL, LH, HL and HH band of (N/8*N/8) in level 3 [3,4]. Therefore, the LL band in level 3 is coarser than the LL bands in level 2 and so on. The edge in level 3 is the coarsest edge and the edge in level 1 is the finest edge. It is easy to know that the edge in the LH, HL and HH bands in level 3 should be highly correlated with the edge estimated in the LL band in level 3. Therefore, the edges of the LL band in level 3 can be used to predict edges of the HL, LH and HH bands in level 3. The edges in the LH, HL and HH band can also be used to predict the edges of their corresponding bands in level 2 and so on.
Two Dimensional Wavelet Transform: Since the scaling and wavelet functions are separable, each convolution breaks down into one-dimensional convolution on the rows and columns of f (i,j), which is (N*N) dimension. At stage1, the rows of the image f (i,j) first convolve with low pass filter and with high pass filter. The columns of each of (N/2*N) array are then convolved with low-pass filter and with high-pass filter. The result is the four (N/2*N/2) arrays required for that stage of the transform. The transformation process can be carried out to many stages. Each image row will pass though the two convolution functions and each of them creates an output stream that is half the length of the input row, these convolution function are filters, the first half is the low pass filter function [5].
While the other half is produced by the high pass filter function; Where: N: is the input row size. c's: are the coefficients (in this example c 0 = c 1 = 1). a, b: are the output functions.
In the proposed algorithm of this paper we use (1/ 2 ) for a i and b i instead of (1/2) in forward and reverse wavelet transform to reduce the number of operations required in the process. In many situations, the low-pass output contains most of the information content of the input row. The high pass output contains the difference between the true input and the value of the reconstructed input. The original image is reconstructed, by the inverse low pass filter; Which is applied to the LL band in level 3. The inverse high pass filter function is applied; to band LH in level 3. The perfect reconstruction is a sum of the inverse low pass and inverse high pass filter; Image Compression: Compression of DWT is one transform coding classes, which has three basic components; transformation, quantization and coding. The original image passes though multi resolution wavelet transformation to produce transform coefficients that are decorrelated. DWT decomposes the input image into a set of frequency subband. The transform coefficients are then quantized by a simple scalar quantizer to produce a stream of symbols. Note that all the information loss occurs in the quantization stage.
The quantization goal is to produce transform coefficients of quantized distribution small enough, that the symbols can be entropy coded at low bit rate. Two algorithms are proposed for image compression by using edge detection.

Predictive Edge Detection from the Coarsest Band:
Most edge detectors are based on local measurements of the image variations and edges, which are generally defined as "block", where the image intensity has a maximum variation. The image variations can be examined by standard deviation of a block of transform coefficients for edge detection. Denoting an N*N image by f(x,y) and µ is the mean value, σ is the standard deviation which are computed as: For each subband a threshold that indicates image variation can be selected to do edge detection, Fig. 2   In the LL band of level 3, the subband 8 is shown in Fig.  1 and a block of 2*2 is used to compute it's standard deviation. Then it is compared with a predefined threshold of each band. The threshold becomes a tool for achieving the trade-off between image degradation and compression ratio. If the standard deviation at the subband 8 is greater than the predefined threshold of a subband the corresponding block of this subband is considered to be a region of high spatial variation and the corresponding coefficients are preserved; otherwise, they are discarded (fill with zeros).This algorithm uses the coarsest band to predict the edge of all sub bands which can be written as bellow:  Fig. 3. Figure 4 illustrates the algorithm 2 on the progressive predictive edge detection. The encoder, first transmits the sub band 8 to the receiver. According to the standard deviation of a block of 2*2 in the subband 8, the encoder decides whether to send the block of 2*2 at LH, HL and HH bands of level 3 or not. If the block is rejected then it is marked in the encoder and is filled by zeros in the encoder. Otherwise the block is transmitted and unmarked. When the transmission of all bands in level 3 is finished the standard deviation at the other three bands in level 3 (block of 2*2) is used to predict the edges of the corresponding bands of level 2 (block of 4*4). According to the standard deviation of block 2*2 in every band in level 2, the encoder decides whether to send the block of 4*4 at the corresponding bands in level 1 or not, if it will be filled by zeros. In coding; the marked block means that is already discarded and the block is not used to predict the lower level. Since the transformed coefficients are transmitted level by level, the algorithm is written as below: Each band is optimally quantized and encode with variable length coding. With the exception of the sub band 8, each band is quantized with various bit-rates based on its standard deviation. Figure 6 and 7, show the edge detection on in the subbands by algorithm 1 and 2 respectively, the white dots in the subbands are the coefficients, which are predicted as edges and preserved; otherwise, the coefficients which are not predicted as edges, are discarded. The proposed coding methods are applied to (8bit/pixel) gray level images. The encoder output bit rate measured in bit/pixel and is a measure of the reconstruction quality. The peak signal-to-noise ratio (PSNR dB ) is used, which is defined by: PSNR dB = 10 log 10 (256 2 /MSE) (8) Where MSE is the Mean-Square-Error The Table 1 and 2 show the bit rate and PSNR, to two types of images, the photo images and satellite images. The tables show one of the samples, the compression ratio of satellite image is less than the photo image, because it contains huge amount of information compared with the photo image.

CONCLUSION
The use of discrete wavelet transform provides an attractive trade off between spatial and frequency resolution. This unique property of wavelet transform does not exit in other transform. It also has better energy concentration property than the other transforms. Choice the order of the wavelet in image compression is a critical issue that affects image quality as well as system design. This choice is based on several tests namely; energy distribution and compaction, visual reconstruction artifacts and finally. The comparisons of these filter performance on the proposed algorithms. The orientations HL and LH contain more energy than HH sub bands. The coefficients in orientation are less important for the reconstruction since they are responsible for patterns that can hardly be seen by the human's eye. In addition, first resolution level contain less energy than second, which contains less energy than the third, ….etc. The coarsest level, orientation LL consists of wider range larger positive coefficients than the other orientations. This orientation contains the most important coefficients. Thus a great care should be given to this subband in quantization and coding to obtain high reconstruction quality.