[go: up one dir, main page]

CN114298922A - Image processing method, device and electronic device - Google Patents

Image processing method, device and electronic device Download PDF

Info

Publication number
CN114298922A
CN114298922A CN202111511051.7A CN202111511051A CN114298922A CN 114298922 A CN114298922 A CN 114298922A CN 202111511051 A CN202111511051 A CN 202111511051A CN 114298922 A CN114298922 A CN 114298922A
Authority
CN
China
Prior art keywords
image
texture
regions
enhanced
reconstructed
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.)
Pending
Application number
CN202111511051.7A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111511051.7A priority Critical patent/CN114298922A/en
Publication of CN114298922A publication Critical patent/CN114298922A/en
Priority to PCT/CN2022/131594 priority patent/WO2023103715A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/60Image enhancement or restoration using machine learning, e.g. neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • G06T7/45Analysis of texture based on statistical description of texture using co-occurrence matrix computation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

本申请实施例提供了一种图像处理方法、装置及电子设备。该方法包括:首先,获取重建图像,然后,对重建图像进行图像增强,得到中间图像;接着,确定中间图像中各区域分别对应的纹理复杂度权重,纹理复杂度权重为0至1之间的数,随后,依据中间图像中各区域分别对应的纹理复杂度权重,对中间图像中各区域对应的纹理强度分别进行衰减,得到重建图像对应的增强图像。这样,能够保留中间图像中纹理区域的纹理,同时对非纹理区域中的纹理进行衰减,进而实现增强重建图像中纹理区域的纹理的同时,避免非纹理区域产生虚假纹理,从而减小重建图像的视觉失真,增加图像的真实感,提高图像的主观质量。

Figure 202111511051

Embodiments of the present application provide an image processing method, apparatus, and electronic device. The method includes: first, acquiring a reconstructed image, and then performing image enhancement on the reconstructed image to obtain an intermediate image; then, determining the texture complexity weights corresponding to each region in the intermediate image, and the texture complexity weights are between 0 and 1. Then, according to the texture complexity weight corresponding to each area in the intermediate image, the texture intensity corresponding to each area in the intermediate image is respectively attenuated to obtain an enhanced image corresponding to the reconstructed image. In this way, the texture of the textured area in the intermediate image can be preserved, and the texture in the non-textured area can be attenuated at the same time, so that the texture of the textured area in the reconstructed image can be enhanced, and the false texture of the non-textured area can be avoided, thereby reducing the reconstructed image. Visual distortion, increase the realism of the image, and improve the subjective quality of the image.

Figure 202111511051

Description

图像处理方法、装置及电子设备Image processing method, device and electronic device

技术领域technical field

本申请实施例涉及图像处理技术领域,尤其涉及一种图像处理方法、装置及电子设备。The embodiments of the present application relate to the technical field of image processing, and in particular, to an image processing method, an apparatus, and an electronic device.

背景技术Background technique

通常,在传输视频之前,会对视频进行压缩,以提高视频传输的效率;其中,视频压缩率越大,压缩后的视频的数据量越小。但随着压缩率的增加,视频会出现可见的视觉失真;为了减小重建图像的视觉失真,可以对重建图像进行后处理,以实现码率不变情况下的质量提升。Generally, before video is transmitted, the video is compressed to improve the efficiency of video transmission; wherein, the larger the video compression rate is, the smaller the data volume of the compressed video is. However, with the increase of the compression rate, visible visual distortion will appear in the video; in order to reduce the visual distortion of the reconstructed image, the reconstructed image can be post-processed to improve the quality when the bit rate remains unchanged.

虽然对重建图像进行后处理,能够显著提高重建图像的主观质量,但在非纹理区域容易生成虚假纹理,影响图像的主观质量。Although post-processing of the reconstructed image can significantly improve the subjective quality of the reconstructed image, false textures are easily generated in the non-textured area, which affects the subjective quality of the image.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题,本申请提供一种图像处理方法、装置及电子设备。In order to solve the above technical problems, the present application provides an image processing method, apparatus and electronic device.

第一方面,本申请实施例提供一种图像处理方法,该方法包括:首先,获取重建图像;然后,对重建图像进行图像增强,得到中间图像。接着,确定中间图像中各区域分别对应的纹理复杂度权重,纹理复杂度权重为0至1之间的数;随后,依据中间图像中各区域分别对应的纹理复杂度权重,对中间图像中各区域对应的纹理强度分别进行衰减,得到重建图像对应的增强图像。这样,能够保留中间图像中纹理区域的纹理,同时对非纹理区域中的纹理进行衰减,进而实现增强重建图像中纹理区域的纹理的同时,避免非纹理区域产生虚假纹理,从而减小重建图像的视觉失真,增加图像的真实感,提高图像的主观质量。In a first aspect, an embodiment of the present application provides an image processing method. The method includes: first, acquiring a reconstructed image; then, performing image enhancement on the reconstructed image to obtain an intermediate image. Next, determine the texture complexity weight corresponding to each area in the intermediate image, and the texture complexity weight is a number between 0 and 1; then, according to the texture complexity weight corresponding to each area in the intermediate image, each area in the intermediate image The texture intensity corresponding to the region is respectively attenuated to obtain the enhanced image corresponding to the reconstructed image. In this way, the texture of the textured area in the intermediate image can be preserved, and the texture in the non-textured area can be attenuated at the same time, so that the texture of the textured area in the reconstructed image can be enhanced, and the false texture of the non-textured area can be avoided, thereby reducing the reconstructed image. Visual distortion, increase the realism of the image, and improve the subjective quality of the image.

此外,本申请将纹理复杂度权重控制在0到1范围,使得相邻区域对应的纹理更柔和,能够避免相邻区域增强的纹理效果不一致的问题。In addition, the present application controls the texture complexity weight in the range of 0 to 1, so that the texture corresponding to the adjacent areas is softer, and the problem of inconsistent texture effects enhanced by adjacent areas can be avoided.

示例性的,纹理复杂度权重与纹理复杂度成正比,也就是说,纹理复杂度越大,纹理复杂度权重越大。这样,能够尽可能保持中间图像中纹理区域的纹理效果,而针对非纹理区域,根据纹理复杂度进行衰减。Exemplarily, the texture complexity weight is proportional to the texture complexity, that is, the greater the texture complexity, the greater the texture complexity weight. In this way, the texture effect of the textured area in the intermediate image can be maintained as much as possible, while the non-textured area is attenuated according to the texture complexity.

示例性的,中间图像为纹理增强图像或残差图像。Exemplarily, the intermediate image is a texture-enhanced image or a residual image.

示例性的,中间图像和增强图像的分辨率,均与重建图像的分辨率相同。Exemplarily, the resolution of the intermediate image and the enhanced image are the same as the resolution of the reconstructed image.

示例性的,可以采用GANEF(Generative Adversarial Network EnhancementFilter,生成对抗网络的增强滤波器)对重建图像进行图像增强,得到中间图像。Exemplarily, a GANEF (Generative Adversarial Network Enhancement Filter, an enhancement filter of a generative adversarial network) can be used to perform image enhancement on the reconstructed image to obtain an intermediate image.

示例性的,GANEF输出的图像可以为纹理增强图像,也可以为残差图像。Exemplarily, the image output by GANEF can be a texture-enhanced image or a residual image.

需要说明的,虽然增强图像是对中间图像中各区域进行了纹理增强的衰减,但是仅对中间图像进行了纹理强度的部分衰减,相对于重建图像而言,增强图像部分区域的纹理强度依然是大于重建图像的;也就是说,增强图像依然是具有纹理增强效果的。It should be noted that although the enhanced image is the attenuation of texture enhancement for each area in the intermediate image, only part of the texture intensity is attenuated for the intermediate image. Compared with the reconstructed image, the texture intensity of some areas of the enhanced image is still larger than the reconstructed image; that is, the enhanced image is still texture-enhanced.

根据第一方面,中间图像为残差图像;依据中间图像中各区域分别对应的纹理复杂度权重,对中间图像中各区域对应的纹理强度分别进行衰减,得到重建图像对应的增强图像,包括:将残差图像中各像素点的像素值,分别与各像素点所属区域对应的纹理复杂度权重相乘,得到残差更新图像;根据残差更新图像和重建图像,生成增强图像。According to the first aspect, the intermediate image is a residual image; according to the texture complexity weight corresponding to each area in the intermediate image, the texture intensity corresponding to each area in the intermediate image is respectively attenuated to obtain an enhanced image corresponding to the reconstructed image, including: The pixel value of each pixel in the residual image is multiplied by the texture complexity weight corresponding to the region to which each pixel belongs to obtain the residual updated image; the enhanced image is generated according to the residual updated image and the reconstructed image.

示例性的,残差图像通过将纹理增强图像与重建图像相减得到。Exemplarily, the residual image is obtained by subtracting the texture-enhanced image and the reconstructed image.

根据第一方面,或者以上第一方面的任意一种实现方式,根据残差更新图像和重建图像,生成增强图像,包括:将残差更新图像和重建图像相加,得到增强图像。According to the first aspect, or any implementation manner of the above first aspect, generating an enhanced image according to the residual updated image and the reconstructed image includes: adding the residual updated image and the reconstructed image to obtain the enhanced image.

示例性的,可以对残差更新图像和重建图像进行逐像素点相加,得到增强图像。Exemplarily, the residual update image and the reconstructed image may be added pixel by pixel to obtain an enhanced image.

根据第一方面,或者以上第一方面的任意一种实现方式,中间图像为纹理增强图像,方法还包括:对重建图像进行图像保真,得到基础保真图像。According to the first aspect, or any implementation manner of the above first aspect, the intermediate image is a texture-enhanced image, and the method further includes: performing image fidelity on the reconstructed image to obtain a basic fidelity image.

示例性的,基础保真图像与重建图像的分辨率相同。Exemplarily, the base fidelity image is the same resolution as the reconstructed image.

示例性的,可以采用非GANEF对重建图像进行图像保真,得到基础保真图像。Exemplarily, a non-GANEF can be used to perform image fidelity on the reconstructed image to obtain a basic fidelity image.

根据第一方面,或者以上第一方面的任意一种实现方式,确定中间图像中各区域对应的纹理复杂度权重,包括:按照预设分区规则,将基础保真图像和纹理增强图像分别划分为N个区域,N为正整数;分别确定基础保真图像中N个区域的纹理复杂度;基于基础保真图像中N个区域的纹理复杂度,确定纹理增强图像中N个区域分别对应的纹理复杂度权重。According to the first aspect, or any implementation manner of the above first aspect, determining the texture complexity weight corresponding to each region in the intermediate image includes: dividing the basic fidelity image and the texture-enhanced image into two groups according to preset partitioning rules. N regions, where N is a positive integer; determine the texture complexity of the N regions in the basic fidelity image respectively; determine the texture corresponding to the N regions in the texture enhanced image based on the texture complexity of the N regions in the basic fidelity image complexity weight.

根据第一方面,或者以上第一方面的任意一种实现方式,依据中间图像中各区域分别对应的纹理复杂度权重,对中间图像中各区域对应的纹理强度分别进行衰减,得到重建图像对应的增强图像,包括:依据纹理增强图像中N个区域对应的纹理复杂度权重,确定纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重;依据纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重,对纹理增强图像中N个区域和基础保真图像中N个区域进行加权计算,得到重建图像对应的增强图像。According to the first aspect, or any one of the implementation manners of the first aspect above, according to the texture complexity weights corresponding to the respective regions in the intermediate image, the texture intensities corresponding to the regions in the intermediate image are respectively attenuated to obtain the corresponding texture intensity of the reconstructed image. Enhancing the image, including: according to the texture complexity weights corresponding to the N areas in the texture-enhanced image, determining the weighted calculation weights corresponding to the N areas in the texture-enhanced image and the weighted calculation weights corresponding to the N areas in the basic fidelity image respectively; According to the weighted calculation weights corresponding to the N regions in the texture-enhanced image and the weighted calculation weights corresponding to the N regions in the basic fidelity image, the weighted calculation is performed on the N regions in the texture-enhanced image and the N regions in the basic fidelity image. , to obtain the enhanced image corresponding to the reconstructed image.

根据第一方面,或者以上第一方面的任意一种实现方式,依据纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重,对纹理增强图像中N个区域和基础保真图像中N个区域进行加权计算,得到重建图像对应的增强图像,包括:将纹理增强图像中N个区域分别对应的加权计算权重,与纹理增强图像中N个区域分别相乘,得到第一乘积;将基础保真图像中N个区域分别对应的加权计算权重,与基础保真图像中N个区域分别相乘,得到第二乘积;将第一乘积和第二乘积相加,得到重建图像对应的增强图像。According to the first aspect, or any implementation manner of the first aspect above, according to the weighted calculation weights corresponding to the N regions in the texture enhancement image and the weighted calculation weights corresponding to the N regions in the basic fidelity image, the texture enhancement Perform weighted calculation on the N areas in the image and the N areas in the basic fidelity image to obtain an enhanced image corresponding to the reconstructed image, including: weighting the weighted calculation weights corresponding to the N areas in the texture enhanced image respectively, with the N areas in the texture enhanced image. The regions are multiplied separately to obtain the first product; the weighted calculation weights corresponding to the N regions in the basic fidelity image are respectively multiplied by the N regions in the basic fidelity image to obtain the second product; the first product and the third The two products are added together to obtain the enhanced image corresponding to the reconstructed image.

根据第一方面,或者以上第一方面的任意一种实现方式,依据纹理增强图像中N个区域分别对应的纹理复杂度权重,确定纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重,包括:将纹理增强图像中N个区域分别对应的纹理复杂度权重,确定为纹理增强图像中N个区域分别对应的加权计算权重;将1与纹理增强图像中N个区域分别对应的纹理复杂度权重的差值,确定为基础保真图像中N个区域分别对应的加权计算权重。According to the first aspect, or any one of the implementation manners of the first aspect above, according to the texture complexity weights corresponding to the N regions in the texture-enhanced image, respectively, the weighted calculation weights and the basic guarantees corresponding to the N regions in the texture-enhanced image are determined. The weighted calculation weights corresponding to the N areas in the real image respectively include: determining the texture complexity weights corresponding to the N areas in the texture-enhanced image as the weighted calculation weights corresponding to the N areas in the texture-enhanced image respectively; The difference between the texture complexity weights corresponding to the N regions in the texture-enhanced image is determined as the weighted calculation weights corresponding to the N regions in the basic fidelity image.

