CN114079771B - Image coding and decoding method and device based on wavelet transformation - Google Patents

Image coding and decoding method and device based on wavelet transformation Download PDF

Info

Publication number
CN114079771B
CN114079771B CN202010820592.7A CN202010820592A CN114079771B CN 114079771 B CN114079771 B CN 114079771B CN 202010820592 A CN202010820592 A CN 202010820592A CN 114079771 B CN114079771 B CN 114079771B
Authority
CN
China
Prior art keywords
sub
band
wavelet
subband
bands
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010820592.7A
Other languages
Chinese (zh)
Other versions
CN114079771A (en
Inventor
马祥
杨海涛
董存辉
刘�东
张恋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Huawei Technologies Co Ltd
Original Assignee
University of Science and Technology of China USTC
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC, Huawei Technologies Co Ltd filed Critical University of Science and Technology of China USTC
Priority to CN202010820592.7A priority Critical patent/CN114079771B/en
Priority to PCT/CN2021/110574 priority patent/WO2022033371A1/en
Publication of CN114079771A publication Critical patent/CN114079771A/en
Application granted granted Critical
Publication of CN114079771B publication Critical patent/CN114079771B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The embodiment of the application provides an image coding and decoding method and device based on wavelet transformation. Wherein, include: carrying out wavelet transformation on the image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands; quantizing wavelet coefficients of the 3N +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3N +1 sub-bands; entropy coding is carried out on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3N +1 sub-bands to obtain a compressed code stream of any sub-band, wherein the context information of the wavelet coefficients in any sub-band comprises the wavelet coefficients in the encoded co-located sub-band. According to the method and the device, the relevance of the context information is improved by referring to the sub-band coefficients in the encoded co-located sub-band, and therefore the efficiency of image entropy coding is improved.

Description

Image coding and decoding method and device based on wavelet transformation
Technical Field
The present invention relates to the field of image encoding and decoding, and in particular, to a wavelet transform-based image encoding and decoding method and apparatus.
Background
A digital image is image information recorded in a digital signal. A digital image (hereinafter referred to as an image) may be viewed as a two-dimensional array of M rows and K columns containing M x K samples, the location of each sample being referred to as a sample location and the value of each sample being referred to as a sample value.
In applications such as image storage and transmission, it is usually necessary to perform an encoding operation on an image to reduce the storage capacity and transmission bandwidth. A typical image coding flow generally includes three steps of transformation, quantization and entropy coding. For an image to be coded, performing decorrelation on the image to be coded through transformation in a first step to obtain a transformation coefficient with more concentrated energy distribution; secondly, quantizing the transformation coefficient to obtain a quantized coefficient; and thirdly, entropy coding is carried out on the quantized coefficient to obtain a compressed code stream.
The transform methods commonly used in image coding include discrete cosine transform, wavelet transform, and the like. The wavelet transform is a local transform method, can carry out localized and multi-scale analysis on the image, focuses on the change details of signals, and is very suitable for image coding tasks.
Wherein, after wavelet transformation, an image forms a plurality of sub-bands, for example, if an image is wavelet transformed N times, it will result in 3N +1 sub-bands (or referred to as sub-images). And quantizing and entropy coding the multiple sub-bands obtained by the wavelet transform to obtain a compressed code stream. The decoding operation is reverse in order to the encoding operation, and generally includes three steps of entropy decoding, inverse quantization, and inverse transformation. Wherein, if an image is subjected to a wavelet transform, 4 sub-bands LL are obtained 1 、LH 1 、HL 1 、HH 1 Wherein, the four sub-bands are all primary sub-bands; for sub-band LL therein 1 4 sub-bands LL are obtained through wavelet transformation 2 、LH 2 、HL 2 、HH 2 If the four sub-bands are the secondary sub-bands; and by analogy, i-level sub-bands can be obtained through i-time wavelet transformation.
The entropy coding method for wavelet coefficients is actually a subband coding method, i.e. all subbands are coded. For example, the entropy coding method may adopt a context-based entropy coding method, each coefficient in a subband is coded by using a progressive scanning method, when each coefficient is coded, context information in a context region corresponding to a current coefficient is firstly obtained, probability estimation is performed on the coefficient according to the context information to obtain probability distribution information of the coefficient, and the coefficient is coded according to the probability distribution information. Wherein the context information in the context area includes: the region size within the current coefficient sub-band is the reconstructed coefficient information above and to the left within the 3x3, 5x5, or 7x7 region, or the encoded information within the 3x3, 5x5, or 7x7 region between the current coefficient sub-bands. If the context information in the region is not available, if the coefficients in the region are not coded, or if the coefficients are not present, then the 0 coefficients are padded.
When the size of the sub-band changes, when entropy coding is carried out on the coefficient in the current i-1 level sub-band, the coefficient block with the same resolution as the i-1 level wavelet sub-band can be obtained by using the i-level coded sub-band through wavelet inverse transformation, and the probability estimation is carried out on the current coefficient by taking the coefficient block as the context information between the sub-bands of the current coefficient. For example, when entropy encoding the transform coefficients in the level 1 subband, the inverse wavelet transform is performed on the encoded coefficients in the level 2 subband to obtain a coefficient block LL 1 ', will coefficient block LL 1 ' probability estimation is performed on the current coefficient as context information between subbands at the time of entropy coding of the level 1 wavelet coefficient.
However, with the prior art, when the coefficient in the sub-band of the current level is coded, the coefficient after wavelet inverse transformation of the coded sub-band of the higher level is referred to for coding, and the correlation is low; when entropy coding is performed on the coefficient of the boundary, if context information is unavailable, the accuracy of probability distribution of the current coefficient is affected if 0 coefficient is filled; alternatively, when encoding the coefficients within each level of subbands, a line scan method is used, which has no signal adaptivity.
In summary, the image coding and decoding efficiency of the prior art is low.
Disclosure of Invention
The application discloses an image coding and decoding method and device based on wavelet transformation, which can improve the efficiency of image coding and decoding.
In a first aspect, an embodiment of the present application provides an image encoding method based on wavelet transform, including: carrying out N times of wavelet transformation on an image block K to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer greater than 0; respectively carrying out quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands; entropy coding is carried out on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3N +1 sub-bands to obtain a compressed code stream of any sub-band, wherein the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in the encoded co-located sub-band; the co-located subband is a subband in the image block adjacent to the image block K, and the position of the co-located subband in the image block adjacent to the image block K is the same as the position of any subband in the image block K.
According to the embodiment of the application, in the process of entropy coding the sub-bands, entropy coding is carried out on any sub-band according to the context information of the wavelet coefficients in any sub-band, so that the compressed code stream of any sub-band is obtained, wherein the context information is the wavelet coefficients in the encoded co-located sub-band. The sub-bands are subjected to entropy coding by referring to the wavelet coefficients in the coded co-located sub-bands, so that the relevance of context information is improved, the accuracy of probability estimation is further improved, and the efficiency of image entropy coding can be further improved.
Wherein the co-located subbands are subbands in an image block K-spatially adjacent to the image block. The position of the co-located sub-band in the image block adjacent to the image block K is the same as the position of any sub-band in the image block K, and the method includes: the co-located subband and the any subband are subbands at the same level, the co-located subband and the any subband are subbands of the same type, and the subband type comprises at least one of an LL subband, an HL subband, an LH subband and an HH subband.
Wherein, the context information of the quantized upper boundary wavelet coefficient in any sub-band is the wavelet coefficient of the lower boundary of the encoded co-located sub-band.
The context information of the quantized left boundary wavelet coefficients in any one subband is the wavelet coefficients of the right boundary of the encoded co-located subband.
And the context information of the quantized wavelet coefficient of the upper left boundary in any sub-band is the wavelet coefficient of the lower right boundary of the encoded co-located sub-band.
The context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a high-frequency sub-band which is coded in a sub-band higher than any sub-band. The high frequency sub-band is at least one of HL, LH and HH.
The wavelet transformation is to decompose each level of low-frequency sub-band into multiple sub-bands. Any one of the sub-bands is any one of all sub-bands obtained by performing wavelet transform on the image block K for N times. The sub-band at the higher level is the sub-band obtained by wavelet transform once more than any sub-band. For example, if any sub-band is a sub-band obtained by wavelet transform of i times, a sub-band one level higher than the any sub-band is a sub-band obtained by wavelet transform of i +1 times.
Further, the wavelet coefficients in any one of the subbands also include non-boundary wavelet coefficients.
Wherein any one of the sub-bands is sub-band HH i Sub-band HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients both set to 0 i+1 The wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing wavelet transformation once to obtain the target.
As an optional implementation manner, the entropy encoding of any one of the subbands according to context information of quantized wavelet coefficients of the any subband in the 3n +1 subbands includes: entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
Wherein the method further comprises: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
Wherein any one of the sub-bands is a high-frequency sub-band which is any one of the sub-band HH, the sub-band HL and the sub-band LH.
Alternatively, the wavelet coefficient scanning order is a scanning order with the smallest corresponding rate-distortion value among a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
Alternatively, the wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
Wherein the method further comprises: and writing the identifier corresponding to the wavelet coefficient scanning sequence into a code stream so as to facilitate a decoding end to decode the image.
In a second aspect, an embodiment of the present application provides an image encoding method based on wavelet transform, including: carrying out N times of wavelet transformation on an image block K to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer greater than 0; respectively carrying out quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands; entropy coding any one sub-band according to context information of the quantized wavelet coefficients in any one sub-band of the 3n +1 sub-bands to obtain a compressed code stream of any one sub-band, wherein the context information of the quantized wavelet coefficients in any one sub-band comprises the wavelet coefficients in a reference sub-band of any one sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a high-frequency sub-band which is coded in a sub-band at a higher level than any one sub-band.
According to the embodiment of the application, in the process of entropy coding the sub-bands, entropy coding is carried out on any sub-band according to the context information of the wavelet coefficient in any sub-band to obtain the compressed code stream of any sub-band, wherein the context information is the wavelet coefficient in the reference sub-band of any sub-band, and the reference sub-band is obtained by carrying out up-sampling or inverse wavelet transform on the high-frequency sub-band which is coded in the sub-band at a higher level than any sub-band. By referring to the sub-band coefficient of the coded high-frequency sub-band, the reference to the sub-band coefficient of the low-frequency sub-band is avoided, the relevance of context information is improved, the accuracy of probability estimation is further improved, and the efficiency of image entropy coding is further improved.
Wherein any one of the sub-bands is sub-band HH i Sub-band HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 The wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 As sub-band HH i+1 Sub-band HL i+1 Sub-band LH i+1 I is a positive integer, indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing primary wavelet transform.
Wherein entropy encoding any one of the 3N +1 sub-bands according to context information of quantized wavelet coefficients in the sub-band comprises: entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
Wherein the method further comprises: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning order is a horizontal scanning order; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning sequence is a vertical scanning sequence; when the texture of the low frequency subbands in the image block K is neither horizontal nor vertical texture, then the wavelet coefficient scan order is a zig-zag scan order.
Wherein the any sub-band is any one of sub-band HH, sub-band HL and sub-band LH.
Alternatively, the wavelet coefficient scanning order is a scanning order with the smallest corresponding rate-distortion value among a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
Alternatively, the wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
Wherein the method further comprises: and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
In a third aspect, an embodiment of the present application provides an image encoding method based on wavelet transform, including: carrying out N times of wavelet transformation on the image block K to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer greater than 0; respectively carrying out quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands; entropy coding is carried out on the quantized wavelet coefficient in any sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order to obtain a compressed code stream of any sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding carried out on the quantized wavelet coefficient in any sub-band.
With the embodiments of the present application, the sub-bands are entropy encoded according to the wavelet coefficient scanning order, so that each sub-band coefficient is encoded in a specific order when entropy encoding is performed. The approach improves the efficiency of image entropy coding.
Wherein the method further comprises: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
Wherein the any sub-band is any one of sub-band HH, sub-band HL and sub-band LH.
Alternatively, the wavelet coefficient scanning order is a scanning order with the smallest corresponding rate-distortion value among a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
Alternatively, the wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
Wherein, still include: and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
In a fourth aspect, an embodiment of the present application provides an image decoding method based on wavelet transform, including: entropy decoding a compressed code stream comprising 3N +1 sub-bands of an image block K according to context information of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands, wherein the context information of any sub-band of the 3N +1 sub-bands comprises the wavelet coefficients in a decoded homotopic sub-band; the co-located subbands are subbands in an image block adjacent to the image block K, the position of the co-located subbands in the image block adjacent to the image block K is the same as the position of any subband in the image block K, and N is an integer greater than 0; inversely quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands; and carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image of the image block K.
Wherein, the context information of the quantized upper boundary wavelet coefficient in any sub-band is the wavelet coefficient of the lower boundary of the decoded co-located sub-band.
Wherein the context information of the quantized left boundary wavelet coefficient in any one of the subbands is the wavelet coefficient of the right boundary of the decoded co-located subband.
Wherein, the context information of the quantized wavelet coefficient of the upper left boundary in any sub-band is the wavelet coefficient of the lower right boundary of the decoded co-located sub-band.
Wherein the context information of the quantized wavelet coefficients in any sub-band comprises wavelet coefficients in a reference sub-band of the any sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band one level higher than the any sub-band.
The quantized wavelet coefficients in any one of the subbands further include non-boundary wavelet coefficients.
Wherein any one of the sub-bands is sub-band HH i Sub-band HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 The wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 As sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the pair sub-band LL i And performing primary wavelet transform.
The entropy decoding of the compressed code stream including the 3N +1 sub-bands according to the context information of the 3N +1 sub-bands of the image block K includes: and entropy decoding the compressed code stream comprising the 3N +1 sub-bands according to the wavelet coefficient scanning order and the context information of the 3N +1 sub-bands.
Wherein the method further comprises: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
In a fifth aspect, an embodiment of the present application provides an image decoding method based on wavelet transform, including: entropy decoding is carried out on the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein the compressed code stream includes a compressed code stream of 3n +1 sub-bands, and a quantized wavelet coefficient in any sub-band of 3n +1 sub-bands is obtained by entropy decoding the code stream of any sub-band according to context information of the quantized wavelet coefficient in any sub-band of 3n +1 sub-bands; the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band at a higher level than any sub-band, and N is an integer greater than 0; inversely quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands; and carrying out wavelet inverse transformation on the wavelet coefficients of the sub-bands of 3N +1 for N times to obtain a reconstructed image block.
Wherein any one of the sub-bands is sub-band HH i Subband HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 The wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer, indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing primary wavelet transform.
The entropy decoding of the compressed code stream comprises: and carrying out entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence.
The method further comprises the following steps: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
In a sixth aspect, an embodiment of the present application provides an image decoding method based on wavelet transform, including: entropy decoding is carried out on the compressed code stream according to the wavelet coefficient scanning sequence to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein, the compressed code stream comprises a code stream of 3N +1 sub-bands; inversely quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands; and carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
Wherein the method further comprises: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning sequence according to the identifier.
In a seventh aspect, an embodiment of the present application provides an image encoding apparatus based on wavelet transform, including: the wavelet transformation module is used for carrying out wavelet transformation on the image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0; a quantization processing module, configured to perform quantization processing on the wavelet coefficients of 3n +1 subbands to obtain quantized wavelet coefficients of 3n +1 subbands; the encoding module is configured to perform entropy encoding on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3n +1 sub-bands to obtain a compressed code stream of any sub-band, where the context information of the quantized wavelet coefficients in any sub-band includes wavelet coefficients in a coded co-located sub-band; the co-located subband is a subband in the image block adjacent to the image block K, and the position of the co-located subband in the image block adjacent to the image block K is the same as the position of any subband in the image block K.
The context information of the quantized wavelet coefficient of the upper boundary in any subband is the wavelet coefficient of the lower boundary of the encoded co-located subband.
The context information of the quantized left boundary wavelet coefficients in any one subband is the wavelet coefficients of the right boundary of the encoded co-located subband.
And the context information of the quantized wavelet coefficient of the upper left boundary in any sub-band is the wavelet coefficient of the lower right boundary of the encoded co-located sub-band.
The context information of the quantized wavelet coefficients in any one sub-band includes wavelet coefficients in a reference sub-band of the any one sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a high-frequency sub-band coded in a sub-band one level higher than the any sub-band.
The quantized wavelet coefficients in any one of the subbands further include non-boundary wavelet coefficients.
Wherein any one of the sub-bands is sub-band HH i Subband HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer, indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the pair sub-band LL i And performing wavelet transformation once to obtain the target.
Wherein, the encoding module is specifically configured to: entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
The apparatus further comprises a determination module to: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning sequence is a vertical scanning sequence; when the texture of the low frequency subbands in the image block K is neither horizontal nor vertical texture, then the wavelet coefficient scan order is a zig-zag scan order.
The any sub-band is any one of a sub-band HH, a sub-band HL and a sub-band LH.
The wavelet coefficient scanning order is the scanning order with the smallest corresponding rate-distortion value in a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
The wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
The apparatus also includes a write module to: and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
In an eighth aspect, an embodiment of the present application provides an image encoding apparatus based on wavelet transform, including: the wavelet transformation module is used for carrying out wavelet transformation on an image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0; a quantization processing module, configured to perform quantization processing on the wavelet coefficients of 3n +1 subbands to obtain quantized wavelet coefficients of 3n +1 subbands; an encoding module, configured to perform entropy encoding on any one sub-band according to context information of the quantized wavelet coefficients in any one sub-band of the 3n +1 sub-bands to obtain a compressed code stream of the any one sub-band, where the context information of the quantized wavelet coefficients in the any one sub-band includes the wavelet coefficients in a reference sub-band of the any one sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a high-frequency sub-band that is encoded in a sub-band at a higher level than the any sub-band.
Any one of the sub-bands is sub-band HH i Sub-band HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And a subband MP with wavelet coefficients both set to 0 i+1 Wavelet inversion is carried out on each outer sub-bandObtaining the new product; the sub-band MP i+1 As sub-band HH i+1 Sub-band HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the pair sub-band LL i And performing primary wavelet transform.
The encoding module is specifically configured to: entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
The apparatus further comprises a determination module to: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subbands in the image block K is neither horizontal nor vertical texture, then the wavelet coefficient scan order is a zig-zag scan order.
The any sub-band is any one of a sub-band HH, a sub-band HL and a sub-band LH.
The wavelet coefficient scanning order is the scanning order with the smallest corresponding rate-distortion value in a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
The wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
The apparatus also includes a write module to: and writing the identifier corresponding to the wavelet coefficient scanning sequence into a code stream so as to facilitate a decoding end to decode the image.
In a ninth aspect, an embodiment of the present application provides an image encoding apparatus based on wavelet transform, including: the wavelet transformation module is used for carrying out wavelet transformation on an image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0; a quantization processing module, configured to perform quantization processing on the wavelet coefficients of the 3n +1 subbands to obtain quantized wavelet coefficients of the 3n +1 subbands; the encoding module is configured to perform entropy encoding on the quantized wavelet coefficients in any subband of the 3n +1 subbands according to a wavelet coefficient scanning order to obtain a compressed code stream of any subband, where the wavelet coefficient scanning order is an order of performing entropy encoding on the quantized wavelet coefficients in any subband.
The apparatus further comprises a determination module to: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning order is a horizontal scanning order; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
The any sub-band is any one of a sub-band HH, a sub-band HL and a sub-band LH.
The wavelet coefficient scanning order is the scanning order with the smallest corresponding rate-distortion value in a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
The wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
The apparatus also includes a write module to: and writing the identifier corresponding to the wavelet coefficient scanning sequence into a code stream so as to facilitate a decoding end to decode the image.
In a tenth aspect, an embodiment of the present application provides an image decoding apparatus based on wavelet transform, including: a decoding module, configured to perform entropy decoding on a compressed code stream including 3n +1 subbands according to context information of 3n +1 subbands of an image block K to obtain quantized wavelet coefficients of 3n +1 subbands, where the context information of any subband in the 3n +1 subbands includes a wavelet coefficient in a decoded collocated subband; the co-located sub-band is a sub-band in an image block adjacent to the image block K, the position of the co-located sub-band in the image block adjacent to the image block K is the same as the position of any sub-band in the image block K, and N is an integer greater than 0; the inverse quantization module is used for inverse quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands; and the wavelet inverse transformation module is used for carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image of the image block K.
The context information of the quantized upper boundary wavelet coefficients in any one sub-band is the wavelet coefficients of the lower boundary of the decoded co-located sub-band.
The context information of the quantized left boundary wavelet coefficients in any one subband is the wavelet coefficients of the right boundary of the decoded co-located subband.
The context information of the quantized left upper boundary wavelet coefficient in any sub-band is the wavelet coefficient of the right lower boundary of the decoded co-located sub-band.
The context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band one level higher than the sub-band of any sub-band.
The quantized wavelet coefficients in any one of the subbands further include non-boundary wavelet coefficients.
The any sub-band being sub-band HH i Subband HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the pair sub-band LL i And performing wavelet transformation once to obtain the target.
The decoding module is specifically configured to: and entropy decoding the compressed code stream comprising the 3N +1 sub-bands according to the wavelet coefficient scanning order and the context information of the 3N +1 sub-bands.
The decoding module is further configured to: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
In an eleventh aspect, an embodiment of the present application provides an image decoding apparatus based on wavelet transform, including: the decoding module is used for carrying out entropy decoding on the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein, the compressed code stream comprises a compressed code stream of 3N +1 sub-bands, and the quantized wavelet coefficient in any sub-band of the 3N +1 sub-bands is obtained by entropy decoding the code stream of any sub-band according to the context information of the quantized wavelet coefficient in any sub-band of the 3N +1 sub-bands; the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band at a higher level than any sub-band, and N is an integer greater than 0; an inverse quantization module, configured to inverse quantize the quantized wavelet coefficients of 3n +1 subbands to obtain wavelet coefficients of 3n +1 subbands; and the wavelet inverse transformation module is used for carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
Any one of the sub-bands is sub-band HH i Sub-band HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 Is a sub-bandHH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing wavelet transformation once to obtain the target.
The decoding module is specifically configured to: and carrying out entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence.
The decoding module is further configured to: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
In a twelfth aspect, an embodiment of the present application provides an image decoding apparatus based on wavelet transform, including: the decoding module is used for carrying out entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence so as to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein, the compressed code stream comprises a code stream of 3N +1 sub-bands; an inverse quantization module, configured to inverse quantize the quantized wavelet coefficients of 3n +1 subbands to obtain wavelet coefficients of 3n +1 subbands; and the wavelet inverse transformation module is used for carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
The decoding module is further configured to: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
In a thirteenth aspect, the present application provides a computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method as provided in any one of the possible embodiments of the first aspect and/or any one of the possible embodiments of the second aspect and/or any one of the possible embodiments of the third aspect and/or any one of the possible embodiments of the fourth aspect and/or any one of the possible embodiments of the fifth aspect and/or any one of the possible embodiments of the sixth aspect.
In a fourteenth aspect, embodiments of the present application provide a computer program product, which, when run on a computer, causes the computer to perform the method as provided in any one of the possible embodiments of the first aspect and/or any one of the possible embodiments of the second aspect and/or any one of the possible embodiments of the third aspect and/or any one of the possible embodiments of the fourth aspect and/or any one of the possible embodiments of the fifth aspect and/or any one of the possible embodiments of the sixth aspect.
It is to be understood that the apparatus of the seventh aspect, the apparatus of the eighth aspect, the apparatus of the ninth aspect, the apparatus of the tenth aspect, the apparatus of the eleventh aspect, the apparatus of the twelfth aspect, the computer storage medium of the thirteenth aspect, or the computer program product of the fourteenth aspect, as provided above, are adapted to perform the method as provided in any of the first aspects and the method as provided in any of the second aspects and/or any of the possible embodiments of the third aspects and/or any of the possible embodiments of the fourth aspects and/or any of the possible embodiments of the fifth aspects and/or any of the possible embodiments of the sixth aspects. Therefore, the beneficial effects achieved by the method can refer to the beneficial effects in the corresponding method, and are not described herein again.
Drawings
The drawings used in the embodiments of the present application are described below.
FIG. 1 is a schematic diagram of an image encoding process based on wavelet transform provided by an embodiment of the present application;
fig. 2 is a schematic flowchart of an image encoding method based on wavelet transform according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a wavelet transform provided in an embodiment of the present application;
fig. 4 is a schematic diagram of context information of subband coefficients according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating another wavelet transform-based image coding method according to an embodiment of the present application;
fig. 6 is a schematic diagram of context information of subband coefficients according to an embodiment of the present application;
fig. 7 is a schematic flowchart of another image encoding method based on wavelet transform according to an embodiment of the present application;
FIG. 8a is a schematic view of a subband scanning sequence according to an embodiment of the present application;
FIG. 8b is a schematic diagram of a Z-shaped scanning order in the scanning order of the wavelet coefficients provided by the embodiment of the present application;
FIG. 8c is a schematic diagram of a horizontal scanning order in the scanning order of the wavelet coefficients provided by the embodiment of the present application;
FIG. 8d is a schematic diagram of a vertical scanning order in the scanning order of wavelet coefficients provided by an embodiment of the present application;
FIG. 9 is a diagram of a wavelet transform-based image decoding process provided in an embodiment of the present application;
fig. 10 is a flowchart illustrating an image decoding method based on wavelet transform according to an embodiment of the present application;
fig. 11 is a schematic flowchart of another wavelet transform-based image decoding method according to an embodiment of the present application;
fig. 12 is a schematic flowchart of another image decoding method based on wavelet transform according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an image encoding apparatus based on wavelet transform according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an image decoding apparatus based on wavelet transform according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings. The terminology used in the description of the embodiments herein is for the purpose of describing particular embodiments herein only and is not intended to be limiting of the application.
Firstly, an image coding process based on wavelet transformation is introduced, as shown in fig. 1, a target image or an image block to be coded is subjected to wavelet transformation for N times to obtain wavelet coefficients of 3N +1 sub-bands; quantizing the wavelet coefficients of the obtained 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands; and entropy coding the wavelet coefficient after quantization of the 3N +1 sub-bands to obtain a compressed code stream.
Referring to fig. 2 in particular, fig. 2 is a schematic flowchart of an image encoding method based on wavelet transform according to an embodiment of the present application. As shown in fig. 2, the method includes:
s201, carrying out N times of wavelet transformation on an image block K to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0;
the image block K may be any one of M image blocks obtained by processing a target image, where M is an integer greater than 1. The target image may be an image, a sub-image, a slice (slice), a slice (patch), etc., but is not limited thereto.
The M image blocks can be obtained by dividing the target image. Specifically, a partition method based on a quadtree may be adopted to partition the target image. The target image may be divided into image blocks of the same size, for example, may be divided into image blocks of an area size of 8 × 8 on average.
Then, the M image blocks are respectively subjected to wavelet transform. Wherein, any image block K is wavelet transformed for N times, and then the wavelet coefficient of 3N +1 sub-bands can be obtained.
One of the sub-images is called an approximate image which is a low-resolution approximation of the original image; the other three sub-images are called detail images, which contain the high-frequency information of the original image. In image coding, multiple iterative wavelet transforms are often performed on an approximate image to obtain a multi-resolution representation of the image. For example, if an image is wavelet transformed N times, then 3N +1 subbands can be obtained, as shown in fig. 3, where an image is wavelet transformed N times to obtain N-level subbands, and after a first wavelet transform, obtain a first-level subband; and then carrying out wavelet transformation on the low-frequency sub-band in the first-level sub-band to obtain a second-level sub-band, and so on. Where each level of subbands contains one or more wavelet coefficients (alternatively referred to as subband coefficients).
The wavelet transform method in this scheme may use a conventional wavelet transform in the prior art, or a depth network-based wavelet transform, or other similar transform methods, which is not specifically limited in this scheme.
S202, carrying out quantization processing on the wavelet coefficients of the 3N +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
s203, entropy coding is carried out on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3N +1 sub-bands to obtain a compressed code stream of any sub-band, wherein the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in the encoded co-located sub-band; the co-located subband is a subband in the image block adjacent to the image block K, and the position of the co-located subband in the image block adjacent to the image block K is the same as the position of any subband in the image block K.
The context information of the wavelet coefficients may be the wavelet coefficients in the encoded co-located subbands. The co-located subband is a subband in an image block spatially adjacent to the image block K among the M image blocks, and the position of the co-located subband in the image block adjacent to the image block K is the same as the position of the subband in the image block K.
It should be noted that, in the present scheme, the position of the co-located subband in the image block adjacent to the image block K is the same as the position of the any subband in the image block K, including: the co-located subband and the any subband are the same-level subband, the co-located subband and the any subband are subbands of the same type, and the subband type comprises at least one of an LL subband, an HL subband, an LH subband and an HH subband.
Where the LL subband is the wavelet coefficient resulting from convolution with a low-pass wavelet filter from two directions, which is an approximate representation of the image.
The HL sub-band is a wavelet coefficient generated by convolution in the row direction by using a low-pass wavelet filter and then convolution in the column direction by using a high-pass wavelet filter, and the HL sub-band represents the horizontal singular characteristics of an image; may be referred to as horizontal subbands.
The LH sub-band is a wavelet coefficient generated by convolution in the row direction by using a high-pass wavelet filter and then convolution in the column direction by using a low-pass wavelet filter, and the LH sub-band represents the vertical singular characteristics of an image; may be referred to as vertical subbands.
The HH sub-band is a wavelet coefficient generated by convolution of two directions using a high-pass wavelet filter, which represents a diagonal edge characteristic of an image; may be referred to as diagonal subbands.
Wherein the quantized wavelet coefficients in the any one sub-band may comprise boundary wavelet coefficients located in a boundary region in the any one sub-band.
When the subband coefficients at the upper boundary in the subband are coded, the context information is the subband coefficients at the lower boundary in the co-located subband, as shown in the upper right-hand graph of fig. 4.
When encoding the left boundary subband coefficients in a subband, its context information is the right boundary subband coefficients in the co-located subband, as shown in the lower left corner of FIG. 4.
When encoding the subband coefficients at the upper left boundary in the subband, the context information is the subband coefficients at the lower right boundary in the co-located subband, as shown in the upper left corner of fig. 4.
The above is only described by taking the upper boundary, the left boundary and the upper left boundary of the encoded subband as an example, wherein, when the lower boundary, the right boundary and the lower right boundary of the encoded subband are encoded, the above description can be referred to accordingly, for example, when the subband coefficients of the lower boundary of the subband are encoded, the context information thereof is the upper boundary subband coefficients in the co-located subband; when the sub-band coefficient of the right boundary in the sub-band is coded, the context information is the left boundary sub-band coefficient in the co-located sub-band; when the sub-band coefficient of the right lower boundary in the sub-band is coded, the context information is the upper left boundary sub-band coefficient in the co-located sub-band, etc.
In the process of entropy coding the sub-bands, context information of wavelet coefficients to be coded is obtained; then obtaining the probability distribution of the wavelet coefficient to be coded according to the context information; and then entropy coding is carried out on the wavelet coefficient to be coded according to the probability distribution of the wavelet coefficient to be coded.
For example, the context information of the wavelet coefficient to be encoded may be input into a probability estimation network to obtain a probability distribution of the wavelet coefficient to be encoded, and then the probability distribution is used to perform entropy encoding on the wavelet coefficient to be encoded to obtain the encoding information of the wavelet coefficient to be encoded. The probability distribution estimation method used in the probability estimation network may include: a probability distribution estimation method based on a deep learning Network, such as a Recurrent Neural Network (RNN) and a Convolutional Neural Network (PixelCNN).
And entropy coding is carried out on any sub-band according to the context information of the wavelet coefficient in any sub-band so as to obtain a compressed code stream of any sub-band. And obtaining the compressed code stream of the image block K based on the compressed code stream of the 3N +1 sub-bands. And further, the compressed code stream can be written into the code stream.
According to the embodiment of the application, in the process of entropy coding the sub-bands, entropy coding is carried out on any sub-band according to the context information of the wavelet coefficients in any sub-band, so as to obtain the compressed code stream of any sub-band, wherein the context information is the wavelet coefficients in the coded co-located sub-band. The sub-bands are subjected to entropy coding by referring to the wavelet coefficients in the coded co-located sub-bands, so that the relevance of context information is improved, the accuracy of probability estimation is further improved, and the efficiency of image entropy coding can be further improved.
Referring to fig. 5, fig. 5 is a schematic flowchart of another wavelet transform-based image coding method according to an embodiment of the present application. As shown in fig. 5, the method includes:
s501, carrying out N times of wavelet transformation on an image block K to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0;
one image is subjected to wavelet transformation to obtain four sub-images, wherein one sub-image is called an approximate image which is a low-resolution approximation of an original image; the other three sub-images are called detail images, which contain the high-frequency information of the original image. In image coding, multiple iterative wavelet transforms are often performed on an approximate image to obtain a multi-resolution representation of the image. For example, if an image is wavelet transformed for N times, it will obtain 3n +1 subbands, as shown in fig. 3, where an image is wavelet transformed for N times to obtain N-level subbands, and after the first wavelet transformation, obtain the first-level subbands; and then carrying out wavelet transformation on the low-frequency sub-band in the first-level sub-band to obtain a second-level sub-band, and so on. Where each level of subbands contains one or more wavelet coefficients (alternatively referred to as subband coefficients).
The wavelet transform method in this scheme may use a conventional wavelet transform in the prior art, or a depth network-based wavelet transform, or other similar transform methods, which is not limited herein.
S502, carrying out quantization processing on the wavelet coefficients of the 3N +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
s503, entropy coding is carried out on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3N +1 sub-bands to obtain a compressed code stream of any sub-band, wherein the context information of the wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, and the reference sub-band is obtained by carrying out up-sampling or inverse wavelet transform on a high-frequency sub-band which is coded in a sub-band at a higher level than any sub-band.
In the process of entropy coding the sub-bands, context information of wavelet coefficients to be coded is obtained; then obtaining the probability distribution of the wavelet coefficient to be coded according to the context information; and then entropy coding is carried out on the wavelet coefficient to be coded according to the probability distribution of the wavelet coefficient to be coded.
For example, the context information of the wavelet coefficient to be encoded may be input into a probability estimation network to obtain a probability distribution of the wavelet coefficient to be encoded, and then the probability distribution is used to perform entropy encoding on the wavelet coefficient to be encoded to obtain the encoding information of the wavelet coefficient to be encoded. The probability distribution estimation method used in the probability estimation network may include: a probability distribution estimation method based on a deep learning Network, such as a Recurrent Neural Network (RNN) and a Convolutional Neural Network (PixelCNN).
The reference sub-band is obtained by up-sampling or wavelet inverse transformation of a high-frequency sub-band coded in a sub-band higher than any one sub-band. The high-frequency subband is any one of subband HH, subband HL and subband LH.
Specifically, when performing entropy coding on the subband coefficients in the current i-1 level subband, the context may be constructed by referring to the subband coefficients of the i-level encoded high-frequency subband, avoiding referring to the subband coefficients of the low-frequency subband.
As a first implementation, the i-1 st level sub-band LH is encoded i-1 For the i level sub-band LH, with respect to the sub-band coefficient of middle level i Upsampling to obtain the i-1 level sub-band LH i-1 Coefficient Block LH of the same size i ', reference is made to the use of LH i The coefficients within the preset region of' serve as the context when the current subband coefficient is encoded. Wherein, for HL i-1 ,HH i-1 The same method can be used for coding the inner subband coefficients, and the description is omitted here. As shown in fig. 6.
Further, as a second implementation, when the sub-band coefficient LH in the current i-1 level sub-band is measured i-1 For entropy coding, more high-frequency information in level i can be referred to, i.e. the subband LH in the high-frequency subband coded at level i i 、HH i And HL i Are all up-sampled to obtain the i-1 level sub-band LH i-1 Coefficient Block LH of the same size i ’、H H i ' and HL i ' refer to the context when encoding using the coefficients within its preset region as the current sub-band coefficients. Wherein, for HL i-1 ,HH i-1 The same approach can be used for coding the inner subband coefficients. The number of high-frequency subbands to be referred to is not limited, and may be 3, 2, or 1. The central position of the preset region may be the same co-located position of the spatial domain of the wavelet coefficients to be encoded in any sub-band. Ready to be wovenThe position of the wavelet coefficient of the code in the sub-band where the wavelet coefficient of the code is located is the same as the position of the center position of the preset region in the sub-band where the wavelet coefficient of the code is located. For example, as shown by the region R1 in the sub-band LL2 and the region R2 in the sub-band LH2 in FIG. 6, the region R1 is the same co-located position in the spatial domain of the region R2.
As a third implementation, when encoding the subbands MP i The reference sub-band is passed through the pair sub-band LL i Sub-band MP in sub-band obtained by performing wavelet transform once i+1 The wavelet coefficients of all the outer sub-bands are set to be 0 and then are subjected to inverse wavelet transform to obtain the wavelet coefficients; the sub-band MP i For sub-band HH i Subband HL i Sub-band LH i I is a positive integer, and i is not more than N-1.
In particular, the subband coefficient LH in the current i-1 level subband is measured i-1 When entropy coding is carried out, the i-th level division sub-band LH is carried out i The other subband coefficients are all filled with 0, that is, the subband HH in level i i 、HL i And LL i Filling 0 in the sub-band coefficient, then making wavelet inverse transformation on the processed i-th level sub-band to obtain new sub-band LH i ', mixing LH i The coefficients within the preset region of' serve as the context when the current subband coefficient is encoded. The central position of the preset region may be the same co-located position of the spatial domain of the wavelet coefficients to be encoded in any sub-band.
As yet another implementation, when entropy coding is performed on sub-band coefficients within the current level i-1 sub-band, the high level i high frequency sub-band (LH) is entropy coded i 、HL i And HH i ) Wavelet inverse transformation is carried out on the inner coded sub-band coefficient to obtain a sub-band LH i ’、HL i ' and HH i ', as shown in FIG. 6. Containing only the high-frequency part, and then dividing the sub-band LH i ’、HL i ' and HH i ' the subband coefficients in the preset region serve as the context for the subband coefficients in the current level i-1 subband. The central position of the preset region is the same co-located position of the space domain of the wavelet coefficient to be coded in any sub-band.
According to the embodiment of the application, in the process of entropy coding the sub-bands, entropy coding is carried out on any sub-band according to the context information of the wavelet coefficient in any sub-band to obtain the compressed code stream of any sub-band, wherein the context information is the wavelet coefficient in the reference sub-band of any sub-band, and the reference sub-band is obtained by carrying out up-sampling or inverse wavelet transform on the high-frequency sub-band which is coded in the sub-band at a higher level than any sub-band. By referring to the sub-band coefficient of the coded high-frequency sub-band, the reference to the sub-band coefficient of the low-frequency sub-band is avoided, the relevance of context information is improved, the accuracy of probability estimation is further improved, and the efficiency of image entropy coding is further improved.
The above embodiments describe various context information, wherein the context information may also be the encoded wavelet coefficients in the subband where the wavelet coefficients to be currently encoded are located. I.e. when processing each subband coefficient, the subband coefficients coded in a preset region within the same subband are used as context, e.g. the preset region size may be 3x3/5x5/7x7. The preset area size may be expressed as sxz, which means that the width of the preset area is s coefficients, and the height of the preset area is z coefficients. The size of the preset area is not particularly limited by the scheme.
Referring to fig. 7, fig. 7 is a schematic flowchart of another image encoding method based on wavelet transform according to an embodiment of the present application. As shown in fig. 7, the method includes:
s701, performing wavelet transformation on the image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0;
s702, respectively carrying out quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
s703, entropy coding is carried out on the quantized wavelet coefficient in any sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order to obtain a compressed code stream of any sub-band, wherein the wavelet coefficient scanning order is the order of entropy coding the quantized wavelet coefficient in any sub-band.
When processing each sub-band of each image block, processing each sub-band according to a preset sub-band scanning order from the low-frequency sub-band of the high-level wavelet. As shown in fig. 8a, the sub-band scanning order may be a Z-type scanning order, which may also be a horizontal scanning order or a vertical scanning order, etc.
When processing the wavelet coefficient of each sub-band, entropy coding can be performed on the quantized wavelet coefficient in any sub-band according to a preset wavelet coefficient scanning order.
The wavelet coefficient scanning order may be a preset scanning order, such as: a Z-type scan order, as shown in FIG. 8 b; horizontal scan order, as can be seen in FIG. 8 c; or vertical scan order, as shown in fig. 8 d.
Alternatively, the wavelet coefficient scanning order may be a scanning order with the smallest rate distortion value among multiple scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
Specifically, at the encoding end, an optimal scanning sequence is selected by using a Rate Distortion Optimization (RDO) method, that is, the current image is encoded by using a Z-type scanning sequence, a horizontal scanning sequence or a vertical scanning sequence, respectively, to obtain rate distortion values of the current image, and the scanning sequence with the minimum rate distortion value is selected as the optimal wavelet coefficient scanning sequence by comparing relative sizes of the coding rate distortion values. The encoding end uses the identification to mark the optimal scanning order, and can write the value of the identification into the code stream to be transmitted to the decoding end. For example, the flag corresponds to a first value indicating that the wavelet coefficient scan order is a zigzag scan order; when the identification corresponds to a second value, the scanning sequence of the wavelet coefficients is represented as a horizontal scanning sequence; when the flag corresponds to a third value, it indicates that the wavelet coefficient scan order is a vertical scan order. And the decoding end can analyze the identified value from the code stream so as to obtain the wavelet coefficient scanning order of the sub-band.
As another alternative implementation, the wavelet coefficient scan order for the high frequency subbands may be determined based on the texture of the low frequency subband (LL) within the current image block. When the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
Specifically, the texture direction of the low frequency subband may be determined by calculating gradient values of coefficients of the low frequency subband. For example, gradient operators are used to calculate gradient values for the coefficients within the current sub-band; and determining the texture direction of the current low-frequency sub-band by comparing the horizontal gradient value with the vertical gradient value. If the horizontal gradient value is larger than the vertical gradient value, the current texture direction can be regarded as the vertical direction; if the vertical gradient value is greater than the horizontal gradient value, the current texture direction may be considered the horizontal direction.
The following description takes the first-order gradient operator as an example:
calculating the absolute value of the gradient value for each coefficient point L (x, y) in the current sub-band and accumulating;
Gx=∑ xy abs(L(x+1,y)-L(x,y));
Gy=∑ xy abs(L(x,y+1)-L(x,y));
wherein Gx is the cumulative sum of the absolute values of the horizontal gradient values at each coefficient point; gy is the cumulative sum of the absolute values of the vertical gradient values at each coefficient point.
If Gx is larger than Gy, the current texture direction is considered to be the vertical direction; if Gx is smaller than Gy, the current texture direction is considered to be the horizontal direction.
Instead of using a first order gradient operator, other operator calculations may be used. For example, the sobel operator, canny operator, laplace operator, robert operator, etc. The specific method is similar to the above, and is not described herein again.
If the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence of the high-frequency sub-band is a horizontal scanning sequence; if the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order of the high-frequency sub-band is a vertical scanning order; otherwise, a Z-scan order is used.
After the wavelet coefficient scanning order is obtained, the identifier corresponding to the wavelet coefficient scanning order can be written into the code stream, so that a decoding end can decode an image.
The above description is given by taking the image block K as an example. It should be noted that each image block may use a different wavelet coefficient scanning order. The present embodiment is not particularly limited to this.
With the embodiments of the present application, the sub-bands are entropy encoded according to the wavelet coefficient scanning order, so that each sub-band coefficient is encoded in a specific order when entropy encoding is performed. The approach improves the efficiency of image entropy coding.
It should be noted that the image coding methods based on wavelet transform provided in the above embodiments can be used in any combination. And is not particularly limited herein.
The following describes the image decoding process based on wavelet transform, as shown in fig. 9, entropy decoding is performed on the compressed code stream to obtain the quantized wavelet coefficients of each sub-band; performing inverse quantization on the quantized wavelet coefficients of each sub-band to obtain the wavelet coefficients of each sub-band; and performing wavelet inverse transformation on the wavelet coefficients of the sub-bands to obtain a reconstructed image.
Referring to fig. 10 in particular, fig. 10 is a schematic flowchart of an image decoding method based on wavelet transform according to an embodiment of the present application. As shown in fig. 10, the method includes:
s1001, entropy decoding a compressed code stream comprising 3N +1 sub-bands according to context information of the 3N +1 sub-bands of an image block K to obtain quantized wavelet coefficients of the 3N +1 sub-bands, wherein the context information of any sub-band of the 3N +1 sub-bands comprises the decoded wavelet coefficients in the co-located sub-bands; the co-located sub-band is a sub-band in an image block adjacent to the image block K, the position of the co-located sub-band in the image block adjacent to the image block K is the same as the position of any sub-band in the image block K, and N is an integer greater than 0;
the description of the parity subband can refer to the related description in the embodiment shown in fig. 2, and is not repeated herein.
The context information of the quantized upper boundary wavelet coefficients in any one of the above subbands is the wavelet coefficients of the lower boundary of the decoded co-located subband. The context information of the quantized left boundary wavelet coefficients in any one subband is the wavelet coefficients of the right boundary of the decoded co-located subband. The context information of the quantized left upper boundary wavelet coefficient in any sub-band is the wavelet coefficient of the right lower boundary of the decoded co-located sub-band.
The above embodiment may refer to the embodiment shown in fig. 2, and details are not repeated here.
S1002, inversely quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands;
s1003, carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image of the image block K.
Wherein the method may further comprise: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning sequence according to the identifier. And entropy decoding the compressed code stream comprising the 3N +1 sub-bands of the image block K according to the wavelet coefficient scanning order and the context information of the 3N +1 sub-bands of the image block K.
Referring to fig. 11, fig. 11 is a schematic flowchart of another image decoding method based on wavelet transform according to an embodiment of the present application. As shown in fig. 11, the method includes:
s1101, entropy decoding is carried out on the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein the compressed code stream includes a compressed code stream of 3n +1 sub-bands, and a quantized wavelet coefficient in any sub-band of 3n +1 sub-bands is obtained by entropy decoding the code stream of any sub-band according to context information of the quantized wavelet coefficient in any sub-band of 3n +1 sub-bands; the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band at a higher level than the any sub-band, and N is an integer greater than 0;
wherein, when decoding the sub-band MP i The reference sub-band is passed through the pair sub-band LL i Sub-band MP in sub-band obtained by performing wavelet transform once i+1 The wavelet coefficients of all the outer sub-bands are set to be 0 and then are subjected to inverse wavelet transform to obtain the wavelet coefficients; the sub-band MP i As sub-band HH i Sub-band HL i Sub-band LH i I is a positive integer, and i is not more than N-1.
Wherein the entropy decoding of the compressed code stream comprises: and performing entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence. And obtaining an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
The above detailed description may refer to the embodiment shown in fig. 5, and is not repeated herein.
S1102, inverse quantization is carried out on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
s1103, carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
Referring to fig. 12, fig. 12 is a schematic flowchart of another wavelet transform-based image decoding method according to an embodiment of the present application. As shown in fig. 12, the method includes:
s1201, entropy decoding is carried out on the compressed code stream according to the wavelet coefficient scanning sequence to obtain quantized wavelet coefficients of the 3N +1 sub-bands; wherein, the compressed code stream comprises a code stream of 3N +1 sub-bands;
and determining the wavelet coefficient scanning order according to the identifier by acquiring the identifier in the compressed code stream.
S1202, inverse quantization is carried out on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
s1203, carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
The wavelet transform-based image decoding methods provided by the above embodiments can be used in any combination. And is not particularly limited herein.
The specific implementation of the image decoding method based on wavelet transform can refer to the related description in the image coding method in fig. 7, and is not described herein again.
As shown in fig. 13, an embodiment of the present application further provides an image encoding apparatus based on wavelet transform, including:
a wavelet transform module 1301, configured to perform wavelet transform on the image block K for N times to obtain wavelet coefficients of 3n +1 subbands, where N is an integer greater than 0;
a quantization processing module 1302, configured to perform quantization processing on the wavelet coefficients of the 3n +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3n +1 sub-bands;
an encoding module 1303, configured to perform entropy encoding on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3n +1 sub-bands to obtain a compressed code stream of any sub-band, where the context information of the quantized wavelet coefficients in any sub-band includes the wavelet coefficients in the encoded co-located sub-band; the co-located subband is a subband in the image block adjacent to the image block K, and the position of the co-located subband in the image block adjacent to the image block K is the same as the position of any subband in the image block K.
The context information of the quantized upper boundary wavelet coefficient in any sub-band is the wavelet coefficient of the lower boundary of the encoded co-located sub-band.
The context information of the quantized left boundary wavelet coefficients in any one subband is the wavelet coefficients of the right boundary of the encoded co-located subband.
And the context information of the quantized wavelet coefficient of the upper left boundary in any sub-band is the wavelet coefficient of the lower right boundary of the encoded co-located sub-band.
The context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a high-frequency sub-band which is coded in a sub-band higher than any sub-band.
The quantized wavelet coefficients in any one of the subbands further include non-boundary wavelet coefficients.
Wherein any one of the sub-bands is sub-band HH i Subband HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And a subband MP with wavelet coefficients both set to 0 i+1 The wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer, indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing wavelet transformation once to obtain the target.
Wherein, the encoding module is specifically configured to: entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
The apparatus further comprises a determination module to: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning order is a horizontal scanning order; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
The any sub-band is any one of a sub-band HH, a sub-band HL and a sub-band LH.
The wavelet coefficient scanning order is the scanning order with the smallest corresponding rate-distortion value in a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
The wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
The apparatus also includes a write module to: and writing the identifier corresponding to the wavelet coefficient scanning sequence into a code stream so as to facilitate a decoding end to decode the image.
An embodiment of the present application further provides an image encoding apparatus based on wavelet transform, including:
the wavelet transformation module is used for carrying out wavelet transformation on an image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0;
a quantization processing module, configured to perform quantization processing on the wavelet coefficients of the 3n +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3n +1 sub-bands;
an encoding module, configured to perform entropy encoding on any one sub-band according to context information of the quantized wavelet coefficients in any one sub-band of the 3n +1 sub-bands to obtain a compressed code stream of the any one sub-band, where the context information of the quantized wavelet coefficients in the any one sub-band includes the wavelet coefficients in a reference sub-band of the any one sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a high-frequency sub-band that is encoded in a sub-band at a higher level than the any sub-band.
The any sub-band being sub-band HH i Subband HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Sub-band HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of the subband, said i is not greater than N-1, andthe sub-band MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing wavelet transformation once to obtain the target.
The encoding module is specifically configured to: entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
The apparatus further comprises a determination module to: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning order is a horizontal scanning order; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
The any sub-band is any one of a sub-band HH, a sub-band HL and a sub-band LH.
The wavelet coefficient scanning sequence is the scanning sequence with the minimum corresponding rate distortion value in the multiple scanning sequences; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
The wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
The apparatus also includes a write module to: and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
An embodiment of the present application further provides an image encoding apparatus based on wavelet transform, including:
the wavelet transformation module is used for carrying out wavelet transformation on the image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0;
a quantization processing module, configured to perform quantization processing on the wavelet coefficients of 3n +1 subbands to obtain quantized wavelet coefficients of 3n +1 subbands;
the encoding module is configured to perform entropy encoding on the quantized wavelet coefficients in any subband of the 3n +1 subbands according to a wavelet coefficient scanning order to obtain a compressed code stream of any subband, where the wavelet coefficient scanning order is an order of performing entropy encoding on the quantized wavelet coefficients in any subband.
The apparatus further comprises a determination module to: determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K; when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning sequence is a vertical scanning sequence; when the texture of the low frequency subbands in the image block K is neither horizontal nor vertical texture, then the wavelet coefficient scan order is a zig-zag scan order.
The any sub-band is any one of a sub-band HH, a sub-band HL and a sub-band LH.
The wavelet coefficient scanning order is the scanning order with the smallest corresponding rate-distortion value in a plurality of scanning orders; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
The wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
The apparatus also includes a write module to: and writing the identifier corresponding to the wavelet coefficient scanning sequence into a code stream so as to facilitate a decoding end to decode the image.
As shown in fig. 14, an embodiment of the present application further provides an image decoding apparatus based on wavelet transform, including:
a decoding module 1401, configured to perform entropy decoding on a compressed code stream including the 3n +1 sub-bands according to context information of the 3n +1 sub-bands of an image block K to obtain quantized wavelet coefficients of the 3n +1 sub-bands, where the context information of any one of the 3n +1 sub-bands includes a wavelet coefficient in a decoded co-located sub-band; the co-located sub-band is a sub-band in an image block adjacent to the image block K, the position of the co-located sub-band in the image block adjacent to the image block K is the same as the position of any sub-band in the image block K, and N is an integer greater than 0;
an inverse quantization module 1402, configured to perform inverse quantization on the quantized wavelet coefficients of the 3n +1 sub-bands to obtain wavelet coefficients of the 3n +1 sub-bands;
and a wavelet inverse transformation module 1403, configured to perform wavelet inverse transformation on the wavelet coefficients of the sub-bands of 3n +1 for N times to obtain a reconstructed image of the image block K.
The context information of the quantized upper boundary wavelet coefficients in any one sub-band is the wavelet coefficients of the lower boundary of the decoded co-located sub-band.
The context information of the quantized left boundary wavelet coefficients in any one subband is the wavelet coefficients of the right boundary of the decoded co-located subband.
The context information of the quantized left upper boundary wavelet coefficient in any sub-band is the wavelet coefficient of the right lower boundary of the decoded co-located sub-band.
The context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band one level higher than the sub-band of any sub-band.
The quantized wavelet coefficients in any one of the subbands further include non-boundary wavelet coefficients.
The any sub-band being sub-band HH i Subband HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For subband HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the pair sub-band LL i And performing primary wavelet transform.
The decoding module is specifically configured to: and entropy decoding the compressed code stream comprising the 3N +1 sub-bands according to the wavelet coefficient scanning order and the context information of the 3N +1 sub-bands.
The decoding module is further configured to: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
An embodiment of the present application further provides an image decoding apparatus based on wavelet transform, including:
the decoding module is used for carrying out entropy decoding on the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein the compressed code stream includes a compressed code stream of 3n +1 sub-bands, and a quantized wavelet coefficient in any sub-band of 3n +1 sub-bands is obtained by entropy decoding the code stream of any sub-band according to context information of the quantized wavelet coefficient in any sub-band of 3n +1 sub-bands; the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band at a higher level than any sub-band, and N is an integer greater than 0;
the inverse quantization module is used for inverse quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for carrying out N-time wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands to obtain a reconstructed image block.
The any sub-band being sub-band HH i Subband HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And wavelet coefficients are set to 0Subband removing MP i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 As sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer, indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing wavelet transformation once to obtain the target.
The decoding module is specifically configured to: and performing entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence.
The decoding module is further configured to: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
An embodiment of the present application further provides an image decoding apparatus based on wavelet transform, including:
the decoding module is used for carrying out entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence so as to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein, the compressed code stream comprises a code stream of 3N +1 sub-bands;
the inverse quantization module is used for inverse quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
The decoding module is further configured to: and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
Embodiments of the present application further provide a computer-readable storage medium having stored therein instructions, which when executed on a computer or processor, cause the computer or processor to perform one or more steps of any one of the methods described above.
The embodiment of the application also provides a computer program product containing instructions. The computer program product, when run on a computer or processor, causes the computer or processor to perform one or more steps of any of the methods described above.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optics, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
Those skilled in the art can understand that all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer readable storage medium and can include the processes of the method embodiments described above when executed. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered within the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (56)

