Abstract: Although the post-compression rate-distortion optimization algorithm of the JPEG2000 still image compression standard can maintain good image quality, it has a large amount of computation and occupies a lot of memory. This paper proposes a new rate control method based on prior information scanning, which has an image quality basically equivalent to that of rate-distortion optimization. This method can effectively reduce the computational complexity of entropy coding and reduce memory usage.
Keywords: JPEG2000; image compression; rate-distortion optimization; scanning
0 Introduction
With the continuous development of multimedia and network technology, how to effectively use channel bandwidth when transmitting image or video information has become one of the main topics of discussion today. Rate control is a method that must be used to control the bit rate in image or video encoding. Its ultimate goal is to reasonably distribute the target bit rate to the image or video in order to obtain the minimum distortion.
JPEG2000 is a new international standard for still image compression encoding. Because it adopts a new structure different from other image compression standards, JPEG2000 has the advantages of high compression ratio, support for lossy and lossless compression, and random access and processing of code streams. The encoding algorithm of JPEG2000 includes discrete wavelet transform (DWT) and bit plane entropy coding. In JPEG2000, rate control can be performed by trying different quantization step sizes: and through the bit plane MQ encoder, JPEG2000 can accurately and simply control the bit rate to achieve the required bit rate. The core encoding method of JPEG2000 is embedded code block coding (EBCOT). Its optimal truncation is a rate control method that minimizes image distortion. This process is after the wavelet coefficients are entropy coded (compressed), so it is also called compressed rate-distortion optimization (PCRD).
According to the actual rate-distortion information of all compressed data, PCRD technology can calculate the image distortion minimization of the target bitstream. However, this also requires all the bitstream data of the image. In fact
, a lot of data will not be output, and this process will also take up a lot of memory and calculation. To this end, this paper proposes a new rate control method that can effectively reduce the amount of calculation and memory usage, while achieving similar results.
1 Introduction to JPEG2000
As a new international compression standard, JPEG2000 can usually be regarded as six parts: wavelet transform (DWT), scalar quantization, bit coefficient modeling, arithmetic coding, post-compression rate distortion optimization and bitstream organization.
Wavelet transform can decompose the image into four sub-bands: LL, HL, LH and HH, and can be decomposed at multiple levels. LL is where the low-frequency information of the image is located, and the other three sub-bands contain the high-frequency information of the image. After these wavelet coefficients are quantized, they can enter the EBCOT coding process.
1.1 Entropy coding
The entropy coding process generally includes coefficient modeling and arithmetic coding. It is essentially a bit plane coding process. In this process, each coding block is encoded independently and passes through three coding channels, namely the importance channel, the amplitude refinement channel and the zeroing channel. These coding channels will find the context of each bit coefficient according to the bit coefficient model, and then perform context-based arithmetic coding (MQ) on this bit coefficient.
1.2 Rate control
Rate control involves three parts: quantization, entropy coding and bitstream organization. Quantization is the process of repeatedly adjusting the quantization step size according to the required compression rate to achieve the target bit rate. This is an interactive control method. Another method of using post-compression processing is to set a truncation point for each coding block in the bitstream data. This truncation point can determine the amount of data encoded by the coding channel of each code block. This is the post-compression rate-distortion optimization of JPEG2000. The specific algorithm is as follows:
First, set the bit rate of the coding block Bi to be
, the distortion to be
, and the target bit rate of the final compressed data to be Rmax. Then the truncation point of each coding block can be freely selected. It only needs the final bit rate to satisfy the following formula:
If the distortion of the reconstructed image is represented by the sum of the distortions of each coding block, the distortion of the reconstructed image is:
Thus, at the intercept point ni, its rate-distortion slope is:
Then, using the Lagrange multiplier method, the optimal truncation point λ can be found, thereby achieving optimal truncation coding.
2 New rate control method
The optimal truncation point λ can only be obtained through the actual rate-distortion slope of all truncation points, which requires that all bit plane data encoded by the entropy coding process and all encoded code streams are stored in the memory, and even those code streams that do not need to be transmitted after code stream control must be encoded and stored. However, through research, it is found that if the rate-distortion slope of each truncation point is arranged in a descending manner, the arrangement order is related to the number of bit plane layers. In general, the rate-distortion slope of a high bit plane is greater than that of a low bit plane; secondly, the rate-distortion slope of the first encoded channel is greater than that of the later encoded channel.
Based on the above two points, the bit plane information of the image can be scanned first, and then those with large rate-distortion slopes can be encoded. The unimportant bits at the end can be left unencoded. The process of this method is first to calculate the highest bit plane number Pi of each code block Bi according to the following formula;
where is the maximum coefficient in the code block Bi. Then, the maximum number of planes is calculated:
The sequence diagram for scanning each code block is shown in Figure 1. For each scanned code block, there are generally the following three conditions:
(1) First, determine whether Pi = Pmax. If so, encode the unencoded bit plane channel of this coding block, then reduce Pi by 1, and then check condition (2). Otherwise, check condition (3);
(2) If the accumulated bit rate is greater than the target bit rate, exit encoding immediately. Otherwise, check condition (3);
(3) If this is the last coding block, then reduce Pmax by 1, and then enter the encoding of the next layer. Otherwise, continue scanning the next coding block.
Since the above condition (2) is satisfied
, the bit rate will not exceed the compression rate limit. Conditions (1) and (3) fully consider the importance of bit planes and coding channels, thereby ensuring the best image quality.
3 Experimental results
Here, we use 512x512 lena images for testing. Table 1 records the comparison between PCRD and the new method in terms of computational complexity and memory usage. Table 2 lists the comparison of the two methods in terms of PSNR. The decompressed image effects of the two methods are shown in Figure 2.
4 Conclusion
Through the analysis of JPEG2000, this paper proposes a method to control the bit rate by estimating rate-distortion information. Since this method does not need to encode all the data, it can effectively reduce redundant calculations and memory usage while maintaining image quality.
Previous article:The Difference Between Digital Potentiometer and Digital-to-Analog Converter
Next article:Research on the Design of USB Control System Based on CY7C68013A
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University Hall----Live Replay: Infineon Intelligent Motor Drive Solution
- Should I switch from MCU to Linux? Come in and see what the experts say
- Reservoir control system information
- The problem of resistance in circuit
- DSP320C6000 instruction list collection
- Filtering Problems in H-bridge Driving Circuit
- Xilinx FPGA application advanced general IP core detailed explanation and design development
- Ultra-Wideband (UWB) For Dummies
- MSP430F149 cc1101 wireless transceiver source program
- A fun animation