An image processing method, apparatus, electronic device, and storage medium

By selecting an appropriate denoising model based on the degree of image loss in compressed images and combining it with image feature recovery processing, the problem of image loss caused by image compression noise is solved, and image quality is improved.

CN115546037BActive Publication Date: 2025-10-28BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110737951.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2025-10-28
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

Existing image compression technologies result in image loss and introduce compression noise during transmission, thus affecting image quality.

Method used

By determining the degree of image loss in the compressed image, a target denoising model matching the degree of image loss is selected, and targeted denoising processing is performed on the compressed image, including the application of light and deep denoising models, combined with image feature restoration processing to improve image quality.

Benefits of technology

It effectively removes compression noise, preserves image details, and improves the image quality of compressed images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115546037B_ABST
    Figure CN115546037B_ABST
Patent Text Reader

Abstract

This disclosure provides an image processing method, apparatus, electronic device, and storage medium. The method includes: determining the degree of image loss in a compressed image; determining a target denoising model matching the degree of image loss, wherein the greater the degree of image loss, the greater the denoising amplitude of the target denoising model; and performing denoising processing on the compressed image using the target denoising model to remove compression noise from the compressed image. The image processing scheme provided by this disclosure enables targeted noise removal from compressed images with different degrees of image loss, thereby improving the image quality of the compressed image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of information technology, and in particular to an image processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Because images contain large amounts of data, compression techniques are typically used to compress them before transmission to save bandwidth and increase transmission speed. JPEG (Joint Photographic Experts Group) is one of the commonly used image compression technologies and standards.

[0003] However, image compression introduces varying degrees of image loss, known as compression noise, such as blockiness and ringing artifacts. The presence of compression noise affects image quality; therefore, to improve the quality of compressed images, it is necessary to remove compression noise through certain methods. Summary of the Invention

[0004] To solve the above-mentioned technical problems, or at least partially solve them, embodiments of this disclosure provide an image processing method, apparatus, electronic device, and storage medium that enables targeted noise removal of compressed images with different degrees of image loss, thereby improving the image quality of the compressed images.

[0005] In a first aspect, embodiments of this disclosure provide an image processing method, the method comprising:

[0006] Determine the degree of image loss in the compressed image;

[0007] Determine a target noise reduction model that matches the degree of image loss, wherein the greater the degree of image loss, the greater the noise reduction amplitude of the target noise reduction model;

[0008] The compressed image is denoised using the target denoising model to remove compression noise.

[0009] Secondly, embodiments of this disclosure also provide an image processing apparatus, the apparatus comprising:

[0010] The first determining module is used to determine the degree of image loss in the compressed image;

[0011] The second determining module is used to determine a target noise reduction model that matches the degree of image loss, wherein the greater the degree of image loss, the greater the noise reduction amplitude of the target noise reduction model;

[0012] The processing module is used to perform noise reduction processing on the compressed image using the target noise reduction model to remove compression noise from the compressed image.

[0013] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0014] One or more processors;

[0015] Storage device for storing one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.

[0017] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the image processing method described above.

[0018] Fifthly, embodiments of this disclosure also provide a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the image processing method described above.

[0019] The technical solution provided in this disclosure has at least the following advantages compared with the prior art:

[0020] The image processing method provided in this disclosure selects a target noise reduction model that matches the degree of image loss in the compressed image. The greater the degree of image loss, the greater the noise reduction amplitude of the target noise reduction model. This achieves targeted noise removal for compressed images with different degrees of image loss, thereby improving the image quality of the compressed image. Attached Figure Description

[0021] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0022] Figure 1 This is a flowchart of an image processing method according to an embodiment of the present disclosure;

[0023] Figure 2 This is a flowchart of another image processing method in an embodiment of this disclosure;

[0024] Figure 3 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure;

[0025] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. Detailed Implementation

