Você está na página 1de 3

201O Second International Conference on Communication Systems, Networks and Applications

Design and Research on the JPEG-LS Image Compression Algorithm


Huizhuo Niu Yuanyuan Shang, Xinhua Yang, Dawei Xu, Baoyuan Han, Chuan Chen

1. College of Information Engineering, Capital Normal University 2. Beijing Engineering Research Center of High Reliable Embedded System, Capital Normal University Beijing, China ymdynhz@126.com

1. College of Information Engineering, Capital Normal University 2. Beijing Engineering Research Center of High Reliable Embedded System, Capital Normal University Beijing, China

Abstract-with the increasing of imaging sensor resolution, the captured images are becoming larger and larger, which requires higher image compression ratio. This paper analyzes some key points of this standard including nonlinear prediction, golomb coding in and Run-Length coding, and of discusses the The performance lossless compression JPEG-LS.

The whole algorithm system consists of seven modules. The paper describes several key points of the design in detail, and analyzed the hardware implementation flow. Finally, some conclusion is brought out for further research.
II.

comparison of this standard with other algorithms is also given. While discussing the hardware implementation based on FPGA, this paper presents the cache settings for reading and writing and timing control for the whole hardware design. The analysis shows that JPEG-LS lossless compression algorithm has a certain advantage in the imaging field.

Research on image

compression algorithms
A.

Comparison of compression algorithms

Index Terms-Image Compression, JPEG-LS, Golomb coding,


run-length coding

I.

Introduction

With the improvement of image sensor resolution, a growing amount of data is brought out in the modem image process. And it leads to an increasingly heavy burden for data storage and transmission. Therefore, the image data compression also becomes more important. Because some of the system requires a higher integrity for the image detail, the lossless compression is necessary for the images. Now there are some popular image compression algorithms such as JPEG, PNG, JPEG 2000, JPEG-LS etc. This article discusses an image compression method and its implementation based on hardware. Because of the need for hardware realization, the real and complex performance should be the first concern. Compared with such algorithms, JPEG-LS can be drawn with obvious advantages. JPEG-LS (ITU-T T.S7 ISO / IEC 14495) is an international standard for image lossless or near lossless compression which is proposed in 9S. And what we only focused on is its lossless compression performance. This algorithm is used because there is no data conversion such as FFT and other complex data transformation process. As only the data subtraction, shift and other similar processing should be realized, the algorithm is relatively simple and suitable for hardware implementation. The compression process is embedded into a high-speed image acquisition system in the FPGA using VHDL. The core components of this hardware system used EP2C35F672CS which is produced by ALTERA.

Lossless compression is known as redundancy compression method or entropy coding. Specifically, it means that the image after being decoded is strictly the same as the primitive one. And there is no distortion between them. From the mathematical point, it is a reversible operation. Nowadays, the popular lossless compression coding algorithms include Huffman coding, arithmetic coding, length encoding, etc. But each method has some limitations. Therefore, the International Standard Organization consolidated strengths and weaknesses of various algorithms and proposed a series of coding standards. These standards integrate some single algorithm together. It provides an efficient way for compression and then becomes a hot research. The more mature standards among them are JPEG, JPEG-LS, JPEG2000 etc, and they are for still image coding algorithms. The following table is a performance comparison among some mainstream compression algorithm. What we concerned is the lossless compression performance and low complexity. And the extend function such as scalability for JPEG2000 is not important. Compared with other algorithms, almost the JPEG-LS lossless compression can achieve the best results at the same computational complexity [4-5].
TABLE!.
algorit hm Random Access

COMPARISON OF COMPRESSION ALGORITHMS


Low Com pIe xity
++++ +

Error Recover y
++ +++

Embedd ed Bit Stream +

Univers al
++ ++

JPEG MPEG4 V TC

978-1-4244-7477-61101$26.00 2010 IEEE


232

ICCSNA2010

algorit hm

Random Access

Low Comple xitv


+++++ +++ ++

Error Recover y
++ + +++

Embedd ed Bit Stream


-

Univers al
+++ +++ +++

JPEGLS PNG JPEG 2000


algorit hm

++

+++

Lossless Com pre ssion


+

Loss Compre ssion


+++ ++++

Flexibili

ROI Encodin

Arbitrar

ty
++ +++

2
+

Y Shape
++

JPEG MPEG 4 V TC JPEGLS PNG JPEG 2000

++++ +++ +++

+ +++++

+++

+++++

4.2. RAM_IO calls for 8KB space to store the context data and environment variables. Parameter model module calculates the model parameters under the conventional mode. The data which are calculated from this module are code length parameter (data_k) and the data which needs to be encoded (data_merrval). Then the golomb_transform module does the conventional model encode. If run-length encoding mode is required, first the code length is calculated by the MCV and it also determined the need for run-length break encoding. The runlength_transform module encodes the length. At the same time, the breakpoint is encoded by the break_encoding module. The encoded data from the above three modules is imported into the data_fifo module in a serial way. This module converts the final output data to 8-bit.

B.

jPEG-LS algorithm

