WO2021109867A1 - Image processing method and apparatus, computer readable storage medium and electronic device - Google Patents

Image processing method and apparatus, computer readable storage medium and electronic device Download PDF

Info

Publication number
WO2021109867A1
WO2021109867A1 PCT/CN2020/129437 CN2020129437W WO2021109867A1 WO 2021109867 A1 WO2021109867 A1 WO 2021109867A1 CN 2020129437 W CN2020129437 W CN 2020129437W WO 2021109867 A1 WO2021109867 A1 WO 2021109867A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
intermediate image
processed
noise
image processing
Prior art date
Application number
PCT/CN2020/129437
Other languages
French (fr)
Chinese (zh)
Inventor
陈曦
Original Assignee
RealMe重庆移动通信有限公司
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 RealMe重庆移动通信有限公司 filed Critical RealMe重庆移动通信有限公司
Publication of WO2021109867A1 publication Critical patent/WO2021109867A1/en

Links

Images

Classifications

    • G06T5/70

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular, to an image processing method, an image processing device, a computer-readable medium, and an electronic device.
  • Integrating high-pixel sensors on mobile terminals has become a trend in the development of mobile terminals.
  • the total number of pixels of the sensor has doubled.
  • the increase in the actual photosensitive size of the sensor is limited. This has caused the problem of increasing pixel density and weakening of the signal received by each pixel and the more serious electronic crosstalk.
  • the output image has more noise and low signal-to-noise ratio, which severely limits high-pixel sensors.
  • an image processing method including: acquiring an image to be processed, and performing an iterative process using the image to be processed until the similarity between the first intermediate image and the second intermediate image is greater than the similarity Up to the threshold, the first intermediate image and the second intermediate image are both images generated in the denoising process of the image to be processed; after the iterative process is ended, the first intermediate image or the second intermediate image is output as the image corresponding to the image to be processed The processed image; wherein, the iterative process includes: based on the objective function, the second intermediate image is determined using the image to be processed and the first intermediate image; the third intermediate image is determined using the noise estimation model and the second intermediate image; the third intermediate image is determined by the noise estimation model and the second intermediate image.
  • the image serves as the first intermediate image.
  • an image processing device including: an image denoising module for acquiring an image to be processed, and using the image to be processed to perform an iterative process until the difference between the first intermediate image and the second intermediate image Until the similarity between the two is greater than the similarity threshold, the first intermediate image and the second intermediate image are both images generated in the denoising process of the image to be processed; the image output module is used to output the first intermediate image after the iterative process is completed Or the second intermediate image, as the processed image corresponding to the image to be processed; wherein, the iterative process includes: based on the objective function, the second intermediate image is determined by using the image to be processed and the first intermediate image; and the noise estimation model and the first intermediate image are used to determine the second intermediate image.
  • the second intermediate image determines the third intermediate image; the third intermediate image is used as the first intermediate image.
  • a computer-readable medium on which a computer program is stored, and the computer program is executed by a processor to implement the above-mentioned image processing method.
  • an electronic device including: one or more processors; a storage device, for storing one or more programs, when one or more programs are executed by one or more processors , Enabling one or more processors to implement the above-mentioned image processing method.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture of an image processing method or image processing apparatus to which an embodiment of the present disclosure can be applied;
  • FIG. 2 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure
  • FIG. 3 shows a schematic diagram of a process of determining an optimal solution after introducing auxiliary variables according to an exemplary embodiment of the present disclosure
  • Fig. 4 schematically shows a flowchart of an image processing method according to an exemplary embodiment of the present disclosure
  • FIG. 5 schematically shows a flowchart of an iterative process according to an exemplary embodiment of the present disclosure
  • Fig. 6 shows a schematic structural diagram of a noise estimation model according to an exemplary embodiment of the present disclosure
  • FIG. 7 shows a schematic diagram of visualized iterative processing according to an exemplary embodiment of the present disclosure
  • FIG. 8 schematically shows a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure
  • FIG. 9 schematically shows a block diagram of an image processing apparatus according to another exemplary embodiment of the present disclosure.
  • FIG. 10 schematically shows a block diagram of an image processing apparatus according to another exemplary embodiment of the present disclosure.
  • FIG. 11 schematically shows a block diagram of an image processing apparatus according to still another exemplary embodiment of the present disclosure.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture of an image processing method or image processing apparatus to which an embodiment of the present disclosure can be applied.
  • the system architecture 1000 may include one or more of terminal devices 1001, 1002, 1003, a network 1004 and a server 1005.
  • the network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005.
  • the network 1004 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
  • the numbers of terminal devices, networks, and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks, and servers according to implementation needs.
  • the server 1005 may be a server cluster composed of multiple servers.
  • the user can use the terminal devices 1001, 1002, 1003 to interact with the server 1005 through the network 1004 to receive or send messages and so on.
  • the terminal devices 1001, 1002, 1003 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and so on.
  • the terminal device 1001, 1002, 1003 may obtain the image to be processed. Specifically, the image captured by the terminal device 1001, 1002, 1003 through its camera module may be used as the image to be processed. Next, the terminal device 1001, 1002, 1003 may perform the following iterative process until the similarity between the first intermediate image and the second intermediate image associated with the image to be processed is less than the similarity threshold, and the iterative process ends After that, the first intermediate image or the second intermediate image is used as the processed image.
  • the iterative process may include: the first step is to substitute the image to be processed and the first intermediate image into a pre-configured objective function to determine the second intermediate image; the second step is to use the noise estimation model and the second intermediate image The third intermediate image is determined, and the third intermediate image is used as the first intermediate image to update the first intermediate image. Therefore, the first and second steps above are repeated continuously to realize the iterative process.
  • a machine learning model such as a convolutional neural network
  • the training process of the noise estimation model can be performed by the server 1005.
  • the server 1005 transmits the trained model parameters to the terminal devices 1001, 1002, 1003 through the network 1004. , Thus better solve the problem of insufficient processing capacity of the terminal equipment 1001, 1002, 1003.
  • the main steps of the image processing method involved in the present disclosure may also be executed by the server 1005.
  • the terminal devices 1001, 1002, and 1003 send the image taken by the camera module to the server 1005 via the network 1004, and the image is the image to be processed.
  • the server 1005 uses the image to be processed to perform the above iterative process until the first intermediate image The similarity with the second intermediate image is greater than the similarity threshold. After the iterative process is over, the first intermediate image or the second intermediate image is used as the processed image, and the determined processed image is sent to the terminal devices 1001, 1002, 1003 through the network 1004, so that the user can view the denoised Image.
  • the image processing method of the exemplary embodiment of the present disclosure is generally executed by the terminal device 1001, 1002, 1003, and specifically, is usually executed by a mobile terminal such as a mobile phone.
  • the image processing apparatus described below is generally configured in the terminal equipment 1001, 1002, 1003.
  • Fig. 2 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an exemplary embodiment of the present disclosure.
  • This electronic device corresponds to a terminal device that executes the image processing method of the exemplary embodiment of the present disclosure.
  • the computer system 200 includes a central processing unit (CPU) 201, which can be based on a program stored in a read-only memory (ROM) 202 or a program loaded from a storage portion 208 into a random access memory (RAM) 203 And perform various appropriate actions and processing.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data required for system operation are also stored.
  • the CPU 201, the ROM 202, and the RAM 203 are connected to each other through a bus 204.
  • An input/output (I/O) interface 205 is also connected to the bus 204.
  • the following components are connected to the I/O interface 205: the input part 206 including keyboard, mouse, touch screen, etc.; including the output part 207 such as cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers; including hard disk, etc.
  • the communication section 209 performs communication processing via a network such as the Internet.
  • the drive 210 is also connected to the I/O interface 205 as needed.
  • a removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed, so that the computer program read from it is installed into the storage section 208 as needed.
  • the system structure may also include a camera module. Specifically, it may include dual-camera, triple-camera, quad-camera, etc., to enrich shooting modes to meet the needs of different shooting scenes.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication section 209, and/or installed from the removable medium 211.
  • CPU central processing unit
  • various functions defined in the system of the present application are executed.
  • the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable 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 of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more for realizing the specified logic function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by It is realized by a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present disclosure may be implemented in software or hardware, and the described units may also be provided in a processor. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • this application also provides a computer-readable medium.
  • the computer-readable medium may be included in the electronic device described in the above-mentioned embodiments; or it may exist alone without being assembled into the electronic device. in.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by an electronic device, the electronic device realizes the method described in the following embodiments.
  • machine learning models are used to estimate noise.
  • this method can be used to fit a more complex noise model to achieve a better processing effect, and the processing time is short.
  • the processing effect of this method is heavily dependent on the sample size and conditions in the model training process.
  • the image denoising problem can be considered as the main branch of the image restoration field.
  • the image denoising can be represented by a degradation model, which can be represented by Formula 1. :
  • y represents the image before denoising
  • x represents the image after denoising
  • H represents the identity matrix
  • n represents additive white Gaussian noise with a standard deviation of ⁇ .
  • represents the regularization parameter, which is used to measure the importance of the former constraint and the latter constraint. If ⁇ is larger, it means that the latter item in the entire constraint is more important. If ⁇ is smaller (for example, much less than two One part), it means that the previous constraint is more important.
  • ⁇ (x) is a general representation of the prior distribution of the signal. It represents a pre-judgmental constraint on the signal distribution. For example, it can be a constraint on the gradient, a constraint on the space, or Constraints in the frequency domain are not limited in this disclosure.
  • the function corresponding to Formula 3 may be referred to as an intermediate function.
  • It is also called the fidelity term, and ⁇ (x) can be called the regularization term.
  • formula 3 some time-consuming iterative optimization algorithms can be used to approximate the optimal solution.
  • the solution process is to obtain a set of prior parameters ⁇ , this set of prior parameters ⁇ are related parameters of the loss function to be optimized, by using a large-capacity training set with a one-to-one correspondence between a noise image and a noiseless image To determine the best parameters that meet the corresponding relationship between the two Use this loss function to estimate the noise-free image corresponding to the noise image. Therefore, for the model learning method, formula 3 can be rewritten as formula 4:
  • the HQS Half Quadratic Splitting
  • the present disclosure introduces an auxiliary variable (that is, a direction different from the direction of x), and approaches the optimal solution from two directions by continuously iterating the auxiliary variable and x. It should be understood that these two directions are similar to each other.
  • u represents a regularization parameter, which is used to represent the importance of the constraint item, and is a constraint to ensure that x and z are similar.
  • This processing strategy can be understood as a process of exploring "downhill”. As shown in Figure 3, although it is not known from which direction from the initial point to find the optimal solution, it is known that there are two directions from which to approach the optimal solution (minimum objective function).
  • Equation 7 For (i) of formula 7, it can be solved by the way of finding the extreme value of the quadratic term. As for (ii) of formula 7, it returns to the solution of a standard statistical model, and the solution of this equation depends on the prior situation. The previous method of solving this problem believes that a certain transform domain dimension of z (frequency domain, difference domain, etc.) has certain sparse characteristics. However, the noise is not sparse, so (ii) in Equation 7 can be transformed into a formula 8:
  • exemplary embodiments of the present disclosure provide a new image processing method.
  • FIG. 4 schematically shows a flowchart of an image processing method of an exemplary embodiment of the present disclosure.
  • the image processing method may include the following steps:
  • the image to be processed may be an image taken by a camera module of a terminal device, or may be an image obtained from another terminal device or the network.
  • the image to be processed may also be any image to be denoised in the video.
  • the present disclosure does not limit the source, size, shooting scene, etc. of the image to be processed.
  • the terminal device After acquiring the image to be processed, the terminal device can use the image to be processed to perform an iterative process.
  • the iterative process involved in the present disclosure will be described below with reference to steps S52 to S56 in FIG. 5.
  • step S52 based on the objective function, the second intermediate image is determined using the image to be processed and the first intermediate image.
  • steps S52 to S56 only describe one iteration process.
  • the process of initializing the first intermediate image is included.
  • the image to be processed may be filtered to obtain the initialized first intermediate image, which is used as the first intermediate image to perform the iterative process for the first time.
  • a high-pass filter, a low-pass filter, or a combination thereof may be used. To achieve the above filtering process.
  • the second intermediate image can be determined using the image to be processed and the first intermediate image.
  • the second intermediate image may be determined based on an objective function.
  • the objective function for the exemplary embodiment of the present disclosure corresponds to (i) in Equation 7 above. That is to say, according to the exemplary embodiment of the present disclosure, firstly, an intermediate function (see formula 3) can be constructed based on the degradation model of image restoration (see formula 1); next, the fidelity of the intermediate function can be determined by the auxiliary variable z. The term is decoupled from the regularization term to determine (i) in Equation 7.
  • the auxiliary variable corresponds to the first intermediate image, that is, the auxiliary variable z can reflect all the information of the first intermediate image.
  • the second intermediate image can be used as the second intermediate image in the exemplary embodiment of the present disclosure.
  • I is the identity matrix.
  • the second intermediate image x k+1 can be determined if the first intermediate image z k is known.
  • step S54 a third intermediate image is determined using the noise estimation model and the second intermediate image.
  • the noise estimation model may be a model based on a convolutional neural network.
  • Figure 6 schematically shows the network structure of the model.
  • the model can be a 7-layer convolutional neural network, including a first layer 61, a second layer 62, a third layer 63, a fourth layer 64, and a fifth layer. 65.
  • the network structure can be constructed based on dilated convolution, for example, the first layer 61 is composed of dilated convolution units and modified linear units (ReLU), the second layer 62, the third layer 63, the fourth layer 64, and the fifth layer 65.
  • the sixth layer 66 is composed of an expanded convolution unit, a batch normalization unit (BN), and a modified linear unit (ReLU), and the seventh layer 67 is composed of an expanded convolution unit.
  • the size of the sensor of the expanded convolution unit in the first layer 61 is 3 ⁇ 3, that is, the size of the convolution kernel is 3 ⁇ 3.
  • the corresponding sensor size of each layer is (2s+1)*(2s+1), where s It is the coefficient of expansion. From this, the size of the susceptor of each layer can be determined to be 3 ⁇ 3, 5 ⁇ 5, 7 ⁇ 7, 9 ⁇ 9, 7 ⁇ 7, 5 ⁇ 5, 3 ⁇ 3, respectively.
  • the dimension of each layer can be set to 64, that is, the number of feature maps (feature maps) of each layer is set to 64.
  • Using a convolutional neural network based on dilated convolution as the noise estimation model in the present disclosure can obtain semantic information more effectively, thereby ensuring the accuracy of the denoising result.
  • the model training process can be performed on the server in advance.
  • the server can obtain the training set.
  • the training set may include multiple noise images and denoising images corresponding to each noise image, and the difference in noise intensity between each noise image is within a difference threshold, where the difference threshold can be set by the developer according to pre-conducted experiments.
  • the difference threshold can be set by the developer according to pre-conducted experiments.
  • the noise level of each noise image in the training set is consistent, which is convenient to improve the training effect.
  • the images in the training set can be used to train the noise estimation model to obtain the trained model.
  • the noise image is input into the convolutional neural network.
  • the output of the convolutional neural network is the image corresponding to the noise image.
  • the training output image corresponding to the noise image and the corresponding denoising image can be used to calculate the loss function. The above process is performed by continuously inputting samples to minimize the loss function to complete the training process of the convolutional neural network.
  • the server can send the parameter information of the model to the terminal device so that the terminal device can use the noise estimation model to perform an iterative process.
  • server for model training solves the problem of insufficient processing capacity of terminal equipment.
  • the training process of the model can also be performed in the above-mentioned terminal device, which is not limited in the present disclosure.
  • the terminal device may input the second intermediate image determined in step S52 into the trained noise estimation model to determine the noise estimation value corresponding to the second intermediate image.
  • the third intermediate image can be determined based on the second intermediate image and its noise estimate.
  • formula 11 may be used to determine the third intermediate image:
  • f(x k+1 ; ⁇ ) represents the noise estimation value for the second intermediate image
  • here represents the model parameter
  • step S56 the third intermediate image is used as the first intermediate image to realize the update of the first intermediate image.
  • steps S52 to S56 are repeatedly executed in this way, and during the execution process, the similarity between the first intermediate image and the second intermediate image is continuously determined until the similarity between the first intermediate image and the second intermediate image is determined
  • the iterative process ends until the degree is greater than the similarity threshold.
  • the similarity threshold can be set by the developer according to the result of the experiment, which is not limited in the present disclosure. In the case where the similarity between the first intermediate image and the second intermediate image is greater than the similarity threshold, it can be considered that an optimal solution has been found, and the optimal solution is the denoised image.
  • step S52 to step S56 performed by the terminal device, each time the iterative process is executed, the model parameters are updated, and the updated parameters are used to execute the next iterative process. That is to say, during the iterative process, the parameters of the noise estimation model will change to ensure that the iterative process of formula 7 (1) and formula 11 is used to continuously approach the optimal solution.
  • the foregoing determines whether the iterative process is over by the similarity between the first intermediate image and the second intermediate image. It is easy to understand that when the difference between the first intermediate image and the second intermediate image is small, the iterative process ends. .
  • the index of image difference can also be used to determine whether the iterative process is over. For example, when the image difference between the first intermediate image and the second intermediate image is less than a preset threshold, the iteration can be determined The process is over.
  • the terminal device may output the first intermediate image or the second intermediate image As the processed image corresponding to the image to be processed.
  • a similarity determination process is performed. For example, after the first intermediate image is updated, if the similarity between the first intermediate image and the second intermediate image is less than the similarity threshold, the first intermediate image is output as the processed image. For another example, after the second intermediate image is updated, if the similarity between the first intermediate image and the second intermediate image is less than the similarity threshold, the second intermediate image is output as the processed image.
  • the processed image output can be directly saved to the terminal, and can also be displayed for the user to view.
  • the above process of implementing image denoising can be understood as: “going down” from the starting point, walking on one foot (solving the noise-free image directly) is difficult and the local optimum is prone to occur. In this case, another foot is introduced (the auxiliary variable z, which is the first intermediate image above), and the whole process becomes a two-step solution.
  • the exemplary embodiment of the present disclosure may be solved by using a convolutional neural network. It should also be noted that the whole process is constrained by
  • the present disclosure Based on the image processing method of the exemplary embodiment of the present disclosure, on the one hand, the present disclosure combines a noise estimation model to complete the iterative process. Compared with some technologies that only use regularization constraints to continuously optimize the iterative process, the complexity is greatly reduced. While better denoising effects can be obtained, the time-consuming is short; on the other hand, the solution of the present disclosure can effectively remove image noise, so that the high-pixel camera module can be used in low-light environments, greatly expanding the high-pixel camera model The application scenario of the group; on the other hand, the disclosed solution does not require auxiliary tools or hardware changes, and is easy to implement.
  • an image processing device is also provided in this exemplary embodiment.
  • FIG. 8 schematically shows a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure.
  • the image processing device 8 may include an image denoising module 81 and an image output module 83.
  • the image denoising module 81 may be used to obtain the image to be processed, and use the image to be processed to perform an iterative process until the similarity between the first intermediate image and the second intermediate image is greater than the similarity threshold, the first intermediate image
  • Both the second intermediate image and the second intermediate image are images generated during the denoising process of the image to be processed; the iterative process includes: based on the objective function, the second intermediate image is determined by using the image to be processed and the first intermediate image; and the noise estimation model is used And the second intermediate image determine the third intermediate image; the third intermediate image is used as the first intermediate image.
  • the image output module 83 may be used to output the first intermediate image or the second intermediate image as the processed image corresponding to the image to be processed after the iterative process is ended.
  • the present disclosure combines a noise estimation model to complete the iterative processing process. Compared with the process of continuous optimization and iteration that only uses regularization constraints in some technologies, the complexity is greatly reduced. While it is possible to obtain a better denoising effect, it takes a short time; on the other hand, the solution of the present disclosure can effectively remove image noise, so that the high-pixel camera module can be used in a low-light environment, greatly expanding the high-pixel camera model The application scenario of the group; on the other hand, the disclosed solution does not require auxiliary tools or hardware changes, and is easy to implement.
  • the process of determining the third intermediate image by the image denoising module 81 using the noise estimation model and the second intermediate image may be configured to execute: input the second intermediate image into the noise estimation model, and determine the difference between the second intermediate image and the second intermediate image.
  • the noise estimation value corresponding to the intermediate image; the third intermediate image is determined according to the second intermediate image and the noise estimation value.
  • the image processing device 9 may further include a model training module 91.
  • the model training module 91 may be configured to execute: obtain a training set; wherein the training set includes multiple noise images and denoised images corresponding to each noise image, and the noise intensity difference between each noise image is a difference Within the threshold; input the noise image in the training set into a convolutional neural network, and the convolutional neural network outputs the training output image corresponding to the noise image; use the training output image and denoising image corresponding to the noise image to calculate the loss of the convolutional neural network Function to train the convolutional neural network; determine the trained convolutional neural network as the noise estimation model.
  • the image denoising module 81 may also be configured to execute: each time the iterative process is executed, the parameters of the convolutional neural network are updated, and the next iterative process is executed using the updated parameters.
  • a convolutional neural network includes a cascaded plurality of convolutional layers, and each convolutional layer includes an expanded convolution unit.
  • the image processing device 10 may further include an initialization module 101.
  • the initialization module 101 may be configured to perform: filter processing on the image to be processed to obtain the initialized first intermediate image, which is used as the first intermediate image for the first execution of the iterative process.
  • the image processing device 11 may further include an objective function determining module 111.
  • the objective function determination module 111 may be configured to execute: construct an intermediate function based on the degradation model of image restoration, the intermediate function includes a fidelity term and a regularization term; use an auxiliary variable to combine the fidelity term and regularization of the intermediate function The terms are decoupled, and the objective function is determined according to the decoupling result; among them, the auxiliary variable corresponds to the first intermediate image.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.

Abstract

Provided are an image processing method, an image processing apparatus, a computer readable storage medium, and an electronic device, relating to the technical field of image processing. The image processing method includes: obtaining an image to be processed, and using the image to be processed to perform an iterative process, until the similarity between a first intermediate image and a second intermediate image is greater than the similarity threshold (S42), both the first intermediate image and the second intermediate image are images generated during the denoising process of the image to be processed; after finishing the iterative process, outputting the first intermediate image or the second intermediate image as the processed image corresponding to the image to be processed (S44); wherein, the iterative process includes: determining the second intermediate image using the image to be processed and the first intermediate image based on the objective function; using the noise estimation model and the second intermediate image to determine a third intermediate image; using the third intermediate image as the first intermediate image. The noise in the image can be reduced.

Description

图像处理方法及装置、计算机可读介质和电子设备Image processing method and device, computer readable medium and electronic equipment
相关申请的交叉引用Cross-references to related applications
本申请要求于2019年12月04日提交的申请号为201911228475.5、名称为“图像处理方法及装置、计算机可读介质和电子设备”的中国专利申请的优先权,该中国专利申请的全部内容通过引用全部并入本文。This application claims the priority of a Chinese patent application filed on December 4, 2019, with the application number 201911228475.5 and titled "Image processing method and device, computer readable medium and electronic equipment", and the entire content of the Chinese patent application is approved All references are incorporated into this article.
技术领域Technical field
本公开涉及图像处理技术领域,具体而言,涉及一种图像处理方法、图像处理装置、计算机可读介质和电子设备。The present disclosure relates to the field of image processing technology, and in particular, to an image processing method, an image processing device, a computer-readable medium, and an electronic device.
背景技术Background technique
随着移动终端的发展,影像功能越来越得到重视,由此带来的是,摄像模组的光学传感器、镜片及整体结构设计均得到了快速发展。从CCD(Charge Coupled Device,电荷耦合器件)到CMOS(Complementary Metal Oxide Semiconductor,互补金属氧化物半导体),从几万像素到上亿像素,从塑胶镜片到蓝宝石镜片,从普通镜头到潜望式模组,无一不反映了从厂商到用户对影像功能的追求。With the development of mobile terminals, more and more attention has been paid to image functions. As a result, the optical sensor, lens and overall structural design of the camera module have all been rapidly developed. From CCD (Charge Coupled Device) to CMOS (Complementary Metal Oxide Semiconductor), from tens of thousands of pixels to hundreds of millions of pixels, from plastic lenses to sapphire lenses, from ordinary lenses to periscope models Group, all reflect the pursuit of image functions from manufacturers to users.
在移动终端上集成高像素的传感器,已经成为移动终端发展的趋势。为了得到更好的图像解析力,在移动终端不断迭代的过程中,传感器的像素总量成倍增加,然而,传感器实际感光尺寸的增长有限。这就造成像素密度不断增加而各个像素点接收到的信号越来越微弱且电子串扰情况越发严重的问题,由此导致输出的图像中噪点较多,信噪比低,严重限制了高像素传感器的应用场景。Integrating high-pixel sensors on mobile terminals has become a trend in the development of mobile terminals. In order to obtain better image resolution, in the process of continuous iteration of mobile terminals, the total number of pixels of the sensor has doubled. However, the increase in the actual photosensitive size of the sensor is limited. This has caused the problem of increasing pixel density and weakening of the signal received by each pixel and the more serious electronic crosstalk. As a result, the output image has more noise and low signal-to-noise ratio, which severely limits high-pixel sensors. Application scenarios.
发明内容Summary of the invention
根据本公开的第一方面,提供了一种图像处理方法,包括:获取待处理图像,并利用待处理图像执行迭代过程,直至第一中间图像与第二中间图像之间的相似度大于相似度阈值为止,第一中间图像和第二中间图像均是在待处理图像的去噪过程中生成的图像;结束迭代过程后,输出第一中间图像或第二中间图像,作为与待处理图像对应的处理后的图像;其中,迭代过程包括:基于目标函数,利用待处理图像和第一中间图像确定出第二中间图像;利用噪声估计模型和第二中间图像确定第三中间图像;将第三中间图像作为第一中间图像。According to a first aspect of the present disclosure, there is provided an image processing method, including: acquiring an image to be processed, and performing an iterative process using the image to be processed until the similarity between the first intermediate image and the second intermediate image is greater than the similarity Up to the threshold, the first intermediate image and the second intermediate image are both images generated in the denoising process of the image to be processed; after the iterative process is ended, the first intermediate image or the second intermediate image is output as the image corresponding to the image to be processed The processed image; wherein, the iterative process includes: based on the objective function, the second intermediate image is determined using the image to be processed and the first intermediate image; the third intermediate image is determined using the noise estimation model and the second intermediate image; the third intermediate image is determined by the noise estimation model and the second intermediate image. The image serves as the first intermediate image.
根据本公开的第二方面,提供了一种图像处理装置,包括:图像去噪模块,用于获取待处理图像,并利用待处理图像执行迭代过程,直至第一中间图像与第二中间图像之间的相似度大于相似度阈值为止,第一中间图像和第二中间图像均是在待处理图像的去噪过程中生成的图像;图像输出模块,用于结束迭代过程后,输出第一中间图像或第二中间图像,作为与待处理图像对应的处理后的图像;其中,迭代过程包括:基于目标函数,利用待处理图像和第一中间图像确定出第二中间图像;利用噪声估计模型和第二中间图像确定第三中间图像;将第三中间图像作为第一中间图像。According to a second aspect of the present disclosure, there is provided an image processing device, including: an image denoising module for acquiring an image to be processed, and using the image to be processed to perform an iterative process until the difference between the first intermediate image and the second intermediate image Until the similarity between the two is greater than the similarity threshold, the first intermediate image and the second intermediate image are both images generated in the denoising process of the image to be processed; the image output module is used to output the first intermediate image after the iterative process is completed Or the second intermediate image, as the processed image corresponding to the image to be processed; wherein, the iterative process includes: based on the objective function, the second intermediate image is determined by using the image to be processed and the first intermediate image; and the noise estimation model and the first intermediate image are used to determine the second intermediate image. The second intermediate image determines the third intermediate image; the third intermediate image is used as the first intermediate image.
根据本公开的第三方面,提供一种计算机可读介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述图像处理方法。According to a third aspect of the present disclosure, there is provided a computer-readable medium on which a computer program is stored, and the computer program is executed by a processor to implement the above-mentioned image processing method.
根据本公开的第四方面,提供一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行时,使得一个或多个处理器实现上述图像处理方法。According to a fourth aspect of the present disclosure, there is provided an electronic device, including: one or more processors; a storage device, for storing one or more programs, when one or more programs are executed by one or more processors , Enabling one or more processors to implement the above-mentioned image processing method.
附图说明Description of the drawings
图1示出了可以应用本公开实施例的图像处理方法或图像处理装置的示例性系统架构的示意图;FIG. 1 shows a schematic diagram of an exemplary system architecture of an image processing method or image processing apparatus to which an embodiment of the present disclosure can be applied;
图2示出了适于用来实现本公开实施例的电子设备的计算机系统的结构示意图;FIG. 2 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure;
图3示出了根据本公开的示例性实施方式的引入辅助变量后确定最优解的过程示意图;FIG. 3 shows a schematic diagram of a process of determining an optimal solution after introducing auxiliary variables according to an exemplary embodiment of the present disclosure;
图4示意性示出了根据本公开的示例性实施方式的图像处理方法的流程图;Fig. 4 schematically shows a flowchart of an image processing method according to an exemplary embodiment of the present disclosure;
图5示意性示出了根据本公开的示例性实施方式的迭代过程的流程图;FIG. 5 schematically shows a flowchart of an iterative process according to an exemplary embodiment of the present disclosure;
图6示出了根据本公开的示例性实施方式的噪声估计模型的结构示意图;Fig. 6 shows a schematic structural diagram of a noise estimation model according to an exemplary embodiment of the present disclosure;
图7示出了根据本公开的示例性实施方式的可视化迭代处理的示意图;FIG. 7 shows a schematic diagram of visualized iterative processing according to an exemplary embodiment of the present disclosure;
图8示意性示出了根据本公开的示例性实施方式的图像处理装置的方框图;FIG. 8 schematically shows a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure;
图9示意性示出了根据本公开的另一示例性实施方式的图像处理装置的方框图;FIG. 9 schematically shows a block diagram of an image processing apparatus according to another exemplary embodiment of the present disclosure;
图10示意性示出了根据本公开的又一示例性实施方式的图像处理装置的方框图;FIG. 10 schematically shows a block diagram of an image processing apparatus according to another exemplary embodiment of the present disclosure;
图11示意性示出了根据本公开的再一示例性实施方式的图像处理装置的方框图。FIG. 11 schematically shows a block diagram of an image processing apparatus according to still another exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms, and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed To those skilled in the art. The described features, structures or characteristics can be combined in one or more embodiments in any suitable way. In the following description, many specific details are provided to give a sufficient understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, the well-known technical solutions are not shown or described in detail in order to avoid overwhelming the crowd and obscure all aspects of the present disclosure.
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。In addition, the drawings are only schematic illustrations of the present disclosure, and are not necessarily drawn to scale. The same reference numerals in the figures denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in the form of software, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and/or processor devices and/or microcontroller devices.
附图中所示的流程图仅是示例性说明,不是必须包括所有的步骤。例如,有的步骤还可以分解,而有的步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。另外,下面所有的术语“第一”、“第二”、“第三”等仅是为了区分的目的,不应作为本公开内容的限制。The flowchart shown in the drawings is only an exemplary description, and does not necessarily include all the steps. For example, some steps can be decomposed, and some steps can be combined or partially combined, so the actual execution order may be changed according to actual conditions. In addition, all the terms "first", "second", "third", etc. below are only for the purpose of distinction and should not be taken as a limitation of the present disclosure.
图1示出了可以应用本公开实施例的图像处理方法或图像处理装置的示例性系统架构的示意图。FIG. 1 shows a schematic diagram of an exemplary system architecture of an image processing method or image processing apparatus to which an embodiment of the present disclosure can be applied.
如图1所示,系统架构1000可以包括终端设备1001、1002、1003中的一种或多种,网络1004和服务器1005。网络1004用于在终端设备1001、1002、1003和服务器1005之间提供通信链路的介质。网络1004可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1, the system architecture 1000 may include one or more of terminal devices 1001, 1002, 1003, a network 1004 and a server 1005. The network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005. The network 1004 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器1005可以是多个服务器组成的服务器集群等。It should be understood that the numbers of terminal devices, networks, and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks, and servers according to implementation needs. For example, the server 1005 may be a server cluster composed of multiple servers.
用户可以使用终端设备1001、1002、1003通过网络1004与服务器1005交互,以接收或发送消息等。终端设备1001、1002、1003可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、便携式计算机和台式计算机等等。The user can use the terminal devices 1001, 1002, 1003 to interact with the server 1005 through the network 1004 to receive or send messages and so on. The terminal devices 1001, 1002, 1003 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and so on.
例如,终端设备1001、1002、1003可以获取待处理图像,具体的,可以将终端设备 1001、1002、1003通过其摄像模组拍摄的图像作为待处理图像。接下来,终端设备1001、1002、1003可以执行下述迭代过程,直至与待处理图像相关联的第一中间图像与第二中间图像之间的相似度小于相似度阈值为止,并在迭代过程结束后,将第一中间图像或第二中间图像作为处理后的图像。For example, the terminal device 1001, 1002, 1003 may obtain the image to be processed. Specifically, the image captured by the terminal device 1001, 1002, 1003 through its camera module may be used as the image to be processed. Next, the terminal device 1001, 1002, 1003 may perform the following iterative process until the similarity between the first intermediate image and the second intermediate image associated with the image to be processed is less than the similarity threshold, and the iterative process ends After that, the first intermediate image or the second intermediate image is used as the processed image.
其中,迭代过程可以包括:第一步,将待处理图像和第一中间图像代入一预配置的目标函数中,以确定出第二中间图像;第二步,利用噪声估计模型和第二中间图像确定出第三中间图像,将第三中间图像作为第一中间图像,以更新第一中间图像。由此,不断重复上述第一步与第二步,实现迭代过程。The iterative process may include: the first step is to substitute the image to be processed and the first intermediate image into a pre-configured objective function to determine the second intermediate image; the second step is to use the noise estimation model and the second intermediate image The third intermediate image is determined, and the third intermediate image is used as the first intermediate image to update the first intermediate image. Therefore, the first and second steps above are repeated continuously to realize the iterative process.
针对噪声估计模型,可以采用例如卷积神经网络的机器学习模型,该噪声估计模型的训练过程可以由服务器1005进行,服务器1005将训练好的模型参数通过网络1004传递给终端设备1001、1002、1003,从而较好地解决了终端设备1001、1002、1003处理能力不足的问题。For the noise estimation model, a machine learning model such as a convolutional neural network can be used. The training process of the noise estimation model can be performed by the server 1005. The server 1005 transmits the trained model parameters to the terminal devices 1001, 1002, 1003 through the network 1004. , Thus better solve the problem of insufficient processing capacity of the terminal equipment 1001, 1002, 1003.
然而,需要理解的是,本公开涉及的图像处理方法的主要步骤还可以由服务器1005执行。具体的,终端设备1001、1002、1003将由摄像模组拍摄的图像通过网络1004发送至服务器1005,该图像即为待处理图像,服务器1005利用该待处理图像执行上述迭代过程,直至第一中间图像与第二中间图像之间的相似度大于相似度阈值为止。迭代过程结束后,将第一中间图像或第二中间图像作为处理后的图像,并将确定出的处理后的图像通过网络1004发送给终端设备1001、1002、1003,以便用户查看到去噪后的图像。However, it should be understood that the main steps of the image processing method involved in the present disclosure may also be executed by the server 1005. Specifically, the terminal devices 1001, 1002, and 1003 send the image taken by the camera module to the server 1005 via the network 1004, and the image is the image to be processed. The server 1005 uses the image to be processed to perform the above iterative process until the first intermediate image The similarity with the second intermediate image is greater than the similarity threshold. After the iterative process is over, the first intermediate image or the second intermediate image is used as the processed image, and the determined processed image is sent to the terminal devices 1001, 1002, 1003 through the network 1004, so that the user can view the denoised Image.
需要说明的是,本公开示例性实施方式的图像处理方法一般由终端设备1001、1002、1003执行,具体的,通常由例如手机的移动终端执行。相应地,下面描述的图像处理装置一般配置在终端设备1001、1002、1003中。It should be noted that the image processing method of the exemplary embodiment of the present disclosure is generally executed by the terminal device 1001, 1002, 1003, and specifically, is usually executed by a mobile terminal such as a mobile phone. Correspondingly, the image processing apparatus described below is generally configured in the terminal equipment 1001, 1002, 1003.
图2示出了适于用来实现本公开示例性实施方式的电子设备的计算机系统的结构示意图。该电子设备对应于执行本公开示例性实施方式的图像处理方法的终端设备。Fig. 2 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an exemplary embodiment of the present disclosure. This electronic device corresponds to a terminal device that executes the image processing method of the exemplary embodiment of the present disclosure.
需要说明的是,图2示出的电子设备的计算机系统200仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。It should be noted that the computer system 200 of the electronic device shown in FIG. 2 is only an example, and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
如图2所示,计算机系统200包括中央处理单元(CPU)201,其可以根据存储在只读存储器(ROM)202中的程序或者从存储部分208加载到随机访问存储器(RAM)203中的程序而执行各种适当的动作和处理。在RAM 203中,还存储有系统操作所需的各种程序和数据。CPU 201、ROM 202以及RAM 203通过总线204彼此相连。输入/输出(I/O)接口205也连接至总线204。As shown in FIG. 2, the computer system 200 includes a central processing unit (CPU) 201, which can be based on a program stored in a read-only memory (ROM) 202 or a program loaded from a storage portion 208 into a random access memory (RAM) 203 And perform various appropriate actions and processing. In RAM 203, various programs and data required for system operation are also stored. The CPU 201, the ROM 202, and the RAM 203 are connected to each other through a bus 204. An input/output (I/O) interface 205 is also connected to the bus 204.
以下部件连接至I/O接口205:包括键盘、鼠标、触控屏等的输入部分206;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分207;包括硬盘等的存储部分208;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分209。通信部分209经由诸如因特网的网络执行通信处理。驱动器210也根据需要连接至I/O接口205。可拆卸介质211,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器210上,以便于从其上读出的计算机程序根据需要被安装入存储部分208。The following components are connected to the I/O interface 205: the input part 206 including keyboard, mouse, touch screen, etc.; including the output part 207 such as cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers; including hard disk, etc. The storage section 208; and the communication section 209 including a network interface card such as a LAN card, a modem, and the like. The communication section 209 performs communication processing via a network such as the Internet. The drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed, so that the computer program read from it is installed into the storage section 208 as needed.
在以手机等终端设备实现本公开方案的情况下,系统结构中还可以包括摄像模组。具体的,可以包括双摄、三摄、四摄等,丰富拍摄的模式,满足不同拍摄场景需求。In the case of implementing the solution of the present disclosure with a terminal device such as a mobile phone, the system structure may also include a camera module. Specifically, it may include dual-camera, triple-camera, quad-camera, etc., to enrich shooting modes to meet the needs of different shooting scenes.
特别地,根据本公开的实施例,下文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分209从网络上被下载和安装,和/或从可拆卸介质211被安装。在该计算机程序被中央处理单元(CPU)201执行时,执行本申请的系统中限定的各种功能。In particular, according to an embodiment of the present disclosure, the process described below with reference to a flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication section 209, and/or installed from the removable medium 211. When the computer program is executed by the central processing unit (CPU) 201, various functions defined in the system of the present application are executed.
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机 可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable 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 of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more for realizing the specified logic function. Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by It is realized by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。The units described in the embodiments of the present disclosure may be implemented in software or hardware, and the described units may also be provided in a processor. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现如下述实施例中所述的方法。As another aspect, this application also provides a computer-readable medium. The computer-readable medium may be included in the electronic device described in the above-mentioned embodiments; or it may exist alone without being assembled into the electronic device. in. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by an electronic device, the electronic device realizes the method described in the following embodiments.
在一些技术中,采用基于预置先验约束的统计模型来抑制图像噪声。这种方法可以灵活求解各种噪声相关的反问题,但其解法需要大量的迭代过程,耗费时间较长,并且去噪效果严重依赖于预置的初始值,极容易陷入局部最优或者影响算法收敛。In some technologies, statistical models based on preset prior constraints are used to suppress image noise. This method can flexibly solve various noise-related inverse problems, but its solution requires a large number of iterative processes, which takes a long time, and the denoising effect is heavily dependent on the preset initial value, and it is very easy to fall into a local optimum or affect the algorithm convergence.
在另一些技术中,利用机器学习模型来实现噪声的估计。虽然利用这种方法可以拟合复杂度较高的噪声模型以达到较好的处理效果,并且处理时间短。然而,这种方法的处理效果严重依赖于模型训练过程中的样本容量与状况。In other technologies, machine learning models are used to estimate noise. Although this method can be used to fit a more complex noise model to achieve a better processing effect, and the processing time is short. However, the processing effect of this method is heavily dependent on the sample size and conditions in the model training process.
在本公开的示例性实施方式中,图像去噪问题可以被认为是图像修复领域的主要分支,基于图像修复领域的构思,图像去噪可以由一退化模型示出,具体可以采用公式1进行表示:In the exemplary embodiment of the present disclosure, the image denoising problem can be considered as the main branch of the image restoration field. Based on the concept of the image restoration field, the image denoising can be represented by a degradation model, which can be represented by Formula 1. :
y=Hx+n     (公式1)y=Hx+n (Formula 1)
其中,y表示去噪前的图像,x表示去噪后的图像,H表示单位矩阵,n表示标准差为σ的加性高斯白噪声。Among them, y represents the image before denoising, x represents the image after denoising, H represents the identity matrix, and n represents additive white Gaussian noise with a standard deviation of σ.
在仅已知y的情况下求解x,这是一个病态问题,对于这个病态问题的求解,从统计学贝叶斯学派角度可以转化为一个求取最大后验概率(MAP,Maximum A Posterior)的过程,表示为公式2:Solving x when only y is known is an ill-conditioned problem. The solution to this ill-conditioned problem can be transformed from the perspective of the Bayesian school of statistics into a method for obtaining the maximum posterior probability (MAP, Maximum A Posterior) Process, expressed as formula 2:
Figure PCTCN2020129437-appb-000001
Figure PCTCN2020129437-appb-000001
其中,
Figure PCTCN2020129437-appb-000002
表示x的估计,log p(y|x)表示似然函数的对数,log p(x)表示先验概率的对数。进一步地,上述问题可以变换为公式3:
among them,
Figure PCTCN2020129437-appb-000002
Represents the estimate of x, log p(y|x) represents the logarithm of the likelihood function, and log p(x) represents the logarithm of the prior probability. Further, the above problem can be transformed into formula 3:
Figure PCTCN2020129437-appb-000003
Figure PCTCN2020129437-appb-000003
其中,λ表示正则化参数,用来衡量前一项约束与后一项约束的重要性,如果λ较大,则说明整个约束中后一项更加重要,如果λ较小(例如,远小于二分之一),则说明前一项约束更加重要。Φ(x)是一种对信号先验分布的概述性表示,表示对信号分布的一种预判性的约束,例如,可以是梯度上的约束,也可以是空间上的约束,还可以是频域上的约束,本公开对此不做限制。Among them, λ represents the regularization parameter, which is used to measure the importance of the former constraint and the latter constraint. If λ is larger, it means that the latter item in the entire constraint is more important. If λ is smaller (for example, much less than two One part), it means that the previous constraint is more important. Φ(x) is a general representation of the prior distribution of the signal. It represents a pre-judgmental constraint on the signal distribution. For example, it can be a constraint on the gradient, a constraint on the space, or Constraints in the frequency domain are not limited in this disclosure.
在本公开中,公式3对应的函数又可被称为中间函数。另外,
Figure PCTCN2020129437-appb-000004
又被称为保真项(fidelity term),而Φ(x)可被称为正则化项。
In the present disclosure, the function corresponding to Formula 3 may be referred to as an intermediate function. In addition,
Figure PCTCN2020129437-appb-000004
It is also called the fidelity term, and Φ(x) can be called the regularization term.
针对公式3,可以通过一些耗时较长的迭代优化算法来逼近最优解。而对于模型学习方法,求解过程是需要得到一组先验参数Θ,这组先验参数Θ是待优化的损失函数的相关参数,通过使用噪声图像与无噪图像一一对应的大容量训练集来确定出符合二者之间对应关系的最佳参数
Figure PCTCN2020129437-appb-000005
利用这个损失函数估计噪声图像对应的无噪图像。因此,对于模型学习方法来说,公式3可以改写为公式4:
For formula 3, some time-consuming iterative optimization algorithms can be used to approximate the optimal solution. For the model learning method, the solution process is to obtain a set of prior parameters Θ, this set of prior parameters Θ are related parameters of the loss function to be optimized, by using a large-capacity training set with a one-to-one correspondence between a noise image and a noiseless image To determine the best parameters that meet the corresponding relationship between the two
Figure PCTCN2020129437-appb-000005
Use this loss function to estimate the noise-free image corresponding to the noise image. Therefore, for the model learning method, formula 3 can be rewritten as formula 4:
Figure PCTCN2020129437-appb-000006
Figure PCTCN2020129437-appb-000006
其中,l表示损失函数。由此,上述MAP问题转化为求解非线性方程。Among them, l represents the loss function. Therefore, the above-mentioned MAP problem is transformed into solving a nonlinear equation.
从统计模型的解法出发,可以利用HQS(Half Quadratic Splitting,半二次方分裂)方法求解此问题。具体的,由上述参数可知,直接通过x的方向寻找全局最优解是困难的,运算量大。因此,本公开引入一个辅助变量(即与x的方向不同的方向),通过不断迭代求解辅助变量和x的方式从两个方向逼近最优解。应当理解的是,这两个方向彼此近似。Starting from the solution of the statistical model, the HQS (Half Quadratic Splitting) method can be used to solve this problem. Specifically, it can be seen from the above parameters that it is difficult to find the global optimal solution directly through the direction of x, and the amount of calculation is large. Therefore, the present disclosure introduces an auxiliary variable (that is, a direction different from the direction of x), and approaches the optimal solution from two directions by continuously iterating the auxiliary variable and x. It should be understood that these two directions are similar to each other.
在这种情况下,引入辅助变量z,假设z是x的一个替代解,并添加限制条件使得二者尽可能接近,由此,可以将上述公式3转化为公式5:In this case, introduce the auxiliary variable z, assume that z is an alternative solution to x, and add constraints to make the two as close as possible. Therefore, the above formula 3 can be transformed into formula 5:
Figure PCTCN2020129437-appb-000007
Figure PCTCN2020129437-appb-000007
这里的限制及条件可以适当松弛,转化为2范数的正则化约束,见公式6:The restrictions and conditions here can be appropriately relaxed and transformed into a regularization constraint of 2 norm, as shown in formula 6:
Figure PCTCN2020129437-appb-000008
Figure PCTCN2020129437-appb-000008
其中,u表示正则化参数,用于表示约束项的重要性,是保证x与z相似的约束。Among them, u represents a regularization parameter, which is used to represent the importance of the constraint item, and is a constraint to ensure that x and z are similar.
可以基于公式6,分别求解x的估计
Figure PCTCN2020129437-appb-000009
和z的估计
Figure PCTCN2020129437-appb-000010
逐步逼近最优解x,具体可以表示为公式7:
Based on Equation 6, the estimates of x can be solved separately
Figure PCTCN2020129437-appb-000009
And the estimate of z
Figure PCTCN2020129437-appb-000010
Gradually approach the optimal solution x, which can be expressed as Formula 7:
Figure PCTCN2020129437-appb-000011
Figure PCTCN2020129437-appb-000011
这种处理策略可以被理解为是一个探索“下山”的过程。如图3所示,虽然不知道从初始点开始哪个方向能够找到最优解,然而,已知存在两个方向,从两个方向逼近最优解 (目标函数最小值)。This processing strategy can be understood as a process of exploring "downhill". As shown in Figure 3, although it is not known from which direction from the initial point to find the optimal solution, it is known that there are two directions from which to approach the optimal solution (minimum objective function).
对于公式7的(i)而言,可以通过二次项求极值的方式进行求解。而对于公式7的(ii),则重新回到了一个标准的统计模型的解法上,这个方程的求解依赖先验的情况。此问题以往的求解方法认为关于z的某一变换域维度上(频域、差分域等)具有一定的稀疏特性,然而,噪声并非稀疏的,因此可以将公式7中的(ii)转化为公式8:For (i) of formula 7, it can be solved by the way of finding the extreme value of the quadratic term. As for (ii) of formula 7, it returns to the solution of a standard statistical model, and the solution of this equation depends on the prior situation. The previous method of solving this problem believes that a certain transform domain dimension of z (frequency domain, difference domain, etc.) has certain sparse characteristics. However, the noise is not sparse, so (ii) in Equation 7 can be transformed into a formula 8:
Figure PCTCN2020129437-appb-000012
Figure PCTCN2020129437-appb-000012
其中,R表示一些可能的变换算子(傅里叶变换算子、差分算子等),p表示范数约束的形式,例如,p=1或0。Among them, R represents some possible transform operators (Fourier transform operators, difference operators, etc.), and p represents a form of norm constraint, for example, p=1 or 0.
然而,这种计算方法严重依赖于变换域与初始位置的选择与正则化约束的松紧程度。过紧致的约束会导致求解更加耗时且困难,不佳的初始位置极容易导致局部最优,算法稳定性差。However, this calculation method depends heavily on the choice of transform domain and initial position and the tightness of regularization constraints. Too tight constraints will make the solution more time-consuming and difficult, and a poor initial position can easily lead to a local optimum, and the algorithm stability is poor.
鉴于此,在图像去噪方面,本公开示例性实施方式提供了一种新的图像处理方法。In view of this, in terms of image denoising, exemplary embodiments of the present disclosure provide a new image processing method.
图4示意性示出了本公开的示例性实施方式的图像处理方法的流程图。参考图4,所述图像处理方法可以包括以下步骤:FIG. 4 schematically shows a flowchart of an image processing method of an exemplary embodiment of the present disclosure. Referring to FIG. 4, the image processing method may include the following steps:
S42.获取待处理图像,并利用待处理图像执行迭代过程,直至第一中间图像与第二中间图像之间的相似度大于相似度阈值为止,第一中间图像和第二中间图像均是在待处理图像的去噪过程中生成的图像。S42. Obtain the image to be processed, and use the image to be processed to perform an iterative process until the similarity between the first intermediate image and the second intermediate image is greater than the similarity threshold, and the first intermediate image and the second intermediate image are both in the to-be-processed image. Process the image generated in the denoising process of the image.
在本公开的示例性实施方式中,待处理图像可以是由终端设备的摄像模组拍摄的图像,也可以是从其他终端设备或网络上获取的图像。另外,待处理图像还可以是视频中任意一待进行去噪处理的图像。本公开对待处理图像的来源、尺寸、拍摄场景等均不做限制。In the exemplary embodiment of the present disclosure, the image to be processed may be an image taken by a camera module of a terminal device, or may be an image obtained from another terminal device or the network. In addition, the image to be processed may also be any image to be denoised in the video. The present disclosure does not limit the source, size, shooting scene, etc. of the image to be processed.
终端设备在获取到待处理图像后,可以利用该待处理图像执行迭代过程。下面将参考图5中的步骤S52至步骤S56对本公开涉及的迭代过程进行说明。After acquiring the image to be processed, the terminal device can use the image to be processed to perform an iterative process. The iterative process involved in the present disclosure will be described below with reference to steps S52 to S56 in FIG. 5.
在步骤S52中,基于目标函数,利用待处理图像和第一中间图像确定出第二中间图像。In step S52, based on the objective function, the second intermediate image is determined using the image to be processed and the first intermediate image.
需要说明的是,步骤S52至步骤S56仅描述了一次迭代过程。在第一次进行迭代的过程中,包括初始化第一中间图像的过程。具体的,可以对待处理图像进行滤波处理,以得到初始化的第一中间图像,作为首次执行迭代过程的第一中间图像,例如,可以采用高通滤波器、低通滤波器中之一或它们的组合来实现上述滤波处理过程。It should be noted that steps S52 to S56 only describe one iteration process. In the process of the first iteration, the process of initializing the first intermediate image is included. Specifically, the image to be processed may be filtered to obtain the initialized first intermediate image, which is used as the first intermediate image to perform the iterative process for the first time. For example, one of a high-pass filter, a low-pass filter, or a combination thereof may be used. To achieve the above filtering process.
在初始化第一中间图像后,可以利用待处理图像和第一中间图像确定第二中间图像。在本公开的示例性实施方式中,可以基于一目标函数确定出第二中间图像。After the first intermediate image is initialized, the second intermediate image can be determined using the image to be processed and the first intermediate image. In the exemplary embodiment of the present disclosure, the second intermediate image may be determined based on an objective function.
针对本公开示例性实施方式的目标函数,对应于上述公式7中的(i)。也就是说,根据本公开示例性实施方式,首先,可以基于图像恢复的退化模型(见公式1)构建出中间函数(见公式3);接下来,可以利用辅助变量z将中间函数的保真项与正则化项解耦,以确定出公式7中的(i)。The objective function for the exemplary embodiment of the present disclosure corresponds to (i) in Equation 7 above. That is to say, according to the exemplary embodiment of the present disclosure, firstly, an intermediate function (see formula 3) can be constructed based on the degradation model of image restoration (see formula 1); next, the fidelity of the intermediate function can be determined by the auxiliary variable z. The term is decoupled from the regularization term to determine (i) in Equation 7.
需要理解的是,在目标函数中,辅助变量与第一中间图像相对应,也就是说,辅助变量z能够反映出第一中间图像的所有信息。另外,作为待处理图像去噪后的估计,
Figure PCTCN2020129437-appb-000013
可以作为本公开示例性实施方式中的第二中间图像。
It should be understood that in the objective function, the auxiliary variable corresponds to the first intermediate image, that is, the auxiliary variable z can reflect all the information of the first intermediate image. In addition, as an estimate after denoising of the image to be processed,
Figure PCTCN2020129437-appb-000013
It can be used as the second intermediate image in the exemplary embodiment of the present disclosure.
针对求解公式7中(i)的过程,可以采用两个二次项求解极值的方式进行处理,通过求导的方式,可以得到:Regarding the process of solving (i) in Equation 7, two quadratic terms can be used to solve the extreme value for processing. Through the method of derivation, we can get:
x k+1=(H TH+uI) -1(H Ty+uz k)      (公式9) x k+1 = (H T H+uI) -1 (H T y+uz k ) (Equation 9)
其中,I为单位矩阵。Among them, I is the identity matrix.
鉴于针对去噪的情况,H为单位矩阵,因此,公式9还可以改写为:In view of the denoising situation, H is the identity matrix, therefore, formula 9 can also be rewritten as:
x k+1=(H+uI) -1(y+uz k)     (公式10) x k+1 = (H+uI) -1 (y+uz k ) (Equation 10)
由此,在y表示待处理图像、H和I为单位矩阵、u表示正则化参数的情况下,已知第一中间图像z k,即可确定出第二中间图像x k+1Therefore, when y represents the image to be processed, H and I are unit matrices, and u represents the regularization parameter, the second intermediate image x k+1 can be determined if the first intermediate image z k is known.
在步骤S54中,利用噪声估计模型和第二中间图像确定第三中间图像。In step S54, a third intermediate image is determined using the noise estimation model and the second intermediate image.
在本公开的示例性实施方式中,噪声估计模型可以是基于卷积神经网络的模型。图6示意性示出了该模型的网络结构,该模型可以是一个7层的卷积神经网络,包括第一层61、第二层62、第三层63、第四层64、第五层65、第六层66和第七层67。In an exemplary embodiment of the present disclosure, the noise estimation model may be a model based on a convolutional neural network. Figure 6 schematically shows the network structure of the model. The model can be a 7-layer convolutional neural network, including a first layer 61, a second layer 62, a third layer 63, a fourth layer 64, and a fifth layer. 65. The sixth layer 66 and the seventh layer 67.
该网络结构可以是基于膨胀卷积而构建,例如,第一层61由膨胀卷积单元和修正线性单元(ReLU)构成,第二层62、第三层63、第四层64、第五层65、第六层66均由膨胀卷积单元、批量归一化单元(BN)和修正线性单元(ReLU)构成,第七层67由膨胀卷积单元构成。第一层61中的膨胀卷积单元的感受器的尺寸为3×3,也就是说,卷积核的大小为3×3。针对整个网络,在膨胀系数依次为1、2、3、4、3、2、1的情况下,对应的每一层的感受器尺寸为(2s+1)*(2s+1),其中,s为膨胀系数,由此,可以确定出每一层的感受器的尺寸分别为3×3、5×5、7×7、9×9、7×7、5×5、3×3。另外,可以将每一层的维度设置为64,即,每一层特征图(feature map)的数量设置为64。The network structure can be constructed based on dilated convolution, for example, the first layer 61 is composed of dilated convolution units and modified linear units (ReLU), the second layer 62, the third layer 63, the fourth layer 64, and the fifth layer 65. The sixth layer 66 is composed of an expanded convolution unit, a batch normalization unit (BN), and a modified linear unit (ReLU), and the seventh layer 67 is composed of an expanded convolution unit. The size of the sensor of the expanded convolution unit in the first layer 61 is 3×3, that is, the size of the convolution kernel is 3×3. For the entire network, when the expansion coefficient is 1, 2, 3, 4, 3, 2, 1, the corresponding sensor size of each layer is (2s+1)*(2s+1), where s It is the coefficient of expansion. From this, the size of the susceptor of each layer can be determined to be 3×3, 5×5, 7×7, 9×9, 7×7, 5×5, 3×3, respectively. In addition, the dimension of each layer can be set to 64, that is, the number of feature maps (feature maps) of each layer is set to 64.
采用基于膨胀卷积的卷积神经网络作为本公开中的噪声估计模型,可以更有效地获取语义信息,进而保证了去噪结果的准确性。Using a convolutional neural network based on dilated convolution as the noise estimation model in the present disclosure can obtain semantic information more effectively, thereby ensuring the accuracy of the denoising result.
然而,应当理解的是,除上述示例性示出的噪声估计模型外,还可以采用其他的卷积神经网络或采用其他的网络配置来实现噪声估计模型。本公开对此不做限制。However, it should be understood that, in addition to the noise estimation model exemplarily shown above, other convolutional neural networks or other network configurations may also be used to implement the noise estimation model. This disclosure does not limit this.
在确定出噪声估计模型的网络结构后,可以预先在服务器进行模型的训练过程。After the network structure of the noise estimation model is determined, the model training process can be performed on the server in advance.
首先,服务器可以获取训练集。该训练集可以包括多个噪声图像以及与各噪声图像对应的去噪图像,并且各噪声图像之间的噪声强度差异在差异阈值内,其中,差异阈值可以由开发人员根据预先进行的试验进行设定,本公开对其具体取值不做限制。First, the server can obtain the training set. The training set may include multiple noise images and denoising images corresponding to each noise image, and the difference in noise intensity between each noise image is within a difference threshold, where the difference threshold can be set by the developer according to pre-conducted experiments. Certainly, this disclosure does not limit its specific value.
通过将噪声强度差异控制在一定范围内,使得训练集中各噪声图像的噪声水平一致,便于提高训练效果。By controlling the difference in noise intensity within a certain range, the noise level of each noise image in the training set is consistent, which is convenient to improve the training effect.
接下来,可以利用训练集中的图像对噪声估计模型进行训练,以得到训练后的模型。Next, the images in the training set can be used to train the noise estimation model to obtain the trained model.
具体的,针对训练集中的每一噪声图像及对应的去噪图像,将噪声图像输入卷积神经网络中,在这种情况下,卷积神经网络的输出为与该噪声图像对应的图像,记为训练输出图像。接下来,在确定出该卷积神经网络的损失函数的情况下,可以利用该噪声图像对应的训练输出图像和对应的去噪图像,计算损失函数。通过不断输入样本进行上述过程,使损失函数最小化,以完成该卷积神经网络的训练过程。Specifically, for each noise image and the corresponding denoised image in the training set, the noise image is input into the convolutional neural network. In this case, the output of the convolutional neural network is the image corresponding to the noise image. Output images for training. Next, when the loss function of the convolutional neural network is determined, the training output image corresponding to the noise image and the corresponding denoising image can be used to calculate the loss function. The above process is performed by continuously inputting samples to minimize the loss function to complete the training process of the convolutional neural network.
在服务器对噪声估计模型进行训练后,服务器可以将模型的参数信息发送给终端设备,以便终端设备可以利用该噪声估计模型执行迭代过程。After the server trains the noise estimation model, the server can send the parameter information of the model to the terminal device so that the terminal device can use the noise estimation model to perform an iterative process.
利用服务器进行模型训练,解决了终端设备处理能力不足的问题。The use of server for model training solves the problem of insufficient processing capacity of terminal equipment.
然而,应当注意的是,在终端设备处理能力足够进行模型训练的情况下,模型的训练过程还可以在上述终端设备中进行,本公开对此不做限制。However, it should be noted that if the processing capacity of the terminal device is sufficient for model training, the training process of the model can also be performed in the above-mentioned terminal device, which is not limited in the present disclosure.
在确定出训练后的噪声估计模型后,终端设备可以将步骤S52确定出的第二中间图像输入该训练后的噪声估计模型中,以确定出第二中间图像对应的噪声估计值。接下来,可以根据第二中间图像与其噪声估计值确定第三中间图像。After determining the trained noise estimation model, the terminal device may input the second intermediate image determined in step S52 into the trained noise estimation model to determine the noise estimation value corresponding to the second intermediate image. Next, the third intermediate image can be determined based on the second intermediate image and its noise estimate.
具体的,可以采用公式11确定出第三中间图像:Specifically, formula 11 may be used to determine the third intermediate image:
z k+1=x k+1-f(x k+1;Θ)     (公式11) z k+1 = x k+1- f(x k+1 ; Θ) (Equation 11)
其中,f(x k+1;Θ)表示针对第二中间图像的噪声估计值,这里的Θ表示模型参数。 Among them, f(x k+1 ; Θ) represents the noise estimation value for the second intermediate image, and Θ here represents the model parameter.
在步骤S56中,将第三中间图像作为第一中间图像,以实现第一中间图像的更新。In step S56, the third intermediate image is used as the first intermediate image to realize the update of the first intermediate image.
由此,如此反复执行步骤S52至步骤S56,并在执行的过程中,不断确定第一中间图像与第二中间图像的相似度,直至确定出第一中间图像与第二中间图像之间的相似度大于相似度阈值为止,结束迭代过程。其中,相似度阈值可以由开发人员根据试验的结果自行设定,本公开对此不做限制。在第一中间图像与第二中间图像之间的相似度大于相似度阈值的情况下,可以认为寻找到了最优解,该最优解即是去噪后的图像。Therefore, steps S52 to S56 are repeatedly executed in this way, and during the execution process, the similarity between the first intermediate image and the second intermediate image is continuously determined until the similarity between the first intermediate image and the second intermediate image is determined The iterative process ends until the degree is greater than the similarity threshold. Wherein, the similarity threshold can be set by the developer according to the result of the experiment, which is not limited in the present disclosure. In the case where the similarity between the first intermediate image and the second intermediate image is greater than the similarity threshold, it can be considered that an optimal solution has been found, and the optimal solution is the denoised image.
需要说明的是,在终端设备执行上述步骤S52至步骤S56的迭代过程中,每执行一次迭代过程,均会更新模型参数,并利用更新的参数执行下一次的迭代过程。也就是说,在迭代的过程中,噪声估计模型的参数会发生变化,以确保利用上述公式7中的(1)以及公式11的迭代过程不断逼近最优解。It should be noted that, during the iterative process from step S52 to step S56 performed by the terminal device, each time the iterative process is executed, the model parameters are updated, and the updated parameters are used to execute the next iterative process. That is to say, during the iterative process, the parameters of the noise estimation model will change to ensure that the iterative process of formula 7 (1) and formula 11 is used to continuously approach the optimal solution.
此外,上述通过第一中间图像与第二中间图像之间的相似度来确定迭代过程是否结束,容易理解的是,在第一中间图像与第二中间图像之间的差异较小时,迭代过程结束。在这种情况下,还可以采用图像差异这一指标来确定迭代过程是否结束,例如,当第一中间图像与第二中间图像之间的图像差异小于一预设阈值时,则可以确定出迭代过程结束。In addition, the foregoing determines whether the iterative process is over by the similarity between the first intermediate image and the second intermediate image. It is easy to understand that when the difference between the first intermediate image and the second intermediate image is small, the iterative process ends. . In this case, the index of image difference can also be used to determine whether the iterative process is over. For example, when the image difference between the first intermediate image and the second intermediate image is less than a preset threshold, the iteration can be determined The process is over.
S44.结束迭代过程后,输出第一中间图像或第二中间图像,作为与待处理图像对应的处理后的图像。S44. After finishing the iterative process, output the first intermediate image or the second intermediate image as the processed image corresponding to the image to be processed.
在步骤S42中所涉的迭代过程结束后,根据本公开的一些实施例,由于第一中间图像与第二中间图像的差异较小,因此,终端设备可以输出第一中间图像或第二中间图像作为待处理图像对应的处理后的图像。After the iterative process involved in step S42 ends, according to some embodiments of the present disclosure, since the difference between the first intermediate image and the second intermediate image is small, the terminal device may output the first intermediate image or the second intermediate image As the processed image corresponding to the image to be processed.
根据本公开的另一些实施例,每更新第一中间图像或第二中间图像后,执行相似度的判断过程。例如,在更新第一中间图像后,如果第一中间图像与第二中间图像的相似度小于相似度阈值,则输出第一中间图像作为处理后的图像。又例如,在更新第二中间图像后,如果第一中间图像与第二中间图像的相似度小于相似度阈值,则输出第二中间图像作为处理后的图像。According to other embodiments of the present disclosure, after the first intermediate image or the second intermediate image is updated, a similarity determination process is performed. For example, after the first intermediate image is updated, if the similarity between the first intermediate image and the second intermediate image is less than the similarity threshold, the first intermediate image is output as the processed image. For another example, after the second intermediate image is updated, if the similarity between the first intermediate image and the second intermediate image is less than the similarity threshold, the second intermediate image is output as the processed image.
输出的处理后的图像可以直接保存至终端终端,还可以进行展示,以便用户查看。The processed image output can be directly saved to the terminal, and can also be displayed for the user to view.
参考图7,上述实现图像去噪的过程可以被理解为:从起始点的位置“下山”,一只脚走路(直接求解无噪图像)较困难且容易出现局部最优的情况。在这种情况下,引入另一只脚(辅助变量z,也即是上面的第一中间图像),由此,整个过程变为两步求解。然而,针对如何确定出辅助变量的问题,本公开示例性实施方式可以采用卷积神经网络来求解。还应该注意的是,整个过程受到||x-z k|| 2的约束,这种约束保证x与z保持较大的相似度,也就是说,上述例子中保证两只脚均向前走。 With reference to Fig. 7, the above process of implementing image denoising can be understood as: “going down” from the starting point, walking on one foot (solving the noise-free image directly) is difficult and the local optimum is prone to occur. In this case, another foot is introduced (the auxiliary variable z, which is the first intermediate image above), and the whole process becomes a two-step solution. However, for the problem of how to determine the auxiliary variable, the exemplary embodiment of the present disclosure may be solved by using a convolutional neural network. It should also be noted that the whole process is constrained by ||xz k || 2 , which guarantees that x and z maintain a large degree of similarity, that is, in the above example, both feet are guaranteed to move forward.
在图7中,x与z,这两个变量之间的夹角α实际上是一个很小的角度,保证二者相似度高。由此,整个二维信息展开是一个狭长的曲面,使得求解全局最优更加有利。In Figure 7, the angle α between x and z, these two variables is actually a very small angle to ensure a high degree of similarity between the two. Therefore, the entire two-dimensional information expansion is a long and narrow curved surface, which makes it more advantageous to solve the global optimization.
基于本公开示例性实施方式的图像处理方法,一方面,本公开结合一噪声估计模型完成迭代处理过程,相比于一些技术中仅采用正则化约束进行不断优化迭代的过程,复杂度大大降低,在可以获取较好去噪效果的同时,耗时短;另一方面,采用本公开方案能够有效去除图像噪声,使得高像素摄像模组可以应用于弱光环境下,大大扩展了高像素摄像模组的应用场景;再一方面,本公开方案无需辅助工具或硬件上改动,易于实施。Based on the image processing method of the exemplary embodiment of the present disclosure, on the one hand, the present disclosure combines a noise estimation model to complete the iterative process. Compared with some technologies that only use regularization constraints to continuously optimize the iterative process, the complexity is greatly reduced. While better denoising effects can be obtained, the time-consuming is short; on the other hand, the solution of the present disclosure can effectively remove image noise, so that the high-pixel camera module can be used in low-light environments, greatly expanding the high-pixel camera model The application scenario of the group; on the other hand, the disclosed solution does not require auxiliary tools or hardware changes, and is easy to implement.
应当注意,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。It should be noted that although the various steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in the specific order, or that all the steps shown must be performed to achieve the desired the result of. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
进一步的,本示例实施方式中还提供了一种图像处理装置。Further, an image processing device is also provided in this exemplary embodiment.
图8示意性示出了本公开的示例性实施方式的图像处理装置的方框图。参考图8,根据本公开的示例性实施方式的图像处理装置8可以包括图像去噪模块81和图像输出模块 83。FIG. 8 schematically shows a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure. Referring to FIG. 8, the image processing device 8 according to an exemplary embodiment of the present disclosure may include an image denoising module 81 and an image output module 83.
具体的,图像去噪模块81可以用于获取待处理图像,并利用待处理图像执行迭代过程,直至第一中间图像与第二中间图像之间的相似度大于相似度阈值为止,第一中间图像和第二中间图像均是在待处理图像的去噪过程中生成的图像;其中,迭代过程包括:基于目标函数,利用待处理图像和第一中间图像确定出第二中间图像;利用噪声估计模型和第二中间图像确定第三中间图像;将第三中间图像作为第一中间图像。Specifically, the image denoising module 81 may be used to obtain the image to be processed, and use the image to be processed to perform an iterative process until the similarity between the first intermediate image and the second intermediate image is greater than the similarity threshold, the first intermediate image Both the second intermediate image and the second intermediate image are images generated during the denoising process of the image to be processed; the iterative process includes: based on the objective function, the second intermediate image is determined by using the image to be processed and the first intermediate image; and the noise estimation model is used And the second intermediate image determine the third intermediate image; the third intermediate image is used as the first intermediate image.
图像输出模块83可以用于结束迭代过程后,输出第一中间图像或第二中间图像,作为与待处理图像对应的处理后的图像。The image output module 83 may be used to output the first intermediate image or the second intermediate image as the processed image corresponding to the image to be processed after the iterative process is ended.
利用本公开示例性实施方式的图像处理装置,一方面,本公开结合一噪声估计模型完成迭代处理过程,相比于一些技术中仅采用正则化约束进行不断优化迭代的过程,复杂度大大降低,在可以获取较好去噪效果的同时,耗时短;另一方面,采用本公开方案能够有效去除图像噪声,使得高像素摄像模组可以应用于弱光环境下,大大扩展了高像素摄像模组的应用场景;再一方面,本公开方案无需辅助工具或硬件上改动,易于实施。Using the image processing device of the exemplary embodiment of the present disclosure, on the one hand, the present disclosure combines a noise estimation model to complete the iterative processing process. Compared with the process of continuous optimization and iteration that only uses regularization constraints in some technologies, the complexity is greatly reduced. While it is possible to obtain a better denoising effect, it takes a short time; on the other hand, the solution of the present disclosure can effectively remove image noise, so that the high-pixel camera module can be used in a low-light environment, greatly expanding the high-pixel camera model The application scenario of the group; on the other hand, the disclosed solution does not require auxiliary tools or hardware changes, and is easy to implement.
根据本公开的示例性实施例,图像去噪模块81利用噪声估计模型和第二中间图像确定第三中间图像的过程可以被配置为执行:将第二中间图像输入噪声估计模型,确定与第二中间图像对应的噪声估计值;根据第二中间图像与噪声估计值确定第三中间图像。According to an exemplary embodiment of the present disclosure, the process of determining the third intermediate image by the image denoising module 81 using the noise estimation model and the second intermediate image may be configured to execute: input the second intermediate image into the noise estimation model, and determine the difference between the second intermediate image and the second intermediate image. The noise estimation value corresponding to the intermediate image; the third intermediate image is determined according to the second intermediate image and the noise estimation value.
根据本公开的示例性实施例,参考图9,相比对图像处理装置8,图像处理装置9还可以包括模型训练模块91。According to an exemplary embodiment of the present disclosure, referring to FIG. 9, compared to the image processing device 8, the image processing device 9 may further include a model training module 91.
具体的,模型训练模块91可以被配置为执行:获取训练集;其中,训练集包括多个噪声图像以及与各噪声图像对应的去噪图像,并且各噪声图像之间的噪声强度差异在一差异阈值内;将训练集中的噪声图像输入一卷积神经网络,卷积神经网络输出与噪声图像对应的训练输出图像;利用噪声图像对应的训练输出图像和去噪图像,计算卷积神经网络的损失函数,以对卷积神经网络进行训练;将训练后的卷积神经网络确定为噪声估计模型。Specifically, the model training module 91 may be configured to execute: obtain a training set; wherein the training set includes multiple noise images and denoised images corresponding to each noise image, and the noise intensity difference between each noise image is a difference Within the threshold; input the noise image in the training set into a convolutional neural network, and the convolutional neural network outputs the training output image corresponding to the noise image; use the training output image and denoising image corresponding to the noise image to calculate the loss of the convolutional neural network Function to train the convolutional neural network; determine the trained convolutional neural network as the noise estimation model.
根据本公开的示例性实施例,图像去噪模块81还可以被配置为执行:每执行一次迭代过程,更新卷积神经网络的参数,并利用更新的参数执行下一次迭代过程。According to an exemplary embodiment of the present disclosure, the image denoising module 81 may also be configured to execute: each time the iterative process is executed, the parameters of the convolutional neural network are updated, and the next iterative process is executed using the updated parameters.
根据本公开的示例性实施例,卷积神经网络包括级联的多个卷积层,每一卷积层均包括膨胀卷积单元。According to an exemplary embodiment of the present disclosure, a convolutional neural network includes a cascaded plurality of convolutional layers, and each convolutional layer includes an expanded convolution unit.
根据本公开的示例性实施例,参考图10,相比对图像处理装置8,图像处理装置10还可以包括初始化模块101。According to an exemplary embodiment of the present disclosure, referring to FIG. 10, compared to the image processing device 8, the image processing device 10 may further include an initialization module 101.
具体的,初始化模块101可以被配置为执行:对待处理图像进行滤波处理,得到初始化的第一中间图像,作为首次执行迭代过程的第一中间图像。Specifically, the initialization module 101 may be configured to perform: filter processing on the image to be processed to obtain the initialized first intermediate image, which is used as the first intermediate image for the first execution of the iterative process.
根据本公开的示例性实施例,参考图11,相比对图像处理装置8,图像处理装置11还可以包括目标函数确定模块111。According to an exemplary embodiment of the present disclosure, referring to FIG. 11, compared to the image processing device 8, the image processing device 11 may further include an objective function determining module 111.
具体的,目标函数确定模块111可以被配置为执行:基于图像恢复的退化模型构建出中间函数,中间函数包括保真项和正则化项;利用一辅助变量将中间函数的保真项与正则化项解耦,并根据解耦后的结果确定出目标函数;其中,辅助变量与第一中间图像相对应。Specifically, the objective function determination module 111 may be configured to execute: construct an intermediate function based on the degradation model of image restoration, the intermediate function includes a fidelity term and a regularization term; use an auxiliary variable to combine the fidelity term and regularization of the intermediate function The terms are decoupled, and the objective function is determined according to the decoupling result; among them, the auxiliary variable corresponds to the first intermediate image.
由于本公开实施方式的图像处理装置的各个功能模块与上述方法实施方式中相同,因此在此不再赘述。Since each functional module of the image processing device in the embodiment of the present disclosure is the same as in the above method embodiment, it will not be repeated here.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
此外,上述附图仅是根据本公开示例性实施例的方法所包括的处理的示意性说明,而 不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned drawings are merely schematic illustrations of the processing included in the method according to the exemplary embodiments of the present disclosure, and are not intended for limitation. It is easy to understand that the processing shown in the above drawings does not indicate or limit the time sequence of these processings. In addition, it is easy to understand that these processes can be executed synchronously or asynchronously in multiple modules, for example.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
本领域技术人员在考虑说明书及实践这里公开的内容后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Those skilled in the art will easily think of other embodiments of the present disclosure after considering the description and practicing the content disclosed herein. This application is intended to cover any variations, uses, or adaptive changes of the present disclosure. These variations, uses, or adaptive changes follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field that are not disclosed in the present disclosure. . The description and the embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。It should be understood that the present disclosure is not limited to the precise structure that has been described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.