1. An image coding method based on wavelet transform, comprising:
carrying out N times of wavelet transformation on the image block K to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer greater than 0;
quantizing wavelet coefficients of the 3N +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
entropy coding is carried out on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3N +1 sub-bands to obtain a compressed code stream of any sub-band, wherein the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients of the boundary in the encoded co-located sub-band; the co-located subbands are subbands in an image block adjacent to the image block K, and a position of the co-located subband in the image block adjacent to the image block K is the same as a position of the any subband in the image block K.
2. The method according to claim 1, wherein the context information of the quantized upper boundary wavelet coefficients in any subband is the wavelet coefficients of the lower boundary of the encoded co-located subband.
3. The method according to claim 1, wherein the context information of the quantized left boundary wavelet coefficients in any subband is the wavelet coefficients of the right boundary of the encoded co-located subband.
4. The method according to claim 1, wherein the context information of the quantized left upper boundary wavelet coefficients in any one subband is the wavelet coefficients of the right lower boundary of the encoded co-located subband.
5. The method of any one of claims 1 to 4, wherein entropy encoding any one of the 3N +1 subbands according to context information of quantized wavelet coefficients of the any subband comprises:
entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
6. The method of claim 5, further comprising:
determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K;
when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning sequence is a vertical scanning sequence; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
7. The method of claim 6, wherein the any sub-band is any one of sub-band HH, sub-band HL and sub-band LH.
8. The method of claim 5, wherein the wavelet coefficient scanning order is a scanning order of a plurality of scanning orders that corresponds to a smallest rate-distortion value; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
9. The method of claim 5, wherein the wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
10. The method of claim 5, further comprising:
and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
11. An image coding method based on wavelet transform, comprising:
carrying out N times of wavelet transformation on an image block K to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer greater than 0;
quantizing wavelet coefficients of the 3N +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
entropy encoding is carried out on any sub-band according to context information of the quantized wavelet coefficients in any sub-band of the 3N +1 sub-bands to obtain a compressed code stream of any sub-band, wherein the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, and the reference sub-band is obtained by carrying out up-sampling or inverse wavelet transform on high-frequency sub-bands which are coded in sub-bands of a higher level than any sub-band.
12. The method of claim 11, wherein the any sub-band is sub-band HH i Subband HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 The wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 As sub-band HH i+1 Sub-band HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the pair sub-band LL i And performing wavelet transformation once to obtain the target.
13. The method of claim 11 or 12, wherein entropy encoding any one of the 3n +1 subbands according to context information of quantized wavelet coefficients in the any subband comprises:
entropy encoding any one of the subbands 3N +1 according to a wavelet coefficient scanning order and context information of the quantized wavelet coefficients in the any one subband, wherein the wavelet coefficient scanning order is an order of entropy encoding the quantized wavelet coefficients in the any one subband.
14. The method of claim 13, further comprising:
determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K;
when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning order is a horizontal scanning order; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subbands in the image block K is neither horizontal nor vertical texture, then the wavelet coefficient scan order is a zig-zag scan order.
15. The method of claim 14, wherein any one of the sub-bands is any one of sub-band HH, sub-band HL and sub-band LH.
16. The method of claim 13, wherein the wavelet coefficient scanning order is a scanning order of a plurality of scanning orders that corresponds to a smallest rate-distortion value; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
17. The method of claim 13, wherein the wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
18. The method of any one of claims 14 to 17, further comprising:
and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
19. An image decoding method based on wavelet transform, comprising:
entropy decoding a compressed code stream comprising 3N +1 sub-bands of an image block K according to context information of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands, wherein the context information of any sub-band of the 3N +1 sub-bands comprises wavelet coefficients of boundaries in decoded co-located sub-bands; the co-located sub-band is a sub-band in an image block adjacent to the image block K, the position of the co-located sub-band in the image block adjacent to the image block K is the same as the position of any sub-band in the image block K, and N is an integer greater than 0;
inversely quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and carrying out wavelet inverse transformation on the wavelet coefficients of the sub-bands of 3N +1 for N times to obtain a reconstructed image of the image block K.
20. The method according to claim 19, wherein the context information of the quantized upper boundary wavelet coefficients in any one subband is the wavelet coefficients of the lower boundary of the decoded co-located subband.
21. The method according to claim 19, wherein the context information of the quantized left boundary wavelet coefficients in any one of the subbands is the wavelet coefficients of the right boundary of the decoded co-located subband.
22. The method according to claim 19, wherein the context information of the quantized upper left boundary wavelet coefficients in any one of the subbands is the wavelet coefficients of the lower right boundary of the decoded co-located subband.
23. The method of any claim 19 to 22, wherein entropy decoding a compressed code stream comprising 3n +1 subbands according to context information of 3n +1 subbands of an image block K comprises:
entropy decoding a compressed code stream including said 3N +1 sub-bands according to a wavelet coefficient scan order and context information of said 3N +1 sub-bands.
24. The method of claim 23, further comprising:
and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
25. An image decoding method based on wavelet transform, comprising:
entropy decoding is carried out on the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein the compressed code stream includes a compressed code stream of 3n +1 sub-bands, and a quantized wavelet coefficient in any sub-band of 3n +1 sub-bands is obtained by entropy decoding the code stream of any sub-band according to context information of the quantized wavelet coefficient in any sub-band of 3n +1 sub-bands; the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band at a higher level than any sub-band, and N is an integer greater than 0;
inversely quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and carrying out wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
26. The method of claim 25, wherein the any sub-band is sub-band HH i Subband HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 As sub-band HH i+1 Sub-band HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i And performing primary wavelet transform.
27. The method of claim 25, wherein entropy decoding the compressed code stream comprises:
and carrying out entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence.
28. The method of claim 27, further comprising:
and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning sequence according to the identifier.
29. An image encoding apparatus based on wavelet transform, comprising:
the wavelet transformation module is used for carrying out wavelet transformation on an image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0;
a quantization processing module, configured to perform quantization processing on the wavelet coefficients of 3n +1 subbands to obtain quantized wavelet coefficients of 3n +1 subbands;
an encoding module, configured to perform entropy encoding on any sub-band according to context information of a quantized wavelet coefficient in any sub-band of the 3n +1 sub-bands to obtain a compressed code stream of any sub-band, where the context information of the quantized wavelet coefficient in any sub-band includes a wavelet coefficient of a boundary in an encoded co-located sub-band; the co-located subbands are subbands in an image block adjacent to the image block K, and a position of the co-located subband in the image block adjacent to the image block K is the same as a position of the any subband in the image block K.
30. The apparatus according to claim 29, wherein the context information of the quantized upper boundary wavelet coefficients in any subband is the wavelet coefficients of the lower boundary of the encoded co-located subband.
31. The apparatus according to claim 29, wherein the context information of the quantized left boundary wavelet coefficients in any one of the subbands is the wavelet coefficients of the right boundary of the encoded co-located subband.
32. The apparatus according to claim 29, wherein the context information of the quantized upper left boundary wavelet coefficients in any subband is the wavelet coefficients of the lower right boundary of the encoded co-located subband.
33. The apparatus according to any one of claims 29 to 32, wherein the encoding module is specifically configured to:
entropy coding is performed on any one sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the sub-band, wherein the wavelet coefficient scanning order is an order of entropy coding of the quantized wavelet coefficients in the sub-band.
34. The apparatus of claim 33, further comprising means for determining:
determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K;
when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning sequence is a horizontal scanning sequence; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning sequence is a vertical scanning sequence; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
35. The apparatus of claim 34, wherein the any sub-band is any one of a sub-band HH, a sub-band HL, and a sub-band LH.
36. The apparatus of claim 33, wherein the wavelet coefficient scanning order is a scanning order of a plurality of scanning orders that corresponds to a smallest rate-distortion value; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
37. The apparatus of claim 33, wherein the wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
38. The apparatus of claim 33, further comprising a write module configured to:
and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
39. An image encoding apparatus based on wavelet transform, comprising:
the wavelet transformation module is used for carrying out wavelet transformation on the image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands, wherein N is an integer larger than 0;
a quantization processing module, configured to perform quantization processing on the wavelet coefficients of the 3n +1 sub-bands respectively to obtain quantized wavelet coefficients of the 3n +1 sub-bands;
and the encoding module is configured to perform entropy encoding on any one sub-band according to context information of the quantized wavelet coefficient in any one sub-band of the 3n +1 sub-bands to obtain a compressed code stream of any one sub-band, where the context information of the quantized wavelet coefficient in any one sub-band includes the wavelet coefficient in a reference sub-band of any one sub-band, and the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a high-frequency sub-band that has been encoded in a sub-band at a higher level than that of any one sub-band.
40. The apparatus according to claim 39, wherein said any sub-band is sub-band HH i Sub-band HL i Sub-band LH i The reference subband is passed through to subband MP i+1 And a subband MP with wavelet coefficients both set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the pair sub-band LL i And performing wavelet transformation once to obtain the target.
41. The apparatus according to claim 39 or 40, wherein the encoding module is specifically configured to:
entropy encoding any one of the subbands 3N +1 according to a wavelet coefficient scanning order and context information of the quantized wavelet coefficients in the any one subband, wherein the wavelet coefficient scanning order is an order of entropy encoding the quantized wavelet coefficients in the any one subband.
42. The apparatus of claim 41, further comprising means for determining:
determining the wavelet coefficient scanning order of any sub-band according to the texture of the low-frequency sub-band in the image block K;
when the texture of the low-frequency sub-band in the image block K is a horizontal texture, the wavelet coefficient scanning order is a horizontal scanning order; when the texture of the low-frequency sub-band in the image block K is a vertical texture, the wavelet coefficient scanning order is a vertical scanning order; when the texture of the low frequency subband in the image block K is neither a horizontal texture nor a vertical texture, then the wavelet coefficient scan order is a zigzag scan order.
43. The apparatus according to claim 42, wherein said any one of the sub-bands is any one of sub-band HH, sub-band HL and sub-band LH.
44. The apparatus of claim 41, wherein the wavelet coefficient scanning order is a scanning order of a plurality of scanning orders that corresponds to a smallest rate-distortion value; and the rate distortion values corresponding to the multiple scanning orders are determined according to compressed code streams obtained by respectively encoding any sub-band according to the multiple scanning orders.
45. The apparatus of claim 41, wherein the wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
46. The apparatus of any one of claims 42 to 45, further comprising a writing module configured to:
and writing the identifier corresponding to the wavelet coefficient scanning sequence into a code stream so as to facilitate a decoding end to decode the image.
47. An image decoding apparatus based on wavelet transform, comprising:
a decoding module, configured to perform entropy decoding on a compressed code stream including 3n +1 subbands according to context information of 3n +1 subbands of an image block K to obtain quantized wavelet coefficients of 3n +1 subbands, where the context information of any subband in the 3n +1 subbands includes a wavelet coefficient of a boundary in a decoded collocated subband; the co-located subbands are subbands in an image block adjacent to the image block K, the position of the co-located subbands in the image block adjacent to the image block K is the same as the position of any subband in the image block K, and N is an integer greater than 0;
the inverse quantization module is used for inverse quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for carrying out N-time wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands to obtain a reconstructed image of the image block K.
48. The apparatus according to claim 47, wherein the context information of the quantized upper boundary wavelet coefficients in any one of the subbands is the wavelet coefficients of the lower boundary of the decoded co-located subband.
49. The apparatus according to claim 47, wherein the context information of the quantized left boundary wavelet coefficients in any subband is the wavelet coefficients of the right boundary of the decoded co-located subband.
50. The apparatus according to claim 47, wherein the context information of the quantized upper left boundary wavelet coefficients in any one of the subbands is the wavelet coefficients of the lower right boundary of the decoded co-located subband.
51. The apparatus according to any one of claims 47 to 50, wherein the decoding module is specifically configured to:
entropy decoding a compressed code stream including said 3N +1 sub-bands according to a wavelet coefficient scan order and context information of said 3N +1 sub-bands.
52. The apparatus of claim 51, wherein the decoding module is further configured to:
and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning sequence according to the identifier.
53. An image decoding apparatus based on wavelet transform, comprising:
the decoding module is used for carrying out entropy decoding on the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; wherein, the compressed code stream comprises a compressed code stream of 3N +1 sub-bands, and the quantized wavelet coefficient in any sub-band of the 3N +1 sub-bands is obtained by entropy decoding the code stream of any sub-band according to the context information of the quantized wavelet coefficient in any sub-band of the 3N +1 sub-bands; the context information of the quantized wavelet coefficients in any sub-band comprises the wavelet coefficients in a reference sub-band of any sub-band, the reference sub-band is obtained by performing up-sampling or inverse wavelet transform on a decoded high-frequency sub-band in a sub-band at a higher level than the any sub-band, and N is an integer greater than 0;
the inverse quantization module is used for inverse quantizing the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for carrying out N-time wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands to obtain a reconstructed image block.
54. The apparatus of claim 53, wherein the any sub-band is sub-band HH i Sub-band HL i Sub-band LH i Of the reference subband by the pair subband MP i+1 And a subband MP with wavelet coefficients all set to 0 i+1 Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MP i+1 For sub-band HH i+1 Subband HL i+1 Sub-band LH i+1 I is a positive integer, indicating the level of a subband, i is not greater than N-1, the subband MP i+1 And the subband MP i+1 The outer sub-bands pass through the counter-sub-band LL i To carry outAnd performing wavelet transformation once.
55. The apparatus of claim 53, wherein the decoding module is specifically configured to:
and performing entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence.
56. The apparatus of claim 55, wherein the decoding module is further configured to:
and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
CN202010820592.7A 2020-08-14 2020-08-14 Image coding and decoding method and device based on wavelet transformation Active CN114079771B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010820592.7A CN114079771B (en) 2020-08-14 2020-08-14 Image coding and decoding method and device based on wavelet transformation
PCT/CN2021/110574 WO2022033371A1 (en) 2020-08-14 2021-08-04 Wavelet transform-based image encoding/decoding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010820592.7A CN114079771B (en) 2020-08-14 2020-08-14 Image coding and decoding method and device based on wavelet transformation

