Wavelet Coefficient Coding Method, Apparatus, System, Device and Medium

By performing binary arithmetic encoding of wavelet coefficients, the problem of low compression rate of wavelet coefficients in the prior art is solved, and a more efficient data compression effect is achieved.

CN116366070BActive Publication Date: 2025-06-10CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111622005.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-06-10
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The existing wavelet coefficient compression coding scheme has the problem of low compression rate.

Method used

By performing binary arithmetic encoding of wavelet coefficients, it specifically includes blocking the overview coefficients and detailed coefficients, and binary arithmetic encoding of the minimum or mean of the coefficients in each block.

Benefits of technology

The compression rate of the wavelet coefficient is improved and more efficient data compression is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366070B_ABST
    Figure CN116366070B_ABST
Patent Text Reader

Abstract

The present disclosure provides a wavelet coefficient encoding method, apparatus, system, device and medium, relating to the technical field of data processing. The method includes: performing binary arithmetic coding on wavelet coefficients. The present disclosure can improve the compression ratio of wavelet coefficients.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Wavelet Transform (WT) is one of the commonly used transformation methods in image coding. The result of data transformation is called wavelet coefficients. Wavelet coefficients are dimensionless results, and reconstructing these coefficients can obtain actual dimensional data. Traditional wavelet coefficient compression schemes are mainly based on bit-plane or context coding. For example, the ECBOT method adopted by JPEG2000 has the disadvantages of complex coding and low compression ratio.

[0003] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure. Therefore, it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0004] The present disclosure provides a wavelet coefficient coding method, apparatus, system, device and medium, which at least to some extent solves the technical problem of low compression ratio in the wavelet coefficient compression coding scheme provided in the related art.

[0005] Other features and advantages of the present disclosure will become apparent through the following detailed description, or be learned in part through the practice of the present disclosure.

[0006] According to one aspect of the present disclosure, a wavelet coefficient coding method is provided, the method comprising: performing binary arithmetic coding on wavelet coefficients.

[0007] In some embodiments, the performing binary arithmetic coding on wavelet coefficients includes: performing binary arithmetic coding on profile coefficients; performing binary arithmetic coding on detail coefficients.

[0008] In some embodiments, the performing binary arithmetic coding on profile coefficients includes: dividing the profile coefficients into blocks; obtaining the minimum value of the coefficients within each block, performing binary arithmetic coding on the minimum value of the coefficients within each block; obtaining the difference between each coefficient within each block and the minimum value of the coefficients, and performing binary arithmetic coding on the difference between each coefficient and the minimum value of the coefficients.

[0009] In some embodiments, when using truncated unary code to perform binary arithmetic coding on the minimum value of the coefficients within each block, the truncation length max = M, where M represents the maximum value of the profile coefficients; when using truncated unary code to perform binary arithmetic coding on the difference between each coefficient and the minimum value of the coefficients, the truncation length max = M - c_min, where c_min represents the minimum value of the coefficients within each block.

[0010] In some embodiments, the binary arithmetic coding of the profile coefficients includes: partitioning the profile coefficients; obtaining the coefficient mean within each partition, and performing binary arithmetic coding on the coefficient mean within each partition; obtaining the difference between each coefficient within each partition and the coefficient mean, and performing binary arithmetic coding on the difference between each coefficient and the coefficient mean.

[0011] In some embodiments, the binary arithmetic coding of the difference between each coefficient and the coefficient mean includes: determining whether the difference delta between each coefficient and the coefficient mean is 0; if so, encoding 0 and ending the coding; if not, encoding 1 and continuing the coding. The coding sequence is to first perform binary arithmetic coding on the sign bit, and then perform binary arithmetic coding on abs(delta)-1, where delta represents the difference between each coefficient within the partition and the coefficient mean, abs represents the absolute value function, and the sign bit is used to identify the positive or negative situation of delta.

[0012] In some embodiments, when using the truncated unary code to perform binary arithmetic coding on the coefficient mean within each partition, the truncation length max = M, where M represents the maximum value of the profile coefficients; when using the truncated unary code to perform binary arithmetic coding on abs(delta)-1, the truncation length max = M - c_mean - 1, where c_mean represents the coefficient mean within each partition.

[0013] In some embodiments, the binary arithmetic coding of the difference between each coefficient and the coefficient mean includes: letting tmp = 2×delta, if tmp < 0, then converting tmp to a positive odd number through tmp = -tmp - 1, where delta represents the difference between each coefficient within the partition and the coefficient mean; performing binary arithmetic coding on tmp.

[0014] In some embodiments, the binary arithmetic coding of the detail coefficients includes: partitioning the detail coefficients; obtaining the number of non-zero coefficients within each partition, and performing binary arithmetic coding on the number of non-zero coefficients within each partition; obtaining the run value of each partition, and performing binary arithmetic coding on the run value of each partition; performing binary arithmetic coding on the non-zero coefficients within each partition.

[0015] In some embodiments, the binary arithmetic coding of the non-zero coefficients within each partition includes: performing binary arithmetic coding on the sign bit, where the sign bit is used to identify the positive or negative situation of the non-zero coefficient; performing binary arithmetic coding on abs(c)-1, where c represents each non-zero coefficient within the partition, and abs represents the absolute value function.

[0016] In some embodiments, when using truncated unary code to perform binary arithmetic coding on the number of non-zero coefficients within each block, the truncation length max = N, where N represents the size of the block; when using truncated unary code to perform binary arithmetic coding on abs(c)-1, the truncation length max = M-1, where M represents the maximum absolute value of the detail coefficients.

[0017] In some embodiments, the performing binary arithmetic coding on the non-zero coefficients within each block includes: letting tmp = 2×c, if tmp < 0, then converting tmp into a positive odd number by tmp = -tmp - 1, where c represents each non-zero coefficient within the block; performing binary arithmetic coding on tmp.