根据第一方面,或者以上第一方面的任意一种实现方式,确定中间图像中各区域分别对应的纹理复杂度权重,包括:从接收的码流中解码出中间图像中N个区域分别对应的纹理复杂度权重,N为正整数。这样,可以提高确定中间图像中各区域分别对应的纹理强度权重的准确性,进而能够更准确的对控制图像纹理强度的衰减,从而进一步提高图像质量。According to the first aspect, or any one of the implementation manners of the above first aspect, determining the texture complexity weights corresponding to the regions in the intermediate image respectively includes: decoding the corresponding N regions in the intermediate image from the received code stream. Texture complexity weight, N is a positive integer. In this way, the accuracy of determining the texture intensity weight corresponding to each region in the intermediate image can be improved, and the attenuation of the image texture intensity can be controlled more accurately, thereby further improving the image quality.

根据第一方面,或者以上第一方面的任意一种实现方式,确定中间图像中各区域分别对应的纹理复杂度权重,包括:按照预设分区规则,将重建图像和中间图像分别划分为N个区域,N为正整数;分别确定重建图像中N个区域的纹理复杂度;基于重建图像中N个区域的纹理复杂度,确定中间图像中N个区域分别对应的纹理复杂度权重。According to the first aspect, or any implementation manner of the first aspect above, determining the texture complexity weights corresponding to the regions in the intermediate image respectively includes: dividing the reconstructed image and the intermediate image into N pieces according to a preset partitioning rule. region, N is a positive integer; the texture complexity of N regions in the reconstructed image is determined respectively; based on the texture complexity of the N regions in the reconstructed image, the texture complexity weights corresponding to the N regions in the intermediate image are determined respectively.

第二方面,本申请实施例提供一种图像处理装置,该装置包括:In a second aspect, an embodiment of the present application provides an image processing apparatus, and the apparatus includes:

图像获取模块,用于获取重建图像;an image acquisition module for acquiring reconstructed images;

图像增强模块,用于对重建图像进行图像增强,得到中间图像;The image enhancement module is used to perform image enhancement on the reconstructed image to obtain an intermediate image;

纹理权重确定模块,用于确定中间图像中各区域分别对应的纹理复杂度权重,纹理复杂度权重为0至1之间的数;The texture weight determination module is used to determine the texture complexity weight corresponding to each region in the intermediate image, and the texture complexity weight is a number between 0 and 1;

纹理衰减模块,用于依据中间图像中各区域分别对应的纹理复杂度权重,对中间图像中各区域对应的纹理强度分别进行衰减,得到重建图像对应的增强图像。The texture attenuation module is used for attenuating the texture intensity corresponding to each region in the intermediate image according to the texture complexity weight corresponding to each region in the intermediate image, to obtain an enhanced image corresponding to the reconstructed image.

根据第二方面,中间图像为残差图像;纹理衰减模块,包括:According to the second aspect, the intermediate image is a residual image; the texture attenuation module includes:

残差更新模块,用于将残差图像中各像素点的像素值,分别与各像素点所属区域对应的纹理复杂度权重相乘,得到残差更新图像;The residual update module is used to multiply the pixel value of each pixel in the residual image by the texture complexity weight corresponding to the region to which each pixel belongs to obtain the residual update image;

图像生成模块,用于根据残差更新图像和重建图像,生成增强图像。The image generation module is used to update the image and reconstruct the image based on the residual to generate an enhanced image.

根据第二方面,或者以上第二方面的任意一种实现方式,图像生成模块,具体用于将残差更新图像和重建图像相加,得到增强图像。According to the second aspect, or any implementation manner of the above second aspect, the image generation module is specifically configured to add the residual update image and the reconstructed image to obtain an enhanced image.

根据第二方面,或者以上第二方面的任意一种实现方式,中间图像为纹理增强图像,装置还包括:图像保真模块,用于对重建图像进行图像保真,得到基础保真图像。According to the second aspect, or any implementation manner of the above second aspect, the intermediate image is a texture-enhanced image, and the apparatus further includes: an image fidelity module configured to perform image fidelity on the reconstructed image to obtain a basic fidelity image.

根据第二方面,或者以上第二方面的任意一种实现方式,纹理权重确定模块,具体用于按照预设分区规则,将基础保真图像和纹理增强图像分别划分为N个区域,N为正整数;分别确定基础保真图像中N个区域的纹理复杂度;基于基础保真图像中N个区域的纹理复杂度,确定纹理增强图像中N个区域分别对应的纹理复杂度权重。According to the second aspect, or any implementation manner of the above second aspect, the texture weight determination module is specifically configured to divide the basic fidelity image and the texture enhancement image into N regions respectively according to preset partition rules, where N is positive Integer; determine the texture complexity of the N regions in the base fidelity image respectively; determine the texture complexity weights corresponding to the N regions in the texture enhancement image based on the texture complexity of the N regions in the base fidelity image.

根据第二方面,或者以上第二方面的任意一种实现方式,纹理衰减模块,包括:According to the second aspect, or any implementation manner of the above second aspect, the texture attenuation module includes:

加权权重确定模块,用于依据纹理增强图像中N个区域对应的纹理复杂度权重,确定纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重;The weighted weight determination module is used to determine the weighted calculation weights corresponding to the N areas in the texture-enhanced image and the weighted calculation weights corresponding to the N areas in the basic fidelity image according to the texture complexity weights corresponding to the N areas in the texture-enhanced image. Weights;

加权计算模块,用于依据纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重,对纹理增强图像中N个区域和基础保真图像中N个区域进行加权计算,得到重建图像对应的增强图像。The weighted calculation module is used to calculate the corresponding weights of N areas in the texture enhanced image and the corresponding weighted calculation weights of the N areas in the basic fidelity image respectively. The N regions are weighted to obtain an enhanced image corresponding to the reconstructed image.

根据第二方面,或者以上第二方面的任意一种实现方式,加权计算模块,具体用于将纹理增强图像中N个区域分别对应的加权计算权重,与纹理增强图像中N个区域分别相乘,得到第一乘积;将基础保真图像中N个区域分别对应的加权计算权重,与基础保真图像中N个区域分别相乘,得到第二乘积;将第一乘积和第二乘积相加,得到重建图像对应的增强图像。According to the second aspect, or any implementation manner of the second aspect above, the weighted calculation module is specifically configured to multiply the weighted calculation weights corresponding to the N regions in the texture-enhanced image by the N regions in the texture-enhanced image, respectively. , obtain the first product; multiply the weighted calculation weights corresponding to the N regions in the basic fidelity image with the N regions in the basic fidelity image to obtain the second product; add the first product and the second product , to obtain the enhanced image corresponding to the reconstructed image.

根据第二方面,或者以上第二方面的任意一种实现方式,加权权重确定模块,具体用于将纹理增强图像中N个区域分别对应的纹理复杂度权重,确定为纹理增强图像中N个区域分别对应的加权计算权重;将1与纹理增强图像中N个区域分别对应的纹理复杂度权重的差值,确定为基础保真图像中N个区域分别对应的加权计算权重。According to the second aspect, or any implementation manner of the second aspect above, the weighted weight determination module is specifically configured to determine the texture complexity weights corresponding to the N regions in the texture enhanced image as the N regions in the texture enhanced image The corresponding weighted calculation weights respectively; the difference between 1 and the texture complexity weights corresponding to the N regions in the texture enhanced image is determined as the weighted calculation weights corresponding to the N regions in the basic fidelity image.

根据第二方面,或者以上第二方面的任意一种实现方式,纹理权重确定模块,具体用于从接收的码流中解码出中间图像中N个区域分别对应的纹理复杂度权重,N为正整数。According to the second aspect, or any implementation manner of the second aspect above, the texture weight determination module is specifically configured to decode the texture complexity weights corresponding to the N regions in the intermediate image from the received code stream, where N is a positive Integer.

根据第二方面,或者以上第二方面的任意一种实现方式,纹理权重确定模块803,具体用于按照预设分区规则,将重建图像和中间图像分别划分为N个区域,N为正整数;分别确定重建图像中N个区域的纹理复杂度;基于重建图像中N个区域的纹理复杂度,确定中间图像中N个区域分别对应的纹理复杂度权重。According to the second aspect, or any one of the implementation manners of the above second aspect, the texture weight determination module 803 is specifically configured to divide the reconstructed image and the intermediate image into N regions respectively according to the preset partitioning rule, where N is a positive integer; Determine the texture complexity of the N regions in the reconstructed image respectively; based on the texture complexity of the N regions in the reconstructed image, determine the texture complexity weights corresponding to the N regions in the intermediate image respectively.

第二方面以及第二方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第二方面以及第二方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The second aspect and any implementation manner of the second aspect correspond to the first aspect and any implementation manner of the first aspect, respectively. For the technical effects corresponding to the second aspect and any implementation manner of the second aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.

第三方面,本申请实施例提供一种电子设备,包括:存储器和处理器,存储器与处理器耦合;存储器存储有程序指令,当程序指令由处理器执行时,使得电子设备执行第一方面或第一方面的任意可能的实现方式中的图像处理方法。In a third aspect, embodiments of the present application provide an electronic device, including: a memory and a processor, where the memory is coupled to the processor; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the first aspect or The image processing method in any possible implementation manner of the first aspect.

第三方面以及第三方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第三方面以及第三方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The third aspect and any implementation manner of the third aspect correspond to the first aspect and any implementation manner of the first aspect, respectively. For the technical effects corresponding to the third aspect and any implementation manner of the third aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.

第四方面,本申请实施例提供一种芯片,包括一个或多个接口电路和一个或多个处理器;接口电路用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令;当处理器执行计算机指令时,使得电子设备执行第一方面或第一方面的任意可能的实现方式中的图像处理方法。In a fourth aspect, an embodiment of the present application provides a chip, including one or more interface circuits and one or more processors; the interface circuit is configured to receive a signal from a memory of an electronic device, and send a signal to the processor, and the signal includes the memory The computer instructions stored in the computer; when the processor executes the computer instructions, the electronic device is caused to perform the image processing method in the first aspect or any possible implementation manner of the first aspect.

第四方面以及第四方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第四方面以及第四方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The fourth aspect and any implementation manner of the fourth aspect correspond to the first aspect and any implementation manner of the first aspect, respectively. For the technical effects corresponding to the fourth aspect and any implementation manner of the fourth aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.

第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,当计算机程序运行在计算机或处理器上时,使得计算机或处理器执行第一方面或第一方面的任意可能的实现方式中的图像处理方法。In a fifth aspect, embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program runs on a computer or a processor, causes the computer or processor to execute the first aspect or the first aspect. The image processing method in any possible implementation of an aspect.

第五方面以及第五方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第五方面以及第五方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The fifth aspect and any implementation manner of the fifth aspect correspond to the first aspect and any implementation manner of the first aspect, respectively. For the technical effects corresponding to the fifth aspect and any implementation manner of the fifth aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.

第六方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,当计算机程序运行在计算机或处理器上时,使得计算机或处理器执行第一方面或第一方面的任意可能的实现方式中的图像处理方法。In a sixth aspect, embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program runs on a computer or a processor, causes the computer or processor to execute the first aspect or the first aspect. The image processing method in any possible implementation of an aspect.

第六方面以及第六方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第六方面以及第六方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The sixth aspect and any implementation manner of the sixth aspect correspond to the first aspect and any implementation manner of the first aspect, respectively. For the technical effects corresponding to the sixth aspect and any implementation manner of the sixth aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which will not be repeated here.

附图说明Description of drawings

图1a为示例性示出的应用场景示意图;Fig. 1a is a schematic diagram of an exemplary application scenario;

图1b为示例性示出的处理过程示意图;Fig. 1b is a schematic diagram of an exemplary processing process;

图2为示例性示出的处理过程示意图;FIG. 2 is a schematic diagram of an exemplary processing process;

图3a为示例性示出的图像增强处理过程示意图;3a is a schematic diagram of an exemplary image enhancement processing process;

图3b为示例性示出的处理过程示意图;Figure 3b is a schematic diagram of an exemplary processing process;

图3c为示例性示出的图像增强效果示意图;Fig. 3c is a schematic diagram of an exemplary image enhancement effect;

图4为示例性示出的处理过程示意图;4 is a schematic diagram of an exemplary processing process;

图5为示例性示出的处理过程示意图;5 is a schematic diagram of an exemplary processing process;

图6为示例性示出的图像增强处理过程示意图;6 is a schematic diagram of an exemplary image enhancement processing process;

图7为示例性示出的处理过程示意图;7 is a schematic diagram of an exemplary processing process;

图8为示例性示出的图像处理装置示意图;FIG. 8 is a schematic diagram of an exemplary image processing apparatus;

图9为示例性示出的装置的结构示意图。FIG. 9 is a schematic structural diagram of an exemplarily shown device.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases.

本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first target object, the second target object, etc. are used to distinguish different target objects, rather than to describe a specific order of the target objects.

在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or illustrations. Any embodiments or designs described in the embodiments of the present application as "exemplary" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.

在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。In the description of the embodiments of the present application, unless otherwise specified, the meaning of "plurality" refers to two or more. For example, multiple processing units refers to two or more processing units; multiple systems refers to two or more systems.

图1a为示例性示出的应用场景示意图。FIG. 1a is a schematic diagram of an exemplary application scenario.

参照图1a,示例性的,编码端可以对待编码图像进行编码,得到码流;然后将码流传输至解码端。解码端获取到码流后,可以对码流进行解码,得到重建图像。Referring to FIG. 1a, exemplarily, the encoding end may encode the image to be encoded to obtain a code stream; and then transmit the code stream to the decoding end. After the decoding end obtains the code stream, it can decode the code stream to obtain a reconstructed image.

示例性的,解码端在得到重建图像后,可以对重建图像进行后处理,来对重建图像进行增强,得到增强图像,然后输出增强图像,以减小重建图像的视觉失真。Exemplarily, after obtaining the reconstructed image, the decoding end may perform post-processing on the reconstructed image to enhance the reconstructed image to obtain the enhanced image, and then output the enhanced image to reduce visual distortion of the reconstructed image.

示例性的,针对后处理阶段,本申请提出一种图像处理方法,能够增强重建图像中纹理区域的纹理,且避免非纹理区域产生虚假纹理,以减小重建图像的视觉失真,进而增加图像的真实感,提高图像的主观质量。Exemplarily, for the post-processing stage, the present application proposes an image processing method, which can enhance the texture of the textured area in the reconstructed image and avoid false textures in the non-textured area, so as to reduce the visual distortion of the reconstructed image, thereby increasing the image quality. Realism, improving the subjective quality of the image.

图1b为示例性示出的处理过程示意图。FIG. 1b is a schematic diagram of an exemplary processing process.

S101,获取重建图像。S101, acquiring a reconstructed image.

示例性的,解码端获取码流后,可以对码流进行解码,得到重建图像。Exemplarily, after acquiring the code stream, the decoding end may decode the code stream to obtain a reconstructed image.

S102,对重建图像进行图像增强,得到中间图像。S102, performing image enhancement on the reconstructed image to obtain an intermediate image.

