You are on page 1of 17

DIGITAL IMAGE PROCESSING

WRITTEN REPORT

ADAPTIVE IMAGE COMPRESSION TECHNIQUES FOR WIRELESS MULTIMEDIA APPLICATIONS

SUBMITTED BY:
NAVEEN MATHEW FRANCIS #105249595

INTRODUCTION The advent of new technologies like GPRS, EDGE made it possible for the evolution of 3G Networks which integrated data and fax capabilities to the existing voice services. There has been significant growth in this area in past few years and more and more users are getting involved in the new generation mobile systems. This predicts a huge market for wireless multimedia communication in the near future. The 3G features provided include data services, fax, internet, online games, weather updates, stock updates and so on. However, use of multimedia involves a large amount of information which requires a large bandwidth. Also factors like computation energy (energy consumed in processing information to be transmitted), and communication energy (energy consumed in wirelessly transmitting information) requirements for mobile multimedia communication have to be taken into account. The large requirements for bandwidth and energy consumption are significant bottlenecks to wireless multimedia communication. For mobile cellular systems it has been found that many parameters like signal strength vary depending on the user mobility, surroundings, environmental conditions etc. This may cause significant changes in the wireless channel conditions. One way to design a multimedia capable radio that accounts for varying communication conditions and requirements is to assume the worst-case. However, by designing a radio that adapts to current communication conditions and requirements, it is possible to help overcome the bandwidth and energy bottlenecks to wireless multimedia communication. In some cases channel coding parameters are adapted to match current channel conditions, thereby increasing the average bandwidth available. Also we can modify the broadcast power of a power amplifier to meet QoMD (Quality of Multimedia Data) requirements, thereby lowering energy consumption. These two options are used together in some cases. In this report, two different adaptive image compression techniques are explained and a comparison is made between them. First one is based on Dynamic Algorithm that makes use of the effects on an image by varying the parameters like Quantization Level and Virtual Block Size. In the second part we introduce the Wavelet Transform and the corresponding Adaptive Wavelet Image Compression Method. Then an Energy Efficient Wavelet Transform method is explained and is compared to both AWIC and the First method. In the first case analyze the effects of modifying the source coder. The JPEG image compression algorithm is a commonly used source coding technique. The effects of varying parameters of the JPEG image compression algorithm on energy consumption, bandwidth, and latency are discussed in detail. We also introduce a methodology to select the optimal image compression parameters to minimize energy consumption given the current conditions and constraints.

EFFECTS OF VARYING JPEG IMAGE COMPRESSION PARAMETERS ON ENERGY, LATENCY, AND IMAGE QUALITY One of the issues that make wireless multimedia communication difficult is the large amount of data that needs to be transmitted in the air interface between the mobile user and the base station. However, multimedia data can be compressed in a lossy manner, leading to smaller compressed representations of the multimedia data than is available with lossless data compression. Therefore, source coding (compression) plays an important role in communicating multimedia information. Tradeoffs between the Quality of Multimedia Data (QoMD) transmitted, the bandwidth required for communication, the energy consumed, and Quality of Service (latency) required in wireless multimedia communication are possible. The basic algorithm used in the JPEG compression is given below.