[0018] According to another aspect of the present disclosure, there is also provided a wavelet coefficient coding device, which includes: a wavelet coefficient coding module for performing binary arithmetic coding on wavelet coefficients.

[0019] In some embodiments, the wavelet coefficient coding module includes: a profile coefficient coding module for performing binary arithmetic coding on profile coefficients; a detail coefficient coding module for performing binary arithmetic coding on detail coefficients.

[0020] According to another aspect of the present disclosure, there is also provided a data compression system, which includes: an encoding module and a decoding module; wherein, the encoding module is used for performing wavelet transform on the data to be compressed and performing binary arithmetic coding on the wavelet coefficients; the decoding module is used for performing binary arithmetic decoding on the binary code stream from the encoding module to obtain wavelet coefficients, and inversely transforming according to the wavelet coefficients to obtain the data before compression.

[0021] In some embodiments, the encoding module is further used for performing block binary arithmetic coding on profile coefficients and detail coefficients; the decoding module is further used for performing block binary arithmetic decoding on the received binary code stream to obtain profile coefficients and detail coefficients.

[0022] According to another aspect of the present disclosure, there is also provided an electronic device, which includes: a processor; and a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the wavelet coefficient coding method according to any one of the above by executing the executable instructions.

[0023] According to another aspect of the present disclosure, there is also provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the wavelet coefficient coding method according to any one of the above.

[0024] The wavelet coefficient encoding method, apparatus, system, device and medium provided by the embodiments of the present disclosure perform binary arithmetic encoding on wavelet coefficients, which can improve the compression ratio of wavelet coefficients.

[0025] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0027] Figure 1 Showing a schematic diagram of a wavelet coefficient compression system framework provided in the related art;

[0028] Figure 2 Showing a probability distribution diagram of approximation coefficients after wavelet transform of an image;

[0029] Figure 3 Showing a probability distribution diagram of approximation coefficients after wavelet transform of features;

[0030] Figure 4 Showing a flowchart of a wavelet coefficient encoding method in an embodiment of the present disclosure;

[0031] Figure 5 Showing a flowchart of a method for performing binary arithmetic encoding on approximation coefficients in an embodiment of the present disclosure;

[0032] Figure 6 Showing a flowchart of another method for performing binary arithmetic encoding on approximation coefficients in an embodiment of the present disclosure;

[0033] Figure 7 Showing a flowchart of a method for performing binary arithmetic encoding on detail coefficients in an embodiment of the present disclosure;

[0034] Figure 8 Showing a schematic diagram of a wavelet coefficient encoding device in an embodiment of the present disclosure;

[0035] Figure 9 Showing a schematic diagram of a data compression system in an embodiment of the present disclosure;

[0036] Figure 10 Showing a structural block diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments.

[0038] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0039] For ease of understanding, before introducing the embodiments of the present disclosure, several terms involved in the embodiments of the present disclosure are first explained as follows:

[0040] EBCOT: The full name is "Embedded Block Coding with Optimized Truncation", which is translated as "Embedded Block Coding with Optimized Truncation".

[0041] Entropy coding: A way of lossless coding, which is the process of converting the specified data (syntax elements) into a bit stream, and the original data can be completely restored through this bit stream.

[0042] Arithmetic coding: The process of encoding a string of symbols into an arithmetic number.

[0043] Arithmetic decoding: The process of restoring an arithmetic number into a string of symbols.

[0044] Binary arithmetic coding and decoding: The arithmetic coding and decoding process of 0 / 1 binary string symbols.

[0045] MPS symbol: The symbol with a higher occurrence probability, which can be 0 or 1. In the embodiments of the present disclosure, 1 is used to represent the MPS symbol.

[0046] LPS symbol: The symbol with a lower occurrence probability, corresponding to the MPS symbol. In the embodiments of the present disclosure, 0 is used to represent the LPS symbol.

[0047] Binarization: It is the process of converting data (syntax elements) into the corresponding binary symbol string, and it is an essential process for context-based binary arithmetic coding.

[0048] Context Modeling: The process of arithmetic encoding / decoding depends on the probability of symbol occurrence. Generally, the sequence number of the probability model is expressed by ctxId, and each sequence number corresponds to a probability distribution. When encoding / decoding a specific binary symbol, it is necessary to clarify the probability model to which the symbol belongs; the relationship determination between a specific binary symbol and the corresponding probability model is called context modeling;

[0049] Bypass Encoding: Encoding of equiprobable symbols, outputting the corresponding symbol string with a fixed number of bits, a coding method that does not go through binary arithmetic encoding / decoding;

[0050] Run level Encoding (i.e., Run-Length Encoding): The number of consecutive zero coefficients before a non-zero coefficient is called "run", and the absolute value of the non-zero coefficient is called "level";

[0051] ZigZag Scanning: That is, Z-shaped scanning, scanning according to a certain path (Z-shaped), transforming the quantized coefficients from two-dimensional to one-dimensional. After DCT transformation and quantization processing, most of the lower right part of the matrix has become zero values, and the non-zero values are basically concentrated in the upper left part of the matrix. After ZigZag scanning, the two-dimensional matrix can be transformed into a one-dimensional string. The front part of the string is mainly non-zero values, and the back part is mainly zero values;

[0052] Unary Code: The number of 1s represents the value, and 0 represents the end of encoding. As shown in Table 1.

[0053] Table 1

[0054] Numerical value Unary code 0 0 1 10 2 110 3 1110 4 11110 5 111110 6 1111110 7 11111110 8 111111110

[0055] Truncated Unary Code: Similar to the unary code, but there is a maximum known value. Taking the truncated unary code with max = 8 as an example, for values less than 8, it ends with 0, and 8 itself ends with 1. Correspondingly at the decoding end, when 8 consecutive 1s are read out, the decoding ends.

[0056] Table 2

[0057] Numerical value Truncated unary code 0 0 1 10 2 110 3 1110 4 11110 5 111110 6 1111110 7 11111110 8 11111111