示例性的,为了减少重建图像的视觉失真,可以对重建图像进行图像增强,得到中间图像。Exemplarily, in order to reduce the visual distortion of the reconstructed image, image enhancement may be performed on the reconstructed image to obtain an intermediate image.

示例性的,可以采用图像增强模型对重建图像进行图像增强。示例性的,图像增强模型可以是GANEF(Generative Adversarial Network Enhancement Filter,生成对抗网络的增强滤波器),也就是基于生成对抗网络实现的增强滤波器。其中,GAN(生成对抗网络)可以包括生成器和鉴别器;这样,GANEF也包括生成器和鉴别器,在训练GANEF时,可以交替迭代训练生成器和鉴别器。其中,鉴别器的目标是判别出生成器生成的图像和原始图像的真假,生成器的目标是生成接近原始图像的图像,欺骗判别器,通过有效对抗训练,可以让生成器生成尽可能接近原始图像的图像。Exemplarily, an image enhancement model can be used to perform image enhancement on the reconstructed image. Exemplarily, the image enhancement model may be a GANEF (Generative Adversarial Network Enhancement Filter, an enhancement filter of a generative adversarial network), that is, an enhancement filter implemented based on a generative adversarial network. Among them, GAN (Generation Adversarial Network) can include generator and discriminator; in this way, GANEF also includes generator and discriminator. When training GANEF, the generator and discriminator can be trained alternately and iteratively. Among them, the goal of the discriminator is to distinguish the authenticity of the image generated by the generator and the original image. The goal of the generator is to generate an image that is close to the original image and deceive the discriminator. Through effective adversarial training, the generator can be generated as close as possible. Image of the original image.

示例性的,GANEF的训练过程可以如下:生成多组训练数据,一组训练数据包括:待编码图像和对待编码图像的码流进行解码得到的重建图像。示例性的,可以采用训练数据,轮流交替训练生成器和鉴别器,其中,在训练生成器时,可以固定鉴别器的权重参数;在训练鉴别器时,可以固定生成器的权重参数。Exemplarily, the training process of GANEF may be as follows: multiple sets of training data are generated, and a set of training data includes: an image to be encoded and a reconstructed image obtained by decoding a code stream of the image to be encoded. Exemplarily, the training data can be used to train the generator and the discriminator alternately, wherein when training the generator, the weight parameter of the discriminator can be fixed; when training the discriminator, the weight parameter of the generator can be fixed.

示例性的,训练生成器的过程可以如下:预先,将训练数据中的待编码图像输入至鉴别器,由鉴别器对待编码图像进行前向计算,输出鉴别结果。然后以使鉴别器输出的鉴别结果为“真”的概率接近预设概率为目标,调整鉴别器的权重参数。其中,预设概率可以按照需求设置,本申请对此不作限制。待鉴别器根据输入的待编码图像,输出鉴别结果为“真”的概率与预设概率的差值小于概率阈值时,可以固定鉴别器的权重参数。其中,概率阈值可以根据需求设置,本申请对此不作限制。此时,再将训练数据中的重建图像输入至生成器中,由生成器对重建图像进行前向计算,输出中间图像至鉴别器。接着,一方面,由鉴别器对中间图像进行前向计算,输出鉴别结果;另一方面,基于中间图像和待编码图像,生成损失函数值。随后,再以最大化鉴别器输出的鉴别结果为“真”的概率,且以最小化损失函数值为目标,调整生成器的权重参数。Exemplarily, the process of training the generator may be as follows: in advance, input the to-be-encoded image in the training data to the discriminator, and the discriminator performs forward calculation on the to-be-encoded image, and outputs the discrimination result. Then, the weight parameters of the discriminator are adjusted with the goal of making the probability of the discriminator output being "true" close to the preset probability. The preset probability may be set according to requirements, which is not limited in this application. When the difference between the probability that the discriminator outputs a “true” discrimination result and the preset probability according to the input image to be encoded is smaller than the probability threshold, the weight parameter of the discriminator can be fixed. The probability threshold can be set according to requirements, which is not limited in this application. At this time, the reconstructed image in the training data is input into the generator, and the generator performs forward calculation on the reconstructed image, and outputs the intermediate image to the discriminator. Then, on the one hand, the discriminator performs forward calculation on the intermediate image, and outputs the discrimination result; on the other hand, based on the intermediate image and the to-be-encoded image, a loss function value is generated. Then, the weight parameters of the generator are adjusted to maximize the probability that the discriminator output is "true" and to minimize the loss function value.

示例性的,训练鉴别器的过程可以如下:预先,将训练数据中的待编码图像输入至鉴别器,由鉴别器对待编码图像进行前向计算,输出鉴别结果。然后以使鉴别器输出的鉴别结果为“真”的概率接近预设概率为目标,调整鉴别器的权重参数。待鉴别器根据输入的待编码图像,输出鉴别结果为“真”的概率与预设概率的差值小于概率阈值时,再将训练数据中的重建图像输入至生成器中,由生成器对重建图像进行前向计算,输出中间图像至鉴别器。然后,鉴别器对中间图像进行前向计算,输出鉴别结果,再以最大化鉴别器输出的鉴别结果为“假”的概率为目标,调整鉴别器的权重参数。Exemplarily, the process of training the discriminator may be as follows: in advance, input the to-be-encoded image in the training data to the discriminator, and the discriminator performs forward calculation on the to-be-encoded image, and outputs the discrimination result. Then, the weight parameters of the discriminator are adjusted with the goal of making the probability of the discriminator output being "true" close to the preset probability. According to the input image to be encoded, the discriminator outputs the difference between the probability that the discriminant result is "true" and the preset probability is smaller than the probability threshold, and then input the reconstructed image in the training data into the generator, and the generator will reconstruct the reconstructed image. The image is forwarded and an intermediate image is output to the discriminator. Then, the discriminator performs forward calculation on the intermediate image, outputs the discriminant result, and then adjusts the weight parameters of the discriminator with the goal of maximizing the probability that the discriminator output's discrimination result is "false".

这样,按照上述方式交替迭代训练GANEF中的生成器和鉴别器,直至鉴别器无法对生成器输出的中间图像和待编码图像进行很好的判别为止。In this way, the generator and discriminator in GANEF are alternately and iteratively trained in the above-mentioned manner, until the discriminator cannot make a good discrimination between the intermediate image output by the generator and the to-be-encoded image.

示例性的,中间图像可以为残差图像,也可以为纹理增强图像。其中,在训练过程中,当生成器输出的中间图像是残差图像时,可以基于残差图像和重建图像,生成纹理增强图像;然后再将纹理增强图像输入至鉴别器,以及根据纹理增强图像和待编码图像计算损失函数值。当生成器输出的中间图像是纹理增强图像时,可以直接将纹理增强图像输入至鉴别器中。Exemplarily, the intermediate image may be a residual image or a texture-enhanced image. Among them, in the training process, when the intermediate image output by the generator is a residual image, a texture-enhanced image can be generated based on the residual image and the reconstructed image; then the texture-enhanced image is input to the discriminator, and the image is enhanced according to the texture Calculate the loss function value with the image to be encoded. When the intermediate image output by the generator is a texture-enhanced image, the texture-enhanced image can be directly input into the discriminator.

示例性的,可以将残差图像和重建图像相加,生成纹理增强图像。示例性的,可以将残差图像和重建图像进行逐像素点相加,也就将残差图像和重建图像对应位置像素点的像素值进行相加,得到重建图像对应的增强图像。Exemplarily, the residual image and the reconstructed image may be added to generate a texture-enhanced image. Exemplarily, the residual image and the reconstructed image may be added pixel by pixel, that is, the pixel values of the pixels corresponding to the residual image and the reconstructed image are added to obtain an enhanced image corresponding to the reconstructed image.

示例性的,GANEF训练完成后,可以仅采用GANEF中训练后的生成器对重建图像进行图像增强,以得到中间图像。Exemplarily, after the GANEF training is completed, only the generator trained in the GANEF may be used to perform image enhancement on the reconstructed image to obtain an intermediate image.

其中,中间图像的分辨率与重建图像的分辨率相同。Among them, the resolution of the intermediate image is the same as that of the reconstructed image.

S103,确定中间图像中各区域分别对应的纹理复杂度权重。S103: Determine the texture complexity weights corresponding to the regions in the intermediate image respectively.

一种可能的方式中,在确定中间图像后,可以根据重建图像中各区域的纹理复杂度,来确定中间图像中各区域分别对应的纹理复杂度权重。In a possible manner, after the intermediate image is determined, the texture complexity weight corresponding to each area in the intermediate image may be determined according to the texture complexity of each area in the reconstructed image.

一种可能的方式中,在确定中间图像后,可以根据重建图像对应待编码图像中各区域的纹理复杂度,来确定中间图像中各区域分别对应的纹理复杂度权重。In a possible manner, after the intermediate image is determined, the texture complexity weight corresponding to each area in the intermediate image may be determined according to the texture complexity of each area in the image to be encoded corresponding to the reconstructed image.

示例性的,纹理复杂度权重与纹理复杂度成正比,也就是说,纹理复杂度越高,纹理复杂度权重越大;纹理复杂度越低,纹理复杂度权重越小。Exemplarily, the texture complexity weight is proportional to the texture complexity, that is, the higher the texture complexity, the higher the texture complexity weight; the lower the texture complexity, the lower the texture complexity weight.

示例性的,纹理复杂度权重为0到1之间的小数。Exemplarily, the texture complexity weight is a decimal between 0 and 1.

S104,依据所述中间图像中各区域分别对应的纹理复杂度权重,对所述中间图像中各区域对应的纹理强度分别进行衰减,得到所述重建图像对应的增强图像。S104, according to the texture complexity weight corresponding to each region in the intermediate image, attenuate the texture intensity corresponding to each region in the intermediate image respectively, to obtain an enhanced image corresponding to the reconstructed image.

示例性的,针对中间图像中的每个区域,可以基于该区域对应的纹理复杂度权重,对该区域中各像素点的像素值进行衰减,以调整该区域对应的纹理强度。由于纹理复杂度权重与纹理复杂度成正比,因此纹理强度调整后,中间图像中纹理复杂度越高的区域,对应的纹理强度衰减越小,纹理复杂度越低的区域,对应的纹理增强衰减越大。这样,能够在增强纹理区域(纹理复杂度较高)纹理的同时,避免非纹理区域(纹理复杂度较低)产生虚假条纹。也就是说,本申请依据图像局部区域的纹理复杂程度对GANEF结果进行纹理强度衰减控制,即纹理区域尽可能保持原有GANEF的滤波效果,非纹理区域根据纹理复杂度进行GANEF滤波效果的衰减,局部区域的纹理复杂度越小衰减量越大,从而可以有效去除非纹理区域的虚假纹理。此外,本申请将纹理复杂度权重控制在0到1范围,使得相邻区域对应的纹理更柔和,能够避免相邻区域增强的纹理效果不一致的问题。Exemplarily, for each region in the intermediate image, the pixel value of each pixel in the region may be attenuated based on the texture complexity weight corresponding to the region, so as to adjust the texture intensity corresponding to the region. Since the texture complexity weight is proportional to the texture complexity, after the texture intensity is adjusted, the area with higher texture complexity in the intermediate image has less corresponding texture intensity attenuation, and the area with lower texture complexity corresponds to the corresponding texture enhancement attenuation bigger. In this way, while enhancing the texture of the textured region (with a higher texture complexity), it can avoid false streaks in the non-textured region (with a lower texture complexity). That is to say, the present application controls the texture intensity attenuation of the GANEF result according to the texture complexity of the local area of the image, that is, the texture area maintains the original GANEF filtering effect as much as possible, and the non-textured area attenuates the GANEF filtering effect according to the texture complexity. The smaller the texture complexity of the local area, the greater the attenuation, which can effectively remove the false texture of the non-textured area. In addition, the present application controls the texture complexity weight in the range of 0 to 1, so that the texture corresponding to the adjacent areas is softer, and the problem of inconsistent texture effects enhanced by adjacent areas can be avoided.

示例性的,图1b的具体实现方式,可以参照图2、图4、图5和图7,以及对应的描述。Exemplarily, for the specific implementation of FIG. 1 b, reference may be made to FIG. 2 , FIG. 4 , FIG. 5 , and FIG. 7 , and the corresponding descriptions.

图2为示例性示出的处理过程示意图。在图2的实施例中,首先采用GANEF对重建图像进行滤波,得到残差图像;然后基于重建图像中各区域的纹理复杂度,确定残差图像中各区域分别对应的纹理复杂度权重;再根据各区域分别对应的纹理复杂度权重对残差图像进行更新,最后将更新后的残差图像和重建图像相加,得到最终的增强图像。FIG. 2 is a schematic diagram of an exemplary processing process. In the embodiment of Fig. 2, firstly, GANEF is used to filter the reconstructed image to obtain a residual image; then based on the texture complexity of each area in the reconstructed image, the texture complexity weight corresponding to each area in the residual image is determined; The residual image is updated according to the texture complexity weights corresponding to each region, and finally the updated residual image and the reconstructed image are added to obtain the final enhanced image.

S201,对重建图像进行图像增强,得到残差图像。S201, performing image enhancement on the reconstructed image to obtain a residual image.

示例性的,解码端获取到码流后,可以对码流进行解码,得到重建图像;然后可以采用图像增强模型对重建图像进行图像增强,得到中间图像。Exemplarily, after obtaining the code stream, the decoding end can decode the code stream to obtain a reconstructed image; and then an image enhancement model can be used to enhance the reconstructed image to obtain an intermediate image.

示例性的,中间图像为残差图像。Exemplarily, the intermediate image is a residual image.

图3a为示例性示出的图像增强处理过程示意图。Fig. 3a is an exemplary schematic diagram of an image enhancement processing process.

一种可能的方式中,训练的图像增强模型的输出是残差图像。这样,将重建图像输入至图像增强模型,可以直接得到残差图像,如图3a(1)所示。In one possible way, the output of the trained image augmentation model is a residual image. In this way, by inputting the reconstructed image to the image enhancement model, the residual image can be directly obtained, as shown in Figure 3a(1).

一种可能的方式中,训练的图像增强模型的输出是纹理增强图像。这样,将重建图像输入至图像增强模型后,可以得到图像增强模型输出纹理增强图像;然后基于纹理增强图像和重建图像,确定残差图像。可选地,可以对纹理增强图像和重建图像进行逐像素相减,也就说将纹理增强图像和重建图像对应像素点的像素值相减,得到残差图像,如图3a(2)所示。In one possible way, the output of the trained image augmentation model is a texture augmented image. In this way, after inputting the reconstructed image to the image enhancement model, the image enhancement model can output a texture-enhanced image; then, based on the texture-enhanced image and the reconstructed image, a residual image is determined. Optionally, pixel-by-pixel subtraction can be performed on the texture-enhanced image and the reconstructed image, that is, the pixel values of the corresponding pixels of the texture-enhanced image and the reconstructed image are subtracted to obtain a residual image, as shown in Figure 3a(2). .

示例性的,残差图像与重建图像的分辨率相同。Exemplarily, the residual image has the same resolution as the reconstructed image.

S202,基于重建图像,确定残差图像中各区域分别对应的纹理复杂度权重。S202, based on the reconstructed image, determine the texture complexity weight corresponding to each region in the residual image.

示例性的,可以根据重建图像中各个区域对应的纹理复杂度,来确定残差图像中各区域对应的纹理复杂度权重。示例性的,S202可以包括S2021~S2023:Exemplarily, the texture complexity weight corresponding to each region in the residual image may be determined according to the texture complexity corresponding to each region in the reconstructed image. Exemplarily, S202 may include S2021-S2023:

S2021,按照预设分区规则,将重建图像和残差图像分别划分为N个区域。S2021, according to a preset partition rule, divide the reconstructed image and the residual image into N regions respectively.

示例性的,可以按照预先设置的预设分区规则,将重建图像划分为N个区域;以及按照预设分区规则,将残差图像划分为N个区域。也就是说,重建图像和残差图像的区域划分方式相同,由于重建图像和残差图像的分辨率相同,因此重建图像中的N个区域与残差图像中的N个区域是一一对应的。Exemplarily, the reconstructed image may be divided into N regions according to a preset preset partition rule; and the residual image may be divided into N regions according to the preset partition rule. That is to say, the areas of the reconstructed image and the residual image are divided in the same way. Since the resolutions of the reconstructed image and the residual image are the same, the N areas in the reconstructed image and the N areas in the residual image are in one-to-one correspondence. .

示例性的,预设分区规则可以按照需求设置,本申请对此不作限制;其中,N为正整数,根据预设分区规则确定。例如,预设分区规则为:将图像划分为尺寸为w*h的N个区域。其中,w=W/N1,h=H/N2,N=N1*N2,其中,W和H为图像的宽和高,N1和N2为正整数。Exemplarily, the preset partitioning rule may be set as required, which is not limited in this application; wherein, N is a positive integer and is determined according to the preset partitioning rule. For example, the preset partition rule is: divide the image into N regions of size w*h. Wherein, w=W/N1, h=H/N2, N=N1*N2, where W and H are the width and height of the image, and N1 and N2 are positive integers.

需要说明的是,N个区域中的每个区域的尺寸,可以相同,也可以不同,本申请对此不作限制。此外,N个区域中每个区域的形状可以相同,也可以不同,本申请对此不作限制。且本申请对N个区域的形状均不作限制。It should be noted that the size of each of the N regions may be the same or different, which is not limited in this application. In addition, the shape of each of the N regions may be the same or different, which is not limited in the present application. Moreover, the present application does not limit the shapes of the N regions.

S2022,分别确定重建图像中N个区域的纹理复杂度。S2022: Determine the texture complexity of the N regions in the reconstructed image respectively.

以下确定重建图像中第i(i为1~N之间的整数,i的取值可以为于1、N)个区域的纹理复杂度为例进行示例性说明。The following is an example of determining the ith (i is an integer between 1 and N, and the value of i may be the texture complexity of 1, N) regions in the reconstructed image.

示例性的,针对重建图像的第i个区域,可以根据第i个区域所包含像素点的像素值,确定第i个区域的纹理复杂度。Exemplarily, for the ith region of the reconstructed image, the texture complexity of the ith region may be determined according to pixel values of pixels included in the ith region.

一种可能的方式中,可以基于重建图像中第i个区域的共生矩阵,确定重建图像的第i个区域的纹理复杂度。示例性的,可以根据重建图像中第i个区域所包含像素点的像素值,确定重建图像中第i个区域的共生矩阵。然后提取重建图像中第i个区域的共生矩阵对应的特征量(如能量、对比度、熵、逆方差等),再依据重建图像中第i个区域的共生矩阵的特征量,确定重建图像中第i个区域的图像纹理复杂度。例如,将重建图像中第i个区域的共生矩阵的特征量,作为重建图像中第i个区域的纹理复杂度。In a possible manner, the texture complexity of the ith region of the reconstructed image may be determined based on the co-occurrence matrix of the ith region in the reconstructed image. Exemplarily, the co-occurrence matrix of the ith region in the reconstructed image may be determined according to the pixel values of the pixels included in the ith region in the reconstructed image. Then extract the feature quantity (such as energy, contrast, entropy, inverse variance, etc.) corresponding to the co-occurrence matrix of the ith area in the reconstructed image, and then determine the ith area in the reconstructed image according to the feature quantity of the co-occurrence matrix of the ith area in the reconstructed image. Image texture complexity for i regions. For example, the feature quantity of the co-occurrence matrix of the ith region in the reconstructed image is taken as the texture complexity of the ith region in the reconstructed image.

一种可能方式中,可以基于重建图像中第i个区域的边缘比例,确定重建图像中第i个区域的纹理复杂度。示例性的,可以根据重建图像的第i个区域所包含像素点的像素值,计算重建图像中第i个区域内每个像素点对应的梯度强度。然后将重建图像中第i个区域内梯度强度大于梯度强度阈值的像素点的占比,作为重建图像的第i个区域的纹理复杂度。其中,梯度强度阈值可以按照需求设置,本申请对此不作限制。In a possible manner, the texture complexity of the ith region in the reconstructed image may be determined based on the edge ratio of the ith region in the reconstructed image. Exemplarily, the gradient intensity corresponding to each pixel in the ith region in the reconstructed image may be calculated according to the pixel value of the pixel included in the ith region of the reconstructed image. Then, the proportion of pixels whose gradient intensity is greater than the gradient intensity threshold in the ith region of the reconstructed image is taken as the texture complexity of the ith region of the reconstructed image. The gradient intensity threshold may be set as required, which is not limited in this application.

应当理解的是,还可以采用其他方式如根据重建图像中第i个区域的灰度直方图分布,确定重建图像中第i个区域的纹理复杂度,本申请对此不作限制。It should be understood that the texture complexity of the ith region in the reconstructed image may also be determined in other manners, such as according to the grayscale histogram distribution of the ith region in the reconstructed image, which is not limited in this application.

这样,按照上述方式,可以确定重建图像中N个区域的纹理复杂度。In this way, in the above manner, the texture complexity of N regions in the reconstructed image can be determined.

S2023,基于重建图像中N个区域的纹理复杂度,确定残差图像中N个区域分别对应的纹理复杂度权重。S2023 , based on the texture complexity of the N regions in the reconstructed image, determine the texture complexity weights corresponding to the N regions in the residual image respectively.

以下确定残差图像中第i(i为1~N之间的整数,i可以等于1和N)个区域对应的纹理复杂度权重为了进行示例性说明。The texture complexity weight corresponding to the ith (i is an integer between 1 and N, i may be equal to 1 and N) regions in the residual image is determined below for exemplary illustration.

一种可能的方式中,可以将重建图像中第i个区域的纹理复杂度,作为残差图像中第i个区域对应的纹理复杂度权重。In a possible way, the texture complexity of the ith region in the reconstructed image may be used as the texture complexity weight corresponding to the ith region in the residual image.

一种可能的方式中,可以按照预设映射规则,将重建图像中第i个区域的纹理复杂度进行映射,得到残差图像中第i个区域对应的纹理复杂度权重。示例性的,预设映射规则可以按照需求设置,如归一化,本申请对此不作限制。例如,可以对重建图像中第i个区域的纹理复杂度进行归一化处理,得到残差图像中第i个区域对应的纹理复杂度权重。In a possible manner, the texture complexity of the ith region in the reconstructed image may be mapped according to a preset mapping rule, to obtain the texture complexity weight corresponding to the ith region in the residual image. Exemplarily, the preset mapping rules may be set according to requirements, such as normalization, which is not limited in this application. For example, the texture complexity of the ith region in the reconstructed image may be normalized to obtain the texture complexity weight corresponding to the ith region in the residual image.

示例性的,纹理复杂度权重可以是0至1之间的小数。Exemplarily, the texture complexity weight may be a decimal between 0 and 1.

示例性的,纹理复杂度权重与纹理复杂度成正比,也就是说,纹理复杂度越高,纹理复杂度权重越大;纹理复杂度越低,纹理复杂度权重越小。Exemplarily, the texture complexity weight is proportional to the texture complexity, that is, the higher the texture complexity, the higher the texture complexity weight; the lower the texture complexity, the lower the texture complexity weight.

示例性的,在得到残差图像中N个区域对应的纹理复杂度权重后,可以依据残差图像中各区域对应的纹理复杂度权重,对残差图像中各区域对应的纹理强度进行衰减,来对重建图像进行图像增强,得到重建图像对应的增强图像,可以参照S203~S204:Exemplarily, after obtaining the texture complexity weights corresponding to N areas in the residual image, the texture intensity corresponding to each area in the residual image may be attenuated according to the texture complexity weights corresponding to each area in the residual image, To perform image enhancement on the reconstructed image to obtain the enhanced image corresponding to the reconstructed image, refer to S203-S204:

S203,基于残差图像中各个区域对应的纹理复杂度权重,对残差图像中各个区域进行残差更新,得到残差更新图像。S203 , based on the texture complexity weights corresponding to each region in the residual image, perform residual update on each region in the residual image to obtain a residual update image.

示例性的,可以基于残差图像的N个区域对应的纹理复杂度权重,分别对残差图像中N个区域进行残差更新,得到残差更新图像。Exemplarily, based on the texture complexity weights corresponding to the N regions of the residual image, the residual update may be performed on the N regions in the residual image, respectively, to obtain the residual updated image.

一种可能方式中,可以通过将残差图像中各像素点的像素值,分别与各像素点所属区域对应的纹理复杂度权重相乘,来对残差图像进行残差更新,得到残差更新图像。In a possible way, the residual image can be updated by multiplying the pixel value of each pixel in the residual image by the texture complexity weight corresponding to the region to which each pixel belongs to obtain the residual update. image.

以下对残差图像中第i(i为1~N之间的整数,i可以等于1和N)个区域进行残差更新为例进行示例性说明。The following is an example of performing residual update in the ith (i is an integer between 1 and N, and i may be equal to 1 and N) regions in the residual image as an example.

示例性的,假设残差图像中第i个区域对应的纹理增强权重为ratio_i,针对第i个区域的一个像素点(k,j),可以采用该像素点(k,j)对应的像素值为R1(k,j)与ratio_i相乘,对该像素点(k,j)的像素值进行更新,得到新的像素值R2(k,j)=R1(k,j)*ratio_i。其中,(k,j)为残差图像的像素点坐标整数索引,k,j分别表示水平、竖直方向坐标索引,残差图像左上角像素索引为(0,0)。也就是说,残差图像中各像素点的像素值均更新后,即可以得到残差更新图像,残差更新图像中像素点的像素值为R2(k,j)。Exemplarily, assuming that the texture enhancement weight corresponding to the ith region in the residual image is ratio_i, for a pixel (k, j) in the ith region, the pixel value corresponding to the pixel (k, j) can be used. To multiply R1(k,j) and ratio_i, update the pixel value of the pixel point (k,j) to obtain a new pixel value R2(k,j)=R1(k,j)*ratio_i. Among them, (k, j) is the integer index of the pixel point coordinates of the residual image, k, j represent the coordinate index of the horizontal and vertical directions respectively, and the pixel index of the upper left corner of the residual image is (0, 0). That is to say, after the pixel value of each pixel in the residual image is updated, the residual updated image can be obtained, and the pixel value of the pixel in the residual updated image is R2(k, j).

示例性的,残差更新图像和重建图像的分辨率相同。Exemplarily, the residual update image and the reconstructed image have the same resolution.

由于,纹理复杂度权重与纹理复杂度成正比,这样,残差图像纹理复杂度越高的区域,对应的纹理强度衰减越小,纹理复杂度越低的区域,对应的纹理增强衰减越大。Because the texture complexity weight is proportional to the texture complexity, in this way, the area with higher texture complexity of the residual image has a smaller corresponding texture intensity attenuation, and the area with lower texture complexity corresponds to a larger texture enhancement attenuation.

S204,将重建图像和残差更新图像进行相加,得到增强图像。S204, adding the reconstructed image and the residual update image to obtain an enhanced image.

示例性的,可以将重建图像和残差更新图像对应位置像素点的像素值进行相加,得到重建图像对应的增强图像。Exemplarily, the pixel values of the pixel points corresponding to the reconstructed image and the residual update image may be added to obtain an enhanced image corresponding to the reconstructed image.

图3b为示例性示出的处理过程示意图。FIG. 3b is a schematic diagram of an exemplary processing process.

参照图3b,示例性的,A1为重建图像,采用GANEF对重建图像进行滤波后,得到纹理增强图像,如A2所示。然后可以采用纹理增强图像A2减去重建图像A1,得到残差图像,如A4所示Referring to Fig. 3b, exemplarily, A1 is a reconstructed image, and after filtering the reconstructed image with GANEF, a texture-enhanced image is obtained, as shown in A2. Then the texture-enhanced image A2 can be used to subtract the reconstructed image A1 to obtain a residual image, as shown in A4

示例性的,可以计算重建图像A1中各像素点的梯度,然后基于重建图像A1中各像素点的梯度,对重建图像进行二值化,得到二值图像,如A3所示。然后将二值图像A3划分为N个区域,针对每个区域,根据该区域中黑色像素点的占比,确定该区域对应的纹理复杂度;进而可以得到二值图像A3中N个区域分别对应的纹理复杂度。然后根据二值图像中N个区域分别对应的纹理复杂度,确定残差图像A4中N个区域分别对应的纹理复杂度权重。再基于残差图像A4中N个区域分别对应的纹理复杂度权重,对残差图像A4进行残差更新,得到残差更新图像,如A5所示。Exemplarily, the gradient of each pixel in the reconstructed image A1 may be calculated, and then based on the gradient of each pixel in the reconstructed image A1, the reconstructed image is binarized to obtain a binary image, as shown in A3. Then, the binary image A3 is divided into N regions, and for each region, the texture complexity corresponding to the region is determined according to the proportion of black pixels in the region; and then the corresponding N regions in the binary image A3 can be obtained respectively. texture complexity. Then, according to the texture complexity corresponding to the N regions in the binary image, the texture complexity weights corresponding to the N regions in the residual image A4 are determined respectively. Then, based on the texture complexity weights corresponding to the N regions in the residual image A4, the residual image A4 is updated to obtain the residual updated image, as shown in A5.

示例性的,可以将重建图像A1与残差更新图像A5相加,得到增强图像A6。Exemplarily, the reconstructed image A1 and the residual update image A5 may be added to obtain the enhanced image A6.

