Embedded zero-tree wavelet coding method, storage medium and computer equipment

By dynamically adjusting the distribution of the difference M of the absolute value of the descendant node coefficient and the threshold T and optimizing the zero-tree structure, the problem of a large number of encodings in the existing technology is solved, and the encoding efficiency and image compression performance are improved.

CN120264004APending Publication Date: 2025-07-04TONGJI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510297236.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

When the existing embedded zero-tree wavelet encoding method is not recognized as an important coefficient but some nodes in its descendants are recognized as important coefficients, the number of encodings is large, the encoding efficiency is low, and the image compression efficiency is affected.

Method used

By dynamically adjusting the distribution of the difference M of the absolute value of the descendant node coefficient and the threshold T, the zero-tree structure is optimized, and the number of encoded nodes is reduced. The method of dynamically adjusting the wavelet coefficient (DAWC) is used to mark the parent node and descendant node as a zero-tree, and only the zero-tree mark is transmitted to reduce redundant encoding.

Benefits of technology

It effectively reduces the number of encoding nodes, improves encoding efficiency, and significantly improves image compression performance. Especially in images with more high-frequency information, the impact of individual high-frequency information on encoding is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120264004A_ABST
    Figure CN120264004A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image compression, in particular to an embedded zero-tree wavelet coding method, a storage medium and computer equipment, and the method comprises the steps: carrying out the wavelet transformation of an input image, and obtaining a wavelet coefficient matrix; scanning the wavelet coefficient matrix according to a preset threshold T, and marking important coefficient nodes; if the father node is not identified as the important coefficient, but the important coefficient exists in the descendant node, dynamically adjusting the coding strategy according to the distribution condition of the difference value M between the absolute value of the descendant node coefficient and the threshold value T; and performing zero-tree coding on the dynamically adjusted wavelet coefficient, and finally outputting compressed data. By dynamically adjusting the wavelet coefficient and optimizing the zero-tree structure, the number of nodes needing to be coded can be effectively reduced, the number of codes is reduced, and the coding efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image compression, and particularly relates to an embedded zerotree wavelet coding method, a storage medium, and a computer device. Background Art

[0002] Embedded Zerotree Wavelet (abbreviated as EZW) is an efficient image compression algorithm based on wavelet transform. Its core idea is to use the multi-resolution characteristics of wavelet transform and combine the zerotree structure to encode images, thereby achieving efficient compression.

[0003] The zerotree structure is the key to the EZW algorithm. In wavelet transform, a low-frequency coefficient is associated with multiple coefficients in a higher resolution layer, and this association can be represented by a tree structure. If the value of a low-frequency coefficient is small (i.e., less than a certain threshold), then the corresponding coefficients in the higher resolution layer are also likely to be small values, and this structure is called a "zerotree".

[0004] As Figure 1 shown in the schematic diagram of the existing technology wavelet coefficient judgment coding process, where P: positive significant coefficient, the current coefficient is positive and its absolute value is greater than or equal to the threshold; N: negative significant coefficient, the current coefficient is negative and its absolute value is greater than or equal to the threshold; ZTR: zerotree root, the current coefficient is an insignificant coefficient, and all its descendant coefficients are insignificant coefficients; IZ: isolated zero, the current coefficient is an insignificant coefficient, but at least one of its descendant coefficients is a significant coefficient. When traditional embedded zerotree wavelet coding (EZW) is applied to lossy compression, high-frequency information has an adverse effect on the scanning coding efficiency. For example, when an individual descendant node is greater than the parent node, that is, when the parent node is not recognized as a significant coefficient, but some of its descendant nodes are recognized as significant coefficients, then an isolated zero IZ annotation will be made and encoded for transmission, resulting in a large number of encodings and low coding efficiency, thus reducing the image compression efficiency. Summary of the Invention

[0005] The purpose of the present invention is to provide an embedded zerotree wavelet coding method, a storage medium, and a computer device, which can effectively reduce the number of encodings and improve the coding efficiency while maintaining the main information of the image.

[0006] To solve the above technical problems, an embodiment of the present invention provides a technical solution as follows:

[0007] An embedded zerotree wavelet coding method includes the following steps:

[0008] Perform wavelet transform on the input image to obtain a wavelet coefficient matrix;

[0009] Scan the wavelet coefficient matrix according to a preset threshold T and mark significant coefficient nodes;

[0010] If the parent node is not recognized as an important coefficient, but there are important coefficients among its descendant nodes, the coding strategy is dynamically adjusted according to the distribution of the difference M between the absolute value of the coefficient of the descendant node and the threshold T;