The discrete cosine transform (DCT) helps separate the image into parts (or spectral subbands) of differing importance (with respect to the image's visual quality). The DCT is similar to the discrete Fourier transform: it transforms a signal or image from the spatial domain to the frequency domain. With an input image, A, the coefficients for the output "image," B, are:

The input image is N2 pixels wide by N1 pixels high; A(i,j) is the intensity of the pixel in row i and column j; B(k1,k2) is the DCT coefficient in row k1 and column k2 of the DCT matrix. All DCT multiplications are real. This lowers the number of required multiplications, as compared to the discrete Fourier transform. The DCT input is an 8 by 8 array of integers. This array contains each pixel's gray scale level; 8 bit pixels have levels from 0 to 255. The output array of DCT coefficients contains integers; these can range from -1024 to 1023. For most images, much of the signal energy lies at low frequencies; these appear in the upper left corner of the DCT. The lower right values

represent higher frequencies, and are often small - small enough to be neglected with little visible distortion. Huffman coding is an entropy encoding algorithm used for data comprssion. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol.Huffman coding uses a specific method for choosing the representation for each symbol, resulting in a prefix-free code (that is, the bit string representing some particular symbol is never a prefix of the bit string representing any other symbol) that expresses the most common characters using shorter strings of bits than are used for less common source symbols. Huffman was able to design the most efficient compression method of this type: no other mapping of individual source symbols to unique strings of bits will produce a smaller average output size when the actual symbol frequencies agree with those used to create the code. For a set of symbols with a uniform probability distribution and a number of members which is a power of two, Huffman coding is equivalent to simple binary block encoding. Here the input image is divided into blocks of size 8 pixels by 8 pixels. Each of these 8x8 pixel block is transformed by a Discrete Cosine Transform (DCT) into its frequency domain equivalent. After the transform stage, each frequency component is quantized to reduce the amount of information that needs to be transmitted. These quantized values are then encoded using a Huffman encoding-based technique to reduce the size of the image representation. To investigate the effects of image compression parameters on energy, latency, quality of image, and bandwidth, we consider two parameters. The first parameter is the scaling of the quantization values used in the quantization step of JPEG. The JPEG standard defines some default quantization tables that can be scaled up or down depending on the desired quality of the final image. As the quantization level decreases, the image quality increases, but more information needs to be transmitted, causing more bits to be transmitted.

The second parameter that we study is Virtual Block Size (VBS). This parameter affects the DCT portion of JPEG. To implement VBS, the DCT still inputs the entire 8x8 block of pixels, but outputs a VBS X VBS amount of frequency information rather than an 8x8 block. When the block size is 8, all frequency information is computed. When the block size is 5, all frequency data outside the 5x5 block is set to 0.By setting the frequency values outside the VBS X VBS block to zero, less computation energy is required because the elements set to zero do not have to be computed or quantized. In addition, due to the encoding stage of JPEG, zeros require fewer bits to transmit, lowering the communication energy as the VBS values decrease.

128 150 150 150 128 110 100 90 839 125 47 -8 1 0 0 0 124150 150 0150 128 110 100 90 205 -82 -25 -13 0 0 80 44 -81 -47 -11 -7 0 0 0 -6 -22 -13 -1 150 128 110 100 90 000 1509 0 0 0 0 80 80 0 -16 -5 -1 00000000 150 128 110 100 90 80 80 85 00000000 00000000 128 110 100 90 80 80 85 90 110 110 90 80 85 90 95 100 100 90 80 80 85 95 105 115 90 80 80 80 90 100 115 128

839 125 47 -8 1 6 0 -2 124 205 -82 -25 -13 5 -2 -2 44 -81 -47 -11 7 -4 0 2 -6 -22 -13 -1 0 0 -1 0 0 -16 -5 -1 9 1 0 1 8 2 -6 2 0 -5 -1 0 2 -1 -1 0 -1 -3 0 0 -3 -3 2 1 2 1 0 0

VBS = 8

839 125 124 205 44 -81 -6 -22 0 -16 0 0 0 0 0 0

47 -8 -82 -25 -47 -11 -13 -1 -5 -1 0 0 0 0 0 0

1 -13 -7 0 9 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

VBS = 5

Effects of Varying Quantization Level Varying the quantization level of the JPEG image compression algorithm has several effects on wireless multimedia communication. First, increasing the quantization level reduces the image quality. Increasing the quantization level also decreases the number of bits to be sent, decreasing the communication energy, latency, and bandwidth required to wirelessly transmit the image. Effects of Varying Virtual Block Size As smaller VBSs are chosen, the quality of image and computation energy used in the DCT and quantization portion of the JPEG algorithm decrease, while the energy consumed in the encoding portion remains the same. In addition, because zeros require fewer bits to encode, the number of bits transmitted, and therefore the corresponding communication energy, latency, and bandwidth required, also decrease. SELECTION OF IMAGE COMPRESSION PARAMETERS FOR LOW POWER WIRELESS COMMUNICATION This process consists of three steps. The first two steps precompute an image quality parameters table consisting of the quantization level and compression ratio (in bits per pixel) for each possible image quality (PSNR Peak Signal to Noise Ratio) and Virtual Block Size (VBS). The third step, performed on-line in the multimedia capable radio, uses the image quality parameters table to select the optimal image compression parameters for the current latency, bandwidth, and quality of image requirements, along with the current transmission energy/bit (set by the power amplifier to minimize inter-signal interference).

Steps 1,2 (Offline)

lm

...

lm4

321 Possible VBS & QL Combinations

Precomputation

Avg PSNR & Compression ratio for each VBS & QL Precomputation Possible Parameters Table Possible Image Quality & QL Combinations

Step 3(Online)

Possible parameters Table Transmission energy/bit Compute Optimal Image Compression Parameters

Image Quality, latency & Bandwidth constraints

Current Image Compression parameters

In the first precomputation step, the image quality (PSNR) and number of bits to transmit, as determined by the compression ratio, is precomputed for each VBS and quantization level combination. Since image quality and compression ratio values vary from image to image, an average over a large number of images is used. The result of step 1 is a table of PSNRs and compression ratios referenced by VBS and quantization level. Precomputation step 2 uses the table computed in step 1 to determine a quantization level and compression ratio for each possible image quality and VBS combination. To determine the quantization level for a given image quality and VBS pair, a search is made in the table generated by step 1 for the largest quantization value which yields an acceptable image quality with the given VBS. The resulting quantization value, along with the corresponding compression ratio found in the table resulting from step 1, is stored in the image quality parameters table for use in the multimedia capable radio.

Algorithm for run-time selection of image compression parameters

Once the image quality parameters table is stored inside the multimedia capable radio, the radio must select, at run-time, which image compression parameters to use. During wireless communication, the multimedia capable radio monitors the image quality, latency, and bandwidth constraints, as well as the transmission power per bit for the current communication conditions and multimedia service. If there is a significant change in the conditions or constraints, step 3 of our methodology is performed in which the most appropriate image compression parameters are selected.

To determine the image compression parameters which will minimize the overall energy consumption of the mobile multimedia radio, the selection of the VBS and quantization level parameters, and their effects on both computation energy and number of bits transmitted (communication energy) must be considered simultaneously. As an example, consider the figure given below. Here in order to obtain a PSNR of 30dB, a tradeoff between computation energy and number of bits to transmit occurs when choosing different VBS values. The bottom line in the graph shows the decrease in computation energy as the VBS decreases. However, to maintain the same image quality, the quantization level must decrease, increasing the number of bits to transmit, and hence the communication energy. Therefore, to choose the image compression parameters which will minimize overall energy consumption, step 3 of the methodology must consider not only the direct effect that choosing the VBS has on computation energy, but also the indirect effect on communication energy.

For the required image quality (PSNR), and beginning with the largest VBS value (say VBS=8), the algorithm identifies the quantization level and compression ratio used to satisfy the image quality constraint by performing a lookup in the image quality parameters table. The multimedia capable radio then determines the overall energy dissipation by adding the computation energy (determined by VBS) and communication energy (determined as a product of uncompressed image size, compression ratio, and transmission power/bit). The algorithm compares the energy dissipation of the current VBS with the next smallest VBS. If choosing the next smallest VBS will increase the overall energy consumption, or violate the latency or bandwidth constraints, then the current VBS is chosen. If choosing the next smallest VBS decreases the overall energy consumption without violating latency or bandwidth constraints, then the algorithm decrements the VBS. The process is repeated till the optimal VBS and quantization level parameters are identified. Energy Savings Due to Adaptive Image Compression Using the methodology presented to select the optimal JPEG image compression parameters, the overall energy consumed in transmitting an image can be reduced. The adaptive radio consumes significantly less energy than the non-adaptive radio. For example, only 20% of the energy consumed by a non-adaptive radio is consumed by the adaptive radio for an image quality of 33dB.

Another Adaptive image compression method called Wavelet Image Compression is presented now. Wavelet Transform The forward wavelet-based transform uses a 1-D sub band decomposition process where a 1-D set of samples is converted into the low-pass sub band (Li) and high-pass sub band (Hi). The low-pass sub band represents a down sampled low-resolution version of the original image. The high-pass sub band represents residual information of the original image, needed for the perfect reconstruction of the original image from the low-pass sub band. The 2-D sub band decomposition is just an extension of 1-D sub band decomposition. The entire process is carried out by executing a 1-D sub band decomposition twice, first in one direction (horizontal), then in the orthogonal (vertical) direction. For example, the low-pass sub band (Li) resulting from the horizontal direction is further decomposed in the vertical direction, leading to LLi and LHi sub bands. Similarly, the high pass sub band (Hi) is further decomposed into HLi and HHi. After one level of transform, the image can be further decomposed by applying the 2-D subband decomposition to the existing LLli sub band. This iterative process results in multiple transform levels. Consider the figure given below. The first level of transform results in LH1, HL1, and HH1, in addition to LL1, which is further decomposed into LH2, HL2, HH2, LL2 at the second level, and the information of LL2 is used for the third level transform. We refer to the sub band LLi as a low-resolution sub band and high-pass sub bands LHi, HLi, HHi as horizontal, vertical, and diagonal sub band respectively since they represent the horizontal, vertical, and diagonal residual information of the original image. An example of three-level decomposition into sub bands of the image CASTLE is shown in the figure below.

Energy Consumption of the Wavelet Transform Algorithm We choose the Daubechies 5-tap/3-tap filter [8] for embedding in the forward wavelet transform. The main property of the wavelet filter is that it includes neighborhood information in the final result, thus avoiding the block effect of DCT transform which was discussed earlier.

It also has good localization and symmetric properties, which allow for simple treatment, high-speed computation, and high quality compressed image. In addition, this filter is amenable to energy efficient hardware implementation because it consists of binary shifter and integer adder units rather than multiplier/divider units. The following equation represents the Daubechies 5-tap/3-tap filter.

We analyze energy efficiency by determining the number of times certain basic operations are performed for a given input, which in turn determines the amount of switching activity, and hence the energy consumption. For example, in the forward wavelet decomposition using the above filter, 8 shift and 8 add operations are required to convert the sample image pixel into a low-pass coefficient. Similarly, high-pass decomposition requires 2 shift and 4 adds. We model the energy consumption of the low/high-pass decomposition by counting the number of operations and denote this as the computational load. Thus 8S + 8A units of computational load are required in a unit pixel of the low-pass decomposition and 2S + 4A units for the high-passes. For a given input image size of M X N and wavelet decomposition applied through L transform levels, we can estimate the total computational load as follows. Suppose we first apply the decomposition in the horizontal direction. Since all even-positioned image pixels are decomposed into the low-pass coefficients and odd-positioned image pixels are decomposed into the high-pass coefficients, the total computational load involved in horizontal decomposition is 1/2MN(10S+12A). The amount of computational load in the vertical decomposition is identical. Using the fact that the image size decreases by a factor of 4 in each transform level, the total computational load can be represented as follows:

The transform also involves a large number of memory accesses. Here we estimate the data-access load by counting the total number of memory accesses during the wavelet transform. At a transform level, each pixel is read twice and written twice. Hence, with the same condition as the above estimation method, the total data-access load is given by the number of read and write operations:

The overall computation energy is computed as a weighted sum of the computational load and data-access load. Also we have to consider the communication energy which is given by C*R, where C is the size of the compressed image (in bits) and R is the per bit transmission energy consumed by the RF transmitter.

Energy Efficient Wavelet Image Transform Algorithm Here we have an algorithm aimed at minimizing computation energy (by reducing the number of arithmetic operations and memory accesses) and communication energy (by reducing the number of transmitted bits). Further, the algorithm aims at effecting energy savings while minimally impacting the quality of the image. This algorithm exploits the numerical distribution of the high-pass coefficients to judiciously eliminate a large number of samples from consideration in the image compression process. The figure shown below illustrates the distribution of high-pass coefficients after applying a 2 level wavelet transform to the 512 X 512 image. We observe that the high-pass coefficients are generally represented by small integer values. For example, 80 % of the high-pass coefficients for level 1 are less than 5. Because of the numerical distribution of the high-pass coefficients and the effect of the quantization step on small valued coefficients, we can estimate the high-pass coefficients to be zeros and hence avoid computing them and incur minimal image quality loss. This approach has two main advantages. First, because the high-pass coefficients do not have to be computed, we reduce the computation energy consumed during the wavelet image compression process by reducing the number of executed operations. Second, because the encoder and decoder are aware of the estimation technique, no information needs to be transmitted across the wireless channel, thereby reducing the communication energy required.

This algorithm consists of two techniques attempting to conserve energy by avoiding the computation and communication of high-pass coefficients. The first technique attempts to conserve energy by eliminating the least significant sub band. This technique is called HH elimination. In the second scheme, only the most significant sub band (lowresolution information, LLi) is kept and all high-pass sub bands (LHi, HLi, and HHi) are removed. This H* elimination, because all high-pass sub bands are eliminated in the transform step.

Energy Efficiency of Elimination Techniques The modifications made to the wavelet transform step for applying the elimination technique is shown in the figure below. To implement the HH elimination technique, after the row transform, the high-pass coefficients are only fed into the low-pass filter, and not the high-pass filter in the following column transform step. This avoids the generation of a diagonal sub band (HH). To implement the H* elimination technique, the input image is processed through only the low-pass filter during both the row and column transform steps. We can therefore remove all high-pass decomposition steps during the transform by using the H* elimination technique.

Now lets analyze the energy efficiency of the elimination techniques. In the HH elimination technique, the computation load during the row transform is the same as with the AWIC algorithm. However, during the column transform of the high-pass sub band resulting from the previous row transform, the high-pass sub band (HH) is not computed. The results in a savings of 1/4MN(4A+2S) operation units of computational load (7.4 % compared to the Adaptive Wavelet Image Compression algorithm). Therefore, the total computational load when using HH elimination is represented as:

Because the high-pass sub band resulting from the row transform is still required to compute the HL sub band during the column transform, we cannot save on read accesses using the HH elimination technique. However, we can save on a quarter of write operations (12.5 % savings) during the column transform since the results of HH sub band are pre-assigned to zeros before the transform is computed. Thus, the total dataaccess load is given by:

The HH elimination technique also results in significant communication energy savings. For each transform level that the HH elimination technique is applied, 25 % of the image data is removed leading to less information to be transmitted over the wireless channel.

While the HH elimination technique reduces some computation loads during the transform steps by eliminating one out of every four sub bands, the H* elimination technique targets more significant computation energy savings. In the H* elimination Technique only the LL sub band is generated and all high pass sub bands are removed. Thus, only even-positioned pixels are processed in the row transform and fed to the subsequent column transform. Odd-positioned pixels are skipped, since these pixels represent all the high-pass coefficients (HL, HH). Similarly, at the column transform step, all odd-columned pixels are skipped and only even-columned low-passed pixels are processed. This leads to a savings of MN(6A+4S) operation units of computational load (over 47 % compared to the AWIC algorithm). Therefore, the total computational load when using H* elimination is represented as:

H* elimination also reduces the data-access load significantly. Since the wavelet transform utilizes neighborhood pixels to generate coefficients, all image pixels should be read once to generate low-pass coefficients in the row transform. However, in the column transform, only even-columned pixels are required. We therefore can reduce the number of read accesses by 25 %. Similarly, since only low-pass coefficients (L, LL) are written to memory and accessed through the next transform steps, write operations are saved by 63 %. The total data-access load is given by:

The H* elimination technique can result in significant savings in communication energy since three out of four sub bands are removed from the compressed results.

Effects on Computation Energy and Image Quality

Here we compare the computation energy consumed and the image quality generated by each of the two elimination techniques and the AWIC algorithm. Consider the figure given below we observe that the H* elimination technique leads to significant energy savings over the AWIC algorithm, sometimes at nominal loss in image quality. For example, at elimination level 1, the energy savings using H* elimination is about 34 %, while the loss in image quality is negligible. At elimination level 2, the H* elimination technique yields 42 % energy savings, while the image quality degradation is within 3dB. The figure also shows that significantly more energy savings can be accomplished using H* elimination over HH elimination. However, the degradation in image quality is more significant in the case of H* elimination.

To get an idea of the impact on image quality, we next present visual comparisons of two versions of the image obtained. The PSNRs of the two images are 31.08 dB (AWIC) and 28.63 dB (H* level 2) respectively. Note that while the energy saving between the two approaches is significant (42 %), there is almost no perceivable difference in the quality of the two images.

Effects on Communication Energy and Image Quality Here we study the image quality obtained, and the communication energy consumed in transmitting the compressed image, using the HH and H* elimination techniques. The Communication energy for each technique is estimated from the size of the compressed image. Here we note that when the H* elimination technique is applied through level 2, the communication energy consumption is 37 % less compared to the AWIC algorithm, while the image quality degradation is within only 3 dB. As the number of elimination levels increase, the savings in communication energy increases. However, in doing so, the quality of image also degrades, demonstrating a trade-off between communication energy and quality of image obtained. This demonstrate that depending on the image quality desired by a wireless service, and the state of the battery of the wireless appliances, by applying the HH and H* techniques at different levels of elimination, different trade-offs can be obtained between the image quality obtained and the energy expended in compressing the image and transmitting the compressed image.

Wavelet Image Compression Parameters Besides the elimination techniques we saw earlier, there are other wavelet image compression parameters, which can be used to minimize computation and communication energy consumed, and effect the desired trade-off between energy consumed, image quality obtained, and bandwidth and air time (service cost) expended during multimedia mobile communication. Varying Wavelet Transform Level Increasing the applied wavelet transform level can reduce the number of transmitted bits, leading to less communication energy for mobile image communication. However, increasing the transform level also results in an increase in computation energy consumption. Varying Quantization Level The goal of quantization is to reduce the entropy of the transformed coefficients so that the entropy-coder can meet a target bit-rate, which is lower than the required bit-rate for wireless transmission. Varying the quantization level of the wavelet image compression algorithm has several effects on mobile image communication. By increasing the quantization level, we can decrease the number of transmitted bits, leading to a lower bitrate and less communication energy, latency, and bandwidth required to wirelessly transmit the image. However, increasing the quantization level has negative effects such as decreasing the image quality. Adaptive Image Communication Varying the three parameters (wavelet transform level, elimination level, and quantization level) of the new energy efficient image compression algorithm, EEWITA, can produce significant impact on the computation and communication energy needed, and the image quality obtained, in wireless image communication. Based on EEWITA and its parameters, we can have an adaptive image codec, which can minimize energy consumption and air time needed for an image-based wireless service, while meeting bandwidth constraints of the wireless network, the image quality, and latency constraints of the wireless service.

Central to the adaptive EEWITA is a dynamic parameter selection methodology, which can select the optimal Transform Level (TL), Elimination Level (EL), and Quantization Level (QL), to minimize energy consumption based on the bandwidth, image quality, and latency constraints. . CONCLUSION Future deployment of cellular multimedia data services will require very large amounts of data to be transmitted, creating tremendously high energy and bandwidth requirements that cannot be fulfilled by limited growth in battery technologies, or the projected growth in available cellular bandwidth. By adapting the source coder of a multimedia capable radio to current communication conditions and constraints, it is possible to overcome the bandwidth and energy bottlenecks to wireless multimedia communication. The effects of varying the quantization level and VBS on quality of image, bandwidth required, computation energy, and communication energy is significant and an adaptive algorithm depending on these factors were discussed. Also another method based on Wavelet Transform named adaptive EEWITA codec enables transmission of image data, an important part of internet and other data applications, with significant savings in the energy consumed and air time (service cost) required, while meeting available bandwidth and data quality constraints.

GLOSSARY GPRS General Packet Radio Service EDGE Enhanced Data Rates for Global Evolution 3G Third Generation Cellular Networks QoMD - Quality of Multimedia Data VBS - Virtual Block Size QL Quantization Level DCT - Discrete Cosine Transform JPEG - Joint Photographic Experts Group PSNR Peak Signal to Noise Ratio AWIC Adaptive Wavelet Image Compression Li - Low-pass sub band Hi - High-pass sub band EEWITA - Energy Efficient Wavelet Image Transform Algorithm REFERENCES: 1) Adaptive and Energy Efficient Wavelet Image Compression For Mobile Multimedia Data Services - Dong-Gi Lee and Sujit Dey

2) Adaptive Image Compression for Wireless Multimedia Communication -Clark N. Taylor and Sujit Dey 3) Digital Image Processing Gonzalez and Woods 4) Digital Picture Processing - A. Rosenfeld and A. C. Kak

You might also like