Claims (20)

  1. 一种图像处理方法,包括:An image processing method, including:
    获取待处理图像,并利用所述待处理图像执行迭代过程,直至第一中间图像与第二中间图像之间的相似度大于相似度阈值为止,所述第一中间图像和所述第二中间图像均是在所述待处理图像的去噪过程中生成的图像;Obtain the image to be processed, and use the image to be processed to perform an iterative process until the similarity between the first intermediate image and the second intermediate image is greater than the similarity threshold, the first intermediate image and the second intermediate image Are all images generated during the denoising process of the image to be processed;
    结束所述迭代过程后,输出所述第一中间图像或所述第二中间图像,作为与所述待处理图像对应的处理后的图像;After finishing the iterative process, output the first intermediate image or the second intermediate image as a processed image corresponding to the image to be processed;
    其中,所述迭代过程包括:Wherein, the iterative process includes:
    基于目标函数,利用所述待处理图像和所述第一中间图像确定出所述第二中间图像;Determine the second intermediate image by using the image to be processed and the first intermediate image based on the objective function;
    利用噪声估计模型和所述第二中间图像确定第三中间图像;Determining a third intermediate image by using the noise estimation model and the second intermediate image;
    将所述第三中间图像作为所述第一中间图像。Use the third intermediate image as the first intermediate image.
  2. 根据权利要求1所述的图像处理方法,其中,利用噪声估计模型和所述第二中间图像确定第三中间图像包括:The image processing method according to claim 1, wherein determining the third intermediate image using the noise estimation model and the second intermediate image comprises:
    将所述第二中间图像输入所述噪声估计模型,确定与所述第二中间图像对应的噪声估计值;Inputting the second intermediate image into the noise estimation model, and determining a noise estimation value corresponding to the second intermediate image;
    根据所述第二中间图像与所述噪声估计值确定第三中间图像。A third intermediate image is determined according to the second intermediate image and the noise estimation value.
  3. 根据权利要求1或2所述的图像处理方法,其中,所述图像处理方法还包括:The image processing method according to claim 1 or 2, wherein the image processing method further comprises:
    获取训练集;其中,所述训练集包括多个噪声图像以及与各所述噪声图像对应的去噪图像,并且各所述噪声图像之间的噪声强度差异在一差异阈值内;Obtain a training set; wherein the training set includes a plurality of noise images and denoising images corresponding to each of the noise images, and the difference in noise intensity between each of the noise images is within a difference threshold;
    将所述训练集中的噪声图像输入一卷积神经网络,所述卷积神经网络输出与所述噪声图像对应的训练输出图像;Input the noise image in the training set to a convolutional neural network, and the convolutional neural network outputs a training output image corresponding to the noise image;
    利用所述噪声图像对应的训练输出图像和去噪图像,计算所述卷积神经网络的损失函数,以对所述卷积神经网络进行训练;Using the training output image and the denoising image corresponding to the noise image to calculate the loss function of the convolutional neural network to train the convolutional neural network;
    将训练后的所述卷积神经网络确定为所述噪声估计模型。The trained convolutional neural network is determined as the noise estimation model.
  4. 根据权利要求3所述的图像处理方法,其中,所述图像处理方法还包括:The image processing method according to claim 3, wherein the image processing method further comprises:
    每执行一次所述迭代过程,更新所述卷积神经网络的参数,并利用更新的参数执行下一次所述迭代过程。Each time the iterative process is executed, the parameters of the convolutional neural network are updated, and the updated parameters are used to execute the next iterative process.
  5. 根据权利要求3所述的图像处理方法,其中,所述卷积神经网络包括级联的多个卷积层,每一所述卷积层均包括膨胀卷积单元。3. The image processing method according to claim 3, wherein the convolutional neural network includes a plurality of convolutional layers cascaded, and each of the convolutional layers includes an expanded convolution unit.
  6. 根据权利要求1所述的图像处理方法,其中,所述图像处理方法还包括:The image processing method according to claim 1, wherein the image processing method further comprises:
    对所述待处理图像进行滤波处理,得到初始化的第一中间图像,作为首次执行所述迭代过程的第一中间图像。Filtering the image to be processed is performed to obtain the initialized first intermediate image, which is used as the first intermediate image for performing the iterative process for the first time.
  7. 根据权利要求1所述的图像处理方法,其中,所述图像处理方法还包括:The image processing method according to claim 1, wherein the image processing method further comprises:
    基于图像恢复的退化模型构建出中间函数,所述中间函数包括保真项和正则化项;An intermediate function is constructed based on the degradation model of image restoration, and the intermediate function includes a fidelity term and a regularization term;
    利用一辅助变量将所述中间函数的保真项与正则化项解耦,并根据解耦后的结果确定出所述目标函数;Use an auxiliary variable to decouple the fidelity term and regularization term of the intermediate function, and determine the objective function according to the decoupling result;
    其中,所述辅助变量与所述第一中间图像相对应。Wherein, the auxiliary variable corresponds to the first intermediate image.
  8. 根据权利要求1所述的图像处理方法,其中,所述待处理图像是由终端设备的摄像模组拍摄的图像。The image processing method according to claim 1, wherein the image to be processed is an image taken by a camera module of a terminal device.
  9. 根据权利要求1所述的图像处理方法,其中,所述图像处理方法还包括:The image processing method according to claim 1, wherein the image processing method further comprises:
    将所述处理后的图像保存至终端设备,并进行展示。The processed image is saved to the terminal device and displayed.
  10. 一种图像处理装置,包括:An image processing device, including:
    图像去噪模块,被配置为获取待处理图像,并利用所述待处理图像执行迭代过程,直 至第一中间图像与第二中间图像之间的相似度大于相似度阈值为止,所述第一中间图像和所述第二中间图像均是在所述待处理图像的去噪过程中生成的图像;The image denoising module is configured to obtain the image to be processed, and use the image to be processed to perform an iterative process until the similarity between the first intermediate image and the second intermediate image is greater than the similarity threshold, the first intermediate image Both the image and the second intermediate image are images generated during the denoising process of the image to be processed;
    图像输出模块,被配置为结束所述迭代过程后,输出所述第一中间图像或所述第二中间图像,作为与所述待处理图像对应的处理后的图像;An image output module configured to output the first intermediate image or the second intermediate image as a processed image corresponding to the image to be processed after the iterative process is ended;
    其中,所述迭代过程包括:基于目标函数,利用所述待处理图像和所述第一中间图像确定出所述第二中间图像;利用噪声估计模型和所述第二中间图像确定第三中间图像;将所述第三中间图像作为所述第一中间图像。Wherein, the iterative process includes: determining the second intermediate image using the image to be processed and the first intermediate image based on an objective function; determining a third intermediate image using a noise estimation model and the second intermediate image ; Use the third intermediate image as the first intermediate image.
  11. 根据权利要求10所述的图像处理装置,其中,所述图像去噪模块利用噪声估计模型和所述第二中间图像确定第三中间图像的过程被配置为执行:将所述第二中间图像输入所述噪声估计模型,确定与所述第二中间图像对应的噪声估计值;根据所述第二中间图像与所述噪声估计值确定第三中间图像。The image processing device according to claim 10, wherein the process of determining the third intermediate image by the image denoising module using the noise estimation model and the second intermediate image is configured to perform: inputting the second intermediate image The noise estimation model determines a noise estimation value corresponding to the second intermediate image; and determines a third intermediate image according to the second intermediate image and the noise estimation value.
  12. 根据权利要求10或11所述的图像处理装置,其中,所述图像处理装置还包括:The image processing device according to claim 10 or 11, wherein the image processing device further comprises:
    模型训练模块,被配置为获取训练集;其中,所述训练集包括多个噪声图像以及与各所述噪声图像对应的去噪图像,并且各所述噪声图像之间的噪声强度差异在一差异阈值内;将所述训练集中的噪声图像输入一卷积神经网络,所述卷积神经网络输出与所述噪声图像对应的训练输出图像;利用所述噪声图像对应的训练输出图像和去噪图像,计算所述卷积神经网络的损失函数,以对所述卷积神经网络进行训练;将训练后的所述卷积神经网络确定为所述噪声估计模型。The model training module is configured to obtain a training set; wherein the training set includes a plurality of noise images and a denoising image corresponding to each of the noise images, and the noise intensity difference between each of the noise images is a difference Within the threshold; input the noise image in the training set into a convolutional neural network, and the convolutional neural network outputs the training output image corresponding to the noise image; use the training output image and the denoising image corresponding to the noise image Calculate the loss function of the convolutional neural network to train the convolutional neural network; determine the trained convolutional neural network as the noise estimation model.
  13. 根据权利要求12所述的图像处理装置,其中,图像去噪模块还被配置为执行:每执行一次所述迭代过程,更新所述卷积神经网络的参数,并利用更新的参数执行下一次所述迭代过程。The image processing device according to claim 12, wherein the image denoising module is further configured to execute: each time the iterative process is executed, the parameters of the convolutional neural network are updated, and the updated parameters are used to execute the next Describe the iterative process.
  14. 根据权利要求12所述的图像处理装置,其中,所述卷积神经网络包括级联的多个卷积层,每一所述卷积层均包括膨胀卷积单元。The image processing device according to claim 12, wherein the convolutional neural network includes a plurality of convolutional layers cascaded, and each of the convolutional layers includes an expanded convolution unit.
  15. 根据权利要求10所述的图像处理装置,其中,所述图像处理装置还包括:The image processing device according to claim 10, wherein the image processing device further comprises:
    初始化模块,被配置为对所述待处理图像进行滤波处理,得到初始化的第一中间图像,作为首次执行所述迭代过程的第一中间图像。The initialization module is configured to perform filtering processing on the image to be processed to obtain an initialized first intermediate image as the first intermediate image for performing the iterative process for the first time.
  16. 根据权利要求10所述的图像处理装置,其中,所述图像处理装置还包括:The image processing device according to claim 10, wherein the image processing device further comprises:
    目标函数确定模块,被配置为基于图像恢复的退化模型构建出中间函数,所述中间函数包括保真项和正则化项;利用一辅助变量将所述中间函数的保真项与正则化项解耦,并根据解耦后的结果确定出所述目标函数;其中,所述辅助变量与所述第一中间图像相对应。The objective function determination module is configured to construct an intermediate function based on the degradation model of image restoration, the intermediate function including a fidelity term and a regularization term; and an auxiliary variable is used to resolve the fidelity and regularization terms of the intermediate function And determine the objective function according to the decoupling result; wherein, the auxiliary variable corresponds to the first intermediate image.
  17. 根据权利要求10所述的图像处理装置,其中,所述待处理图像是由终端设备的摄像模组拍摄的图像。10. The image processing device according to claim 10, wherein the image to be processed is an image taken by a camera module of a terminal device.
  18. 根据权利要求10所述的图像处理装置,其中,所述处理后的图像由终端设备包括并进行展示。11. The image processing device according to claim 10, wherein the processed image is included and displayed by a terminal device.
  19. 一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1至9中任一项所述的图像处理方法。A computer readable medium having a computer program stored thereon, and when the program is executed by a processor, the image processing method according to any one of claims 1 to 9 is realized.
  20. 一种电子设备,包括:An electronic device including:
    一个或多个处理器;One or more processors;
    存储装置,被配置为存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至9中任一项所述的图像处理方法。The storage device is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the implementation as in claims 1 to 9 Any one of the image processing methods.