[0011] Perform zero-tree coding on the wavelet coefficients after dynamic adjustment processing, and finally output the compressed data.

[0012] Furthermore, if M is less than the set threshold N and the number of descendant nodes greater than the threshold T is less than K1, adjust the absolute value of the coefficient of the descendant node greater than the threshold T to T - 1; if the number of descendant nodes greater than the threshold T is greater than or equal to K1, no coefficient adjustment is performed; if M is greater than or equal to the set threshold N and the number of descendant nodes greater than the threshold T is less than the set threshold K2, adjust the absolute value of the coefficient of the descendant node greater than the threshold T to T - 1; if the number of descendant nodes greater than the threshold T is greater than or equal to K2, no coefficient adjustment is performed.

[0013] Furthermore, set the initial scanning threshold as , and the total number of nodes in the image is L, then the initial value of the threshold N: ; The threshold corresponding to the wavelet coefficients of the i-th layer is: ; According to different requirements for the image transmission quality: 0 < K1 ≤ L, , both K1 and K2 are taken as integers.

[0014] Furthermore, set the initial scanning threshold as , and the total number of nodes in the image is L, then the threshold used in the i-th scan, and the threshold in the i-th scan is: , , according to different requirements for the image transmission quality, 0 < K1 ≤ L, .

[0015] Furthermore, the wavelet transform adopts the discrete wavelet transform.

[0016] To solve the technical problems proposed by the present invention, a technical solution is also provided as follows:

[0017] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the embedded zero-tree wavelet coding method described above is implemented.

[0018] To solve the technical problems proposed by the present invention, a technical solution is also provided as follows:

[0019] A computer device includes: a memory and a processor, where the memory stores a computer program; when the processor runs the computer program, it can implement the embedded zero-tree wavelet coding method described in any of the above items.

[0020] For the embedded zero-tree wavelet coding method, storage medium, and computer device provided by the present invention, compared with the prior art, in the case where a parent node is not recognized as an important coefficient, but some of its descendant nodes are recognized as important coefficients, to avoid the problem of a large number of encoded data but less effective information transmitted, dynamic adjustment is performed according to the difference M between the descendant node coefficients and the threshold T, and the adjusted wavelet coefficients are subjected to zero-tree coding and output. By dynamically adjusting the wavelet coefficients and optimizing the zero-tree structure, the number of nodes that need to be encoded can be effectively reduced, the number of encoded data can be reduced, and the encoding efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] One or more embodiments are illustrated by way of example in the pictures in the corresponding drawings. These illustrative descriptions do not limit the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0022] Figure 1 is a schematic diagram of the wavelet coefficient judgment and coding process of the prior art;

[0023] Figure 2 is a flowchart of the steps of an embedded zero-tree wavelet coding method in an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of the wavelet coefficient judgment and coding process in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will elaborate on each embodiment of the present invention with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present invention, many technical details are provided to help readers better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in each claim of the present application can still be implemented.

[0026] As Figure 2-3 shown, an embodiment of the present invention relates to an embedded zero-tree wavelet coding method, including the following steps:

[0027] Perform wavelet transform on the input image to obtain a wavelet coefficient matrix; preferably, the wavelet transform uses discrete wavelet transform.

[0028] Scan the wavelet coefficient matrix according to the preset threshold T and mark the important coefficient nodes; if the parent node does not reach the threshold T, it is marked as "unimportant", but its descendant nodes may still be determined to be important due to local high-frequency information.

[0029] If the parent node is not recognized as an important coefficient, but there are important coefficients among its descendant nodes, dynamically adjust the coding strategy according to the distribution of the difference M between the absolute value of the coefficient of the descendant node and the threshold T; by adjusting the coefficients of the descendant nodes, make the absolute value of its coefficient less than the threshold T, so as to optimize the zero-tree structure, reduce redundant coding, effectively reduce the number of codings, and improve the coding efficiency.

[0030] Perform zero-tree coding on the wavelet coefficients after dynamic adjustment processing and finally output the compressed data. After adjustment, a zero-tree structure can be formed, reducing the number of nodes to be coded, saving the transmitted bit values, and significantly improving the coding efficiency while maintaining the main information of the image.

[0031] From the analysis of the wavelet transform characteristics, when a descendant node is scanned but its parent node is not scanned, there may not be many scanned descendant nodes, and the scanning may occur near the scanning threshold T. In order to further optimize the transmission efficiency, the method of adaptively dynamically adjusting the wavelet coefficients (Dynamic Adapt Wavelet Coefficient, abbreviated as DAWC) can be used to optimize the zero-tree structure, effectively reduce the number of codings, and improve the coding efficiency.

[0032] In one embodiment, if the parent node is not recognized as an important coefficient, but some of its descendant nodes are recognized as important coefficients, the coding strategy is dynamically adjusted according to the distribution of the difference M between the absolute value of the descendant node coefficient and the threshold T. The adjustment strategy is as follows: If the absolute value of the descendant node coefficient has a small gap with the threshold T, it indicates that its importance is low. That is, if M is less than the set threshold N, in order to avoid losing important information due to too many nodes meeting the condition, while limiting the number of descendant nodes greater than the threshold T to be less than K1, the absolute value of the descendant node coefficient greater than the threshold T is adjusted to T - 1. If the number of descendant nodes greater than the threshold T is greater than or equal to K1, no coefficient adjustment is performed; If the difference is large, but the number of important descendant nodes is small, it indicates that these nodes may be isolated noises or minor details. That is, if M is greater than or equal to the set threshold N, the number of descendant nodes recognized as important coefficients is counted. If the number is less than the set K2, the absolute value of the descendant node coefficient greater than the threshold T is adjusted to T - 1. If the number of descendant nodes greater than the threshold T is greater than or equal to K2, no coefficient adjustment is performed; By adjusting the absolute value of the descendant node coefficient greater than the threshold T to T - 1, the absolute value of these descendant node coefficients is made less than the scanning threshold T, and they are marked with ZTR and not encoded in this scan. After adjustment, the parent node and its descendant nodes are all marked as "zero trees", and there is no need to encode each node one by one. Only the zero tree mark needs to be transmitted, significantly reducing the data volume. The adjusted coefficients may be recognized as important coefficients again in subsequent finer scanning levels to ensure that key information is not lost.

[0033] In one embodiment, the initial scanning threshold is set to , and the total number of image nodes is L. Then the initial value of the threshold N: ; The threshold corresponding to the wavelet coefficients of the i-th layer is: ; According to different requirements for image transmission quality, 0 < K1 ≤ L, , where both K1 and K2 are integers, and K1 and K2 can be calculated using either the ceiling or floor method.

[0034] In a different embodiment, the initial scanning threshold is set to , and the total number of image nodes is L. Then the threshold used in the i-th scan, and the threshold in the i-th scan is: , , according to different requirements for image transmission quality, 0 < K1 ≤ L, , where both K1 and K2 are integers, and K1 and K2 can be calculated using either the ceiling or floor method.

[0035] As can be seen from the above embodiments, the threshold values N, K1, and K2 can be adjusted within a certain range according to the transmitted image and transmission requirements, or different adjustment strategies can be applied at different scanning levels. When the selected threshold value N is small, it can ensure that only the nodes close to the threshold are adjusted, avoiding excessive distortion. In some embodiments, for smooth images, the threshold value N is reduced to enhance compression; for high-texture images, the threshold value N can be increased to retain details; for the selection of the threshold values K1 and K2, they can be selected empirically according to the tile size, or a human visual sensitivity model can be introduced to optimize the selection of the threshold values K1 and K2. Only when a small number of nodes exceed the standard, the adjuster coefficient is adjusted to retain most of the important high-frequency information.

[0036] Through the dynamic adaptive coefficient adjustment of the descendant nodes, the parent node and the descendant nodes can both be marked as zero trees, and the descendant nodes do not need to be encoded. The coefficients of the adjusted descendant nodes will be merged and output with other important coefficients in the next scan. More information is transmitted in one encoding, eliminating the influence of individual high-frequency information on the scan encoding and increasing the efficiency of embedded zero-tree wavelet coding.

[0037] The performance of the embedded zero-tree wavelet coding method provided by the present invention in practical applications can be referred to the following cases:

[0038] Table 1 shows the main table content of the wavelet coefficients after an 8x8 block transformation and encoded output at T = 128, 64, 32, and 16. The three regions of -13, -10, and -15 in the table are three high-frequency noise points.

[0039] Table 1 EZW Scanning Results of 8x8 Tiles

[0040]

[0041] Using the existing EZW coding method, when encoding the main table on the right side of Table 1 at T = 8, the coding result is shown in Table 2. The blank spaces are the positions that do not need to be encoded. There are a total of 24 positions that need to be encoded in Table 2, and each position requires 2 bits for encoding, with a total overhead of 48 bits. However, there are only 3 positions that transmit effective image information, and the node number accounts for 4.7%, totaling 6 bits. The transmission efficiency is low, and it has little effect on the image transmission effect. However, due to the large number of encodings, the coding efficiency is seriously affected.

[0042] Table 2 EZW Coding Results in the Prior Art at T = 8

[0043]

