CN108632630B - Binary image coding method combining bit operation and probability prediction - Google Patents
Binary image coding method combining bit operation and probability prediction Download PDFInfo
- Publication number
- CN108632630B CN108632630B CN201810522957.0A CN201810522957A CN108632630B CN 108632630 B CN108632630 B CN 108632630B CN 201810522957 A CN201810522957 A CN 201810522957A CN 108632630 B CN108632630 B CN 108632630B
- Authority
- CN
- China
- Prior art keywords
- coding
- coding algorithm
- algorithm
- binary image
- bit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a binary image coding method combining bit operation and probability prediction, which comprises two processes of coding and decoding, wherein the decoding process is the inverse process of the coding process; the encoding process is as follows: predicting the value of the current pixel based on the coded pixels in the binary image; carrying out bit operation on the predicted value and the true value of the current pixel to obtain a residual error, and obtaining the prediction accuracy; and coding the residual error into a bit stream by utilizing an entropy coding algorithm, and if a binary arithmetic coding algorithm in the entropy coding algorithm is adopted, taking the prediction accuracy as a global context probability model of the binary arithmetic coding algorithm, and using a fixed coding interval to greatly reduce the complexity of a coding process.
Description
Technical Field
The invention relates to the field of image coding and information processing, in particular to a binary image coding method combining bit operation and probability prediction.
Background
With the popularization of handheld devices and the increase of camera resolution, image data on the internet is growing rapidly. Image coding has been a popular area of research to enable efficient transmission and storage of images. Conventional image coding includes prediction, transformation, quantization and entropy coding, wherein the first step of prediction can significantly reduce the amount of data required to represent the image content. Prediction exploits the spatial correlation of an image to represent the current pixel as a function of the pixels already encoded in its domain, e.g. simple linear interpolation. And then, subtracting the predicted value from the real value to obtain a residual error, and transforming the residual error into a group of coefficients of a frequency domain. The coefficients are quantized, discretized and encoded into a bit stream by an entropy coding algorithm.
In conventional coding frameworks, the encoder is unable to buffer too many coded pixels for prediction in view of complexity, so the ability to predict is limited. With the achievement of deep learning that draws attention in computer vision, there are currently many efforts to replace the prediction module in the traditional coding framework with neural networks. The recurrent neural network can predict the value of the current pixel by using all the coded pixels, and the prediction capability and flexibility are greatly enhanced.
Context-based binary arithmetic coding (CABAC) is one of the best current binary coding algorithms, involving both prediction and arithmetic coding. In CABAC, the encoder gives a prediction value according to the context probability model before encoding each pixel, and then the prediction value and the true value are used together to update the encoding interval of the arithmetic encoding, and each pixel is also used to update the context probability model of the encoder after being encoded. However, the encoding complexity of the conventional CABAC algorithm is high.
Disclosure of Invention
The invention aims to provide a binary image coding method combining bit operation and probability prediction, which greatly reduces the complexity of a coding process.
The purpose of the invention is realized by the following technical scheme:
a binary image coding method combining bit operation and probability prediction is characterized by comprising the following steps:
and (3) an encoding process: predicting the value of the current pixel based on the coded pixels in the binary image; carrying out bit operation on the predicted value and the true value of the current pixel to obtain a residual error, and obtaining the prediction accuracy; coding the residual error into a bit stream by utilizing an entropy coding algorithm, and if a binary arithmetic coding algorithm in the entropy coding algorithm is adopted, taking the prediction accuracy as a global context probability model of the binary arithmetic coding algorithm and using a fixed coding interval;
the decoding process is the inverse of the encoding process.
According to the technical scheme provided by the invention, the frequent updating of the coding interval in the arithmetic coding process is avoided by using simple bit operation (exclusive OR operation) and taking the prediction accuracy as the global context probability model, and the complexity of the coding process is greatly reduced compared with the traditional CABAC algorithm.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a diagram illustrating an encoding process according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a decoding process according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a binary image coding method combining bit operation and probability prediction, which mainly comprises two processes of coding and decoding.
As shown in fig. 1, the encoding process steps are as follows:
1. the value of the current pixel is predicted based on the encoded pixels in the binary image.
In the embodiment of the invention, the binary image is generated by thresholding a gray level image, or a bit map after bit plane decomposition, or a binary feature map generated by other methods.
In this step, the value of the current pixel is predicted based on the encoded history pixels, that is, the predicted value of the current pixel is obtained. In the traditional image coding framework, the prediction of the current pixel uses linear or nonlinear combination of coded pixels in the field; the predictor realized by the neural network can utilize more encoded pixels to adaptively learn the dependency relationship among the pixels.
2. And carrying out bit operation on the predicted value and the true value of the current pixel to obtain a residual error, and obtaining the prediction accuracy.
In this step, the bit operation includes: an exclusive OR operation, or an exclusive OR operation; and performing simple exclusive OR operation or exclusive OR operation on the predicted value and the true value to obtain a residual error map and obtain the prediction accuracy. The example shown in fig. 1 uses an exclusive nor operation.
3. And coding the residual error into a bit stream by utilizing an entropy coding algorithm, and if a binary arithmetic coding algorithm in the entropy coding algorithm is adopted, taking the prediction accuracy as a global context probability model of the binary arithmetic coding algorithm and using a fixed coding interval.
If complexity is desired to be reduced, the residual image is coded by context-free entropy coding algorithm, since the main dependency relationship between pixels is captured by the prediction of step 1; if it is desired to increase the compression rate, the residual map is encoded using a context-dependent entropy encoding algorithm. If the binary arithmetic coding algorithm in the entropy coding algorithm is adopted, the prediction accuracy can represent the distribution of 0 and 1 in the residual error map, so that the prediction accuracy is used as a global context probability model of the binary arithmetic coding algorithm, the context-free binary arithmetic coding algorithm in the binary arithmetic coding algorithm is adopted, and a fixed coding interval is used. Compared with CABAC, the scheme provided by the invention greatly reduces the complexity of the coding process.
As will be appreciated by those skilled in the art, an arithmetic coding algorithm is one of the entropy coding algorithms, including context dependent arithmetic coding algorithms and context independent arithmetic coding algorithms. The context probability model is dynamically updated by the context-dependent arithmetic coding algorithm, which is one of the context-dependent entropy coding algorithms, and the context-dependent arithmetic coding algorithm is used in CABAC. The context-free arithmetic coding algorithm uses a fixed coding interval and a global context probability model, and is one of context-free entropy coding algorithms.
Fig. 2 is a schematic diagram of the decoding process. The decoding process, that is, the inverse process of the encoding process, includes the following specific steps: and decoding the bit stream output in the encoding process through an entropy encoding algorithm to obtain a corresponding residual error, and determining the true value of the current pixel by combining the predicted value based on the encoded pixel. Also, the example shown in FIG. 2 uses an exclusive OR operation.
Compared with the traditional CABAC algorithm, the scheme of the embodiment of the invention carries out exclusive OR operation on the predicted value and the true value to obtain a residual error; the prediction accuracy is used as a global context probability model of the binary arithmetic coding algorithm, so that a fixed coding interval is used, the frequent updating of the coding interval in the arithmetic coding process is avoided, and the complexity of a coding process is greatly reduced.
Through the above description of the embodiments, it is clear to those skilled in the art that the above embodiments can be implemented by software, and can also be implemented by software plus a necessary general hardware platform. With this understanding, the technical solutions of the embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (3)
1. A binary image coding method combining bit operation and probability prediction is characterized by comprising the following steps:
and (3) an encoding process: predicting the value of the current pixel based on the coded pixels in the binary image; carrying out bit operation on the predicted value and the true value of the current pixel to obtain a residual error, and obtaining the prediction accuracy rate which can embody the distribution of 0 and 1 in a residual error graph; coding the residual error into a bit stream by utilizing an entropy coding algorithm, and if a binary arithmetic coding algorithm in the entropy coding algorithm is adopted, taking the prediction accuracy as a global context probability model of the binary arithmetic coding algorithm and using a fixed coding interval; wherein the bit operations comprise: an exclusive OR operation, or an exclusive OR operation;
the decoding process is the inverse of the encoding process.
2. A binary image coding method combining bit arithmetic and probability prediction according to claim 1, characterized in that the binary image is generated by gray scale image thresholding or a bit map after bit plane decomposition.
3. The binary image coding method combining bit operation and probability prediction according to claim 1, wherein the entropy coding algorithm comprises: a context-free entropy coding algorithm and a context-dependent entropy coding algorithm; the binary arithmetic coding algorithm using the fixed coding interval and the global context probability model is a context-free entropy coding algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810522957.0A CN108632630B (en) | 2018-05-28 | 2018-05-28 | Binary image coding method combining bit operation and probability prediction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810522957.0A CN108632630B (en) | 2018-05-28 | 2018-05-28 | Binary image coding method combining bit operation and probability prediction |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108632630A CN108632630A (en) | 2018-10-09 |
CN108632630B true CN108632630B (en) | 2020-03-31 |
Family
ID=63690497
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810522957.0A Active CN108632630B (en) | 2018-05-28 | 2018-05-28 | Binary image coding method combining bit operation and probability prediction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108632630B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109474825B (en) * | 2018-10-18 | 2020-07-10 | 北京大学 | Pulse sequence compression method and system |
CN109379590B (en) * | 2018-10-18 | 2020-05-29 | 北京大学 | Pulse sequence compression method and system |
CN109584137B (en) * | 2018-10-24 | 2021-02-02 | 北京大学 | Pulse sequence format conversion method and system |
CN115118972A (en) * | 2021-03-17 | 2022-09-27 | 华为技术有限公司 | Video image coding and decoding method and related equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101039374A (en) * | 2006-03-14 | 2007-09-19 | 联想(北京)有限公司 | Image lossless compression and image decompressing method |
CN101094405A (en) * | 2006-06-22 | 2007-12-26 | 三星电子株式会社 | Flag encoding method, flag decoding method, and apparatus thereof |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8285062B2 (en) * | 2009-08-05 | 2012-10-09 | Sony Corporation | Method for improving the performance of embedded graphics coding |
US9277237B2 (en) * | 2012-07-30 | 2016-03-01 | Vmware, Inc. | User interface remoting through video encoding techniques |
WO2015054812A1 (en) * | 2013-10-14 | 2015-04-23 | Microsoft Technology Licensing, Llc | Features of base color index map mode for video and image coding and decoding |
-
2018
- 2018-05-28 CN CN201810522957.0A patent/CN108632630B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101039374A (en) * | 2006-03-14 | 2007-09-19 | 联想(北京)有限公司 | Image lossless compression and image decompressing method |
CN101094405A (en) * | 2006-06-22 | 2007-12-26 | 三星电子株式会社 | Flag encoding method, flag decoding method, and apparatus thereof |
Also Published As
Publication number | Publication date |
---|---|
CN108632630A (en) | 2018-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11895307B2 (en) | Block-based predictive coding for point cloud compression | |
CN108632630B (en) | Binary image coding method combining bit operation and probability prediction | |
JP7225333B2 (en) | Tiled image compression using neural networks | |
JP6698142B2 (en) | Method and apparatus for encoding video data | |
KR20200089635A (en) | Systems and methods for image compression at multiple, different bitrates | |
TW202042559A (en) | Methods and apparatuses for compressing parameters of neural networks | |
CN105474642A (en) | Re-encoding image sets using frequency-domain differences | |
CN113327599B (en) | Voice recognition method, device, medium and electronic equipment | |
García Aranda et al. | Logarithmical hopping encoding: a low computational complexity algorithm for image compression | |
JP5851987B2 (en) | Arithmetic encoding and decoding method | |
CN115118972A (en) | Video image coding and decoding method and related equipment | |
JP6719538B2 (en) | Method and apparatus for encoding video data | |
CN108024113B (en) | Target ratio self-adaptive compressed domain small target tracking method | |
US10547869B2 (en) | Template-based entropy coding of quantized transform coefficients | |
CN114501031B (en) | Compression coding and decompression method and device | |
CN115103191A (en) | Image processing method, device, equipment and storage medium | |
EP3056002A2 (en) | Method for encoding and decoding a media signal and apparatus using the same | |
CN113240761A (en) | High bit depth image lossless compression method suitable for remote sensing satellite | |
Lu et al. | Image Compression Based on Mean Value Predictive Vector Quantization. | |
US20240121395A1 (en) | Methods and non-transitory computer readable storage medium for pre-analysis based resampling compression for machine vision | |
WO2023169303A1 (en) | Encoding and decoding method and apparatus, device, storage medium, and computer program product | |
JPWO2011114504A1 (en) | Encoder | |
Jabeen et al. | Predictive Coding Based Lossless Image Compression Model | |
CN117896525A (en) | Video processing method, model training method, device, electronic equipment and storage medium | |
JP6509916B2 (en) | Method and apparatus for performing arithmetic coding based on concatenated ROM-RAM table |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |