CN-121985124-A - Image decoding and encoding method, device, equipment and storage medium
Abstract
The application belongs to the technical field of image processing, and discloses an image decoding and encoding method, an image decoding and encoding device, image decoding and encoding equipment and a storage medium. The method comprises the steps of obtaining characteristic channel distinguishing information and/or space point distinguishing information, decoding an image code stream to obtain quantized residual values, constructing inverse quantization precision parameters corresponding to the quantized residual values according to the characteristic channel distinguishing information and/or the space point distinguishing information, inversely quantizing the quantized residual values based on the inverse quantization precision parameters to obtain reconstructed residual values, and carrying out synthesis transformation on the reconstructed residual values to obtain reconstructed image blocks. Because the corresponding inverse quantization parameters are constructed according to the characteristic channel distinguishing information and/or the space point distinguishing information to perform inverse quantization, different quantization parameters can be set according to the difference between the characteristic channel and the space point image texture in the encoding process, so that more important characteristics bear smaller quantization loss, and the encoding and decoding performances are improved.
Inventors
- YIN SHIYING
- CHEN FANGDONG
- WANG LI
- WU XIAOYANG
Assignees
- 杭州海康威视数字技术股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230301
Claims (20)
- 1. An image decoding method, characterized in that the image decoding method comprises the steps of: acquiring characteristic channel distinguishing information and/or space point distinguishing information, and decoding an image code stream to obtain a quantized residual value; constructing inverse quantization precision parameters corresponding to each quantization residual value according to the characteristic channel distinguishing information and/or the space point distinguishing information; for any quantized residual value, performing inverse quantization on the quantized residual value based on the inverse quantization precision parameter corresponding to the quantized residual value to obtain a reconstructed residual value; and obtaining a mean value used when calculating the characteristic residual value through context prediction, reconstructing the reconstructed residual value into an image characteristic based on the mean value, and carrying out synthesis transformation on the image characteristic to obtain a reconstructed image block.
- 2. The image decoding method of claim 1, wherein the step of decoding the image code stream to obtain the quantized residual value comprises: Extracting coding distribution parameters from an image code stream; decoding the coding distribution parameters to obtain probability distribution parameters; quantizing the probability distribution parameters to obtain distribution quantization parameters; and decoding the image code stream based on the distributed quantization parameter to obtain the quantization residual value.
- 3. The image decoding method according to claim 2, wherein the step of quantizing the probability distribution parameters to obtain distribution quantization parameters comprises: Constructing probability quantization parameters according to the characteristic channel distinguishing information and/or the space point distinguishing information; and quantizing the probability distribution parameters based on the probability quantization parameters to obtain distribution quantization parameters.
- 4. The image decoding method according to claim 3, wherein the step of constructing probability quantization parameters from the characteristic channel discrimination information and/or the spatial point discrimination information comprises: constructing the probability quantization parameter according to the characteristic channel or the space point corresponding to the probability distribution parameter; Wherein different characteristic channels or spatial points correspond to different probability quantization parameters.
- 5. The image decoding method according to claim 1, wherein the step of acquiring the characteristic channel discrimination information and/or the spatial point discrimination information includes: and decoding the image code stream to obtain characteristic channel distinguishing information and/or space point distinguishing information.
- 6. The image decoding method according to claim 1, wherein the step of constructing inverse quantization precision parameters corresponding to respective quantized residual values from the characteristic channel distinction information and/or the spatial point distinction information comprises: extracting quantization step sizes corresponding to various characteristic channels from the characteristic channel distinguishing information; and constructing inverse quantization precision parameters corresponding to each quantization residual error value according to the quantization step length.
- 7. The image decoding method of claim 6, wherein different classes of feature channels correspond to different quantization step sizes.
- 8. The image decoding method according to claim 1, wherein the step of constructing inverse quantization precision parameters corresponding to respective quantized residual values from the characteristic channel distinction information and/or the spatial point distinction information comprises: extracting quantization step sizes corresponding to various spatial points from the spatial point distinguishing information; and constructing inverse quantization precision parameters corresponding to each quantization residual error value according to the quantization step length.
- 9. The image decoding method of claim 8, wherein different classes of spatial points correspond to different quantization step sizes.
- 10. The image decoding method according to claim 1, wherein the step of constructing inverse quantization precision parameters corresponding to respective quantized residual values from the characteristic channel distinction information and/or the spatial point distinction information comprises: reading various divided space points from the space point distinguishing information; Reading quantization step sizes corresponding to various characteristic channels in various space points from the characteristic channel distinguishing information; and constructing inverse quantization precision parameters corresponding to each quantization residual error value according to the quantization step length.
- 11. The image decoding method as claimed in claim 6, wherein the step of constructing inverse quantization precision parameters corresponding to the quantized residual values, respectively, according to the quantization step size, comprises: decoding the image code stream to obtain probability distribution parameters; Extracting a parameter interval threshold value from the characteristic channel distinguishing information; and constructing inverse quantization precision parameters corresponding to each quantization residual value respectively according to the probability distribution parameters, the quantization step length and the parameter interval threshold.
- 12. The image decoding method according to claim 1, wherein the step of constructing inverse quantization precision parameters corresponding to respective quantized residual values from the characteristic channel distinction information and/or the spatial point distinction information comprises: the characteristic channel distinguishing information is parsed, For any quantized residual value, obtaining a segmentation step length set corresponding to each type of characteristic channel, wherein the segmentation step length set corresponding to the type of characteristic channel comprises a plurality of different quantization step lengths; extracting a quantization step length corresponding to a channel segment to which the quantization residual value belongs from a segmentation step length set corresponding to one type of characteristic channel; and constructing inverse quantization precision parameters respectively corresponding to the quantization residual values according to the quantization step sizes.
- 13. The image decoding method of claim 1, wherein the method further comprises: for any quantized residual value, obtaining a characteristic channel class corresponding to the quantized residual value, determining a channel segment to which the quantized residual value belongs in the characteristic channel, determining a quantization step length corresponding to the quantized residual value according to the characteristic channel class and the channel segment, and determining an inverse quantization precision parameter corresponding to the quantized residual value according to the quantization step length, wherein a segment step length set corresponding to the characteristic channel comprises a plurality of different quantization step lengths, the characteristic channel is divided into a plurality of channel segments, and one channel segment corresponds to one quantization step length.
- 14. The image decoding method according to claim 1, wherein the step of constructing inverse quantization precision parameters corresponding to respective quantized residual values from the characteristic channel distinction information and/or the spatial point distinction information comprises: determining a characteristic channel class and/or a spatial point class corresponding to each quantized residual value according to the characteristic channel distinguishing information and/or the spatial point information; Determining inverse quantization precision parameters corresponding to each quantization residual value according to the characteristic channel class and/or the spatial point class; Wherein, different kinds of characteristic channels and/or spatial point categories adopt quantization with different precision.
- 15. An image encoding method, characterized in that the image encoding method comprises the steps of: Analyzing and transforming the image block to be processed to obtain image characteristics; residual calculation is carried out on the image characteristics, and image residual values and probability distribution parameters are obtained; constructing quantization precision parameters respectively corresponding to residual values of all images according to the characteristic channel distinguishing information and/or the space point distinguishing information; Carrying out quantization processing on the image residual error value based on the quantization precision parameter to obtain a quantization residual value; And writing the probability distribution parameters and the quantized residual values into an image code stream.
- 16. The image encoding method according to claim 15, wherein the step of writing the probability distribution parameters and the quantized residual values into an image code stream comprises: writing the probability distribution parameters into an image code stream; Constructing a distribution quantization parameter according to the probability distribution parameter; And writing the quantized residual value into an image code stream based on the distributed quantization parameter.
- 17. The image encoding method of claim 15, wherein the step of constructing a distribution quantization parameter from the probability distribution parameter comprises: Constructing probability quantization parameters according to the characteristic channel distinguishing information and/or the space point distinguishing information; and quantizing the probability distribution parameters based on the probability quantization parameters to obtain distribution quantization parameters.
- 18. The image encoding method of claim 17, wherein the constructing probability quantization parameters according to the characteristic channel discrimination information and/or the spatial point discrimination information comprises: constructing the probability quantization parameter according to the characteristic channel or the space point corresponding to the probability distribution parameter; Wherein different characteristic channels or spatial points correspond to different probability quantization parameters.
- 19. The image encoding method according to claim 15, wherein the image encoding method further comprises: And writing the characteristic channel distinguishing information and/or the space point distinguishing information into the image code stream.
- 20. The image encoding method according to claim 15, wherein the step of constructing quantization precision parameters corresponding to respective image residual values according to the characteristic channel distinction information and/or the spatial point distinction information comprises: extracting quantization step sizes corresponding to various characteristic channels from the characteristic channel distinguishing information; And constructing quantization precision parameters respectively corresponding to the residual error values of the images according to the quantization step length.
Description
Image decoding and encoding method, device, equipment and storage medium The present invention is a divisional application of Chinese patent application with application date 2023, 03, 01 and application number 202310209226.1, named "image decoding and encoding method, device, equipment and storage medium". Technical Field The present invention relates to the field of image processing technologies, and in particular, to an image decoding and encoding method, apparatus, device, and storage medium. Background At present, the end-to-end image coding and decoding technology generally comprises modules such as an analysis transformation network, a synthesis transformation network, a prediction based on context, quantization, entropy coding, a super coding network, a super scale decoding network and the like, wherein quantization is a mapping process of 'many to one', signal loss is brought, the mapping process acts on residual errors, the value range of a signal can be changed, and an encoder can give good approximation to an original signal by a small number of symbols, so that the compression rate is improved, but the difference of characteristic channels and image textures is not considered when the quantization is carried out by the existing quantization module, so that the quantization performance of a quantizer is limited. The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art. Disclosure of Invention The invention mainly aims to provide an image decoding and encoding method, device, equipment and storage medium, and aims to solve the technical problem that quantizer performance is poor in the image encoding and decoding process in the prior art. To achieve the above object, the present invention provides an image decoding method comprising the steps of: acquiring characteristic channel distinguishing information and/or space point distinguishing information, and decoding an image code stream to obtain a quantized residual value; constructing inverse quantization precision parameters corresponding to each quantization residual value according to the characteristic channel distinguishing information and/or the space point distinguishing information; Performing inverse quantization on the quantized residual value based on the inverse quantization precision parameter to obtain a reconstructed residual value; and carrying out synthesis transformation on the reconstructed residual error value to obtain a reconstructed image block. In one possible embodiment of the present application, the image code stream includes a first image code stream for transmitting decoding auxiliary information and a second image code stream for transmitting residual data; the step of decoding the image code stream to obtain the quantized residual value comprises the following steps: Extracting coding distribution parameters from the first image code stream; decoding the coding distribution parameters to obtain probability distribution parameters; quantizing the probability distribution parameters to obtain distribution quantization parameters; and decoding the second image code stream based on the distributed quantization parameter to obtain a quantization residual value. In a possible embodiment of the present application, the step of quantizing the probability distribution parameters to obtain distribution quantization parameters includes: Constructing probability quantization parameters according to the characteristic channel distinguishing information and/or the space point distinguishing information; and quantizing the probability distribution parameters based on the probability quantization parameters to obtain distribution quantization parameters. In a possible embodiment of the present application, the step of obtaining characteristic channel distinguishing information and/or spatial point distinguishing information includes: And decoding the first image code stream or the second image code stream to obtain characteristic channel distinguishing information and/or space point distinguishing information. In a possible embodiment of the present application, the image code stream further includes a third image code stream, and the third image code stream is used for transmitting the distinguishing information; the step of obtaining the characteristic channel distinguishing information and/or the space point distinguishing information comprises the following steps: And decoding the third image code stream to obtain characteristic channel distinguishing information and/or space point distinguishing information. In one possible implementation manner of the present application, the step of constructing inverse quantization precision parameters corresponding to each quantized residual value according to the characteristic channel distinguishing information and/or the spatial point di