[0026] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0027] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0028] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0029] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0030] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0031] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0032] Figure 1This is a flowchart of an image processing method according to an embodiment of the present disclosure. This image processing method is applicable to applications involving compression noise removal from compressed images obtained through compression processing, or in other words, the application of compression noise removal, aiming to improve the image quality of compressed images and minimize image loss caused by compression processing. This image processing method can be executed by an image processing device, which can be implemented in software and / or hardware. The device can be configured in a terminal device, such as a tablet computer, smartphone, PDA, wearable device with a display screen, desktop computer, laptop computer, all-in-one computer, smart home device, etc.

[0033] like Figure 1 As shown, the image processing method may specifically include the following steps:

[0034] Step 110: Determine the degree of image loss in the compressed image.

[0035] Image compression sacrifices image quality for file size. The smaller the compressed image file size, the more image information is lost, resulting in lower image quality. During a compression process, users can set the compressed image file size or a specific level of image quality loss based on their business needs. Lower loss levels generally result in higher quality compressed images, but typically also larger file sizes.

[0036] In one implementation, the degree of image loss can be determined based on the compression parameters of the compressed image. It is understood that when compressing the original image to obtain a compressed image, the corresponding degree of image loss is associated with and saved as compression parameters. The degree of image loss in the compressed image can be determined by obtaining its compression parameters. During a single compression process, the user can set appropriate compression parameters according to actual business needs.

[0037] In another implementation, determining the degree of image loss in a compressed image includes: inputting the compressed image into a trained regression model to obtain the degree of image loss. The regression model functions similarly to a scorer, used to score the degree of image loss in the compressed image. The training samples of the regression model include a third sample compressed image and the degree of image loss of that third sample compressed image. The third sample compressed image can be obtained by compressing the original image using image compression software according to a set degree of image loss. In other words, during the training phase, the input to the regression model is a compressed image with a degree of image loss of Q, and the ground truth is Q, where Q ranges from a set range, typically 0-100. Predicting the degree of image loss in a compressed image using a regression model yields highly accurate prediction results.

[0038] Step 120: Determine the target noise reduction model that matches the degree of image loss.

[0039] The greater the degree of image loss, the greater the noise reduction amplitude of the target noise reduction model, that is, the stronger the noise reduction capability of the target noise reduction model, and the more compression noise can be removed from the compressed image.

[0040] In one implementation, determining a target denoising model matching the degree of image loss includes: determining a target denoising model matching the degree of image loss of the compressed image based on a preset score range in which the degree of image loss falls. Specifically, if the degree of image loss of the compressed image is in a first score range, a trained mild denoising model is determined as the target denoising model; if the degree of image loss of the compressed image is in a second score range, a trained deep denoising model is determined as the target denoising model; wherein, the degree of image loss in the first score range is lower than the degree of image loss in the second score range, and the denoising amplitude of the mild denoising model is smaller than the denoising amplitude of the deep denoising model. For example, if the degree of image loss of the compressed image is in the score range of 0-40, the compressed image is considered a clear image with a low degree of image loss, therefore, no processing is performed on such compressed images. If the degree of image loss of the compressed image is in the score range of 40-80, the compressed image is considered a slightly degraded image, that is, the image loss caused by compression processing is not significant, therefore, the matching target denoising model can be determined as a mild denoising model. If the image loss of the compressed image falls within the score range of 80-100, it is considered a severely degraded image, meaning the image quality is significantly reduced due to compression. Therefore, the target denoising model can be determined as a deep denoising model. The training samples for the mild denoising model include a first sample compressed image with an image loss within the first score range and a corresponding first uncompressed original image. The first sample compressed image is obtained by compressing the first uncompressed original image. In other words, during the training phase, the input to the mild denoising model is the first sample compressed image with an image loss within the first score range, and the ground truth is the corresponding first uncompressed original image. For example, during the training phase, the input to the mild denoising model is a first sample compressed image with an image loss of Q, and the ground truth is the corresponding first uncompressed original image, i.e., the high-definition image before compression, where the image loss Q ranges from 40-80. The training samples of the deep noise reduction model include a second sample compressed image whose image loss level falls within the second score range and a second uncompressed original image corresponding to the second sample compressed image. The second sample compressed image is obtained by compressing the second uncompressed original image. During the training phase, the input of the deep noise reduction model is the second sample compressed image whose image loss level falls within the second score range, and the learning ground truth is the second uncompressed original image corresponding to the second sample compressed image.For example, during the training phase, the input to the deep denoising model is a low-quality image stored after a high-definition image is processed by a single JPEG compression (the degree of image loss in compression is Q). The ground truth is the high-definition image before compression, and the value of the image loss Q is in the range of 80-100.

[0041] In another implementation, for example, if the image loss level of the compressed image is 80, then the denoising model corresponding to 80 is determined as the target denoising model; if the image loss level of the compressed image is 70, then the denoising model corresponding to 70 is determined as the target denoising model; if the image loss level of the compressed image is 60, then the denoising model corresponding to 60 is determined as the target denoising model. That is, a corresponding denoising model is pre-trained for each specific image loss level, thereby further improving the denoising effect. It can be understood that if there is no pre-trained denoising model corresponding to the current image loss level, then the pre-trained denoising model corresponding to the value closest to the current image loss level is determined as the target denoising model matching the current image loss level. For example, there are already trained denoising models for compressed images with image loss levels of 70 and 80, respectively. However, the current image loss level is 69. Since there is no already trained denoising model corresponding to 69, the already trained denoising model corresponding to the image loss level of 70 (not the image loss level of 80) that is closest to 69 is determined as the target denoising model that matches the current image loss level of 69.

[0042] Step 130: Perform noise reduction processing on the compressed image using the target noise reduction model to remove compression noise from the compressed image.

[0043] It is understandable that compressing the original image will result in varying degrees of image loss, introducing compression noise such as ringing noise, mosquito noise, blockiness, and stair-step effects. To improve the image quality of compressed images, mild denoising models are used for images with slight loss (e.g., image loss below a threshold), while deep denoising models are used for images with severe loss (e.g., image loss above a threshold). By using denoising models with different denoising amplitudes for compressed images with varying degrees of loss, the goal of removing noise while preserving as much image detail as possible can be achieved. This is because images with slight loss often retain more image detail; if a deep denoising model is used, this retained detail will typically be treated as noise and removed, thus reducing the image quality. Conversely, for images with severe loss, a mild denoising model usually only removes some noise, failing to remove more, and similarly, cannot guarantee the image quality. Therefore, in the technical solution of this embodiment, denoising models with different denoising amplitudes are selected for denoising processing according to the degree of image loss of the compressed image. This not only removes more noise from the severely damaged compressed image, but also preserves the image details of the slightly damaged compressed image, thereby achieving the goal of improving the image quality of the compressed image.

[0044] The image processing method provided in this disclosure selects a target noise reduction model that matches the degree of image loss in the compressed image. The greater the degree of image loss, the greater the noise reduction amplitude of the target noise reduction model. This achieves targeted noise removal for compressed images with different degrees of image loss, thereby improving the image quality of the compressed image.

[0045] Figure 2This is a flowchart of another image processing method according to an embodiment of this disclosure. Based on the technical solutions of the above embodiments, in order to further improve the image quality of compressed images, if a mild denoising model is determined as the target denoising model, and the compressed image is denoised using the target denoising model, the technical solution of this embodiment adds the following step: performing image feature recovery processing on the processed image after denoising. This is because compressed images with slight loss often retain more image features, and during the denoising process of such compressed images, some image features are removed as noise. Therefore, in order to improve the image quality of compressed images, after denoising the compressed image using the target denoising model, a step of performing image feature recovery processing on the processed image after denoising is added to recover the image features that were removed as noise. The same or similar content can be referred to the explanations in the above embodiments, and will not be repeated in this embodiment.

[0046] like Figure 2 As shown, the image processing method includes the following steps:

[0047] Step 210: Determine the degree of image loss in the compressed image.

[0048] Step 220: Determine the mild noise reduction model as the target noise reduction model that matches the degree of image loss.

[0049] Step 230: Perform noise reduction processing on the compressed image using a mild noise reduction model to remove compression noise from the compressed image.

[0050] Step 240: Determine the image features that differ between the compressed image and the processed image obtained after noise reduction; supplement the processed image with the image features to obtain the target image.

[0051] In one implementation, the purpose of determining the image features that differ between the compressed image and the processed image is to identify the image features missing from the processed image compared to the compressed image, i.e., the image features lost during the denoising process in the compressed image. For example, the compressed image is labeled as img. A mild denoising model is used to denoise the compressed image img. The input of the mild denoising model is the compressed image img, and the output is the processed image res. Now, image feature recovery processing is performed on the processed image res. First, the difference between img and res is obtained, i.e., the difference between the pixel values ​​of corresponding pixels in the two images is calculated: diff = img - res. The essence of diff is the image features missing from the processed image res compared to the compressed image img. These image features are then added to the processed image to recover the image features missing from the compressed image in the processed image, thus obtaining the target image.

[0052] Furthermore, in one embodiment, supplementing the processed image with the image features to obtain the target image includes: determining the absolute value of the Laplacian edge value of the processed image; binarizing the absolute value of the Laplacian edge value; performing dilation based on the absolute value of the binarized Laplacian edge value, and obtaining a region mask by inversion to occlude the existing image features of the processed image; and determining the pixels of the target image by multiplying the pixels of the image features that differ between the compressed image and the processed image with the pixels of the region mask, and summing the product with the pixels of the processed image, to restore the image details of the processed image.

[0053] Specifically, the absolute value of the Laplacian edge value of the processed image is determined based on the following formula (1):

[0054] edge=abs(Laplacian(res,ksize))(1)

[0055] Where edge represents the absolute value of the Laplacian edge of the processed image res, abs() represents the function to take the absolute value, Laplacian(res,ksize) represents the Laplacian edge value of the processed image res obtained by the Laplacian edge operator, and ksize is a preset parameter.

[0056] Based on the following formula (2), the absolute value of the Laplacian edge value is binarized according to the set threshold:

[0057] edge<T]=0,edge[edge> =T]=1(2)

[0058] Where T represents the set threshold. If the absolute value of the Laplacian edge is less than T, the absolute value edge is set to 0; otherwise, the absolute value edge is set to 1.

[0059] The dilation process is performed based on the absolute value of the Laplacian edge value after binarization using the following formula (3), and a region mask is obtained by inverting the value to mask the existing image information of the processed image:

[0060] mask = 1 - cv2.dilate(edge)(3)

[0061] Here, mask represents a region mask, cv2.dilate(edge) represents dilation based on the absolute value of the Laplacian edge after binarization, to process discontinuous weak edges into continuous strong edges, 1-cv2.dilate(edge) represents the inversion operation to occlude existing image information, that is, to process existing image information as 0, and cv2.dilate() represents the function to perform dilation.

[0062] Based on the following formula (4), the pixels of the post-processed image are determined by multiplying the pixels of the image features and the pixels of the region mask, and summing them with the pixels of the processed image, so as to restore the image details of the processed image. The post-processed image is a compressed image with restored image details.

[0063] final_res = res + diff * mask(4)

[0064] Where res represents the processed image, final_res represents the target image, diff represents the pixel difference of image features between the compressed image img and the processed image res, and mask represents the region mask. The above formula (4) means to supplement the missing image features into the processed image res in order to restore the image detail information in the processed image res.

[0065] The absolute value of the Laplacian edge values ​​of the processed image.