图3c为示例性示出的图像增强效果示意图。Fig. 3c is an exemplary schematic diagram of an image enhancement effect.

参照图3c,示例性的,图3c(1)是图3b的纹理增强图像A2中局部区域的示意图,图3c(2)是图3b的增强图像A6中局部区域示意图。Referring to Fig. 3c, exemplarily, Fig. 3c(1) is a schematic diagram of a local area in the texture-enhanced image A2 of Fig. 3b, and Fig. 3c(2) is a schematic diagram of a local area in the enhanced image A6 of Fig. 3b.

示例性的,图3c(1)和图3c(2)中的路面为非纹理区域,通过图3c(1)和图3c(2)中椭圆区域,以及比对图3c(1)和图3c(2)中矩形区域可知,本申请得到的增强图像中非纹理区域没有虚假条纹。Exemplarily, the road surface in Fig. 3c(1) and Fig. 3c(2) is a non-textured area, through the elliptical area in Fig. 3c(1) and Fig. 3c(2), and comparing Fig. 3c(1) and Fig. 3c (2) The rectangular area in the middle shows that there are no false streaks in the non-textured area in the enhanced image obtained by the present application.

这样,通过根据重建图像纹理复杂度,将纹理复杂度权重控制在0到1范围,来对重建图像中各个区域对应的纹理强度进行衰减,能够保留中间图像中纹理区域的纹理,同时对非纹理区域中的纹理进行衰减,进而在增强重建图像中纹理区域(纹理复杂度较高)纹理的同时,避免重建图像中非纹理区域(纹理复杂度较低)产生虚假条纹;从而降低重建图像的视觉失真。且本申请将纹理复杂度权重控制在0到1范围,使得相邻区域对应的纹理更柔和,能够避免相邻区域增强的纹理效果不一致的问题。In this way, by controlling the texture complexity weight in the range of 0 to 1 according to the texture complexity of the reconstructed image, the texture intensity corresponding to each area in the reconstructed image can be attenuated, so that the texture of the texture area in the intermediate image can be retained, and the non-texture texture can be preserved. The texture in the area is attenuated, so as to enhance the texture of the texture area (higher texture complexity) in the reconstructed image, while avoiding false streaks in the non-texture area (low texture complexity) in the reconstructed image; thus reducing the visual quality of the reconstructed image distortion. In addition, the present application controls the texture complexity weight in the range of 0 to 1, so that the texture corresponding to the adjacent area is softer, and the problem of inconsistent texture effects enhanced by the adjacent area can be avoided.

此外,相对于现有技术采用两个模型来进行后处理而言,本申请仅使用一个模型,降低了计算复杂度。In addition, compared with the prior art using two models for post-processing, the present application uses only one model, which reduces the computational complexity.

图4为示例性示出的处理过程示意图。在图4的实施例中,首先采用GANEF对重建图像进行滤波,得到残差图像;然后基于重建图像对应待编码图像中各区域的纹理复杂度,确定残差图像各区域分别对应的纹理复杂度权重;再根据各区域分别对应的纹理复杂度权重对残差图像进行更新,最后将更新后的残差图像和重建图像相加,得到最终的增强图像。FIG. 4 is a schematic diagram of an exemplary processing process. In the embodiment of FIG. 4 , firstly, GANEF is used to filter the reconstructed image to obtain a residual image; then based on the texture complexity of each area in the image to be encoded corresponding to the reconstructed image, the texture complexity corresponding to each area of the residual image is determined. Then, the residual image is updated according to the texture complexity weight corresponding to each region, and finally the updated residual image and the reconstructed image are added to obtain the final enhanced image.

S401,对码流进行解码,得到重建图像和待编码图像中各区域对应的纹理复杂度权重。S401: Decode the code stream to obtain texture complexity weights corresponding to regions in the reconstructed image and the image to be encoded.

示例性的,编码端可以基于待编码图像,生成待编码图像中各区域对应的纹理复杂度权重,可以包括S4011~S4013:Exemplarily, the encoding end may generate, based on the image to be encoded, the texture complexity weight corresponding to each region in the image to be encoded, which may include S4011 to S4013:

S4011,按照预设分区规则,将待编码图像划分为N个区域。S4011, according to a preset partition rule, divide the image to be encoded into N regions.

S4012,分别确定待编码图像中N个区域的纹理复杂度。S4012: Determine the texture complexity of the N regions in the to-be-coded image respectively.

示例性的,S4011~S4012,可以参照上述S2021~S2022的描述,在此不再赘述。Exemplarily, for S4011 to S4012, reference may be made to the descriptions of the foregoing S2021 to S2022, which will not be repeated here.

S4013,基于待编码图像中N个区域的纹理复杂度,确定待编码图像中N个区域分别对应的纹理复杂度权重。S4013 , based on the texture complexity of the N regions in the to-be-coded image, determine the texture complexity weights corresponding to the N-regions in the to-be-coded image respectively.

以下确定待编码图像中第i(i为1~N之间的整数,i的取值可以为1、N)个区域对应的纹理复杂度权重为例进行示例性说明。The following is an example of determining the texture complexity weight corresponding to the ith (i is an integer between 1 and N, and the value of i may be 1, N) regions in the image to be encoded.

一种可能的方式中,可以将待编码图像中第i个区域的纹理复杂度,作为待编码图像中第i个区域对应的纹理复杂度权重。In a possible manner, the texture complexity of the ith region in the image to be encoded may be used as the texture complexity weight corresponding to the ith region in the image to be encoded.

一种可能的方式中,可以按照预设映射规则,将待编码图像中第i个区域的纹理复杂度进行映射,得到待编码图像中第i个区域对应的纹理复杂度权重。例如,可以对待编码图像中第i个区域的纹理复杂度进行归一化处理,得到待编码图像中第i个区域对应的纹理复杂度权重。In a possible manner, the texture complexity of the ith region in the image to be encoded may be mapped according to a preset mapping rule to obtain the texture complexity weight corresponding to the ith region in the image to be encoded. For example, the texture complexity of the ith region in the to-be-coded image may be normalized to obtain the texture complexity weight corresponding to the ith region in the to-be-coded image.

示例性的,纹理复杂度权重可以是0至1之间的小数。Exemplarily, the texture complexity weight may be a decimal between 0 and 1.

示例性的,纹理复杂度权重与纹理复杂度成正比,也就是说,纹理复杂度越高,纹理复杂度权重越大;纹理复杂度越低,纹理复杂度权重越小。Exemplarily, the texture complexity weight is proportional to the texture complexity, that is, the higher the texture complexity, the higher the texture complexity weight; the lower the texture complexity, the lower the texture complexity weight.

示例性的,编码端可以对待编码图像进行编码,得到对应的码流;以及可以对待编码图像中N个区域对应的纹理复杂度权重进行编码,得到对应的码流。然后可以将对待编码图像中N个区域分别对应的纹理复杂度权重进行编码得到的码流和对待编码图像进行编码得到的码流,发送至解码端。这样,解码端获取到码流后,从码流中解码出重建图像和待编码图像中N个区域分别对应的纹理复杂度权重。Exemplarily, the encoding end may encode the image to be encoded to obtain a corresponding code stream; and may encode texture complexity weights corresponding to N regions in the image to be encoded to obtain a corresponding code stream. Then, the code stream obtained by encoding the texture complexity weights corresponding to the N regions in the image to be encoded and the code stream obtained by encoding the image to be encoded may be sent to the decoding end. In this way, after acquiring the code stream, the decoding end decodes the texture complexity weights corresponding to the N regions in the reconstructed image and the to-be-encoded image respectively from the code stream.

S402,对重建图像进行图像增强,得到残差图像。S402, performing image enhancement on the reconstructed image to obtain a residual image.

示例性的,解码端可以采用图像增强模型对重建图像进行图像增强,得到中间图像。示例性的,中间图像为残差图像。Exemplarily, the decoding end may use an image enhancement model to perform image enhancement on the reconstructed image to obtain an intermediate image. Exemplarily, the intermediate image is a residual image.

其中,S402可以参照上述S201的描述,在此不再赘述。Wherein, for S402, reference may be made to the description of the above-mentioned S201, and details are not repeated here.

示例性的,残差图像的分辨率,与重建图像的分辨率以及待编码图像的分辨率均相同。Exemplarily, the resolution of the residual image is the same as the resolution of the reconstructed image and the resolution of the to-be-encoded image.

S403,依据待编码图像中各区域对应的纹理复杂度权重,生成残差图像中各区域分别对应的纹理复杂度权重。S403, according to the texture complexity weight corresponding to each area in the image to be encoded, generate the texture complexity weight corresponding to each area in the residual image.

示例性的,在得到残差图像后,可以按照预先设置的预设分区规则,将残差图像划分为N个区域。其中,对残差图像的区域划分方式与对待编码图像的区域划分方式相同,由于残差图像与待编码图像的分辨率相同,因此残差图像中的N个区域与待编码图像中的N个区域是一一对应的。进而,可以将待编码图像的第i个区域对应的纹理复杂度权重,作为残差图像的第i个区域对应的纹理复杂度权重。这样,可以确定残差图像中N个区域分别对应的纹理复杂度权重。Exemplarily, after the residual image is obtained, the residual image may be divided into N regions according to a preset preset partitioning rule. The area division method of the residual image is the same as that of the image to be encoded. Since the resolution of the residual image and the image to be encoded are the same, the N areas in the residual image are the same as the N areas in the image to be encoded. Regions are in one-to-one correspondence. Furthermore, the texture complexity weight corresponding to the ith region of the image to be encoded may be used as the texture complexity weight corresponding to the ith region of the residual image. In this way, the texture complexity weights corresponding to the N regions in the residual image can be determined.

示例性的,纹理复杂度权重可以是0至1之间的小数。Exemplarily, the texture complexity weight may be a decimal between 0 and 1.

示例性的,在得到残差图像中N个区域对应的纹理复杂度权重后,可以依据残差图像中各区域分别对应的纹理复杂度权重,调整残差图像中各区域分别对应的纹理强度,得到重建图像对应的增强图像,可以参照S404~S405:Exemplarily, after obtaining the texture complexity weights corresponding to N regions in the residual image, the texture intensity corresponding to each region in the residual image can be adjusted according to the texture complexity weights corresponding to each region in the residual image, respectively, To obtain the enhanced image corresponding to the reconstructed image, refer to S404-S405:

S404,基于残差图像中各区域分别对应的纹理复杂度权重对残差图像进行残差更新,得到残差更新图像。S404 , performing a residual update on the residual image based on the texture complexity weights corresponding to each region in the residual image to obtain a residual updated image.

S405,将重建图像和残差更新图像进行相加,得到增强图像。S405, adding the reconstructed image and the residual update image to obtain an enhanced image.

示例性的,S404~S405,可以参照上文S203~S204的描述,在此不再赘述。Exemplarily, for S404-S405, reference may be made to the descriptions of S203-S204 above, which will not be repeated here.

这样,通过根据待编码图像纹理复杂度,将纹理复杂度权重控制在0到1范围,来调整重建图像中各个区域对应的纹理增强,能够在增强重建图像中纹理区域(纹理复杂度较高)纹理的同时,避免重建图像中非纹理区域(纹理复杂度较低)产生虚假条纹;进而降低重建图像的视觉失真。且本申请将纹理复杂度权重控制在0到1范围,使得相邻区域对应的纹理更柔和,能够避免相邻区域增强的纹理效果不一致的问题。In this way, by controlling the texture complexity weight in the range of 0 to 1 according to the texture complexity of the image to be encoded, to adjust the texture enhancement corresponding to each area in the reconstructed image, it is possible to enhance the texture area (with high texture complexity) in the reconstructed image. At the same time of texture, it avoids false streaks in the non-textured area (with low texture complexity) in the reconstructed image; thereby reducing the visual distortion of the reconstructed image. In addition, the present application controls the texture complexity weight in the range of 0 to 1, so that the texture corresponding to the adjacent area is softer, and the problem of inconsistent texture effects enhanced by the adjacent area can be avoided.

此外,相对于现有技术采用两个模型来进行后处理而言,本申请仅使用一个模型,降低了计算复杂度。In addition, compared with the prior art using two models for post-processing, the present application uses only one model, which reduces the computational complexity.

再次,相对于根据重建图像确定的纹理复杂度权重而言,根据待编码图像确定的纹理复杂度权重更准确,进而能够更准确的对控制图像纹理强度的衰减,从而进一步提高图像质量。Thirdly, compared with the texture complexity weight determined according to the reconstructed image, the texture complexity weight determined according to the to-be-encoded image is more accurate, which can more accurately control the attenuation of the texture intensity of the image, thereby further improving the image quality.

图5为示例性示出的处理过程示意图。在图5的实施例中,首先采用非生成对抗网络(非GANEF)和生成对抗网络(GANEF)对重建图像进行滤波,分别得到基础保真图像和纹理增强图像,再基于重建图像或基础保真图像中各区域对应的纹理复杂度,确定基础保真图像和纹理增强图像分别对应的加权计算因子,最后基于加权计算因子将基础保真图像和纹理增强图像进行加权融合,得到最终的增强图像。FIG. 5 is a schematic diagram of an exemplary processing process. In the embodiment of FIG. 5 , the reconstructed image is first filtered by a non-generative adversarial network (non-GANEF) and a generative adversarial network (GANEF) to obtain a basic fidelity image and a texture-enhanced image, respectively, and then based on the reconstructed image or basic fidelity The texture complexity corresponding to each area in the image is determined, and the weighted calculation factors corresponding to the basic fidelity image and the texture-enhanced image are determined. Finally, the basic fidelity image and the texture-enhanced image are weighted and fused based on the weighted calculation factor to obtain the final enhanced image.

S501,对重建图像进行图像增强,得到纹理增强图像。S501, performing image enhancement on the reconstructed image to obtain a texture-enhanced image.

示例性的,解码端获取到码流后,可以对码流进行解码,得到重建图像;然后可以采用图像增强模型对重建图像进行图像增强,得到中间图像。示例性的,中间图像为纹理增强图像。Exemplarily, after obtaining the code stream, the decoding end can decode the code stream to obtain a reconstructed image; and then an image enhancement model can be used to enhance the reconstructed image to obtain an intermediate image. Exemplarily, the intermediate image is a texture-enhanced image.

图6为示例性示出的图像增强处理过程示意图。FIG. 6 is an exemplary schematic diagram of an image enhancement processing process.