JPEG-LS algorithm is based on LOCO-I algorithm [6]. Here we discuss the encoder process. On the basis of the data prediction, encoding uses run-length coding model and entropy coding based on prediction model. During the encoding process, the original image pixel data is put into the encoder in turn. Then the encoder calculated the local gradient for the current coding pixel according to the context of the pixel. According to the context, the encoder selects the encoding method, that is, whether the conventional mode or the run-length encoding mode. If the local gradients reflect that the current pixel is in a flat area (the local gradients are all "0"), choose the run-length encoding mode, or run into the conventional mode coding. In the conventional mode, several context pixels which have been already encoded are inspected through the context model. The encoder uses a cause-effect template for fixed prediction, and context is taken into account to correct the predicted values adaptively. Then calculate the forecast error for Golomb coding. In the run-length model, first scan for length, and encode the lengths and termination of the pixel which breaks the run-length encoding. The specific implementation principle is shown below.

Figure 2.

JPEG-LS encoding modules

B.

Timing control in MCU module

Figure I.

Block diagram for JPEG-LS

MCV module controls the entire coding process. It is the most critical module. It completes for the following three features: first, it make the data to be compressed write into the RAM_IO module and read them out. It provides the address and read or write enable signal. Judge the context data to select the method for encoding. If it is run-length model, the calculation of the length is necessary. Set a counter to give each module enable signal to start the appropriate treatment. For the pixel data input and read out processing, this module has two pointers to control a reasonable order, see this at 4.3.1. The encoding mode is selected by computing the gradient of the neighborhood data. If all of them are zero, encode by RLE mode, or encode by conventional mode. For the control of each module, it makes use of a process control state machine. The specific process is shown as follows. First of all, give the initialized signal to start the program. This signal sets the parameters of the two modes, and empties the FIFO cache. While inputting a pixel, the timing control module needs to give the cache address. Yet while reading data the address is given first. After reading out the data which would be encoded and its neighboring pixel, the timing control module needs to determine the encoding mode. If conventional mode encoding is required, give the encoding enable signal. And then do the conventional mode coding process. At the same time, the next pixel can be read to judge. If it is run length coding, run length scanning module to read data and

III.

The design of JPEG- LS based on FPGA

A.

System design

The hardware implementation for JPEG-LS using VHDL language. This system contains seven modules. MCV is the core of the entire system, and it is in charge of timing control and the choice for encoding method. This part is analysis in

233

calculate run length until the break. Then this module needs to return an interrupt signal to show that the run-length scanning is completed and return the run length for the next scan so that it can decide the number of pixels point to skip. Since then determine whether it is the end of this line to select the run length encoding mode. While encoding, read the next pixel. At the same time, update the process parameters. The core algorithm, Golomb coding is non-fixed length coding, so set a FIFO. The serial data is put out by 8-bit. When all the data are output, a sign of the signal is given out. The module controls the encoding for the next pixel until the end of the whole image. If the final pixels do not reach to 8, the output will be filled with zeros.

In the data processing process, both read-p and write-p are in a queue for four lines cycle. When reading (writing) a pixel, the reading (writing) pointer pluses one. As soon as the handled data reached to the end of the fourth line, tum to the first row for next process. To facilitate the context reading, the whole process can not cover the last line of reading data. That is to say, writing pointer should in a loop behind the reading pointer over a row. And also reading can not exceed writing (or the data read out will be the last four lines of data). After initialization, start writing pointer to write data with the appropriate address. At this time the difference between reading and writing pointers is less than a row, so reading pointer does not move until a row of data is enough. Now reading and writing is deposited into two separate processes that can be completed in the same clock cycle.
IV.

Conclusions

This article introduces the design of JPEG-LS based on FPGA. Several key points about its hardware implementations are discussed in detail, including cache settings, timing control, and handling of boundary points. The disadvantage of this method lies in the ability to distinguish error. In our future research, some error correction methods will be utilized to make this algorithm more efficient.

Acknowledgment
We would like to express our thanks to Prof. W.G. Zhang, Dr. R. Ding, and Dr. Y.X Zhang for their helps. This work was supported by a grant from the National Natural Science Foundation of China (No. 10603009) and Beijing Nova Program (No. 2008B57).

References
[1] Figure 3. Timing control in MC U module [2]

Bei Liu, Image compression technology in satellite engineering research. Master's thesis, Tongji University, 2007.1
David S. Taubman, Michael W. Marcellin, JPEG2000: Image C ompression, Fundamentals, Standards and Practice, publishing house of electronic Industry.

c.

Handling f Cache or

[3] [4]

In order to facilitate data storage and read, set a cache for four lines of pixels. Using a reading pointer and a writing pointer to control the data to read and write. Because of the need to read the context of the information, control both the sequence of the pointer as shown below.

Dong Hu, Still image coding methods and international standards, Beijing University of posts and telecommunication press, 2003.12 Weinbenger Marcelo J. Senoussi Gndiel, Sapiro Guillermo. The LOC O-I Lossless Image C ompression Algorithm; Principles and Standardization into JPEG-LS[J]. IEEE Trams. on Image Processing, 2000, 8(9): 13091324

[5]

Weinbenger M J, Serouasi G, Sapiro G. LOC O-I: A Low C omplexity, C ontext-Based, Lossless Image C ompression Algorithm [A]. Data C ompression C onference [C ], 1996.3 Tianxu Zhang, Sheng Zhou, Yonghui Zeng, Lossless of Image Systems C ompression Algorithm based Engineering and Eletronics, 2004, on FPGA, Journal 26(10) : 1340-1343

[6]

Figure 4.

Reading pointer & writing pointer

234

Você também pode gostar