[0066] The method provided in this disclosure, based on the technical solutions of the above embodiments, further improves the image quality of compressed images. If a mild denoising model is determined as the target denoising model, and the compressed image is denoised using the target denoising model, the technical solution of this embodiment adds the following step: performing image feature recovery processing on the processed image after denoising. This is because compressed images with slight loss often retain a lot of image detail information. However, during the denoising process of such compressed images, some image detail information is removed as noise. Therefore, to improve the image quality of compressed images, after denoising the compressed image using the target denoising model, a step of performing image feature recovery processing on the processed image after denoising is added to recover the image detail information that was removed as noise.

[0067] Figure 3 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of this disclosure. The apparatus provided in this embodiment can be configured in a terminal device. Figure 3As shown, the device specifically includes: a first determining module 310, a second determining module 320, and a processing module 330.

[0068] The first determining module 310 is used to determine the degree of image loss in the compressed image; the second determining module 320 is used to determine a target denoising model that matches the degree of image loss, wherein the greater the degree of image loss, the greater the denoising amplitude of the target denoising model; and the processing module 330 is used to perform denoising processing on the compressed image through the target denoising model to remove the compression noise of the compressed image.

[0069] Optionally, the second determining module 320 includes: a first determining unit, used to determine a target noise reduction model that matches the degree of image loss based on a preset score range in which the degree of image loss of the compressed image is located.

[0070] Optionally, the first determining unit is specifically used to: if the image loss of the compressed image is in a first score range, then determine the trained light denoising model as the target denoising model; if the image loss of the compressed image is in a second score range, then determine the trained deep denoising model as the target denoising model; wherein the image loss in the first score range is lower than the image loss in the second score range.

[0071] Optionally, the training samples of the mild denoising model include a first sample compressed image whose image loss level is in the first score range and a first uncompressed original image corresponding to the first sample compressed image, wherein the first sample compressed image is obtained by compressing the first uncompressed original image; the training samples of the deep denoising model include a second sample compressed image whose image loss level is in the second score range and a second uncompressed original image corresponding to the second sample compressed image, wherein the second sample compressed image is obtained by compressing the second uncompressed original image.

[0072] Optionally, the apparatus further includes: a third determining module, configured to determine the image features that differ between the compressed image and the processed image obtained after denoising the compressed image using a mild denoising model; and a supplementing module, configured to supplement the processed image with the image features to obtain the target image.

[0073] Optionally, the supplementary module includes:

[0074] The determining unit is used to determine the absolute value of the Laplacian edge value of the processed image based on the following formula (1):

[0075] edge=abs(Laplacian(res,ksize))(1)

[0076] Where edge represents the absolute value of the Laplacian edge of the processed image res, abs() represents the function to take the absolute value, Laplacian(res,ksize) represents the Laplacian edge value of the processed image res obtained by the Laplacian edge operator, and ksize is a preset parameter.

[0077] The binarization processing unit is used to binarize the absolute value of the Laplacian edge value according to a set threshold based on the following formula (2):

[0078] edge<T]=0,edge[edge> =T]=1(2)

[0079] Where T represents the set threshold. If the absolute value of the Laplacian edge value edge is less than T, the absolute value edge is set to 0; otherwise, the absolute value edge is set to 1.

[0080] The dilation processing unit is used to perform dilation processing based on the absolute value of the binarized Laplacian edge value using the following formula (3), and to obtain a region mask by inverting the value, so as to occlude the existing image information of the processed image:

[0081] mask = 1 - cv2.dilate(edge)(3)

[0082] Here, mask represents the region mask, cv2.dilate(edge) represents dilation based on the absolute value edge of the binarized Laplacian edge, 1-cv2.dilate(edge) represents the inversion operation, and cv2.dilate() represents the function to perform dilation.

[0083] The recovery unit is used to determine the pixels of the target image based on the following formula (4), using the product of the pixels of the image features and the pixels of the region mask, and the sum of the pixels of the processed image:

[0084] final_res = res + diff * mask(4)

[0085] Where res represents the processed image, final_res represents the target image, diff represents the pixel points of the image features, and mask represents the region mask.

[0086] Optionally, the first determining module 310 is specifically used to: input the compressed image into a trained regression model to obtain the degree of image loss of the compressed image.

[0087] Optionally, the training samples of the regression model include a third sample compressed image and the degree of image loss of the third sample compressed image.

[0088] The image processing apparatus provided in this disclosure improves the image quality of compressed images by selecting a target noise reduction model that matches the degree of image loss of the compressed image.

[0089] The apparatus provided in this disclosure embodiment can execute the method steps provided in this disclosure method embodiment, and its beneficial effects will not be elaborated here.

[0090] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 4 The diagram illustrates a structural schematic suitable for implementing the electronic device 500 in the embodiments of this disclosure. The electronic device 500 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0091] like Figure 4 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 501, which can perform various appropriate actions and processes to implement the methods of the embodiments described herein, based on a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing device 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0092] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0093] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the methods as described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0094] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0095] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0096] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0097] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0098] Determine the degree of image loss in the compressed image;

[0099] Determine a target noise reduction model that matches the degree of image loss, wherein the greater the degree of image loss, the greater the noise reduction amplitude of the target noise reduction model;

[0100] The compressed image is denoised using the target denoising model to remove compression noise.

[0101] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also perform other steps described in the above embodiments.

[0102] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0104] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0105] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0106] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0107] According to one or more embodiments of this disclosure, an image processing method is provided, comprising: determining the degree of image loss of a compressed image; determining a target noise reduction model matching the degree of image loss; and performing noise reduction processing on the compressed image using the target noise reduction model to remove compression noise from the compressed image.

[0108] According to one or more embodiments of this disclosure, in the image processing method provided in the embodiments of this disclosure, optionally, determining the target noise reduction model that matches the degree of image loss includes: determining the target noise reduction model that matches the degree of image loss based on a preset score range in which the degree of image loss of the compressed image is located.

[0109] According to one or more embodiments of this disclosure, in the image processing method provided in the embodiments of this disclosure, optionally, determining a target denoising model matching the degree of image loss based on a preset score range in which the image loss degree of the compressed image is located includes: if the image loss degree of the compressed image is in a first score range, then determining a trained light denoising model as the target denoising model; if the image loss degree of the compressed image is in a second score range, then determining a trained deep denoising model as the target denoising model; wherein, the image loss degree in the first score range is lower than the image loss degree in the second score range, and the denoising amplitude of the light denoising model is smaller than the denoising amplitude of the deep denoising model.

[0110] According to one or more embodiments of this disclosure, in the image processing method provided in the embodiments of this disclosure, optionally, the training samples of the mild denoising model include a first sample compressed image whose image loss level is in the first score range and a first uncompressed original image corresponding to the first sample compressed image, wherein the first sample compressed image is obtained by compressing the first uncompressed original image; the training samples of the deep denoising model include a second sample compressed image whose image loss level is in the second score range and a second uncompressed original image corresponding to the second sample compressed image, wherein the second sample compressed image is obtained by compressing the second uncompressed original image.

[0111] According to one or more embodiments of this disclosure, in the image processing method provided in the embodiments of this disclosure, optionally, if a mild denoising model is determined to be the target denoising model, after denoising the compressed image through the target denoising model, the method further includes: determining the image features that differ between the compressed image and the processed image obtained after denoising; supplementing the processed image with the image features to obtain the target image.

[0112] According to one or more embodiments of this disclosure, in the method provided in this disclosure, optionally, the step of supplementing the image features to the processed image to obtain a target image includes: determining the absolute value of the Laplacian edge value of the processed image; performing binarization processing on the absolute value of the Laplacian edge value according to a set threshold; performing dilation processing based on the absolute value of the binarized Laplacian edge value, and obtaining a region mask by inverting the value to occlude the existing image features of the processed image; and determining each pixel of the target image by multiplying the pixel of the image feature with the pixel of the region mask and summing the product with each pixel of the processed image.