一种可能的方式中,训练的图像增强模型的输出是残差图像。这样,将重建图像输入至图像增强模型,可以得到图像增强模型输出的残差图像,然后可以根据残差图像和重建图像,确定纹理增强图像。可选的,可以将残差图像和重建图像对应像素点的像素值相加,得到纹理增强图像,如图6(1)所示。In one possible way, the output of the trained image augmentation model is a residual image. In this way, by inputting the reconstructed image into the image enhancement model, the residual image output by the image enhancement model can be obtained, and then the texture enhanced image can be determined according to the residual image and the reconstructed image. Optionally, the pixel values of the corresponding pixels of the residual image and the reconstructed image may be added to obtain a texture-enhanced image, as shown in FIG. 6(1).

一种可能的方式中,训练的图像增强模型的输出是纹理增强图像。这样,将重建图像输入至图像增强模型后,可以直接得到纹理增强图像,如图6(2)所示。In one possible way, the output of the trained image augmentation model is a texture augmented image. In this way, after inputting the reconstructed image to the image enhancement model, a texture-enhanced image can be directly obtained, as shown in Figure 6(2).

示例性的,纹理增强图像与重建图像的分辨率相同。Exemplarily, the texture-enhanced image is of the same resolution as the reconstructed image.

S502,对重建图像进行图像保真,得到基础保真图像。S502, performing image fidelity on the reconstructed image to obtain a basic fidelity image.

示例性的,可以采用预设的图像保真模型可以重建图像进行图像保真,得到基础保真图像。Exemplarily, a preset image fidelity model can be used to reconstruct an image to perform image fidelity to obtain a basic fidelity image.

示例性的,图像保真模型采用的网络可以是非生成对抗网络,如卷积神经网络等,本申请对此不作限制。Exemplarily, the network used by the image fidelity model may be a non-generative adversarial network, such as a convolutional neural network, which is not limited in this application.

示例性的,图像保真模型的训练过程可以如下:收集多组训练数据,一组训练数据包括待编码图像和对待编码图像的码流进行解码得到的重建图像。针对一组训练数据,将一组训练数据输入至图像保真模型中,由图像保真模型对重建图像进行前向计算,输出基础保真图像。基于图像保真模型输出的基础保真图像和训练数据中的待编码图像计算损失函数值,以最小化损失函数值为目标,调整图像保真模型的权重参数。然后可以根据上述方式,采用收集的多组训练数据对图像保真模型进行训练,直至图像保真模型的训练次数等于预设训练次数,或图像保真模型的损失函数值小于或等于损失函数阈值,或图像保真模型的效果满足预设效果条件,停止对图像保真模型的训练,得到训练后的图像保真模型。示例性的,预设训练次数、损失函数阈值和预设效果条件,均可以按照需求设置,本申请对此不作限制。Exemplarily, the training process of the image fidelity model may be as follows: collect multiple sets of training data, where a set of training data includes an image to be encoded and a reconstructed image obtained by decoding a code stream of the image to be encoded. For a set of training data, a set of training data is input into the image fidelity model, and the image fidelity model performs forward calculation on the reconstructed image, and outputs the basic fidelity image. Calculate the loss function value based on the basic fidelity image output by the image fidelity model and the to-be-encoded image in the training data, and adjust the weight parameters of the image fidelity model with the goal of minimizing the loss function value. Then, the image fidelity model can be trained by using the collected training data in the above manner, until the number of training times of the image fidelity model is equal to the preset number of training times, or the loss function value of the image fidelity model is less than or equal to the loss function threshold , or the effect of the image fidelity model satisfies the preset effect condition, stop the training of the image fidelity model, and obtain the trained image fidelity model. Exemplarily, the preset training times, the loss function threshold, and the preset effect conditions can all be set as required, which is not limited in this application.

需要说明的是,本申请不限制S501与S502的执行顺序。It should be noted that this application does not limit the execution order of S501 and S502.

示例性的,纹理增强图像和基础保真图像,均与重建图像的分辨率相同。Exemplarily, both the texture-enhanced image and the base fidelity image are of the same resolution as the reconstructed image.

S503,基于基础保真图像,生成纹理增强图像中各区域分别对应的纹理复杂度权重。S503 , based on the basic fidelity image, generate texture complexity weights corresponding to each region in the texture enhanced image.

示例性的,S503可以包括S5031a~S5034a:Exemplarily, S503 may include S5031a to S5034a:

S5031a,按照预设分区规则,将基础保真图像和纹理增强图像分别划分为N个区域。S5031a, according to preset partition rules, divide the basic fidelity image and the texture enhancement image into N regions respectively.

S5032a,分别确定基础保真图像中N个区域的纹理复杂度。S5032a: Determine the texture complexity of the N regions in the basic fidelity image respectively.

S5033a,基于基础保真图像中N个区域的纹理复杂度,确定纹理增强图像中N个区域分别对应的纹理复杂度权重。S5033a, based on the texture complexity of the N regions in the basic fidelity image, determine the texture complexity weights corresponding to the N regions in the texture enhancement image respectively.

示例性的,S5031a~S5033a可以参照上文S2021~S2023的描述,在此不再赘述。Exemplarily, for S5031a-S5033a, reference may be made to the descriptions of S2021-S2023 above, which will not be repeated here.

一种可能的方式中,可以基于重建图像,生成纹理增强图像中各区域对应的纹理复杂度权重,可以参照S5031b~S5033b:In a possible way, the texture complexity weight corresponding to each region in the texture-enhanced image can be generated based on the reconstructed image. Refer to S5031b to S5033b:

S5031b,按照预设分区规则,将重建图像和纹理增强图像分别划分为N个区域。S5031b, according to a preset partition rule, divide the reconstructed image and the texture-enhanced image into N regions respectively.

S5032b,分别确定重建图像中N个区域的纹理复杂度。S5032b, respectively determine the texture complexity of the N regions in the reconstructed image.

S5033b,基于重建图像中N个区域的纹理复杂度,确定纹理增强图像中N个区域分别对应的纹理复杂度权重。S5033b, based on the texture complexity of the N regions in the reconstructed image, determine the texture complexity weights corresponding to the N regions in the texture enhancement image respectively.

示例性的,S5031b~S5033b可以参照上文S2021~S2023的描述,在此不再赘述。Exemplarily, for S5031b to S5033b, reference may be made to the descriptions of S2021 to S2023 above, which will not be repeated here.

S504,根据纹理增强图像中各区域分别对应的纹理复杂度权重,对基础保真图像和纹理增强图像进行加权融合,得到增强图像。S504: Perform weighted fusion of the basic fidelity image and the texture-enhanced image according to the texture complexity weights corresponding to each region in the texture-enhanced image to obtain an enhanced image.

示例性的,将纹理增强图像和基础保真图像均划分为N个区域后,纹理增强图像与基础保真图像的区域是一一对应的。这样,可以将纹理增强图像中各区域,与基础保真图像中对应区域进行加权融合,可以得到增强图像。Exemplarily, after both the texture-enhanced image and the basic fidelity image are divided into N regions, the regions of the texture-enhanced image and the basic fidelity image are in one-to-one correspondence. In this way, each area in the texture-enhanced image can be weighted and fused with the corresponding area in the basic fidelity image, and an enhanced image can be obtained.

示例性的,S504可以包括S5041~S5042:Exemplarily, S504 may include S5041-S5042:

S5041,依据纹理增强图像中N个区域分别对应的纹理复杂度权重,确定纹理增强图像中N个区域分别对应加权计算权重和基础保真图像中N个区域分别对应的加权计算权重。S5041 , according to the texture complexity weights corresponding to the N regions in the texture enhanced image respectively, determine the weighted calculation weights corresponding to the N regions in the texture enhanced image and the weighted calculation weights corresponding to the N regions in the basic fidelity image respectively.

示例性的,可以将纹理增强图像中N个区域对应的纹理复杂度权重,作为纹理增强图像中N个区域的加权计算权重。以及将1与纹理增强图像中N个区域对应的纹理复杂度权重之间的差值,作为基础保真图像中N个区域的加权计算权重。Exemplarily, the texture complexity weights corresponding to the N regions in the texture-enhanced image may be used as the weighted calculation weights of the N regions in the texture-enhanced image. And the difference between 1 and the texture complexity weights corresponding to the N regions in the texture-enhanced image is used as the weighted calculation weight of the N regions in the basic fidelity image.

例如,针对第i个区域,纹理增强图像的第i个区域对应的纹理复杂度权重为ratio_i,则纹理增强图像的第i个区域的加权计算权重可以为ratio_i,基础保真图像的第i个区域的加权计算权重为1-ratio_i。For example, for the ith area, the texture complexity weight corresponding to the ith area of the texture-enhanced image is ratio_i, then the weighted calculation weight of the ith area of the texture-enhanced image can be ratio_i, and the ith area of the basic fidelity image The weighted calculation weight of the region is 1-ratio_i.

S5042,依据纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重,对纹理增强图像中N个区域和基础保真图像中N个区进行加权计算,得到增强图像。S5042, according to the weighted calculation weights corresponding to the N areas in the texture enhancement image and the weighted calculation weights corresponding to the N areas in the basic fidelity image respectively, perform the calculation on the N areas in the texture enhancement image and the N areas in the basic fidelity image. Weighted calculation to get an enhanced image.

示例性的,针对第i个区域,根据纹理增强图像中第i个区域的加权计算权重和基础保真图像中第i个区域的加权计算权重,对纹理增强图像中第i个区域的各像素点和基础保真图像中第i个区域的各像素点进行加权计算,得到第i个区域的增强图像。Exemplarily, for the ith area, according to the weighted calculation weight of the ith area in the texture-enhanced image and the weighted calculation weight of the ith area in the basic fidelity image, each pixel of the ith area in the texture-enhanced image is calculated. Points and each pixel point of the ith area in the basic fidelity image are weighted to obtain the enhanced image of the ith area.

示例性的,可以将纹理增强图像中N个区域分别对应的加权计算权重,与纹理增强图像中N个区域分别相乘,得到第一乘积;将基础保真图像中N个区域分别对应的加权计算权重,与基础保真图像中N个区域分别相乘,得到第二乘积;将第一乘积和第二乘积相加,得到重建图像对应的增强图像。Exemplarily, the weighted calculation weights corresponding to the N regions in the texture-enhanced image can be multiplied by the N regions in the texture-enhanced image to obtain the first product; the weights corresponding to the N regions in the basic fidelity image are respectively Calculate the weight and multiply it with N regions in the basic fidelity image to obtain the second product; add the first product and the second product to obtain the enhanced image corresponding to the reconstructed image.

例如,纹理增强图像中第i个区域的加权计算权重为ratio_i,纹理增强图像中第i个区域的一个像素点(j,k)的像素值为E1(j,k);基础保真图像中第i个区域的加权计算权重为1-ratio_i,基础保真图像中第i个区域的一个像素点(j,k)的像素值为E2(j,k),则对重建图像的第i个区域的像素点(j,k)进行图像增强后的像素值R(i,j)=ratio_i*E1(i,j)+(1-ratio_i)*E2(i,j)。For example, the weighted calculation weight of the ith area in the texture-enhanced image is ratio_i, and the pixel value of a pixel (j, k) in the ith area in the texture-enhanced image is E1(j, k); in the basic fidelity image The weighted calculation weight of the ith area is 1-ratio_i, and the pixel value of a pixel (j, k) of the ith area in the basic fidelity image is E2(j, k), then the ith area of the reconstructed image is The pixel value R(i,j)=ratio_i*E1(i,j)+(1-ratio_i)*E2(i,j) for the pixel point (j,k) of the region after image enhancement.

这样,通过根据重建图像纹理复杂度,将纹理复杂度权重控制在0到1范围来,调整重建图像中各个区域对应的纹理增强,能够在增强重建图像中纹理区域(纹理复杂度较高)纹理的同时,避免重建图像中非纹理区域(纹理复杂度较低)产生虚假条纹;进而降低重建图像的视觉失真。且本申请将纹理复杂度权重控制在0到1范围,使得相邻区域对应的纹理更柔和,能够避免相邻区域增强的纹理效果不一致的问题。In this way, by adjusting the texture enhancement corresponding to each area in the reconstructed image by controlling the texture complexity weight in the range of 0 to 1 according to the texture complexity of the reconstructed image, the texture of the texture area (higher texture complexity) in the reconstructed image can be enhanced. At the same time, it avoids false streaks in the non-textured area (with low texture complexity) in the reconstructed image; thereby reducing the visual distortion of the reconstructed image. In addition, the present application controls the texture complexity weight in the range of 0 to 1, so that the texture corresponding to the adjacent area is softer, and the problem of inconsistent texture effects enhanced by the adjacent area can be avoided.

图7为示例性示出的处理过程示意图。在图7的实施例中,首先采用非生成对抗网络(非GANEF)和生成对抗网络(GANEF)对重建图像进行滤波,分别得到基础保真图像和纹理增强图像,再基于重建图像对应的待编码图像或基础保真图像中各区域对应的纹理复杂度,确定基础保真图像和纹理增强图像分别对应的加权计算因子,最后基于加权计算因子将基础保真图像和纹理增强图像进行加权融合,得到最终的增强图像。FIG. 7 is a schematic diagram of an exemplary processing process. In the embodiment of FIG. 7 , a non-generative adversarial network (non-GANEF) and a generative adversarial network (GANEF) are used to filter the reconstructed image, respectively, to obtain a basic fidelity image and a texture-enhanced image, and then based on the reconstructed image corresponding to the to-be-encoded image The texture complexity corresponding to each area in the image or the basic fidelity image, determine the weighted calculation factors corresponding to the basic fidelity image and the texture-enhanced image respectively, and finally perform weighted fusion of the basic fidelity image and the texture-enhanced image based on the weighted calculation factor to obtain The final enhanced image.

S701,对码流进行解码,得到重建图像和待编码图像中各区域对应的纹理复杂度权重。S701: Decode the code stream to obtain texture complexity weights corresponding to regions in the reconstructed image and the image to be encoded.

示例性的,编码端可以基于待编码图像,生成纹理复杂度权重,可以包括S7011~S7013:Exemplarily, the encoding end may generate the texture complexity weight based on the to-be-encoded image, which may include S7011 to S7013:

S7011,按照预设分区规则,将待编码图像划分为N个区域。S7011, according to a preset partition rule, divide the image to be encoded into N regions.

S7012,分别确定待编码图像中N个区域的纹理复杂度。S7012: Determine the texture complexity of the N regions in the to-be-coded image respectively.

S7013,基于待编码图像中N个区域的纹理复杂度,确定待编码图像中N个区域分别对应的纹理复杂度权重。S7013, based on the texture complexity of the N regions in the to-be-coded image, determine the texture complexity weights corresponding to the N-regions in the to-be-coded image respectively.

示例性的,S7011~S7013,可以参照上述S2021~S2023的描述,在此不再赘述。Exemplarily, for S7011-S7013, reference may be made to the descriptions of the above-mentioned S2021-S2023, which will not be repeated here.