Publications (2)

Publication Number Publication Date
CN114079771A CN114079771A (en) 2022-02-22
CN114079771B true CN114079771B (en) 2023-03-28

Family

ID=80247721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010820592.7A Active CN114079771B (en) 2020-08-14 2020-08-14 Image coding and decoding method and device based on wavelet transformation

Country Status (2)

Country Link
CN (1) CN114079771B (en)
WO (1) WO2022033371A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005341389A (en) * 2004-05-28 2005-12-08 Ricoh Co Ltd Image processor, processing method and program, and information recording medium
CN101192303A (en) * 2006-11-24 2008-06-04 北京中电华大电子设计有限责任公司 High speed bit flat surface decoding method and circuit suitable for Jpeg2000 standard
CN105611301A (en) * 2015-12-23 2016-05-25 四川大学 Distributed video coding and decoding method based on wavelet domain residual errors

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2933457B2 (en) * 1993-02-18 1999-08-16 日本電気株式会社 Wavelet transform coding method
KR100366638B1 (en) * 2001-02-07 2003-01-09 삼성전자 주식회사 Apparatus and method for image coding using tree-structured vector quantization based on wavelet transform
US7522774B2 (en) * 2004-03-10 2009-04-21 Sindhara Supermedia, Inc. Methods and apparatuses for compressing digital image data
JP4111448B2 (en) * 2004-04-22 2008-07-02 株式会社リコー Image processing apparatus, image processing method, program, and information recording medium
CN103037220B (en) * 2008-01-04 2016-01-13 华为技术有限公司 Video coding, coding/decoding method and device and processing system for video
JP5660361B2 (en) * 2010-03-26 2015-01-28 ソニー株式会社 Image processing apparatus and method, and program
CN102447896B (en) * 2010-09-30 2013-10-09 华为技术有限公司 Method, device and system for processing image residual block
CN102595113B (en) * 2011-01-13 2014-06-04 华为技术有限公司 Method, device and system for scanning conversion coefficient block
CN103581691B (en) * 2013-11-14 2016-05-18 北京航空航天大学 A kind of towards sparse coefficient efficiently can parallel image coding method
CN106803242A (en) * 2016-12-26 2017-06-06 江南大学 Multi-focus image fusing method based on quaternion wavelet conversion
CN108718409B (en) * 2018-06-11 2020-09-18 齐齐哈尔大学 Remote sensing image compression method
CN111009018A (en) * 2019-12-24 2020-04-14 苏州天必佑科技有限公司 Image dimensionality reduction and reconstruction method based on deep neural network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005341389A (en) * 2004-05-28 2005-12-08 Ricoh Co Ltd Image processor, processing method and program, and information recording medium
CN101192303A (en) * 2006-11-24 2008-06-04 北京中电华大电子设计有限责任公司 High speed bit flat surface decoding method and circuit suitable for Jpeg2000 standard
CN105611301A (en) * 2015-12-23 2016-05-25 四川大学 Distributed video coding and decoding method based on wavelet domain residual errors