[0044] For the above scenario, when using the embedded zero-tree wavelet coding method provided by the present invention and T = 8, the descendant nodes -13, -10, -15 identified as important coefficients are adaptively and dynamically adjusted to -7, so that the main table is encoded as ZTR. Thus, only the zero-tree flag needs to be encoded in this round. Compared with the EZW coding in the prior art in Table 2, if the original coding needs to process 24 descendant nodes, only 1 zero-tree flag may be needed after adjustment, and the number of encoded bits is reduced by 23, which can save 46 bits of transmission, and the compression ratio is significantly improved, and the coding efficiency is improved. The main table after adaptive dynamic coefficient adjustment is shown in Table 3.

[0045] Table 3 Main table after adaptive dynamic adjustment

[0046]

[0047] As can be seen from the above table, by dynamically adjusting the coding strategy of wavelet coefficients, the number of encoded bits can be effectively reduced, and the efficiency of EZW coding is significantly improved. Especially in images with more high-frequency information, the embedded zero-tree wavelet coding method provided by the present invention can remove the influence of individual high-frequency information on coding and further improve the compression performance.

[0048] An embodiment of the present invention relates to a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned embedded zero-tree wavelet coding method is implemented.

[0049] An embodiment of the present invention relates to a computer device, including: a memory and a processor, where the memory has a computer program; when the processor runs the computer program, the above-mentioned embedded zero-tree wavelet coding method can be implemented.

[0050] For the embedded zero-tree wavelet coding method, storage medium and computer device provided by the present invention, compared with the prior art, in the case where the parent node is not identified as an important coefficient, but some of its descendant nodes are identified as important coefficients, in order to avoid the problem of a large number of encoded bits but less effective information transmitted, dynamic adjustment is performed according to the difference M between the descendant node coefficients and the threshold T, and the adjusted wavelet coefficients are subjected to zero-tree coding and output. By dynamically adjusting the wavelet coefficients and optimizing the zero-tree structure, the number of nodes to be encoded can be effectively reduced, the number of encoded bits is reduced, and the coding efficiency is improved.

[0051] Those of ordinary skill in the art can understand that the above embodiments are specific embodiments for implementing the present invention, and in practical applications, various changes can be made in form and details without departing from the spirit and scope of the present invention.

Claims

1. An embedded zero-tree wavelet coding method, characterized in that, It includes the following steps: Perform wavelet transform on the input image to obtain a wavelet coefficient matrix; Scan the wavelet coefficient matrix according to a preset threshold T and mark important coefficient nodes; If the parent node is not recognized as an important coefficient, but there are important coefficients among its descendant nodes, dynamically adjust the coding strategy according to the distribution of the difference M between the absolute value of the coefficient of the descendant node and the threshold T; Perform zero-tree coding on the wavelet coefficients after dynamic adjustment processing, and finally output compressed data.

2. The embedded zero-tree wavelet coding method according to claim 1, wherein If M is less than the set threshold N and the number of descendant nodes greater than the threshold T is less than K1, adjust the absolute value of the coefficient of the descendant node greater than the threshold T to T - 1; if the number of descendant nodes greater than the threshold T is greater than or equal to K1, no coefficient adjustment is performed; if M is greater than or equal to the set threshold N and the number of descendant nodes greater than the threshold T is less than the set threshold K2, adjust the absolute value of the coefficient of the descendant node greater than the threshold T to T - 1; if the number of descendant nodes greater than the threshold T is greater than or equal to K2, no coefficient adjustment is performed.

3. The embedded zero-tree wavelet coding method according to claim 2, wherein Set the initial scanning threshold as , if the total number of image nodes is L, then the initial value of the threshold N is: ; the threshold corresponding to the wavelet coefficients of the i-th layer is: ; according to different requirements for the image transmission quality: 0 < K1 ≤ L, , both K1 and K2 are taken as integers.

4. The embedded zero-tree wavelet coding method according to claim 2, wherein Set the initial scanning threshold to . If the total number of image nodes is L, then the threshold used for the i-th scan , and the threshold for the i-th scan is: , , where 0 < K1 ≤ L according to different requirements for image transmission quality, , and both K1 and K2 are integers.

5. The embedded zero-tree wavelet coding method according to claim 1, characterized in that The wavelet transform adopts discrete wavelet transform.

6. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed by a processor, it implements the embedded zero-tree wavelet coding method as described in any one of claims 1 to 5.

7. A computer device, characterized in that, It includes: A memory and a processor, the memory has a computer program; when the processor runs the computer program, it can implement the embedded zero-tree wavelet coding method as described in any one of claims 1 to 5.