CN114079771A - 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
CN114079771A
CN114079771A CN202010820592.7A CN202010820592A CN114079771A CN 114079771 A CN114079771 A CN 114079771A CN 202010820592 A CN202010820592 A CN 202010820592A CN 114079771 A CN114079771 A CN 114079771A
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.)
Granted
Application number
CN202010820592.7A
Other languages
Chinese (zh)
Other versions
CN114079771B (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: performing wavelet transformation on the image block K for N times to obtain wavelet coefficients of 3N +1 sub-bands; 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; and entropy coding is carried out on any sub-band according to the context information of the quantized wavelet coefficient 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 coefficient in any sub-band comprises the wavelet coefficient in the coded 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 coefficient in the encoded co-located sub-band, and 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 image storage, transmission and other applications, 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, an image is wavelet transformed to form a plurality of sub-bands, for example, if an image is wavelet transformed N times, 3N +1 sub-bands (or sub-images) will be obtained. For a plurality of sub-bands obtained by wavelet transformation, quantization and entropy coding are carried out on the sub-bandsAnd the code is operated to obtain a compressed code stream. The decoding operation is opposite 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 obtained1、LH1、HL1、HH1Wherein, the four sub-bands are all primary sub-bands; for sub-band LL therein14 sub-bands LL are obtained through wavelet transformation2、LH2、HL2、HH2Then the four sub-bands are all 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, and use a progressive scanning method to code each coefficient in a subband, when each coefficient is coded, first obtain context information in a context region corresponding to a current coefficient, perform probability estimation on the coefficient according to the context information to obtain probability distribution information of the coefficient, and code the coefficient according to the probability distribution information. Wherein the context information in the context area includes: reconstructed coefficient information in the upper and left side within the 3x3, 5x5, or 7x7 region of the current coefficient sub-band, or encoded information in the 3x3, 5x5, or 7x7 region between 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 LL1', block of coefficients LL1' Up and Down between subbands when entropy coding as level 1 wavelet coefficientsThe text information performs probability estimation on the current 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 for coding, and the correlation is low; when entropy coding is performed on the boundary coefficient, if context information is unavailable, the accuracy of the probability distribution of the current coefficient is affected if 0 coefficient is filled; alternatively, when encoding 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: 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 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 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 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.
Wherein the co-located subbands are subbands in an image block spatially 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 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 transform is to continuously decompose each level of low-frequency sub-band into a plurality of 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 HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
As an optional implementation manner, the entropy encoding, according to context information of the quantized wavelet coefficients of any sub-band of the 3N +1 sub-bands, of any sub-band includes: entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the any subband.
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 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 a high-frequency sub-band, which 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 second aspect, an embodiment of the present application provides an image encoding method based on wavelet transform, including: 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 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 encoding is carried out on any sub-band according to context information of 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 a high-frequency sub-band which is coded in a sub-band at a higher level than 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.
Wherein any one of the sub-bands is sub-band HHiSubband HLiSub-band LHiIn (1)One, the reference sub-band passes through the pair sub-band MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
Wherein the entropy encoding of any one of the 3N +1 sub-bands according to context information of quantized wavelet coefficients in the any one sub-band comprises: entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the any subband.
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 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 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: 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 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; and entropy coding the quantized wavelet coefficients 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 for entropy coding the quantized wavelet coefficients 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 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.
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, 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 the 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; performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands; and performing 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.
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.
Wherein any one of the sub-bands is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
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 performing entropy decoding on 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 the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; the compressed code stream comprises compressed code streams of 3N +1 sub-bands, and a 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 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; performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands; and performing wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
Wherein any one of the sub-bands is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
The entropy decoding of the compressed code stream includes: and performing 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 the compressed code stream according to the wavelet coefficient scanning sequence to obtain quantized wavelet coefficients of 3N +1 sub-bands; the compressed code stream comprises 3N +1 code streams of sub-bands; performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands; and performing 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 order 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 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 greater than 0; the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands; the encoding module is used for entropy encoding 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 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 HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
Wherein, the encoding module is specifically configured to: entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the 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 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 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 greater than 0; the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands; and the encoding module is used for entropy encoding any sub-band according to the 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 performing up-sampling or inverse wavelet transform on a high-frequency sub-band which is encoded in a sub-band at a higher level than any sub-band.
The any sub-band being sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
The encoding module is specifically configured to: entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the 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 order into a code stream so that a decoding end can 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 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 greater than 0; the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands; and the coding module is used for entropy coding the quantized wavelet coefficients 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 for entropy coding the quantized wavelet coefficients in any 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 order into a code stream so that a decoding end can decode the image.
In a tenth aspect, an embodiment of the present application provides an image decoding apparatus based on wavelet transform, including: the decoding module is used for performing entropy decoding on the compressed code stream comprising the 3N +1 sub-bands according to the context information of the 3N +1 sub-bands of the 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 wavelet coefficients in the 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; the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands; and the wavelet inverse transformation module is used for performing 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 HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
The decoding module is specifically configured to: and performing entropy decoding on 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; the compressed code stream comprises compressed code streams of 3N +1 sub-bands, and a 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 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; the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands; and the wavelet inverse transformation module is used for performing wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
The any sub-band being sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd 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.
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; the compressed code stream comprises 3N +1 code streams of sub-bands; the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands; and the wavelet inverse transformation module is used for performing 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 illustrating a wavelet transform-based image decoding process provided by 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 transform is introduced, as shown in fig. 1, a target image or an image block to be coded is subjected to wavelet transform 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, 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 greater 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, the target image may be divided by a quadtree-based division method. The target image may be divided into image blocks of the same size, for example, may be divided into image blocks having 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 subjected to wavelet transformation for N times, and wavelet coefficients of 3N +1 sub-bands can be obtained.
One of the images 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 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, 3N +1 subbands may be obtained, as shown in fig. 3, where an image is wavelet-transformed N times to obtain N-level subbands, and for example, after the first wavelet transform, the first-level subbands are obtained; 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 the present solution 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 the present solution.
S202, 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;
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.
Wherein, the context information of the wavelet coefficients can 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 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.
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 convolution in the column direction by using a high-pass wavelet filter, and the HL sub-band represents the horizontal direction singular characteristics of an image; may be referred to as horizontal sub-bands.
The LH sub-band is a wavelet coefficient generated by convolution in the row direction by using a high-pass wavelet filter and 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 encoded, the context information is the subband coefficients at the lower boundary in the co-located subband, as shown in the upper right-hand diagram 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 coded, the above description can be referred to accordingly, for example, when the subband coefficients of the lower boundary of the subband are coded, 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 streams 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, 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 greater 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, 3N +1 sub-bands will be obtained, as shown in fig. 3, where an image is wavelet-transformed for N times to obtain N-level sub-bands, and for example, after the first wavelet transform is performed, the first-level sub-band is obtained; 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 the present 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, 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;
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 th level subband, a context may be constructed by referring to the subband coefficients of the i-th level encoded high-frequency subband, so as to avoid referring to the subband coefficients of the low-frequency subband.
As a first implementation, the i-1 st level sub-band LH is encodedi-1For the i-th level sub-band LH in the case of sub-band coefficients of middle leveliUpsampling to obtain the i-1 level sub-band LHi-1Coefficient block LH of the same sizei', reference is made to the use of LHiThe coefficients within the preset region of' serve as the context when the current subband coefficient is encoded. Wherein for HLi-1,HHi-1The 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, the subband coefficient LH in the current i-1 level subband is consideredi-1For 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 ii、HHiAnd HLiAre all up-sampled to obtain the i-1 level sub-band LHi-1Coefficient block LH of the same sizei’、H Hi' and HLi' refer to a context when encoding using coefficients within its preset region as current subband coefficients. Wherein for HLi-1,HHi-1The 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. That is, the position of the wavelet coefficient to be coded in the sub-band where the wavelet coefficient is located is the same as the position of the center of the preset region in the sub-band where the wavelet coefficient is located. For example, as shown in 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 as the region R2.
As a third implementation, when encoding a sub-band MPiThe reference sub-band is passed through the pair sub-band LLiSub-band MP in sub-band obtained by performing wavelet transform oncei+1The 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 MPiFor sub-band HHiSubband HLiSub-band LHiI 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 measuredi-1When entropy coding is carried out, the i-th level division sub-band LH is carried outiThe other subband coefficients are all filled with 0, i.e. the subband HH in level ii、HLiAnd LLiFilling 0 in the sub-band coefficient, then making wavelet inverse transformation on the processed i-th level sub-band to obtain new sub-band LHi', will LHi' the coefficients within the preset region are coded as the current subband coefficientsThe context of the time. 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 codedi、HLiAnd HHi) Wavelet inverse transformation is carried out on the inner coded sub-band coefficient to obtain a sub-band LHi’、HLi' and HHi', as shown in FIG. 6. Containing only the high-frequency part, and then dividing the sub-band LHi’、HLi' and HHi' 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. in processing each subband coefficient, the subband coefficients already coded in a preset region within the same subband are used as context, e.g. the preset region size may be 3x3/5x5/7x 7. Where the preset area size may be represented as sxz, which indicates that the preset area is s coefficients wide and z coefficients high. 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 greater 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 coefficients in any sub-band of the 3N +1 sub-bands according to a wavelet coefficient scanning sequence to obtain a compressed code stream of any sub-band, wherein the wavelet coefficient scanning sequence is the sequence for entropy coding the quantized wavelet coefficients 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 scan order described above may be a scan order using a preset, for example: 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 order is selected by using a Rate Distortion Optimization (RDO) method, that is, a Z-type scanning order, a horizontal scanning order or a vertical scanning order is used to encode the current image, so as to obtain rate distortion values of the current image, respectively, and by comparing the relative sizes of the coding rate distortion values, the scanning order with the minimum rate distortion value is selected as the optimal wavelet coefficient scanning order. The encoding end uses the mark to mark the optimal scanning order, and can write the value of the mark 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 identifier corresponds to a second value, the wavelet coefficient scanning sequence 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 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.
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 and accumulating the absolute value of the gradient value for each coefficient point L (x, y) in the current sub-band;
Gx=∑xyabs(L(x+1,y)-L(x,y));
Gy=∑xyabs(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; and 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 order of the high-frequency sub-band is a horizontal scanning order; 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-type scanning 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 the decoding end can decode the 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 solution 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 wavelet transform-based image coding methods provided in the above embodiments may 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, performing entropy decoding on a compressed code stream comprising 3N +1 sub-bands according to context information of the 3N +1 sub-bands of the 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 wavelet coefficients in the 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;
the descriptions of the parity subbands may refer to the related descriptions in the embodiment shown in fig. 2, and are 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 specific implementation can refer to the embodiment described in fig. 2, and is not described herein again.
S1002, performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
s1003, performing 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 order according to the identifier. And performing entropy decoding on 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 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, performing entropy decoding on the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; the compressed code stream comprises compressed code streams of 3N +1 sub-bands, and a 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 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;
wherein, when decoding the sub-band MPiThe reference sub-band is passed through the pair sub-band LLiSub-band MP in sub-band obtained by performing wavelet transform oncei+1The 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 MPiFor sub-band HHiSubband HLiSub-band LHiI 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, performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
s1103, performing 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 image decoding method based on wavelet transform according to an embodiment of the present application. As shown in fig. 12, the method includes:
s1201, performing entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence to obtain quantized wavelet coefficients of 3N +1 sub-bands; the compressed code stream comprises 3N +1 code streams of sub-bands;
and determining the wavelet coefficient scanning order according to the identifier by acquiring the identifier in the compressed code stream.
S1202, performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
s1203, performing 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:
the wavelet transform module 1301 is configured to perform wavelet transform on the image block K 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;
the encoding module 1303 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 encoded co-located sub-bands; 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 HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
Wherein, the encoding module is specifically configured to: entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the 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 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 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 greater than 0;
the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
and the encoding module is used for entropy encoding any sub-band according to the 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 performing up-sampling or inverse wavelet transform on a high-frequency sub-band which is encoded in a sub-band at a higher level than any sub-band.
The any sub-band being sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
The encoding module is specifically configured to: entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the 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 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 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 greater than 0;
the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
and the coding module is used for entropy coding the quantized wavelet coefficients 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 for entropy coding the quantized wavelet coefficients in any 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 order into a code stream so that a decoding end can 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 the image block K, so as to obtain quantized wavelet coefficients of the 3N +1 sub-bands, where the context information of any sub-band 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;
a wavelet inverse transformation module 1403, configured to perform wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands 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 HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
The decoding module is specifically configured to: and performing entropy decoding on 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; the compressed code stream comprises compressed code streams of 3N +1 sub-bands, and a 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 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;
the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for performing wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
The any sub-band being sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd 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; the compressed code stream comprises 3N +1 code streams of sub-bands;
the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for performing 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 also 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, 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.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. 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 by 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 (84)

1. An image coding method based on wavelet transform, comprising:
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 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 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.
2. The method according to claim 1, 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 encoded co-located subband.
3. The method according to claim 1 or 2, 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.
4. A method according to any one of claims 1 to 3, wherein the context information of the quantized left upper boundary wavelet coefficients in any one of the subbands is the wavelet coefficients of the right lower boundary of the encoded co-located subband.
5. The method according to claim 1, wherein the context information of the quantized wavelet coefficients in any one of the subbands comprises wavelet coefficients in a reference subband of the any one subband, the reference subband being obtained by up-sampling or inverse wavelet transform a high frequency subband coded in a subband one level higher than the any one subband.
6. The method of claim 5, wherein the quantized wavelet coefficients in any one of the subbands further comprise non-boundary wavelet coefficients.
7. The method according to claim 5 or 6, wherein any one of the sub-bands is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
8. The method according to any one of claims 1 to 7, wherein entropy encoding any one of the 3N +1 sub-bands according to context information of quantized wavelet coefficients of the sub-band comprises:
entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the any subband.
9. The method of claim 8, 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 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.
10. The method according to claim 9, wherein said any one of the sub-bands is any one of sub-band HH, sub-band HL, and sub-band LH.
11. The method of claim 8, 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.
12. The method of claim 8 or 11, wherein the wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
13. The method according to any one of claims 8 to 12, 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.
14. An image coding method based on wavelet transform, comprising:
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 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 encoding is carried out on any sub-band according to context information of 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 a high-frequency sub-band which is coded in a sub-band at a higher level than any sub-band.
15. The method of claim 14, wherein any one of the sub-bands is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer,level for indicating a sub-band, i not greater than N-1, the sub-band MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
16. The method according to claim 14 or 15, wherein entropy encoding any one of the 3N +1 sub-bands according to context information of quantized wavelet coefficients in the any one sub-band comprises:
entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the any subband.
17. The method of claim 16, 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 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.
18. The method according to claim 17, wherein said any one of the sub-bands is any one of sub-band HH, sub-band HL, and sub-band LH.
19. The method of claim 16, 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.
20. The method of claim 16 or 19, wherein the wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
21. The method of any one of claims 16 to 20, 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.
22. An image coding method based on wavelet transform, comprising:
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 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;
and entropy coding the quantized wavelet coefficients 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 for entropy coding the quantized wavelet coefficients in any sub-band.
23. The method of claim 22, 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 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.
24. The method according to claim 23, wherein said any one of the sub-bands is any one of sub-band HH, sub-band HL, and sub-band LH.
25. The method of claim 22, 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.
26. The method of claim 22 or 25, wherein the wavelet coefficient scan order is a vertical scan order or a zigzag scan order.
27. The method of any one of claims 22 to 26, 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.
28. 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 the wavelet coefficients in the 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;
performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and performing 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.
29. The method according to claim 28, 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.
30. The method according to claim 28 or 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 decoded co-located subband.
31. The method according to any one of claims 28 to 30, wherein the context information of the quantized left upper boundary wavelet coefficients in any one of the subbands is the wavelet coefficients of the right lower boundary of the decoded co-located subband.
32. The method according to claim 28, wherein the context information of the quantized wavelet coefficients in any one of the subbands comprises wavelet coefficients in a reference subband of the any one subband, the reference subband being obtained by up-sampling or inverse wavelet transform a decoded high frequency subband in a subband one level higher than the any one subband.
33. The method of claim 32, wherein the quantized wavelet coefficients in any of the subbands further comprise non-boundary wavelet coefficients.
34. The method according to claim 32 or 33, wherein said any sub-band is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1The outer bands take inInverse transformation of the line wavelet is obtained; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
35. The method according to any one of claims 28 to 34, wherein said entropy decoding 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 comprises:
and performing entropy decoding on 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.
36. The method of claim 35, further comprising:
and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
37. An image decoding method based on wavelet transform, comprising:
entropy decoding the compressed code stream to obtain quantized wavelet coefficients of 3N +1 sub-bands; the compressed code stream comprises compressed code streams of 3N +1 sub-bands, and a 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 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;
performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and performing wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
38. The method of claim 37, wherein the any one sub-band is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
39. The method according to claim 37 or 38, wherein said entropy decoding the compressed code stream comprises:
and performing entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence.
40. The method of claim 39, further comprising:
and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
41. An image decoding method based on wavelet transform, comprising:
entropy decoding the compressed code stream according to the wavelet coefficient scanning sequence to obtain quantized wavelet coefficients of 3N +1 sub-bands; the compressed code stream comprises 3N +1 code streams of sub-bands;
performing inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain wavelet coefficients of the 3N +1 sub-bands;
and performing wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
42. The method of claim 41, further comprising:
and acquiring an identifier in the compressed code stream, and determining the wavelet coefficient scanning order according to the identifier.
43. An image encoding apparatus based on wavelet transform, comprising:
the wavelet transformation module is used for 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 greater than 0;
the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
the encoding module is used for entropy encoding 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.
44. The apparatus according to claim 43, 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.
45. The apparatus according to claim 43 or 44, 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.
46. The apparatus according to any of claims 43 to 45, wherein the context information of the quantized upper left boundary wavelet coefficients in any of the subbands is the wavelet coefficients of the lower right boundary of the encoded co-located subband.
47. The apparatus according to claim 43, wherein the context information of the quantized wavelet coefficients in any one of the subbands comprises wavelet coefficients in a reference subband of the any one subband, and the reference subband is obtained by up-sampling or inverse wavelet transform a high frequency subband coded in a subband one level higher than the any one subband.
48. The apparatus according to claim 47, wherein the quantized wavelet coefficients in any of the subbands further comprise non-boundary wavelet coefficients.
49. The apparatus according to claim 47 or 48, characterised in that said any sub-band is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
50. The apparatus according to any one of claims 43 to 49, wherein the encoding module is specifically configured to:
entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the any subband.
51. The apparatus of claim 50, further comprising a determination module configured 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.
52. The apparatus according to claim 51, wherein said any one sub-band is any one of sub-band HH, sub-band HL and sub-band LH.
53. The apparatus of claim 50, 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.
54. The apparatus of claim 50 or 53, wherein the wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
55. The apparatus according to any one of claims 50 to 54, further comprising a writing 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.
56. An image encoding apparatus based on wavelet transform, comprising:
the wavelet transformation module is used for 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 greater than 0;
the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
and the encoding module is used for entropy encoding any sub-band according to the 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 performing up-sampling or inverse wavelet transform on a high-frequency sub-band which is encoded in a sub-band at a higher level than any sub-band.
57. The apparatus according to claim 56, wherein said any sub-band is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
58. The apparatus according to claim 56 or 57, wherein the encoding module is specifically configured to:
entropy encoding any one of the 3N +1 subbands according to a wavelet coefficient scanning order and context information of quantized wavelet coefficients in the any subband, the wavelet coefficient scanning order being an order in which entropy encoding is performed on the quantized wavelet coefficients in the any subband.
59. The apparatus of claim 58, further comprising a determination module configured 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.
60. The apparatus according to claim 59, wherein said any sub-band is any one of sub-band HH, sub-band HL, and sub-band LH.
61. The apparatus according to claim 58, 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.
62. The apparatus of claim 58 or 61, wherein the wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
63. The apparatus according to any one of claims 58 to 62, further comprising a writing 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.
64. An image encoding apparatus based on wavelet transform, comprising:
the wavelet transformation module is used for 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 greater than 0;
the quantization processing module is used for respectively performing quantization processing on the wavelet coefficients of the 3N +1 sub-bands to obtain quantized wavelet coefficients of the 3N +1 sub-bands;
and the coding module is used for entropy coding the quantized wavelet coefficients 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 for entropy coding the quantized wavelet coefficients in any sub-band.
65. The apparatus of claim 64, further comprising a determination module configured 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.
66. The apparatus according to claim 65, wherein said any one sub-band is any one of sub-band HH, sub-band HL and sub-band LH.
67. The apparatus according to claim 64, 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.
68. The apparatus of claim 64 or 67, wherein the wavelet coefficient scan order is a vertical scan order or a Z-type scan order.
69. The apparatus according to any one of claims 64 to 68, further comprising a writing module for:
and writing the identifier corresponding to the wavelet coefficient scanning order into a code stream so that a decoding end can decode the image.
70. An image decoding apparatus based on wavelet transform, comprising:
the decoding module is used for performing entropy decoding on the compressed code stream comprising the 3N +1 sub-bands according to the context information of the 3N +1 sub-bands of the 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 wavelet coefficients in the 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;
the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for performing 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.
71. The apparatus according to claim 70, 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.
72. The apparatus according to claim 70 or 71, 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.
73. The apparatus according to any of claims 70 to 72, wherein the context information of the quantized upper left boundary wavelet coefficients in any of the subbands is the wavelet coefficients of the lower right boundary of the decoded co-located subband.
74. The apparatus according to claim 70, wherein the context information of the quantized wavelet coefficients in any one of the subbands comprises wavelet coefficients in a reference subband of the any one subband, and the reference subband is obtained by up-sampling or inverse wavelet transform a decoded high frequency subband in a subband one level higher than the any one subband.
75. The apparatus according to claim 74, wherein the quantized wavelet coefficients in any of the subbands further comprise non-boundary wavelet coefficients.
76. The apparatus according to claim 74 or 75, characterised in that said any sub-band is sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiIs carried out onceAnd performing wavelet transformation.
77. The apparatus according to any one of claims 70 to 76, wherein the decoding module is specifically configured to:
and performing entropy decoding on 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.
78. The apparatus of claim 77, 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.
79. 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; the compressed code stream comprises compressed code streams of 3N +1 sub-bands, and a 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 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;
the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for performing wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
80. The apparatus as claimed in claim 79, wherein the chamber is defined byOne sub-band being sub-band HHiSubband HLiSub-band LHiThe reference subband is passed through to subband MPi+1And a subband MP with wavelet coefficients all set to 0i+1Wavelet inverse transformation is carried out on each outer sub-band to obtain the wavelet inverse transformation; the sub-band MPi+1For sub-band HHi+1Subband HLi+1Sub-band LHi+1I is a positive integer for indicating the level of a subband, i is not greater than N-1, the subband MPi+1And the subband MPi+1The outer sub-bands pass through the counter-sub-band LLiAnd performing wavelet transformation once to obtain the target.
81. The apparatus of claim 79 or 80, wherein the decoding module is specifically configured to:
and performing entropy decoding on the compressed code stream according to the wavelet coefficient scanning sequence.
82. The apparatus of claim 81, 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.
83. An image decoding apparatus based on wavelet transform, comprising:
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; the compressed code stream comprises 3N +1 code streams of sub-bands;
the inverse quantization module is used for carrying out inverse quantization on the quantized wavelet coefficients of the 3N +1 sub-bands to obtain the wavelet coefficients of the 3N +1 sub-bands;
and the wavelet inverse transformation module is used for performing wavelet inverse transformation on the wavelet coefficients of the 3N +1 sub-bands for N times to obtain a reconstructed image block.
84. The apparatus of claim 83, 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 true CN114079771A (en) 2022-02-22
CN114079771B 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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005311785A (en) * 2004-04-22 2005-11-04 Ricoh Co Ltd Device and method for processing image, program, and information recording medium
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
CN102447896A (en) * 2010-09-30 2012-05-09 华为技术有限公司 Method, device and system for processing image residual block
CN102595113A (en) * 2011-01-13 2012-07-18 华为技术有限公司 Method, device and system for scanning conversion coefficient block
US20120328192A1 (en) * 2010-03-26 2012-12-27 Sony Corporation Image processor, image processing method, and program
CN103037220A (en) * 2008-01-04 2013-04-10 华为技术有限公司 Video coding and decoding methods and video coding and decoding devices and video processing system
CN103581691A (en) * 2013-11-14 2014-02-12 北京航空航天大学 Efficient and parallelable image coding method oriented to sparse coefficients
CN105611301A (en) * 2015-12-23 2016-05-25 四川大学 Distributed video coding and decoding method based on wavelet domain residual errors
CN106803242A (en) * 2016-12-26 2017-06-06 江南大学 Multi-focus image fusing method based on quaternion wavelet conversion
CN111009018A (en) * 2019-12-24 2020-04-14 苏州天必佑科技有限公司 Image dimensionality reduction and reconstruction method based on deep neural network

Family Cites Families (4)

* 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
CN108718409B (en) * 2018-06-11 2020-09-18 齐齐哈尔大学 Remote sensing image compression method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005311785A (en) * 2004-04-22 2005-11-04 Ricoh Co Ltd Device and method for processing image, program, and information recording medium
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
CN103037220A (en) * 2008-01-04 2013-04-10 华为技术有限公司 Video coding and decoding methods and video coding and decoding devices and video processing system
US20120328192A1 (en) * 2010-03-26 2012-12-27 Sony Corporation Image processor, image processing method, and program
CN102447896A (en) * 2010-09-30 2012-05-09 华为技术有限公司 Method, device and system for processing image residual block
CN102595113A (en) * 2011-01-13 2012-07-18 华为技术有限公司 Method, device and system for scanning conversion coefficient block
CN103581691A (en) * 2013-11-14 2014-02-12 北京航空航天大学 Efficient and parallelable image coding method oriented to sparse coefficients
CN105611301A (en) * 2015-12-23 2016-05-25 四川大学 Distributed video coding and decoding method based on wavelet domain residual errors
CN106803242A (en) * 2016-12-26 2017-06-06 江南大学 Multi-focus image fusing method based on quaternion wavelet conversion
CN111009018A (en) * 2019-12-24 2020-04-14 苏州天必佑科技有限公司 Image dimensionality reduction and reconstruction method based on deep neural network

Also Published As

Publication number Publication date
CN114079771B (en) 2023-03-28
WO2022033371A1 (en) 2022-02-17

Similar Documents

Publication Publication Date Title
Cheng et al. Energy compaction-based image compression using convolutional autoencoder
JP4718609B2 (en) Multidimensional digital signal filtering method and apparatus, and related encoding / decoding method and apparatus
Roos et al. Reversible intraframe compression of medical images
US6249614B1 (en) Video compression and decompression using dynamic quantization and/or encoding
KR100281165B1 (en) Lossless / Lossless Compression and Storage Method of Multiple Resolutions of Data for Efficient Processing and Its System
US6389074B1 (en) Method and apparatus for digital data compression
Chappelier et al. Oriented wavelet transform for image compression and denoising
US6263110B1 (en) Method for data compression
US20100054613A1 (en) Methods and devices for coding and decoding, a telecommunication system and computer program implementing them
Chaudhari et al. Wavelet transformed based fast fractal image compression
CN104471945B (en) Coding with Wavelets/coding/decoding method and device
CN114079771B (en) Image coding and decoding method and device based on wavelet transformation
US8989278B2 (en) Method and device for coding a multi dimensional digital signal comprising original samples to form coded stream
Thakker et al. Lossy Image Compression-A Comparison Between Wavelet Transform, Principal Component Analysis, K-Means and Autoencoders
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
Amin et al. Vector quantization based lossy image compression using wavelets–a review
Ho et al. Adaptive predictor based on maximally flat halfband filter in lifting scheme
Hooda Contributions to data compression research for various media formats using particle swarm optimization and neural networks
AU708489B2 (en) A method and apparatus for digital data compression
Arya Devi et al. Compression of gray scale images using linear prediction on wavelet coefficients
AU725719B2 (en) A method of digital image compression
Vogler et al. Wavelet-based compression of volumetric cfd data sets
Chen et al. Non-embedded wavelet image coding scheme

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