Also Published As

Publication number Publication date
WO2022033371A1 (en) 2022-02-17
CN114079771A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
US6163626A (en) Method for digital image compression
Roos et al. Reversible intraframe compression of medical images
JP3993632B2 (en) Data compression system with importance quantizer
US6389074B1 (en) Method and apparatus for digital data compression
JP4718609B2 (en) Multidimensional digital signal filtering method and apparatus, and related encoding / decoding method and apparatus
KR100281165B1 (en) Lossless / Lossless Compression and Storage Method of Multiple Resolutions of Data for Efficient Processing and Its System
US6263110B1 (en) Method for data compression
Chappelier et al. Oriented wavelet transform for image compression and denoising
US6266414B1 (en) Method for digital data compression
EP0971544A2 (en) An image coding method and apparatus for localised decoding at multiple resolutions
WO1993017519A1 (en) Fractal coding of data
JPH10198337A (en) High speed aspect ratio zooming and thumbnail operation using compression and ceiling
US8369631B2 (en) Methods and devices for coding and decoding, a telecommunication system and computer program implementing them
KR20100016272A (en) Image compression and decompression using the pixon method
US7460722B2 (en) Encoding of digital data with determination of sample path
CN114079771B (en) Image coding and decoding method and device based on wavelet transformation
JP7401822B2 (en) Image encoding method, image encoding device and program
Devi et al. Gray scale image compression based on wavelet transform and linear prediction
EP0920213A2 (en) Method and apparatus for decoding transform coefficients
KR100950417B1 (en) Method for Modeling Context of Wavelet Transform based on Directional Filtering and Apparatus for Coding Wavelet, and Recording Medium therefor
AU708489B2 (en) A method and apparatus for digital data compression
AU725719B2 (en) A method of digital image compression
Ho et al. Adaptive predictor based on maximally flat halfband filter in lifting scheme
Arya Devi et al. Compression of gray scale images using linear prediction on wavelet coefficients
EP3046326A1 (en) Method and device of construction of an epitome, coding and decoding methods and coding and decoding devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant