Full text

Introduction

Most of the current image compression algorithm of the work has focused on the improvement of the compression algorithm itself. However, as the different image features, the compre ssion algorithm effect s are different. According to the characteristic of the image , it make s the image characteristics better match to compression algorithm . This paper supplies a new algorithm for block classification image compression. Entropy is an imp ortant properties of the image which as an important basis for classification. Then we use the block classification results to put forward an image compression algorithm that based on classification of image characteristic.

2.

Algorithm Description

2.1 JPE G Image Compression Algorithm.

JPEG compression algorithm is based on DCT.

© The American Computational Science Society. All rights reserved.

Firstly, the original images make image divide, and then DCT encode, the DCT encoder consists of discrete cosine transform (DCT ), quantization, code, finally getting the compression image. Transmitting by the cable, wireless is equipment. At the receiving end, the compressed images conduct ed

DCT decode, and reconstructed images information. DCT is as a main operating. The diagram is as follows.

Fig .

1 J

PEG image compression algorithm

DCT transformation use the properties of fourier transformation that make use of the images boundary folding to an even function form. It conducts two dimensional fourier

transformation, and the transformed only contains c osine terms, that is called the discrete cosine transformation.

The definition of two dimensional discrete cosine transform for DCT. Assuming that the matrix A is in the size M * N.

    1 1 0 0 2 1 2 1 cos cos 2 2 M N pq p q m m n m p n q B A M M             

( )

, 0 2 ,1 1 p P M M P M           

, 0 2 ,1 1 q q N N q N           

pq B is called the DCT coefficient matrix of A. In JPEG algorithm,

M and N are both eight.

Inverse discrete cosine transform is defined as follows.

    1 1 0 0 2 1 2 1 cos cos 2 2 M N mn p q pq m n m p n q A B M M             

0 1, 0 1 m M n N      

( )

T he formula is that any M * N matrix of A can be expressed as the following function forms.

    2 1 2 1 cos cos 2 2 p q pq m p n q B M M      

0 1, 0 1 m M n N      

( )

These function s are called the base function of DCT transformation. So pq B can be seen as a weighting that is applied to each basis function. The input images are divided into data blocks of 8 *8 size, then make each block into 64 values, and ther e is a numerical DC coefficient. That is the average of the 8 *

image block. The remaining 63 blocks are ac coefficient. Secondly, make quantization to the DCT coefficients. Finally, coding and transmitting the quantized DCT coefficients, and form the form at of images compressed. In the decoding process, we decod e

the quantized DCT coefficients, and then inversing quantization DCT coefficients into the sample blocks. Finally it is combined a single image.

JPEG compression algorithm uses uniform quantizati on. It can be expressed as follows.

      , , , F u v Q u v Round S u v         

( )

  , Q u v is the coefficient of amplitude quantization .

  , S u v is the quantization step, it is the quantization table elements, which usually take s

different values with the DCT coefficients of the position and colo r components. T he table size is 8*8, and match ing with the 64 DCT coefficients.

. . JPEG2000 image compression algorithm.

Firstly, the source image is divided into blocks, then conducting discrete wavelet transformation to the processed results that ob tains the wavelet coefficient. Secondly, quantizing and coding the wavelet coefficients. Decoding is the inverse

© The American Computational Science Society. All rights reserved.

process code. Firstly, decoding, and then inverse quantization and inverse discrete wavelet transformation. Finally, reconstructing the origina l images. The coding block diagram as follows.

Fig .

2 JPEG2000 image compression algorithm

3.

S imulation E valuation Index .

In evaluating the performance of the algorithm for the image compression effect, it mainly has the comp ression ratio, the quality of reconstruction, time complexity, space complexity, cost and other aspects are considered. One of the m ost important is the compression ratio and the quality of reconstruction. This paper uses the performance index of compressi on algori thm to a macroscopic evaluation

s uch as PSNR and MSE. Generally speaking, the smaller of MSE is the better quality of the reconstructed images. But at the fixed conditions of the images quality, the compression efficiency and image quality has a c losely relationship. Sometimes,

if impr oved the compression efficiency ,

the images quality will deteriorate.

  max 1 1 0 0 10 log ( , ) ( , ) N N x y f PSNR g x y f x y                      

( )

max f is the maximum value of the image gray scale. f(x,y) is the inputting image,

x, y= , , , ..., N , g(x,y) is the image that f(x,y) compressed and decompress.

  1 1 0 0 ( , ) ( , ) N N x y MSE g x y f x y N       

( )

4. Simulation and Analy sis

4.1

Entropy Classified Algorithm.

Following is 100 images that simulate by MATLAB software. Calculating each image s ’ entropy, and calculate the PSNR of JPEG and JPEG2000 compression algorithm. The data was distribution ed as follow.

Fig .

Comparison of JPEG and JPEG2000 PSNR

From the graph, when the entropy value between 0 and 6, JPEG’PSNR is bigger th an the JPEG2000. That is to say ,

the JPEG compression is better when reconstructed images. JPEG2000’PSNR is bigger when the entropy value between 6 and 8. JPEG2000 is better when reconstructed images.

To classify the 100 images, it uses JPEG compression when the entropy value between 0 and 6, and when the entropy value between 6 and 8, it uses the JPEG2000 to images compression. Compared the new ideas wi th each compression, the results is as follows.

T able 1 Classification data processing

Average PSNR

Average Entropy

JPEG

JPEG2000

Entropy Classification A lgorithm

5.1263

65.9387

63.6757

67.6444

The new compression algorithm is better quality which can see from table 2.

© The American Computational Science Society. All rights reserved.

4.2

Block of image processing.

The image is decomposed into 4 pieces. On the left is M1, right M2 , lower left M3, lower right M4 . The simulation diagram and data table as follows.

Fig .

4 I

mage simulation of block

Table 2 P rocessing d ata of b lock

PSNR

Name of images

Entrop y

JPEG

JPEG200

M1.jpg

5.4682

59.452

57.6033

M2.jpg

6.2417

64.573

79.2647

M3.jpg

6.3830

54.432

75.2235

M4.jpg

6.1422

56.630

78.3452

Average Entropy of Divided

6.0588

58.772

72.6092

Average En tropy of Undivide d

6.2534

58.432

72.4319

Divided image can get a better effect than the anterior from the data of table.

Fig .

Block diagram of n ew a lgorithm

5.

New Algorithm Simulation.

Block the above images, and calculate the entropy value. Try to classify the images by the entropy range, and then choose different compression algorithm for images compression. Through a large number of calculations, the analysis shows that the new compression algorithm has certain advantage s.

The following is the compression and reconstruction results of a picture and data comparison of 100 images.

Fig .

T he simulation comparison chart

F ig .

Different algorithms comparison of average PSNR

T able 3 Processing the d ata a fter b lock and c l assification .

Average of PSNR

Average Entropy

JPE G

JPEG2

PSNR of new

Algorithm

6.058

58.7

72.609

73.0715

© The American Computational Science Society. All rights reserved.

6.

Conclusions

This paper studies on the JPEG and JPEG2000 image compression algorithm that existing, and put forward the blocking and classifying images compression algorithm which is based on entropy. It make s some validation in the compression efficiency of the theory , and the algorithm is better than the other two algorithms.

Acknowledgment

This work was supported by Science and Technology Development Plan of Jilin Province (201201107) and Doctoral Scientific Research Fund of Northeast Dianli University (bsjxm 201104) .

Figures

Article figure
Article figure
Article figure
Article figure