[0058] The following will detail the specific implementation manners of the present disclosure in conjunction with the accompanying drawings and embodiments.

[0059] Figure 1 Shows a schematic diagram of a wavelet coefficient compression system framework provided in the related art, as Figure 1 shown, at the encoding end, an image or video is input into the convolutional neural network CNN model to extract the feature data F 32-1, the coefficients after multi-scale wavelet transform need to be quantized. The quantized coefficients are entropy encoded into a bit stream and transmitted to the decoding end. It can be seen that the entropy encoding does not adopt context-based adaptive binary arithmetic coding, and the compression ratio is not high.

[0060] Figure 2 Shows a probability distribution diagram of the approximation coefficients after wavelet transform of an image; Figure 3 Shows a probability distribution diagram of the approximation coefficients after wavelet transform of features. As Figure 2 shown, after wavelet decomposition of the image, it has the characteristic that the probability distribution of the approximation coefficients is extremely complex; as Figure 3 shown, for the feature data extracted from the image through the convolutional neural network CNN, the coefficients after wavelet decomposition have completely different characteristics, and the approximation coefficient distribution is also extremely simple. Figure 2 and Figure 3 In and , CA quant represents the approximation coefficient; CD_1quant represents the first wavelet coefficient; CD_2quant represents the second wavelet coefficient; CD_3quant represents the third wavelet coefficient.

[0061] For images or videos, the feature data after passing through the CNN feature extraction network has completely different characteristics after wavelet transform decomposition. The probability distribution of the approximation coefficients is extremely complex, making it difficult to implement binarization and context modeling, and unable to adopt context-based arithmetic coding. To improve the compression ratio of wavelet coefficients, an embodiment of the present disclosure provides a wavelet coefficient coding method, which performs binary arithmetic coding on wavelet coefficients. Specifically, it can include the following two parts:

[0062] I. The binarization process of the approximation coefficients is as follows:

[0063] The following method 1 or method 2 can be adopted:

[0064] Assume: M is the possible maximum value of the approximation coefficient

[0065] Method 1:

[0066] 1) Divide the approximation coefficients into blocks, each block having a size of N, where N is a preset positive integer;

[0067] 2) Obtain the minimum coefficient c_min within the block, and perform binary arithmetic coding on c_min. The coding method can be truncated unary code (max = M) or unary code or other coding methods;

[0068] 3) Respectively obtain the interpolation of each coefficient within the block and c_min, delta = c - c_min, and perform binary arithmetic coding on delta. The coding method can be truncated unary code (max = M - c_min) or unary code or other coding.

[0069] Method 2:

[0070] 1) Divide the profile coefficients into blocks, each block having a size of N, where N is a preset positive integer value;

[0071] 2) Calculate the mean value c_mean of the coefficients within the block, and perform binary arithmetic coding on c_mean. The coding method can be truncated unary code (max = M), or unary code, or other coding methods;

[0072] 3) Calculate the interpolation of each coefficient within the block and c_min respectively. delta = c - c_mean, and perform binary arithmetic coding on delta. The coding methods include the following two:

[0073] The first coding method:

[0074] a. Determine whether the difference delta between each coefficient and the coefficient mean value is 0. If so, code 0 and end the coding; if not, code 1 and continue the following coding:

[0075] b. Perform binary arithmetic coding on the sign bit, occupying 1 bit;

[0076] c. Perform binary arithmetic coding on abs(delta) - 1. The coding method can be truncated unary code (max = M - c_mean - 1), or unary code, or other coding methods;

[0077] The second coding method:

[0078] a. Let tmp = 2 × delta. If tmp < 0, convert tmp = -tmp - 1 to a positive odd number;

[0079] b. Perform binary arithmetic coding on tmp. The coding method can be unary code or other coding methods.

[0080] II. The binarization process of the detail coefficients is as follows:

[0081] Assume that the maximum absolute value of the coefficient c is M;

[0082] 1) Divide the detail coefficients into blocks, each block having a size of N, where N is a preset positive integer value, and N for each detail coefficient can be different;

[0083] 2) Coefficient coding within the block:

[0084] a. Calculate the number of non-zero coefficients within the block, and perform binary arithmetic coding on the number. It can be truncated unary code (max = N), or unary code, or other coding;

[0085] b. Calculate each run, and perform binary arithmetic coding on each run. It can be unary code or other coding;

[0086] c. Perform binary arithmetic coding on each non-zero.

[0087] 3) There are also two ways to encode non-zero values:

[0088] The first encoding method:

[0089] a. The sign bit of binary arithmetic coding, occupying 1 bit

[0090] b. Binary arithmetic coding of abs(c)-1, which can be a truncated unary code (max = M-1) or a unary code or other coding methods;

[0091] The second encoding method:

[0092] a. Let tmp = 2×c. If tmp < 0, convert tmp = -tmp - 1 to a positive odd number;

[0093] b. Perform binary arithmetic coding on tmp.

[0094] The wavelet coefficient coding method provided in the embodiments of the present disclosure can be executed by any electronic device with computing and processing capabilities. The electronic device can be a terminal device or a server. Among them, the terminal device can include, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a wearable device, an augmented reality device, a virtual reality device, etc.; the server can be a server that provides various services, such as a background management server that supports the operations of a device used by a user through a terminal device. The background management server can analyze and process data such as requests received, and feedback the processing results to the terminal device.

[0095] Optionally, the clients of the application programs installed in the terminal device are the same, or the clients of the same type of application programs based on different operating systems. Based on the differences in the terminal platforms, the specific forms of the clients of the application programs can also be different. For example, the clients of the application programs can be mobile phone clients, PC clients, etc.

[0096] Optionally, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the present disclosure does not limit this.

[0097] Figure 4 The flowchart of a wavelet coefficient coding method according to an embodiment of the present disclosure is shown. As Figure 4 shown, the method includes the following steps:

[0098] S402, performing binary arithmetic coding on the wavelet coefficients.