[0113] According to one or more embodiments of this disclosure, in the method provided in this disclosure, optionally, determining the degree of image loss of the compressed image includes: inputting the compressed image into a trained regression model to obtain the degree of image loss of the compressed image.

[0114] According to one or more embodiments of this disclosure, in the method provided in this disclosure, optionally, the training samples of the regression model include a third sample compressed image and the image loss degree of the third sample compressed image.

[0115] According to one or more embodiments of this disclosure, an image processing apparatus is provided, comprising: a first determining module for determining the degree of image loss of a compressed image; a second determining module for determining a target denoising model matching the degree of image loss, wherein the greater the degree of image loss, the greater the denoising amplitude of the target denoising model; and a processing module for performing denoising processing on the compressed image using the target denoising model to remove compression noise from the compressed image.

[0116] According to one or more embodiments of this disclosure, in an image processing apparatus provided by an embodiment of this disclosure, optionally, the second determining module includes: a first determining unit, configured to determine a target noise reduction model matching the degree of image loss based on a preset score range in which the degree of image loss of the compressed image is located.

[0117] According to one or more embodiments of this disclosure, in an image processing apparatus provided by an embodiment of this disclosure, optionally, the first determining unit is specifically configured to: if the image loss degree of the compressed image is in a first score range, then determine a trained light denoising model as the target denoising model; if the image loss degree of the compressed image is in a second score range, then determine a trained deep denoising model as the target denoising model; wherein, the image loss degree in the first score range is lower than the image loss degree in the second score range, and the denoising amplitude of the light denoising model is less than the denoising amplitude of the deep denoising model.

[0118] According to one or more embodiments of this disclosure, in an image processing apparatus provided by an embodiment of this disclosure, optionally, the training samples of the mild denoising model include a first sample compressed image whose image loss level is in the first score range and a first uncompressed original image corresponding to the first sample compressed image, wherein the first sample compressed image is obtained by compressing the first uncompressed original image; the training samples of the deep denoising model include a second sample compressed image whose image loss level is in the second score range and a second uncompressed original image corresponding to the second sample compressed image, wherein the second sample compressed image is obtained by compressing the second uncompressed original image.

[0119] According to one or more embodiments of the present disclosure, in an image processing apparatus provided in an embodiment of the present disclosure, optionally, the apparatus further includes: a third determining unit, configured to determine the image features that differ between the compressed image and the processed image obtained after noise reduction processing; and a supplementing module, configured to supplement the processed image with the image features to obtain a target image.

[0120] According to one or more embodiments of this disclosure, in an image processing apparatus provided in an embodiment of this disclosure, optionally, the supplementary module includes: a determining unit, configured to determine the absolute value of the Laplacian edge value of the processed image; a binarization processing unit, configured to perform binarization processing on the absolute value of the Laplacian edge value based on the following formula (2) and a set threshold; a dilation processing unit, configured to perform dilation processing based on the absolute value of the binarized Laplacian edge value, and obtain a region mask by inversion operation to occlude the existing image information of the processed image; and a restoration unit, configured to determine each pixel of the target image by using the product of the pixel of the image feature and the pixel of the region mask, and the sum of each pixel of the processed image.

[0121] According to one or more embodiments of this disclosure, in an image processing apparatus provided in an embodiment of this disclosure, optionally, the first determining module is specifically used to: input the compressed image into a trained regression model to obtain the degree of image loss of the compressed image.

[0122] According to one or more embodiments of this disclosure, in an image processing apparatus provided in an embodiment of this disclosure, optionally, the training samples of the regression model include a third sample compressed image and the image loss degree of the third sample compressed image.