S702,对重建图像进行图像增强,得到纹理增强图像。S702, performing image enhancement on the reconstructed image to obtain a texture-enhanced image.

示例性的,S702可以参照上述S502的描述,在此不再赘述。Exemplarily, for S702, reference may be made to the description of the foregoing S502, and details are not repeated here.

S703,依据待编码图像中各区域对应的纹理复杂度权重,确定纹理增强图像中各区域分别对应的纹理增强权重。S703, according to the texture complexity weights corresponding to the regions in the image to be encoded, determine the texture enhancement weights corresponding to the regions in the texture enhancement image respectively.

示例性的,在得到纹理增强图像后,可以按照预先设置的预设分区规则,将纹理增强图像划分为N个区域。其中,对纹理增强图像的区域划分方式与对待编码图像的区域划分方式相同,且纹理增强图像与待编码图像的分辨率相同,因此纹理增强图像中的区域与待编码图像中的区域是一一对应的。进而,可以将待编码图像的第i个区域对应的纹理复杂度权重,作为纹理增强图像的第i个区域对应的纹理复杂度权重。这样,可以确定纹理增强图像中N个区域对应的纹理复杂度权重。Exemplarily, after the texture-enhanced image is obtained, the texture-enhanced image may be divided into N regions according to a preset preset partition rule. The area division method of the texture-enhanced image is the same as that of the image to be encoded, and the resolution of the texture-enhanced image and the image to be encoded is the same, so the area in the texture-enhanced image and the area in the image to be encoded are one-to-one corresponding. Furthermore, the texture complexity weight corresponding to the ith area of the image to be encoded may be used as the texture complexity weight corresponding to the ith area of the texture-enhanced image. In this way, the texture complexity weights corresponding to the N regions in the texture-enhanced image can be determined.

示例性的,纹理复杂度权重可以是0至1之间的小数。Exemplarily, the texture complexity weight may be a decimal between 0 and 1.

示例性的,在得到纹理增强图像中N个区域对应的纹理复杂度权重后,可以依据纹理增强图像中各区域对应的纹理复杂度权重,调整纹理增强图像中各区域对应的纹理强度,得到重建图像对应的增强图像,可以参照S704~S705:Exemplarily, after obtaining the texture complexity weights corresponding to N regions in the texture enhanced image, the texture intensity corresponding to each region in the texture enhanced image can be adjusted according to the texture complexity weights corresponding to each region in the texture enhanced image to obtain a reconstruction. For the enhanced image corresponding to the image, refer to S704-S705:

S704,对重建图像进行图像保真,得到基础保真图像。S704, performing image fidelity on the reconstructed image to obtain a basic fidelity image.

示例性的,S704可以参照上述S502的描述,在此不再赘述。Exemplarily, for S704, reference may be made to the description of the foregoing S502, and details are not repeated here.

示例性的,本申请不限制S704和S702的执行顺序。Exemplarily, the present application does not limit the execution order of S704 and S702.

S705,根据纹理增强图像中各区域对应的纹理复杂度权重,对基础保真图像和纹理增强图像进行加权融合,得到增强图像。S705, according to the texture complexity weight corresponding to each region in the texture enhanced image, perform weighted fusion of the basic fidelity image and the texture enhanced image to obtain an enhanced image.

示例性的,S705可以参照上述S504的描述,在此不再赘述。Exemplarily, for S705, reference may be made to the description of the foregoing S504, and details are not repeated here.

这样,通过根据待编码图像纹理复杂度,将纹理复杂度权重控制在0到1范围,来调整重建图像中各个区域对应的纹理增强,能够在增强重建图像中纹理区域(纹理复杂度较高)纹理的同时,避免重建图像中非纹理区域(纹理复杂度较低)产生虚假条纹;进而降低重建图像的视觉失真。且本申请将纹理复杂度权重控制在0到1范围,使得相邻区域对应的纹理更柔和,能够避免相邻区域增强的纹理效果不一致的问题。In this way, by controlling the texture complexity weight in the range of 0 to 1 according to the texture complexity of the image to be encoded, to adjust the texture enhancement corresponding to each area in the reconstructed image, it is possible to enhance the texture area (with high texture complexity) in the reconstructed image. At the same time of texture, it avoids false streaks in the non-textured area (with low texture complexity) in the reconstructed image; thereby reducing the visual distortion of the reconstructed image. In addition, the present application controls the texture complexity weight in the range of 0 to 1, so that the texture corresponding to the adjacent area is softer, and the problem of inconsistent texture effects enhanced by the adjacent area can be avoided.

再次,相对于根据重建图像确定的纹理复杂度权重而言,根据待编码图像确定的纹理复杂度权重更准确,进而能够更准确的对控制图像纹理强度的衰减,从而进一步提高图像质量。Thirdly, compared with the texture complexity weight determined according to the reconstructed image, the texture complexity weight determined according to the to-be-encoded image is more accurate, which can more accurately control the attenuation of the texture intensity of the image, thereby further improving the image quality.

图8为示例性示出的图像处理装置示意图。FIG. 8 is a schematic diagram of an exemplary image processing apparatus.

参照图8,示例性的,该图像处理装置包括:图像获取模块801、图像增强模块802、纹理权重确定模块803和纹理衰减模块804,其中:8 , the image processing apparatus exemplarily includes: an image acquisition module 801, an image enhancement module 802, a texture weight determination module 803 and a texture attenuation module 804, wherein:

图像获取模块801,用于获取重建图像;an image acquisition module 801, configured to acquire a reconstructed image;

图像增强模块802,用于对重建图像进行图像增强,得到中间图像;an image enhancement module 802, configured to perform image enhancement on the reconstructed image to obtain an intermediate image;

纹理权重确定模块803,用于确定中间图像中各区域分别对应的纹理复杂度权重,纹理复杂度权重为0至1之间的数;The texture weight determination module 803 is used for determining the texture complexity weight corresponding to each region in the intermediate image respectively, and the texture complexity weight is a number between 0 and 1;

纹理衰减模块804,用于依据中间图像中各区域分别对应的纹理复杂度权重,对中间图像中各区域对应的纹理强度分别进行衰减,得到重建图像对应的增强图像。The texture attenuation module 804 is configured to attenuate the texture intensity corresponding to each region in the intermediate image according to the texture complexity weight corresponding to each region in the intermediate image, to obtain an enhanced image corresponding to the reconstructed image.

示例性的,中间图像为残差图像;Exemplarily, the intermediate image is a residual image;

纹理衰减模块804,包括:Texture attenuation module 804, including:

残差更新模块,用于将残差图像中各像素点的像素值,分别与各像素点所属区域对应的纹理复杂度权重相乘,得到残差更新图像;The residual update module is used to multiply the pixel value of each pixel in the residual image by the texture complexity weight corresponding to the region to which each pixel belongs to obtain the residual update image;

图像生成模块,用于根据残差更新图像和重建图像,生成增强图像。The image generation module is used to update the image and reconstruct the image based on the residual to generate an enhanced image.

示例性的,图像生成模块,具体用于将残差更新图像和重建图像相加,得到增强图像。Exemplarily, the image generation module is specifically configured to add the residual update image and the reconstructed image to obtain an enhanced image.

示例性的,中间图像为纹理增强图像,装置还包括:Exemplarily, the intermediate image is a texture-enhanced image, and the apparatus further includes:

图像保真模块,用于对重建图像进行图像保真,得到基础保真图像。The image fidelity module is used to perform image fidelity on the reconstructed image to obtain a basic fidelity image.

示例性的,纹理权重确定模块803,具体用于按照预设分区规则,将基础保真图像和纹理增强图像分别划分为N个区域,N为正整数;分别确定基础保真图像中N个区域的纹理复杂度;基于基础保真图像中N个区域的纹理复杂度,确定纹理增强图像中N个区域分别对应的纹理复杂度权重。Exemplarily, the texture weight determination module 803 is specifically configured to divide the basic fidelity image and the texture-enhanced image into N regions respectively according to preset partition rules, where N is a positive integer; respectively determine N regions in the basic fidelity image. The texture complexity is determined based on the texture complexity of the N regions in the basic fidelity image, and the texture complexity weights corresponding to the N regions in the texture-enhanced image are determined.

示例性的,纹理衰减模块804,包括:Exemplarily, the texture attenuation module 804 includes:

加权权重确定模块,用于依据纹理增强图像中N个区域对应的纹理复杂度权重,确定纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重;The weighted weight determination module is used to determine the weighted calculation weights corresponding to the N areas in the texture-enhanced image and the weighted calculation weights corresponding to the N areas in the basic fidelity image according to the texture complexity weights corresponding to the N areas in the texture-enhanced image. Weights;

加权计算模块,用于依据纹理增强图像中N个区域分别对应的加权计算权重和基础保真图像中N个区域分别对应的加权计算权重,对纹理增强图像中N个区域和基础保真图像中N个区域进行加权计算,得到重建图像对应的增强图像。The weighted calculation module is used to calculate the corresponding weights of N areas in the texture enhanced image and the corresponding weighted calculation weights of the N areas in the basic fidelity image respectively. The N regions are weighted to obtain an enhanced image corresponding to the reconstructed image.

示例性的,加权计算模块,具体用于将纹理增强图像中N个区域分别对应的加权计算权重,与纹理增强图像中N个区域分别相乘,得到第一乘积;将基础保真图像中N个区域分别对应的加权计算权重,与基础保真图像中N个区域分别相乘,得到第二乘积;将第一乘积和第二乘积相加,得到重建图像对应的增强图像。Exemplarily, the weighted calculation module is specifically used to multiply the weighted calculation weights corresponding to the N regions in the texture-enhanced image respectively with the N regions in the texture-enhanced image to obtain the first product; The weighted calculation weights corresponding to the respective regions are multiplied by the N regions in the basic fidelity image to obtain the second product; the first product and the second product are added to obtain the enhanced image corresponding to the reconstructed image.

示例性的,加权权重确定模块,具体用于将纹理增强图像中N个区域分别对应的纹理复杂度权重,确定为纹理增强图像中N个区域分别对应的加权计算权重;将1与纹理增强图像中N个区域分别对应的纹理复杂度权重的差值,确定为基础保真图像中N个区域分别对应的加权计算权重。Exemplarily, the weighted weight determination module is specifically configured to determine the texture complexity weights corresponding to the N regions in the texture enhanced image as the weighted calculation weights corresponding to the N regions in the texture enhanced image respectively; The difference between the texture complexity weights corresponding to the N regions in the base fidelity image is determined as the weighted calculation weights corresponding to the N regions in the basic fidelity image.

示例性的,纹理权重确定模块803,具体用于从接收的码流中解码出中间图像中N个区域分别对应的纹理复杂度权重,N为正整数。Exemplarily, the texture weight determination module 803 is specifically configured to decode, from the received code stream, texture complexity weights corresponding to N regions in the intermediate image, where N is a positive integer.

示例性的,纹理权重确定模块803,具体用于按照预设分区规则,将重建图像和中间图像分别划分为N个区域,N为正整数;分别确定重建图像中N个区域的纹理复杂度;基于重建图像中N个区域的纹理复杂度,确定中间图像中N个区域分别对应的纹理复杂度权重。Exemplarily, the texture weight determination module 803 is specifically configured to divide the reconstructed image and the intermediate image into N regions respectively according to a preset partition rule, where N is a positive integer; and respectively determine the texture complexity of the N regions in the reconstructed image; Based on the texture complexity of the N regions in the reconstructed image, the texture complexity weights corresponding to the N regions in the intermediate image respectively are determined.

一个示例中,图9示出了本申请实施例的一种装置900的示意性框图装置900可包括:处理器901和收发器/收发管脚902,可选地,还包括存储器903。In an example, FIG. 9 shows a schematic block diagram of an apparatus 900 according to an embodiment of the present application. The apparatus 900 may include: a processor 901 , a transceiver/transceiver pin 902 , and optionally, a memory 903 .

装置900的各个组件通过总线904耦合在一起,其中总线904除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都称为总线904。Various components of the device 900 are coupled together through a bus 904, wherein the bus 904 includes a power bus, a control bus and a status signal bus in addition to a data bus. For clarity, however, the various buses are referred to as bus 904 in the figures.

可选地,存储器903可以用于前述方法实施例中的指令。该处理器901可用于执行存储器903中的指令,并控制接收管脚接收信号,以及控制发送管脚发送信号。Optionally, the memory 903 may be used for instructions in the foregoing method embodiments. The processor 901 can be used to execute the instructions in the memory 903, and control the receive pins to receive signals, and control the transmit pins to transmit signals.

装置900可以是上述方法实施例中的电子设备或电子设备的芯片。The apparatus 900 may be the electronic device or the chip of the electronic device in the above method embodiments.

其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.

本实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的图像处理方法。This embodiment also provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned related method steps to realize the above-mentioned embodiments. image processing method.

本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的图像处理方法。This embodiment also provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the image processing method in the above-mentioned embodiment.

另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的图像处理方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used to store computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the image processing methods in the above method embodiments.

其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.

通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by different The function module is completed, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

本申请各个实施例的任意内容,以及同一实施例的任意内容,均可以自由组合。对上述内容的任意组合均在本申请的范围之内。Any content of each embodiment of the present application and any content of the same embodiment can be freely combined. Any combination of the above is within the scope of this application.

集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a removable hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and other media that can store program codes.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of this application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions. Software instructions can be composed of corresponding software modules, and software modules can be stored in random access memory (Random Access Memory, RAM), flash memory, read only memory (Read Only Memory, ROM), erasable programmable read only memory ( Erasable Programmable ROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), registers, hard disks, removable hard disks, compact disks (CD-ROMs), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium may reside in an ASIC.

本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机可读存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should realize that, in one or more of the above examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer-readable storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (24)