[0099] It should be noted that the wavelet coefficients in S402 above can be the wavelet coefficients obtained by performing wavelet transform on data such as images or videos, or can be the wavelet coefficients obtained by performing wavelet transform on the feature data extracted from images or videos by a convolutional neural network. Since the wavelet coefficients include profile coefficients and detail coefficients. In specific implementation, S402 may include: performing binary arithmetic coding on the profile coefficients; performing binary arithmetic coding on the detail coefficients.

[0100] Figure 5 The flowchart of a method for performing binary arithmetic coding on profile coefficients according to an embodiment of the present disclosure is shown. As Figure 5 shown, the method includes the following steps:

[0101] S502, dividing the profile coefficients into blocks;

[0102] S504, obtaining the minimum value of the coefficients within each block, and performing binary arithmetic coding on the minimum value of the coefficients within each block;

[0103] S506, obtaining the difference between each coefficient within each block and the minimum value of the coefficients, and performing binary arithmetic coding on the difference between each coefficient and the minimum value of the coefficients.

[0104] It should be noted that in the embodiments of the present disclosure, the block size is not limited, and different block sizes can be set according to different specific applications. Optionally, in the embodiments of the present disclosure, the minimum value of the coefficients within each block and the difference between each coefficient and the minimum value of the coefficients can be encoded in binary arithmetic by, but not limited to, the following coding methods: unary code, truncated unary code. In the embodiments of the present disclosure, the specific coding method is not limited. In practical applications, those skilled in the art can also adopt other coding methods, for example, exponential Golomb coding, etc.

[0105] In some embodiments, when using the truncated unary code to perform binary arithmetic coding on the minimum value of the coefficients within each block, the truncation length max = M, where M represents the maximum value of the profile coefficients; when using the truncated unary code to perform binary arithmetic coding on the difference between each coefficient and the minimum value of the coefficients, the truncation length max = M - c_min, where c_min represents the minimum value of the coefficients within each block. Using the truncated unary code coding method can obtain better results.

[0106] It should be noted that during the decoding process, the corresponding method to the encoding method can be adopted, which may include: performing block binary arithmetic decoding on the coding result of the profile coefficient; first decoding to obtain the difference between each coefficient and the minimum coefficient value within each block; then decoding to obtain the minimum coefficient value within each block; and finally determining the profile coefficient according to the minimum coefficient value within each block and the difference between each coefficient and the minimum coefficient value within each block.

[0107] Figure 6 The flowchart shows another method for binary arithmetic encoding of profile coefficients in an embodiment of the present disclosure, as Figure 6 shown, including the following steps:

[0108] S602, block the profile coefficients;

[0109] S604, calculate the coefficient mean value within each block, and perform binary arithmetic encoding on the coefficient mean value within each block;

[0110] S606, calculate the difference between each coefficient and the coefficient mean value within each block, and perform binary arithmetic encoding on the difference between each coefficient and the coefficient mean value.

[0111] It should be noted that the present disclosure does not limit the block size. Different block sizes can be set according to different specific applications. Optionally, in the embodiments of the present disclosure, the coefficient mean value within each block can be binary arithmetically encoded by, but not limited to, the following encoding methods: unary code, truncated unary code. The present disclosure does not limit the specific encoding method. In actual applications, those skilled in the art can also adopt other encoding methods, such as exponential Golomb coding, etc.

[0112] In some embodiments, when using the truncated unary code to perform binary arithmetic encoding on the coefficient mean value within each block, the truncation length max = M, where M represents the maximum value of the profile coefficient. Using the truncated unary code encoding method can obtain better results.

[0113] In some embodiments, the binary arithmetic encoding of the difference between each coefficient and the coefficient mean value may specifically include: determining whether the difference delta between each coefficient and the coefficient mean value is 0; if so, encoding 0 and ending the encoding; if not, encoding 1 and continuing the encoding. The encoding order is to first perform binary arithmetic encoding on the sign bit, and then perform binary arithmetic encoding on abs(delta)-1, where delta represents the difference between each coefficient and the coefficient mean value within the block, abs represents the absolute value function, and the sign bit is used to identify the positive and negative situation of delta.

[0114] Optionally, in the embodiments of the present disclosure, abs(delta)-1 can be binary arithmetic encoded by, but not limited to, the following encoding methods: unary code, truncated unary code. In the embodiments of the present disclosure, the specific encoding method is not limited. In practical applications, those skilled in the art can also adopt other encoding methods, such as exponential Golomb coding, etc.

[0115] In some embodiments, when using the truncated unary code to perform binary arithmetic encoding on abs(delta)-1, the truncation length max = M - c_mean - 1, where c_mean represents the coefficient mean within each block. Using the truncated unary code encoding method can achieve better results.

[0116] In some embodiments, performing binary arithmetic encoding on the difference between each coefficient and the coefficient mean includes: letting tmp = 2×delta, if tmp < 0, then converting tmp to a positive odd number through tmp = -tmp - 1, where delta represents the difference between each coefficient and the coefficient mean within the block; performing binary arithmetic encoding on tmp. Optionally, in the embodiments of the present disclosure, tmp can be binary arithmetic encoded by, but not limited to, the following encoding methods: unary code, exponential Golomb coding, etc.

[0117] It should be noted that during the decoding process, the corresponding method to the encoding method can be adopted, which may include: performing block binary arithmetic decoding on the coding result of the profile coefficient; first decoding to obtain the difference between each coefficient and the coefficient mean within each block; then decoding to obtain the coefficient mean within each block; finally, determining the profile coefficient according to the coefficient mean within each block and the difference between each coefficient and the coefficient mean within each block.

[0118] Figure 7 The flowchart of a method for performing binary arithmetic encoding on detail coefficients in the embodiments of the present disclosure is shown as Figure 7 shown, including the following steps:

[0119] S702, partitioning the detail coefficients;