[0123] According to one or more embodiments of this disclosure, an electronic device is provided, comprising:

[0124] One or more processors;

[0125] Memory, used to store one or more programs;

[0126] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the image processing methods provided in this disclosure.

[0127] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements an image processing method as described in any of the present disclosure.

[0128] This disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the image processing method described above.

[0129] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0130] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0131] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. An image processing method, characterized in that, The method includes: Determine the degree of image loss in the compressed image; wherein the degree of image loss characterizes the image quality lost during image compression; Based on the preset score range of the image loss degree of the compressed image, a target noise reduction model matching the image loss degree is determined. The greater the image loss degree, the greater the noise reduction amplitude of the target noise reduction model for the compressed noise. The target noise reduction model includes a mild noise reduction model or a deep noise reduction model. The compressed image is denoised using the target denoising model to remove compression noise from the compressed image. If the mild denoising model is determined to be the target denoising model, the image features that differ between the compressed image and the processed image obtained after denoising are determined. The image features are added to the processed image to obtain the target image.

2. The method according to claim 1, characterized in that, The step of determining a target noise reduction model that matches the degree of image loss based on a preset score range of the compressed image's image loss includes: If the image loss of the compressed image is within the first score range, then the trained mild denoising model is determined as the target denoising model. If the image loss of the compressed image is within the second score range, then the trained deep denoising model is determined as the target denoising model. The image loss in the first score range is less than that in the second score range, and the noise reduction amplitude of the mild noise reduction model is less than that of the deep noise reduction model.

3. The method according to claim 2, characterized in that, The training samples of the mild noise reduction model include a first sample compressed image with a loss level in the first score range and a first uncompressed original image corresponding to the first sample compressed image. The first sample compressed image is obtained by compressing the first uncompressed original image. The training samples of the deep noise reduction model include a second sample compressed image whose image loss level is in the second score range and a second uncompressed original image corresponding to the second sample compressed image. The second sample compressed image is obtained by compressing the second uncompressed original image.

4. The method according to claim 1, characterized in that, The step of supplementing the processed image with the image features to obtain the target image includes: Determine the absolute value of the Laplacian edge value of the processed image; The absolute values ​​of the Laplacian edge values ​​are binarized according to a set threshold. Dilation is performed based on the absolute value of the Laplacian edge value after binarization, and a region mask is obtained by inverting the value to occlude the existing image features of the processed image. The pixels of the target image are determined by multiplying the pixel values ​​of the image features that differ between the compressed image and the processed image with the pixel values ​​of the region mask, and summing these with the pixel values ​​of the processed image.

5. The method according to any one of claims 1-4, characterized in that, Determining the degree of image loss in a compressed image includes: The compressed image is input into a trained regression model to obtain the degree of image loss in the compressed image.

6. The method according to claim 5, characterized in that, The training samples for the regression model include a third sample compressed image and the degree of image loss of the third sample compressed image.

7. An image processing apparatus, characterized in that, include: The first determining module is used to determine the degree of image loss in the compressed image; wherein, the degree of image loss characterizes the image quality lost during image compression; The second determining module is used to determine a target noise reduction model that matches the degree of image loss based on a preset score range in which the degree of image loss of the compressed image is located. The greater the degree of image loss, the greater the noise reduction effect of the target noise reduction model on the compressed noise. The target noise reduction model includes a mild noise reduction model or a deep noise reduction model. The processing module is used to perform noise reduction processing on the compressed image using the target noise reduction model to remove compression noise from the compressed image; The third determining module is used to determine the image features that differ between the compressed image and the processed image obtained after denoising if the mild denoising model is determined to be the target denoising model. The supplementary module is used to supplement the image features into the processed image to obtain the target image.

8. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the image processing method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Computer cross-sectional image processing method and device

    CN106875342A

  • Pre-analysis and tool self-adaption method for video recovery task

    CN111369477A