PCT/CN2020/129437 2019-12-04 2020-11-17 Image processing method and apparatus, computer readable storage medium and electronic device WO2021109867A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911228475.5 2019-12-04
CN201911228475.5A CN111062883B (en) 2019-12-04 2019-12-04 Image processing method and device, computer readable medium and electronic device

Publications (1)

Publication Number Publication Date
WO2021109867A1 true WO2021109867A1 (en) 2021-06-10

Family

ID=70299697

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/129437 WO2021109867A1 (en) 2019-12-04 2020-11-17 Image processing method and apparatus, computer readable storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN111062883B (en)
WO (1) WO2021109867A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116823994A (en) * 2023-02-20 2023-09-29 阿里巴巴达摩院(杭州)科技有限公司 Image generation and model training method, device, equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062883B (en) * 2019-12-04 2022-10-18 RealMe重庆移动通信有限公司 Image processing method and device, computer readable medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376568A (en) * 2014-11-28 2015-02-25 成都影泰科技有限公司 Method for processing DICOM (digital imaging and communications in medicine) medical images on basis of formats
US20190188510A1 (en) * 2017-12-15 2019-06-20 Samsung Electronics Co., Ltd. Object recognition method and apparatus
CN110009052A (en) * 2019-04-11 2019-07-12 腾讯科技(深圳)有限公司 A kind of method of image recognition, the method and device of image recognition model training
CN111062883A (en) * 2019-12-04 2020-04-24 RealMe重庆移动通信有限公司 Image processing method and device, computer readable medium and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237524B (en) * 2008-03-03 2010-06-02 中国科学院光电技术研究所 An image noise elimination method with reserved high-frequency information
CN104156994B (en) * 2014-08-14 2017-03-22 厦门大学 Compressed sensing magnetic resonance imaging reconstruction method
CN106897971B (en) * 2016-12-26 2019-07-26 浙江工业大学 Non local TV image de-noising method based on independent component analysis and singular value decomposition
CN109658348A (en) * 2018-11-16 2019-04-19 天津大学 The estimation of joint noise and image de-noising method based on deep learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376568A (en) * 2014-11-28 2015-02-25 成都影泰科技有限公司 Method for processing DICOM (digital imaging and communications in medicine) medical images on basis of formats
US20190188510A1 (en) * 2017-12-15 2019-06-20 Samsung Electronics Co., Ltd. Object recognition method and apparatus
CN110009052A (en) * 2019-04-11 2019-07-12 腾讯科技(深圳)有限公司 A kind of method of image recognition, the method and device of image recognition model training
CN111062883A (en) * 2019-12-04 2020-04-24 RealMe重庆移动通信有限公司 Image processing method and device, computer readable medium and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116823994A (en) * 2023-02-20 2023-09-29 阿里巴巴达摩院(杭州)科技有限公司 Image generation and model training method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111062883A (en) 2020-04-24
CN111062883B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
WO2020156009A1 (en) Video repair method and device, electronic device and storage medium
US20190042935A1 (en) Dynamic quantization of neural networks
US20180324465A1 (en) Edge-aware spatio-temporal filtering and optical flow estimation in real time
CN112001914A (en) Depth image completion method and device
WO2021109867A1 (en) Image processing method and apparatus, computer readable storage medium and electronic device
US9953400B2 (en) Adaptive path smoothing for video stabilization
WO2021164269A1 (en) Attention mechanism-based disparity map acquisition method and apparatus
WO2020001222A1 (en) Image processing method, apparatus, computer readable medium, and electronic device
CN111915480A (en) Method, apparatus, device and computer readable medium for generating feature extraction network
WO2022143812A1 (en) Image restoration method, apparatus and device, and storage medium
WO2023005386A1 (en) Model training method and apparatus
US11741579B2 (en) Methods and systems for deblurring blurry images
CN111325792A (en) Method, apparatus, device, and medium for determining camera pose
US20170185900A1 (en) Reconstruction of signals using a Gramian Matrix
CN114463223A (en) Image enhancement processing method and device, computer equipment and medium
CN112418249A (en) Mask image generation method and device, electronic equipment and computer readable medium
CN110211017B (en) Image processing method and device and electronic equipment
CN114792355A (en) Virtual image generation method and device, electronic equipment and storage medium
Liu et al. Image inpainting algorithm based on tensor decomposition and weighted nuclear norm
Zha et al. Simultaneous nonlocal low-rank and deep priors for poisson denoising
CN113409307A (en) Image denoising method, device and medium based on heterogeneous noise characteristics
Li et al. A mixed noise removal algorithm based on multi-fidelity modeling with nonsmooth and nonconvex regularization
CN110069195B (en) Image dragging deformation method and device
CN111784726A (en) Image matting method and device
WO2021217653A1 (en) Video frame insertion method and apparatus, and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20896788

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20896788

Country of ref document: EP

Kind code of ref document: A1