[0120] S704, obtaining the number of non-zero coefficients within each block, and performing binary arithmetic encoding on the number of non-zero coefficients within each block;

[0121] S706, obtaining the run value of each block, and performing binary arithmetic encoding on the run value of each block;

[0122] S708, performing binary arithmetic encoding on the non-zero coefficients within each block.

[0123] It should be noted that the present disclosure does not limit the block size, and different block sizes can be set according to different specific applications. Optionally, embodiments of the present disclosure can perform binary arithmetic coding on the run value of each block through, but not limited to, the following coding methods: unary code, exponential Golomb coding, etc.

[0124] Optionally, embodiments of the present disclosure can perform binary arithmetic coding on the number of non-zero coefficients in each block through, but not limited to, the following coding methods: unary code, truncated unary code, exponential Golomb coding, etc. In some embodiments, when using the truncated unary code to perform binary arithmetic coding on the number of non-zero coefficients in each block, the truncation length max = N, where N represents the size of the block.

[0125] In some embodiments, the binary arithmetic coding of non-zero coefficients in each block includes: performing binary arithmetic coding on the sign bit, where the sign bit is used to identify the positive and negative situations of non-zero coefficients; performing binary arithmetic coding on abs(c)-1, where c represents each non-zero coefficient in the block, and abs represents the absolute value function.

[0126] Optionally, embodiments of the present disclosure can perform binary arithmetic coding on abs(c)-1 through, but not limited to, the following coding methods: unary code, truncated unary code, exponential Golomb coding, etc. In some embodiments, when using the truncated unary code to perform binary arithmetic coding on abs(c)-1, the truncation length max = M-1, where M represents the maximum absolute value of the detail coefficients.

[0127] In some embodiments, the binary arithmetic coding of non-zero coefficients in each block includes: letting tmp = 2×c, if tmp < 0, then converting tmp to a positive odd number through tmp = -tmp-1, where c represents each non-zero coefficient in the block; performing binary arithmetic coding on tmp. Optionally, embodiments of the present disclosure perform binary arithmetic coding on tmp through, but not limited to, the following coding methods: unary code, exponential Golomb coding, etc.

[0128] It should be noted that in the decoding process, the corresponding method to the coding method can be adopted, which may include: performing block binary arithmetic decoding on the coding result of the detail coefficients; first decoding to obtain the number of non-zero coefficients in each block; then decoding to obtain the run value of each block; then decoding to obtain the non-zero coefficients in each block; finally, determining the detail coefficients according to the number of non-zero coefficients in each block, the run value of each block, and the non-zero coefficients in each block.

[0129] Based on the same inventive concept, embodiments of the present disclosure also provide a wavelet coefficient encoding device as described in the following embodiments. Since the principle of problem-solving in this device embodiment is similar to that of the above method embodiment, the implementation of this device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be elaborated.

[0130] Figure 8 FIG. shows a schematic diagram of a wavelet coefficient encoding device in an embodiment of the present disclosure, as Figure 8 shown, the device includes: a wavelet coefficient encoding module 80, configured to perform binary arithmetic encoding on wavelet coefficients.

[0131] Optionally, the wavelet coefficient encoding module 80 in the embodiments of the present disclosure may include: a profile coefficient encoding module 801, configured to perform binary arithmetic encoding on profile coefficients; a detail coefficient encoding module 802, configured to perform binary arithmetic encoding on detail coefficients.

[0132] It should be noted here that the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above method embodiments. It should be noted that the above modules, as part of the device, can be executed in a computer system such as a set of computer-executable instructions.

[0133] In some embodiments, the above profile coefficient encoding module 801 may further be configured to: divide the profile coefficients into blocks; obtain the minimum value of the coefficients within each block, perform binary arithmetic encoding on the minimum value of the coefficients within each block; obtain the difference between each coefficient within each block and the minimum value of the coefficients, and perform binary arithmetic encoding on the difference between each coefficient and the minimum value of the coefficients.

[0134] It should be noted that when using a truncated unary code to perform binary arithmetic encoding on the minimum value of the coefficients within each block, the truncation length max = M, where M represents the maximum value of the profile coefficients; when using a truncated unary code to perform binary arithmetic encoding on the difference between each coefficient and the minimum value of the coefficients, the truncation length max = M - c_min, where c_min represents the minimum value of the coefficients within each block.

[0135] In other embodiments, the above profile coefficient encoding module 801 may further be configured to: divide the profile coefficients into blocks; obtain the mean value of the coefficients within each block, perform binary arithmetic encoding on the mean value of the coefficients within each block; obtain the difference between each coefficient within each block and the mean value of the coefficients, and perform binary arithmetic encoding on the difference between each coefficient and the mean value of the coefficients.

[0136] Further, in some embodiments, the above-mentioned profile coefficient encoding module 801 can also be used to: determine whether the difference delta between each coefficient and the coefficient mean is 0; if so, encode 0 and end the encoding; if not, encode 1 and continue the encoding. The encoding sequence is to perform binary arithmetic encoding on the sign bit first, and then perform binary arithmetic encoding on abs(delta)-1, where delta represents the difference between each coefficient in the block and the coefficient mean, abs represents the absolute value function, and the sign bit is used to identify the positive or negative situation of delta.

[0137] It should be noted that when using the truncated unary code to perform binary arithmetic encoding on the coefficient mean in each block, the truncation length max = M, where M represents the maximum value of the profile coefficient; when using the truncated unary code to perform binary arithmetic encoding on abs(delta)-1, the truncation length max = M - c_mean - 1, where c_mean represents the coefficient mean in each block.

[0138] Further, in some other embodiments, the above-mentioned profile coefficient encoding module 801 can also be used to: let tmp = 2×delta, if tmp < 0, then convert tmp to a positive odd number through tmp = -tmp - 1, where delta represents the difference between each coefficient in the block and the coefficient mean; perform binary arithmetic encoding on tmp.

[0139] In some embodiments, the above-mentioned detail coefficient encoding module 802 can also be used to: divide the detail coefficients into blocks; obtain the number of non-zero coefficients in each block, and perform binary arithmetic encoding on the number of non-zero coefficients in each block; obtain the run value of each block, and perform binary arithmetic encoding on the run value of each block; perform binary arithmetic encoding on the non-zero coefficients in each block.

[0140] In some embodiments, the above-mentioned detail coefficient encoding module 802 can also be used to: perform binary arithmetic encoding on the non-zero coefficients in each block, including: performing binary arithmetic encoding on the sign bit, where the sign bit is used to identify the positive or negative situation of the non-zero coefficient; performing binary arithmetic encoding on abs(c)-1, where c represents each non-zero coefficient in the block, and abs represents the absolute value function.

[0141] When using the truncated unary code to perform binary arithmetic encoding on the number of non-zero coefficients in each block, the truncation length max = N, where N represents the size of the block; when using the truncated unary code to perform binary arithmetic encoding on abs(c)-1, the truncation length max = M - 1, where M represents the maximum absolute value of the detail coefficients.

[0142] In some embodiments, the above-mentioned detail coefficient encoding module 802 can also be used to: let tmp = 2×c, if tmp < 0, then convert tmp into a positive odd number through tmp = -tmp - 1, where c represents each non-zero coefficient within the block; perform binary arithmetic encoding on tmp.

[0143] Based on the same inventive concept, an embodiment of the present disclosure also provides a data compression system, as described in the following embodiments. Since the principle of problem-solving of this system embodiment is similar to that of the above method embodiment, the implementation of this system embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be elaborated.

[0144] Figure 9 FIG. shows a schematic diagram of a data compression system in an embodiment of the present disclosure, as Figure 9 shown, the system includes: an encoding module 901 and a decoding module 902.

[0145] Among them, the encoding module 901 is used to perform wavelet transform on the data to be compressed and perform binary arithmetic encoding on the wavelet coefficients; the decoding module 902 is used to perform binary arithmetic decoding on the binary code stream from the encoding module to obtain wavelet coefficients, and inverse transform according to the wavelet coefficients to obtain the data before compression.

[0146] In some embodiments, the encoding module 901 is further used to perform block binary arithmetic encoding on the approximation coefficients and detail coefficients; the decoding module 902 is further used to perform block binary arithmetic decoding on the received binary code stream to obtain the approximation coefficients and detail coefficients.

[0147] It should be noted that according to different specific application scenarios, the above-mentioned encoding module 901 and decoding module 902 can be deployed on the same device or on different devices, and the present disclosure does not make specific limitations on this.

[0148] The following list several specific examples:

[0149] Embodiment 1:

[0150] Encoding end:

[0151] Step 1: The image passes through the CNN feature extraction network to obtain the feature F 32_1 ;

[0152] Step 2: Perform multi-scale one-dimensional haar wavelet transform on the feature, set the scale to 2, and obtain the multi-scale feature [ca, cd2, cd1] = wavedec( ′haar′, level = 2);

[0153] Step 3: Quantify the features: [ca_quant, cd2_quant, cd1_quant] = Q([ca, cd2, cd1]);

[0154] Assumption: The quantization range of ca_quant is [0, 8]; the quantization range of cd2_quant is [-4, 4]; the quantization range of cd1_quant is [-4, 4];

[0155] Step 4: Encode the profile coefficient ca_quant. First, divide the profile coefficient into blocks, with each block size N = 16;

[0156] Step 5: Obtain the minimum coefficient c_min within the block, use binary arithmetic coding for c_min, and the coding method is truncated unary code (max = 8);

[0157] Step 6: Assume that the c_min obtained in Step 5 is 4. Calculate the interpolation between each coefficient within the block and c_min, delta = c - 4, and use binary arithmetic coding for delta. The coding method is truncated unary code (max = 8 - 4 = 4);

[0158] Step 7: Quantify the detail coefficient cd2_quant. First, divide the detail coefficient into blocks, with each block size N = 8;

[0159] Step 8: Calculate the number of non-zero coefficients within each block, and use binary arithmetic coding. The coding method is truncated unary code (max = 8);

[0160] Step 9: Obtain each run, and use binary arithmetic coding for each run. The coding method is unary code;

[0161] Step 10: Use binary arithmetic coding for each coefficient. First, code the sign bit sign_flag = sign(c), which occupies 1 bit, and then code abs(c) - 1. The coding method is truncated unary code (max = 3);

[0162] Step 11: Quantify the detail coefficient cd1_quant. First, divide the detail coefficient into blocks, with each block size N = 8;

[0163] Step 8: Calculate the number of non-zero coefficients within each block, and use binary arithmetic coding. The coding method is unary code;

[0164] Step 9: Obtain each run, and use binary arithmetic coding for each run. The coding method is unary code;

[0165] Step 10: Use binary arithmetic coding for each coefficient. The coding method is:

[0166] Let tmp = 2×c. If tmp < 0, then tmp = -tmp - 1 to convert it into a positive odd number, and binary-encode tmp using the unary code;

[0167] Decoder: Adopt the corresponding inverse decoding method as the encoder.

[0168] Example 2:

[0169] Encoder:

[0170] Step 1: The image passes through the CNN feature extraction network to obtain the feature F 32_1 ;

[0171] Step 2: Perform a multi-scale one-dimensional Haar wavelet transform on the feature. Assume the scale is 2, and obtain the multi-scale feature [ca, cd2, cd1] = wavedec( 'haar', level = 2);

[0172] Step 3: Quantize the feature: [ca_quant, cd2_quant, cd1_quant] = Q([ca, cd2, cd1]);

[0173] Assume: The quantization interval of ca_quant is [0, 16]; the quantization interval of cd2_quant is [-8, 8]; the quantization interval of cd1_quant is [-6, 6];

[0174] Step 4: Calculate the mean value c_mean of the coefficients within the block, and perform binary arithmetic coding on c_mean using the unary code;

[0175] Step 5: Assume that c_mean obtained in Step 4 is 5. Calculate the interpolation of each coefficient within the block and c_mean respectively, delta = c - 5, and perform binary arithmetic coding on delta. Coding method:

[0176] First, perform binary arithmetic coding on the sign bit, sign_flag = sign(delta), which occupies 1 bit, and then perform binary arithmetic coding on abs(delta) using the unary code;

[0177] The quantization of the detail coefficients is similar to that in Example 1 and will not be elaborated here.

[0178] Decoder: Adopt the corresponding inverse decoding method as the encoder.

[0179] Example 3:

[0180] Encoder:

[0181] Step 1: The image passes through the CNN feature extraction network to obtain the feature F 32_1 ;

[0182] Step 2: Perform multi-scale one-dimensional Haar wavelet transform on the feature. Assume the scale is 2, and obtain the multi-scale feature [ca, cd2, cd1] = wavedec( 'haar', level = 2);

[0183] Step 3: Quantize the feature: [ca_quant, cd2_quant, cd1_quant] = Q([ca, cd2, cd1]);

[0184] Assume: the quantization interval of ca_quant is [0, 6]; the quantization interval of cd2_quant is [-3, 3]; the quantization interval of cd1_quant is [-3, 3];

[0185] Step 4: Calculate the mean value c_mean of the coefficients within the block, and perform binary arithmetic coding on c_mean. The coding method is unary code;

[0186] Step 5: Assume that c_mean obtained in Step 4 is 4. Calculate the interpolation between each coefficient within the block and c_mean respectively, delta = c - 4, and perform binary arithmetic coding on delta. Coding method:

[0187] Let tmp = 2×c. If tmp < 0, then tmp = -tmp - 1 to convert it into a positive odd number, and perform binary coding on tmp. The coding method is unary code;

[0188] The quantization of the detail coefficients is similar to that in Embodiment 1, and will not be elaborated here.

[0189] Decoder: Adopt the corresponding inverse decoding method as the encoder.

[0190] In summary, for the wavelet coefficient coding method, device, system, equipment and medium provided in the embodiments of the present disclosure, the profile coefficients and detail coefficients are divided into blocks, realizing binary arithmetic coding and decoding based on adaptive context, and can improve the compression ratio of wavelet coefficients.

[0191] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, method or program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module" or "system" here.

[0192] Next, refer to Figure 10 to describe the electronic device 1000 according to this embodiment of the present disclosure. Figure 10The illustrated electronic device 1000 is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present disclosure.

[0193] As Figure 10 shown, the electronic device 1000 is presented in the form of a general-purpose computing device. The components of the electronic device 1000 may include, but are not limited to: at least one of the above-mentioned processing units 1010, at least one of the above-mentioned storage units 1020, and a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010).

[0194] Wherein, the storage unit stores program code, and the program code can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of the present specification.

[0195] In some embodiments, the processing unit 1010 may execute the following steps of the above method embodiment: partitioning the profile coefficients; obtaining the minimum value of the coefficients within each block, and performing binary arithmetic coding on the minimum value of the coefficients within each block; obtaining the difference between each coefficient and the minimum value of the coefficients within each block, and performing binary arithmetic coding on the difference between each coefficient and the minimum value of the coefficients.

[0196] In some embodiments, the processing unit 1010 may execute the following steps of the above method embodiment: partitioning the profile coefficients; obtaining the mean value of the coefficients within each block, and performing binary arithmetic coding on the mean value of the coefficients within each block; obtaining the difference between each coefficient and the mean value of the coefficients within each block, and performing binary arithmetic coding on the difference between each coefficient and the mean value of the coefficients.

[0197] In some embodiments, the processing unit 1010 may execute the following steps of the above method embodiment: partitioning the detail coefficients; obtaining the number of non-zero coefficients within each block, and performing binary arithmetic coding on the number of non-zero coefficients within each block; obtaining the run value of each block, and performing binary arithmetic coding on the run value of each block; performing binary arithmetic coding on the non-zero coefficients within each block.

[0198] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202, and may further include a read-only storage unit (ROM) 10203.

[0199] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205. Such program modules 10205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.

[0200] The bus 1030 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.

[0201] The electronic device 1000 may also communicate with one or more external devices 1040 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be carried out through the input / output (I / O) interface 1050. Moreover, the electronic device 1000 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 1060. As shown in the figure, the network adapter 1060 communicates with other modules of the electronic device 1000 through the bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0202] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or can be implemented by the way of software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0203] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided. The computer-readable storage medium may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementation manners, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification.

[0204] More specific examples of the computer-readable storage medium in the present disclosure may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0205] In the present disclosure, the computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, and this readable medium may send, propagate, or transmit a program used by or in combination with an instruction execution system, apparatus, or device.

[0206] Optionally, the program code included on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.

[0207] In specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (for example, by using an Internet service provider to connect through the Internet).

[0208] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0209] In addition, although the steps of the methods in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.

[0210] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure 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 flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the methods according to the embodiments of the present disclosure.

[0211] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.

Claims

1. A wavelet coefficient encoding method, characterized in that, it includes: performing binary arithmetic coding on wavelet coefficients; wherein, the performing binary arithmetic coding on wavelet coefficients includes: performing binary arithmetic coding on the approximation coefficients and detail coefficients after wavelet transform to obtain a binary bitstream; wherein, performing binary arithmetic coding on approximation coefficients includes: dividing approximation coefficients into blocks; performing binary arithmetic coding on the minimum value of coefficients within each block and the difference between each coefficient within each block and the minimum value of coefficients, or performing binary arithmetic coding on the mean value of coefficients within each block and the difference between each coefficient within each block and the mean value of coefficients; wherein, performing binary arithmetic coding on detail coefficients includes: dividing detail coefficients into blocks; performing binary arithmetic coding on the number of non-zero coefficients within each block, the run value of each block, and the non-zero coefficients within each block; the run value is the number of consecutive zero coefficients before a non-zero coefficient; wherein, the wavelet coefficients are wavelet coefficients obtained by performing wavelet transform on image or video data; or wavelet coefficients obtained by performing wavelet transform on feature data extracted from image or video data by a convolutional neural network.

2. The wavelet coefficient encoding method according to claim 1, characterized in that, when using a truncated unary code to perform binary arithmetic coding on the minimum value of coefficients within each block, the truncation length max = M, where M represents the maximum value of approximation coefficients; when using a truncated unary code to perform binary arithmetic coding on the difference between each coefficient and the minimum value of coefficients, the truncation length max = M - c_min, where c_min represents the minimum value of coefficients within each block.

3. The wavelet coefficient encoding method according to claim 1, characterized in that, performing binary arithmetic coding on the difference between each coefficient and the mean value of coefficients includes: judging whether the difference delta between each coefficient and the mean value of coefficients is 0; if so, encoding 0 and ending the encoding; if not, encoding 1 and continuing the encoding. The encoding order is to first perform binary arithmetic coding on the sign bit, and then perform binary arithmetic coding on abs(delta) - 1, where delta represents the difference between each coefficient within the block and the mean value of coefficients, abs represents the absolute value function, and the sign bit is used to identify the positive and negative situation of delta.

4. The wavelet coefficient encoding method according to claim 1, characterized in that, when using a truncated unary code to perform binary arithmetic coding on the mean value of coefficients within each block, the truncation length max = M, where M represents the maximum value of approximation coefficients; when using a truncated unary code to perform binary arithmetic coding on abs(delta) - 1, the truncation length max = M - c_mean - 1, where c_mean represents the mean value of coefficients within each block.

5. The wavelet coefficient encoding method according to claim 1, characterized in that, performing binary arithmetic coding on the difference between each coefficient and the mean value of coefficients includes: Let tmp = 2×delta. If tmp < 0, then convert tmp to a positive odd number by tmp = -tmp - 1, where delta represents the difference between each coefficient in the block and the mean of the coefficients. Perform binary arithmetic coding on tmp.

6. The wavelet coefficient coding method according to claim 1, characterized in that, performing binary arithmetic coding on the non-zero coefficients in each block includes: performing binary arithmetic coding on the sign bit, where the sign bit is used to identify the positive and negative situations of the non-zero coefficients; performing binary arithmetic coding on abs(c) - 1, where c represents each non-zero coefficient in the block and abs represents the absolute value function.

7. The wavelet coefficient coding method according to claim 1, characterized in that, when using the truncated unary code to perform binary arithmetic coding on the number of non-zero coefficients in each block, the truncation length max = N, where N represents the size of the block; when using the truncated unary code to perform binary arithmetic coding on abs(c) - 1, the truncation length max = M - 1, where M represents the maximum absolute value of the detail coefficients.

8. The wavelet coefficient coding method according to claim 1, characterized in that, performing binary arithmetic coding on the non-zero coefficients in each block includes: Let tmp = 2×c. If tmp < 0, then convert tmp to a positive odd number by tmp = -tmp - 1, where c represents each non-zero coefficient in the block; Perform binary arithmetic coding on tmp.

9. A wavelet coefficient coding device, characterized in that, comprising: a wavelet coefficient coding module for performing binary arithmetic coding on wavelet coefficients; wherein, the wavelet coefficients include: the profile coefficients and detail coefficients after wavelet transform; wherein, the wavelet coefficient coding module includes: a profile coefficient coding module for: partitioning the profile coefficients; performing binary arithmetic coding on the minimum coefficient in each block and the difference between each coefficient in each block and the minimum coefficient, or performing binary arithmetic coding on the mean coefficient in each block and the difference between each coefficient in each block and the mean coefficient, to obtain a binary code stream; a detail coefficient coding module for partitioning the detail coefficients; performing binary arithmetic coding on the number of non-zero coefficients in each block, the run value of each block, and the non-zero coefficients in each block; the run value is the number of consecutive zero coefficients before a non-zero coefficient; wherein, the wavelet coefficients are the wavelet coefficients obtained after performing wavelet transform on image or video data; or the wavelet coefficients obtained after performing wavelet transform on the feature data extracted from image or video data by a convolutional neural network.

10. A data compression system, characterized in that, comprising: an encoding module and a decoding module; wherein, the encoding module is used to perform wavelet transform on the data to be compressed and perform binary arithmetic coding on the wavelet coefficients to obtain a binary code stream; the decoding module is used to perform binary arithmetic decoding on the binary code stream from the encoding module to obtain wavelet coefficients, and inverse transform according to the wavelet coefficients to obtain the data before compression; Among them, the wavelet coefficients include: the profile coefficients and detail coefficients after wavelet transform; Among them, the encoding module is further configured to: divide the profile coefficients into blocks; perform binary arithmetic encoding on the minimum value of the coefficients within each block and the difference between each coefficient within each block and the minimum value of the coefficients, or perform binary arithmetic encoding on the average value of the coefficients within each block and the difference between each coefficient within each block and the average value of the coefficients; and divide the detail coefficients into blocks; perform binary arithmetic encoding on the number of non-zero coefficients within each block, the run value of each block, and the non-zero coefficients within each block; the run value is the number of consecutive zero coefficients before a non-zero coefficient; Among them, the data to be compressed is image or video data, or feature data extracted from image or video data through a convolutional neural network.

11. An electronic device, characterized in that, comprising: a processor; and a memory for storing executable instructions of the processor; Among them, the processor is configured to execute the wavelet coefficient encoding method according to any one of claims 1 to 8 by executing the executable instructions.

12. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, it implements the wavelet coefficient encoding method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image encoding and decoding method and device based on wavelet transform

    CN112235583A

  • Stationary image entropy coding method for integrated circuit design

    CN1560916A