1. An image processing method, characterized in that the method comprises:
acquiring a reconstructed image;
carrying out image enhancement on the reconstructed image to obtain an intermediate image;
determining texture complexity weights respectively corresponding to all regions in the intermediate image, wherein the texture complexity weights are numbers between 0 and 1;
and respectively attenuating the texture intensity corresponding to each region in the intermediate image according to the texture complexity weight corresponding to each region in the intermediate image, so as to obtain an enhanced image corresponding to the reconstructed image.
2. The method of claim 1, wherein the intermediate image is a residual image;
the attenuating the texture intensity corresponding to each region in the intermediate image respectively according to the texture complexity weight corresponding to each region in the intermediate image to obtain an enhanced image corresponding to the reconstructed image includes:
multiplying the pixel value of each pixel point in the residual image by the texture complexity weight corresponding to the region to which each pixel point belongs to obtain a residual updated image;
and generating the enhanced image according to the residual updating image and the reconstructed image.
3. The method of claim 2, wherein generating the enhanced image from the residual updated image and the reconstructed image comprises:
and adding the residual updating image and the reconstructed image to obtain the enhanced image.
4. The method of claim 1, wherein the intermediate image is a texture enhanced image, the method further comprising:
and performing image fidelity on the reconstructed image to obtain a basic fidelity image.
5. The method of claim 4, wherein determining the texture complexity weight corresponding to each region in the intermediate image comprises:
according to a preset partition rule, dividing the basic fidelity image and the texture enhanced image into N regions respectively, wherein N is a positive integer;
respectively determining the texture complexity of N areas in the basic fidelity image;
and determining texture complexity weights corresponding to the N regions in the texture enhanced image respectively based on the texture complexity of the N regions in the basic fidelity image.
6. The method according to claim 5, wherein the attenuating the texture intensities corresponding to the regions in the intermediate image respectively according to the texture complexity weights corresponding to the regions in the intermediate image to obtain the enhanced image corresponding to the reconstructed image comprises:
determining weighting calculation weights respectively corresponding to the N regions in the texture enhanced image and weighting calculation weights respectively corresponding to the N regions in the basic fidelity image according to texture complexity weights corresponding to the N regions in the texture enhanced image;
and carrying out weighted calculation on the N regions in the texture enhanced image and the N regions in the basic fidelity image according to the weighted calculation weights respectively corresponding to the N regions in the texture enhanced image and the weighted calculation weights respectively corresponding to the N regions in the basic fidelity image to obtain an enhanced image corresponding to the reconstructed image.
7. The method according to claim 6, wherein the performing weighted computation on the N regions in the texture-enhanced image and the N regions in the basic fidelity image according to the weighted computation weights corresponding to the N regions in the texture-enhanced image and the weighted computation weights corresponding to the N regions in the basic fidelity image, respectively, to obtain an enhanced image corresponding to the reconstructed image comprises:
respectively multiplying the weighted calculation weights corresponding to the N areas in the texture enhanced image with the N areas in the texture enhanced image to obtain a first product;
respectively multiplying the weighting calculation weights respectively corresponding to the N areas in the basic fidelity image with the N areas in the basic fidelity image to obtain a second product;
and adding the first product and the second product to obtain an enhanced image corresponding to the reconstructed image.
8. The method according to claim 6, wherein the determining the weighted computation weights corresponding to the N regions in the texture enhanced image and the weighted computation weights corresponding to the N regions in the basic fidelity image according to the texture complexity weights corresponding to the N regions in the texture enhanced image respectively comprises:
determining texture complexity weights respectively corresponding to the N areas in the texture enhanced image as weighted calculation weights respectively corresponding to the N areas in the texture enhanced image;
and determining the difference value of the texture complexity weight corresponding to 1 and N areas in the texture enhanced image as the weighting calculation weight corresponding to the N areas in the basic fidelity image.
9. The method according to any one of claims 1 to 8, wherein the determining the texture complexity weight corresponding to each region in the intermediate image comprises:
and decoding texture complexity weights respectively corresponding to N areas in the intermediate image from the received code stream, wherein N is a positive integer.
10. The method according to claim 1, 2, 3, 4, 6, 7, 8 or 9, wherein the determining the texture complexity weight corresponding to each region in the intermediate image comprises:
according to a preset partition rule, dividing the reconstructed image and the intermediate image into N areas respectively, wherein N is a positive integer;
respectively determining the texture complexity of N areas in the reconstructed image;
and determining texture complexity weights corresponding to the N regions in the intermediate image respectively based on the texture complexity of the N regions in the reconstructed image.
11. An image processing apparatus, characterized in that the apparatus comprises:
the image acquisition module is used for acquiring a reconstructed image;
the image enhancement module is used for carrying out image enhancement on the reconstructed image to obtain an intermediate image;
a texture weight determining module, configured to determine a texture complexity weight corresponding to each region in the intermediate image, where the texture complexity weight is a number between 0 and 1;
and the texture attenuation module is used for respectively attenuating the texture intensity corresponding to each region in the intermediate image according to the texture complexity weight corresponding to each region in the intermediate image, so as to obtain an enhanced image corresponding to the reconstructed image.
12. The apparatus of claim 11, wherein the intermediate image is a residual image;
the texture attenuation module comprising:
the residual error updating module is used for multiplying the pixel value of each pixel point in the residual error image by the texture complexity weight corresponding to the region to which each pixel point belongs respectively to obtain a residual error updated image;
and the image generation module is used for generating the enhanced image according to the residual error updating image and the reconstructed image.
13. The apparatus of claim 12,
the image generation module is specifically configured to add the residual updated image and the reconstructed image to obtain the enhanced image.
14. The apparatus of claim 11, wherein the intermediate image is a texture enhanced image, the apparatus further comprising:
and the image fidelity module is used for performing image fidelity on the reconstructed image to obtain a basic fidelity image.
15. The apparatus of claim 14,
the texture weight determining module is specifically configured to divide the basic fidelity image and the texture enhanced image into N regions according to a preset partition rule, where N is a positive integer; respectively determining the texture complexity of N areas in the basic fidelity image; and determining texture complexity weights corresponding to the N regions in the texture enhanced image respectively based on the texture complexity of the N regions in the basic fidelity image.
16. The apparatus of claim 15, wherein the texture attenuation module comprises:
a weighted weight determining module, configured to determine, according to texture complexity weights corresponding to N regions in the texture enhanced image, weighted calculation weights corresponding to the N regions in the texture enhanced image and weighted calculation weights corresponding to the N regions in the basic fidelity image;
and the weighting calculation module is used for performing weighting calculation on the N areas in the texture enhanced image and the N areas in the basic fidelity image according to the weighting calculation weights respectively corresponding to the N areas in the texture enhanced image and the weighting calculation weights respectively corresponding to the N areas in the basic fidelity image to obtain an enhanced image corresponding to the reconstructed image.
17. The apparatus of claim 16,
the weighting calculation module is specifically configured to multiply the weighting calculation weights respectively corresponding to the N regions in the texture enhanced image by the N regions in the texture enhanced image, respectively, to obtain a first product; respectively multiplying the weighting calculation weights respectively corresponding to the N areas in the basic fidelity image with the N areas in the basic fidelity image to obtain a second product; and adding the first product and the second product to obtain an enhanced image corresponding to the reconstructed image.
18. The apparatus of claim 16,
the weighting weight determining module is specifically configured to determine texture complexity weights corresponding to the N regions in the texture enhanced image as weighting calculation weights corresponding to the N regions in the texture enhanced image; and determining the difference value of the texture complexity weight corresponding to 1 and N areas in the texture enhanced image as the weighting calculation weight corresponding to the N areas in the basic fidelity image.
19. The apparatus of any one of claims 11 to 18,
the texture weight determining module is specifically configured to decode texture complexity weights corresponding to N regions in the intermediate image from the received code stream, where N is a positive integer.
20. The apparatus of claim 11 or 12 or 13 or 14 or 16 or 17 or 18 or 19,
the texture weight determining module is specifically configured to divide the reconstructed image and the intermediate image into N regions according to a preset partition rule, where N is a positive integer; respectively determining the texture complexity of N areas in the reconstructed image; and determining texture complexity weights corresponding to the N regions in the intermediate image respectively based on the texture complexity of the N regions in the reconstructed image.
21. An electronic device, comprising:
a memory and a processor, the memory coupled with the processor;
the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the image processing method of any one of claims 1 to 10.
22. A chip comprising one or more interface circuits and one or more processors; the interface circuit is configured to receive signals from a memory of an electronic device and to transmit the signals to the processor, the signals including computer instructions stored in the memory; the computer instructions, when executed by the processor, cause the electronic device to perform the image processing method of any of claims 1 to 10.
23. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when run on a computer or a processor, causes the computer or the processor to execute an image processing method according to any one of claims 1 to 10.
24. A computer program product, characterized in that it contains a software program which, when executed by a computer or processor, causes the steps of the method of any one of claims 1 to 10 to be performed.
CN202111511051.7A 2021-12-10 2021-12-10 Image processing method, device and electronic device Pending CN114298922A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111511051.7A CN114298922A (en) 2021-12-10 2021-12-10 Image processing method, device and electronic device
PCT/CN2022/131594 WO2023103715A1 (en) 2021-12-10 2022-11-14 Image processing method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111511051.7A CN114298922A (en) 2021-12-10 2021-12-10 Image processing method, device and electronic device

Publications (1)

Publication Number Publication Date
CN114298922A true CN114298922A (en) 2022-04-08

Family

ID=80967411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111511051.7A Pending CN114298922A (en) 2021-12-10 2021-12-10 Image processing method, device and electronic device

Country Status (2)

Country Link
CN (1) CN114298922A (en)
WO (1) WO2023103715A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023103715A1 (en) * 2021-12-10 2023-06-15 华为技术有限公司 Image processing method and apparatus, and electronic device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116567286B (en) * 2023-07-10 2023-09-22 武汉幻忆信息科技有限公司 Online live video processing method and system based on artificial intelligence

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043575A (en) * 2006-03-20 2007-09-26 硕颉科技股份有限公司 Image reduction method and device
CN101079949A (en) * 2006-02-07 2007-11-28 索尼株式会社 Image processing apparatus and method, recording medium, and program
US20100119176A1 (en) * 2008-11-13 2010-05-13 Hideyuki Ichihashi Image processing apparatus, image processing method, and program
CN103177451A (en) * 2013-04-17 2013-06-26 南京理工大学 Three-dimensional matching algorithm between adaptive window and weight based on picture edge
CN103177420A (en) * 2013-03-13 2013-06-26 北京大学 Image amplification method and image application device based on local-area feature correlations
CN103747263A (en) * 2006-04-28 2014-04-23 株式会社Ntt都科摩 Image predictive coding device, image predictive coding method, image predictive decoding device, image predictive decoding method
CN109982082A (en) * 2019-05-05 2019-07-05 山东大学深圳研究院 A kind of more distortion criterion Rate-distortion optimization methods of HEVC based on local grain characteristic
CN110246093A (en) * 2019-05-05 2019-09-17 北京大学 A kind of decoding image enchancing method
KR20200132682A (en) * 2019-05-16 2020-11-25 삼성전자주식회사 Image optimization method, apparatus, device and storage medium
CN112634278A (en) * 2020-10-30 2021-04-09 上海大学 Superpixel-based just noticeable distortion model
WO2021151276A1 (en) * 2020-05-20 2021-08-05 平安科技(深圳)有限公司 Oct image-based image recognition method and apparatus, and device and storage medium
CN113744235A (en) * 2021-08-30 2021-12-03 河南工业大学 A knee MRI reconstruction technique based on SC-GAN

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114298922A (en) * 2021-12-10 2022-04-08 华为技术有限公司 Image processing method, device and electronic device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079949A (en) * 2006-02-07 2007-11-28 索尼株式会社 Image processing apparatus and method, recording medium, and program
CN101043575A (en) * 2006-03-20 2007-09-26 硕颉科技股份有限公司 Image reduction method and device
CN103747263A (en) * 2006-04-28 2014-04-23 株式会社Ntt都科摩 Image predictive coding device, image predictive coding method, image predictive decoding device, image predictive decoding method
US20100119176A1 (en) * 2008-11-13 2010-05-13 Hideyuki Ichihashi Image processing apparatus, image processing method, and program
CN103177420A (en) * 2013-03-13 2013-06-26 北京大学 Image amplification method and image application device based on local-area feature correlations
CN103177451A (en) * 2013-04-17 2013-06-26 南京理工大学 Three-dimensional matching algorithm between adaptive window and weight based on picture edge
CN109982082A (en) * 2019-05-05 2019-07-05 山东大学深圳研究院 A kind of more distortion criterion Rate-distortion optimization methods of HEVC based on local grain characteristic
CN110246093A (en) * 2019-05-05 2019-09-17 北京大学 A kind of decoding image enchancing method
KR20200132682A (en) * 2019-05-16 2020-11-25 삼성전자주식회사 Image optimization method, apparatus, device and storage medium
WO2021151276A1 (en) * 2020-05-20 2021-08-05 平安科技(深圳)有限公司 Oct image-based image recognition method and apparatus, and device and storage medium
CN112634278A (en) * 2020-10-30 2021-04-09 上海大学 Superpixel-based just noticeable distortion model
CN113744235A (en) * 2021-08-30 2021-12-03 河南工业大学 A knee MRI reconstruction technique based on SC-GAN

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨宏成: "基于压缩传感理论的锥束CT断层图像重建算法研究", 《中国知网硕士学位论文全文数据库》, vol. 2014, no. 9, 15 September 2014 (2014-09-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023103715A1 (en) * 2021-12-10 2023-06-15 华为技术有限公司 Image processing method and apparatus, and electronic device

Also Published As

Publication number Publication date
WO2023103715A1 (en) 2023-06-15

Similar Documents

Publication Publication Date Title
CN113658051B (en) An image defogging method and system based on recurrent generative adversarial network
CN110689599B (en) 3D visual saliency prediction method based on non-local enhancement generation countermeasure network
US20210012093A1 (en) Method and apparatus for generating face rotation image
CN111340866B (en) Depth image generation method, device and storage medium
Lee et al. Local disparity estimation with three-moded cross census and advanced support weight
CN111079764B (en) Low-illumination license plate image recognition method and device based on deep learning
CN116109798B (en) Image data processing method, device, equipment and medium
CN112614070B (en) defogNet-based single image defogging method
CN111611934A (en) Face detection model generation and face detection method, device and equipment
CN114298922A (en) Image processing method, device and electronic device
CN115409755B (en) Map processing method and device, storage medium and electronic equipment
CN111784699B (en) Method and device for carrying out target segmentation on three-dimensional point cloud data and terminal equipment
CN107908998B (en) Two-dimensional code decoding method and device, terminal equipment and computer readable storage medium
CN111488810A (en) Face recognition method and device, terminal equipment and computer readable medium
CN113610958A (en) 3D image construction method and device based on style migration and terminal
CN117409144A (en) Reconstruction method, device, equipment, medium and program product of three-dimensional entity model
CN108986210B (en) Method and device for reconstructing three-dimensional scene
CN118333884A (en) Underwater image enhancement method and system based on feature learning and multidimensional replacement
CN115018753A (en) Projection-based point cloud quality evaluation method, device, equipment and storage medium
CN115359170B (en) Scene data generation method and device, electronic equipment and storage medium
Fahim et al. Enhancing single-view 3D mesh reconstruction with the aid of implicit surface learning
Zeng et al. Progressive feature fusion attention dense network for speckle noise removal in OCT images
CN112926543B (en) Image generation, three-dimensional model generation method, device, electronic device and medium
WO2023179710A1 (en) Coding method and terminal
CN114742873A (en) A three-dimensional reconstruction method, device and medium based on adaptive network

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