Noise image generation method, device, electronic device and storage medium

By obtaining and adjusting the noise index value, a noise image that is closer to the actual noise is generated, which solves the problem that the noise image in the existing technology is not realistic enough and improves the training accuracy of the image noise reduction model.

CN113538223BActive Publication Date: 2024-08-23VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110854815.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-28
Publication Date
2024-08-23
Estimated Expiration
2041-07-28

AI Technical Summary

Technical Problem

The noise images synthesized in the existing technology are not realistic enough, resulting in a reduction in the accuracy of the image denoising model training process.

Method used

By acquiring noise-free images and noisy images collected by the target image sensor, noise is added to the image according to the noise index value, and the real noise image is used to adjust the noise distribution to generate a noise image that is closer to the actual noise.

Benefits of technology

The image denoising model improves the pertinence and training accuracy of the target image sensor, and the noise in the generated noise image is closer to the real noise, which enhances the training effect of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113538223B
    Figure CN113538223B
Patent Text Reader

Abstract

The present application discloses a noise image generation method, device, electronic device and storage medium, belonging to the field of image processing technology. The noise image generation method comprises: acquiring a first image and a second image; wherein the first image is a noise-free image, and the second image is a noisy image acquired using a target image sensor; determining a noise index value corresponding to the target image sensor; adding noise to the first image according to the noise index value to obtain a third image; adjusting the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to a noise image generation method, device, electronic device and storage medium. Background Art

[0002] As users' requirements for image quality increase, noisy images captured by electronic devices are increasingly unable to meet users' needs. Therefore, it is necessary to further perform noise reduction processing on the captured images.

[0003] In the process of image denoising using traditional learning and related artificial intelligence algorithms such as deep learning, it is usually necessary to obtain or construct noise-noise-free sample image pairs in order to use these sample image pairs to train the image denoising model.

[0004] When constructing training samples, the noise in the noise image is usually random noise, so that the noise image synthesized by noise cannot reflect the noise generated by the image sensor in the real electronic device during the image shooting process. Therefore, the synthesized noise image is not realistic enough, thereby reducing the accuracy of the subsequent image denoising model training process. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a noise image generation method, device, electronic device and storage medium, which can solve the problem that the noise image synthesized in the prior art is not realistic enough, thereby reducing the accuracy of the subsequent image denoising model training process.

[0006] In a first aspect, an embodiment of the present application provides a method for generating a noise image, the method comprising:

[0007] Acquire a first image and a second image; wherein the first image is a noise-free image, and the second image is a noisy image acquired using a target image sensor;

[0008] Determining a noise index value corresponding to a target image sensor;

[0009] Adding noise to the first image according to the noise index value to obtain a third image;

[0010] The noise distribution of the third image is adjusted according to the second image to obtain a noise image corresponding to the first image.

[0011] In a second aspect, an embodiment of the present application provides a noise image generating device, the device comprising:

[0012] An acquisition module, used to acquire a first image and a second image; wherein the first image is a noise-free image, and the second image is a noisy image acquired using a target image sensor;

[0013] A determination module, used to determine a noise index value corresponding to a target image sensor;

[0014] A noise adding module, used for adding noise to the first image according to the noise index value to obtain a third image;

[0015] The adjustment module is used to adjust the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0018] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0019] In an embodiment of the present application, a noise-free first image and a noisy second image captured by a target image sensor are obtained, and then noise is added to the first image according to a noise index value corresponding to the target image sensor to obtain a third image. Then, the noise distribution of the third image is adjusted according to the second image to obtain a noise image corresponding to the first image. Since the third image is a noisy image generated for the noise index value corresponding to the target image sensor, and the third image is optimized using the real noise image captured by the target image sensor, that is, the second image, the final noise image can be more targeted to the target image sensor, and the noise in the generated noise image is also closer to the noise of the image actually captured by the target image sensor, thereby improving the accuracy of the subsequent training process of the image denoising model for the target sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is one of the flow charts of a noise image generating method according to an exemplary embodiment;

[0021] Figure 2 is a workflow diagram of an optimized discriminant network according to an exemplary embodiment;

[0022] Figure 3is a second flowchart of a noise image generating method according to an exemplary embodiment;

[0023] Figure 4 is a third flowchart of a noise image generation method according to an exemplary embodiment;

[0024] Figure 5 is a structural block diagram of a noise image generating device according to an exemplary embodiment;

[0025] Figure 6 is a structural block diagram of an electronic device according to an exemplary embodiment;

[0026] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0029] The noise image generation method, device, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0030] Since images directly output by the camera generally contain noise, and the higher the camera's sensitivity (International Standardization Organization, ISO), the more serious the noise in the captured image, the image needs to be processed for noise reduction. Here, ISO is an internationally unified indicator for measuring the photosensitivity of traditional cameras.

[0031] In the process of image denoising using traditional learning, deep learning and other related artificial intelligence algorithms, it is necessary to obtain or construct noise-noise-free sample image pairs in order to use these sample image pairs to train the image denoising model.

[0032] The present application provides a noise image generation method, which can be applied to the scenario of constructing a noise image.

[0033] In addition, the noise image generation method provided in the embodiment of the present application can be executed by a noise image generation device or a control module for the noise image generation method in the noise image generation device. In the embodiment of the present application, the noise image generation method provided in the embodiment of the present application is described by taking the noise image generation device executing the noise image generation method as an example.

[0034] Figure 1 The figure is a flow chart of a noise image generating method according to an exemplary embodiment.

[0035] like Figure 1 As shown, the noise image generation method may include the following steps:

[0036] Step 110: Acquire a first image and a second image.

[0037] In an embodiment of the present application, the first image may be a noise-free image, for example: a high-definition color (Red, Green, Blue, RGB) image. The second image may be a noisy image collected using a target image sensor in a target electronic device, wherein the target image sensor may be a type of sensor referenced when generating a noise image in an embodiment of the present application, or may be a type of sensor targeted by a denoising model trained using the noise image, and the second image may be used to optimize the initial noise image. Both the first image and the second image may be obtained from a public data set or a data set captured using a target image sensor. In the process of acquisition, the data may be cleaned to retain a large number of clear RGB images as the first image. In addition, multiple RGB images of different brightness captured by an electronic device having a target image sensor may be used, and one of them may be selected as the second image.

[0038] Step 120: Determine a noise index value corresponding to the target image sensor.

[0039] Here, since different image sensors have different noise index values, it is necessary to determine the corresponding noise index values ​​for different image sensors. The noise index value may be a value that can measure the noise level of the target image sensor, which can be represented by noiseVariance=Ax+B, where noiseVariance may be the noise index value, x may be the pixel value of each pixel in the original (RAW Image Format, RAW) image corresponding to the first image, and A and B may both be parameters, A may be a parameter of one type of noise, and B may be a parameter of another type of noise. Therefore, by determining A and B, the noise index value that needs to be added to each pixel in the first image can be determined.

[0040] Step 130: adding noise to the first image according to the noise index value to obtain a third image.

[0041] Here, the third image can be the initial noise image. In order to better add noise to the first image, noise can be added to the RAW image corresponding to the first image. Specifically, the pixel value x of each pixel in the RAW image can be input into the above noise model noiseVariance=Ax+B, and the noise index value that needs to be added to each pixel is output, thereby obtaining the third image, that is, the initial noise image.

[0042] Step 140: Adjust the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image.

[0043] Here, the noise image corresponding to the first image may be a noise image that is closer to the actual scene, and the noise image may be used to train the denoising model.

[0044] For example, the noise distribution of the second image can be determined first, and then the noise distribution of the third image can be adjusted according to the noise distribution of the second image, so that the final noise image is the same or similar to the noise distribution of the second image, thereby achieving the purpose of being closer to the noise characteristics of the actual image.

[0045] In an optional implementation, in order to further improve the authenticity of the generated noise image, a neural network model may be used to learn the noise distribution of the second image, and then the neural network model may be used to adjust the noise distribution of the third image to achieve an optimization process for the third image. Specifically, an optimized discriminant network may be used to optimize the third image. The function of the optimized discriminant network may be to perform domain adversarial generation between the third image and the second image, so that the noise distribution of the third image and the second image is as consistent as possible or the similarity is greater than a preset threshold, so as to improve the authenticity of the generated noise image.

[0046] Based on this, the above step 140 may specifically include:

[0047] Inputting the third image into P consecutive convolutional layers in the first network to obtain P feature information output by the P convolutional layers;

[0048] The feature information output by the Pth convolutional layer is input into P consecutive deconvolutional layers in the first network, and a noise image corresponding to the first image is output.

[0049] Here, the first network can be trained according to the second image, P can be a positive integer, P≥2, the P convolutional layers and the P deconvolutional layers can correspond one to one, the input information of the first deconvolutional layer can be the first feature information output by the first convolutional layer and the second feature information output by the second deconvolutional layer, the first convolutional layer can be any convolutional layer among the P convolutional layers, the first deconvolutional layer can be a deconvolutional layer corresponding to the first convolutional layer among the P deconvolutional layers, and the first deconvolutional layer can be the next deconvolutional layer of the second deconvolutional layer.

[0050] Specifically, the third image can be input into the first network in succession to P convolution layers, and the target image undergoes matrix operations in each convolution operation. n =w n (w n-1 (…(w1x+b1))+b n-1 )+b n , can output the corresponding feature vector, where Feature n The feature vector output by the nth convolution module, i.e. the convolution layer, is represented by w, and the weight is represented by w. The feature vector output by the previous deconvolution layer and the feature vector output by the convolution layer corresponding to the previous deconvolution layer are connected through a jump structure and input into the next deconvolution layer. After the matrix operation in each deconvolution operation, After that, the third image after optimization processing is output, that is, the noise image corresponding to the first image, where Represents the feature vector output by the deconvolution layer, w is the weight, and the feature vector output by the previous deconvolution layer and the feature vector output by the convolution layer corresponding to the previous deconvolution layer are connected through a jump structure to fully retain the detail information of the image.

[0051] In a specific example, the workflow of optimizing the network, i.e., the first network, can be as follows: Figure 2As shown, the optimization network 220 may include an input convolution layer 221, four convolution modules 2221-2224, four deconvolution modules 2231-2234, an output deconvolution layer 222, and four jump connections 22311-22341. Among them, the input convolution layer 221 corresponds to the output deconvolution layer 222, the first convolution module 2221 corresponds to the fourth deconvolution module 2234, the second convolution module 2222 corresponds to the third deconvolution module 2233, the third convolution module 2223 corresponds to the second deconvolution module 2232, and the fourth convolution module 2224 corresponds to the first deconvolution module 2231. That is, if the first convolution layer is the input convolution layer 221, the first deconvolution layer is the output deconvolution layer 222, and the second deconvolution layer is the fourth deconvolution module 2234; if the first convolution layer is the first convolution module 2221, the first deconvolution layer is the fourth deconvolution module 2234, and the second deconvolution layer is the third deconvolution module 2233, and so on, which will not be repeated here.

[0052] Exemplarily, the synthetic domain image 210, that is, the third image, is input into four consecutive convolution layers in the optimization network 220 through the input convolution layer 221 to obtain four feature information output by the four convolution layers. Specifically, after passing through the first convolution module 2221, a first feature vector is obtained, after passing through the second convolution module 2222, a second feature vector is obtained, after passing through the third convolution module 2223, a third feature vector is obtained, and after passing through the fourth convolution module 2224, a fourth feature vector is obtained. The first feature information is input into four consecutive deconvolution layers in the optimization network 220 to obtain a noisy image 230. Specifically, the fourth eigenvector and the fifth eigenvector obtained by the first deconvolution module 2231 are connected through a first jump structure 22311, and then input into the second deconvolution module 2232 to obtain a sixth eigenvector. The third eigenvector and the sixth eigenvector are connected through a second jump structure 22321, and then input into the third deconvolution module 2233 to obtain a seventh eigenvector. The second eigenvector and the seventh eigenvector are connected through a third jump structure 22331, and then input into the fourth deconvolution module 2234 to obtain an eighth eigenvector. The first eigenvector and the eighth eigenvector are connected through a fourth jump structure 22341, and then input into the output deconvolution layer 222 to obtain a noisy image 230.

[0053] In this way, by optimizing the third image through the continuous P convolutional layers and deconvolutional layers and the jump structure in the first network, a noise image that is closer to the actual scene than the third image can be obtained, thereby improving the authenticity of the generated noise image.

[0054] In addition, since there may be multiple noise index values ​​corresponding to the target image sensor, noise may be added to the first image according to the multiple noise index values ​​to obtain multiple third images, for example, M third images.

[0055] Regarding the training process of the first network, in an optional implementation, when the number of third images is M, step 140 may specifically include:

[0056] Input the target image into the first network, and output a sixth image;

[0057] Acquire a first noise distribution feature corresponding to the sixth image and a second noise distribution feature corresponding to the second image;

[0058] Inputting the first noise distribution feature and the second noise distribution feature into the second network, and outputting a similarity value between the first noise distribution feature and the second noise distribution feature;

[0059] When the similarity value is less than a preset threshold, the network parameters of the first network are adjusted according to the similarity value and its corresponding loss value until the first network converges to obtain a trained first network.

[0060] Here, the target image can be any image in the M third images, M can be a positive integer, and M≥2. The sixth image can be an image obtained after the target image is optimized by the first network. The M noise images corresponding to the first image can be noise images that are closer to the real noise distribution than the target image. The first network and the second network can form a generative adversarial network. The second image can be an image randomly selected from a plurality of RGB images of different brightness captured by the target image sensor, and the second image can be randomly selected multiple times during the training process.

[0061] Exemplarily, the above-mentioned optimization discriminant network can be a two-stage network model, wherein the first segment of the network can be an optimization network, that is, a first network; and the second segment of the network can be a discriminant network, that is, a second network. The first network can be used to optimize the target image and generate a noise image that is closer to the actual noise distribution, and the second network can be used to determine the similarity value between the first noise distribution feature corresponding to the sixth image and the second noise distribution feature corresponding to the second image. Here, the first network can be trained, and when the similarity value is less than a preset threshold, the network parameters of the first network can be adjusted until the first network converges to obtain a trained first network, and the trained first network can be used to generate a noise image that is more in line with the actual scene.

[0062] In addition, the sixth image output by the optimization network still belongs to the synthetic domain image, and its noise probability distribution can be represented by Px; the noise probability distribution of the real domain image, that is, the second image, can be represented by Py. These two types of images are input into the discriminant network, and feature vectors (feature maps) are output through continuous convolutional layers. Finally, the feature vectors are input into three continuous fully connected layers, and finally a probability value in the interval [0, 1] is output. The probability value represents the similarity between the synthetic domain and the real domain image. When the probability value is closer to 1, it means that the noise distribution of the two images is more similar. When the probability value is closer to 0, it means that the noise distribution of the two images is more different.

[0063] In addition, it can be set in the discriminant network that when the probability value is lower than 0.5, it is considered that there is a large difference in the noise distribution between the sixth image and the second image, and the probability value is fed back to the optimization network in the first stage. The optimization network will adjust the weight coefficients (weights) in the network, regenerate the optimized sixth image, and then input the regenerated sixth image into the discriminant network to perform similarity discrimination between the second image and the sixth image. Specifically, the weight adjustment can be determined by solving the partial derivative of the probability loss with respect to the weight, for example, by updating w^new=Δw+w^old to adjust the weight and train until the training converges to obtain the final model, that is, the trained first network.

[0064] In a specific example, the workflow of the discriminant network, i.e., the second network, can be as follows: Figure 2 As shown, first, the synthetic domain image 210, i.e., the target image, is input to the optimization network 220, and the initial noise image 230, i.e., the sixth image, is output. The first noise distribution feature 2301 corresponding to the noise image 230 and the second noise distribution feature 2501 corresponding to the real domain image 250, i.e., the second image, are obtained through the continuous convolutional layers 241 in the discriminant network 240, and the first noise distribution feature 2301 and the second noise distribution feature 2501 are input to the continuous three-layer fully connected layer 242 in the discriminant network 240, and the similarity value between the first noise distribution feature 2301 and the second noise distribution feature 2501 is output, and the optimization network 220 is trained according to the similarity to obtain a trained optimization network, so as to generate a noise image that is more in line with the actual scene.

[0065] In this way, by using the second network to judge the similarity between the sixth image and the second image during the training of the first network, and then adjusting the network parameters of the first network according to the judgment result, the first network can be enabled to have the ability to optimize the image noise distribution, thereby further improving the authenticity of the noise image generated after optimization by the first network.

[0066] In addition, in an optional implementation, when the first image is a noise-free RGB image, before step 130, the noise image generation method may further include:

[0067] Convert the first image from an RGB image to a raw image file;

[0068] Based on this, the above step 130 may include:

[0069] Add noise to the original image file according to the noise index value to obtain a third image;

[0070] The third image is converted from a raw image file into an RGB image.

[0071] Here, the original image file may be a RAW image. The noise distribution in the RGB image is complex and difficult to process. In order to better process the noise distribution, noise may be added to the RAW image.

[0072] Exemplarily, when acquiring the first image, a high-definition RGB image can be acquired, and then the first image is converted from an RGB image to a RAW image through an inverse image signal processing (ISP) operation. Specifically, for example, a RAW image can be obtained by methods such as inverse tone mapping, gamma inverse correction, and inverse digital gain. Here, ISP may include processes such as black level compensation, color interpolation (demosaicing), denoising, automatic white balance, and color correction. Among them, inverse tone mapping is a technology used to convert a standard dynamic range (SDR) source signal into a high dynamic range (HDR) source signal, which can be applied to the production end or terminal equipment to achieve HDR "restoration" and upward compatibility of existing SDR programs to a certain extent; gamma inverse correction can be a method of editing the gamma curve of an image to perform nonlinear tone editing on the image, which can detect the dark and light parts in the image signal and increase the ratio of the two, thereby improving the image contrast effect, and gamma inverse correction is the reverse operation of gamma correction.

[0073] Based on this, adding noise to the first image according to the noise index value may be adding noise to a RAW image, i.e., an original image file, according to the noise index value. The third image thus obtained may also be a RAW image, i.e., an original image file. Therefore, before adjusting the noise distribution of the third image, the third image may also be converted from an original image file into an RGB image.

[0074] In this way, since the RAW image can better reflect the noise distribution, by converting the first image from an RGB image to a RAW image and then adding noise, the effect of noise addition can be better, which facilitates the extraction of noise distribution characteristics of the image.

[0075] Therefore, by acquiring a noise-free first image and a noisy second image captured by a target image sensor, and then adding noise to the first image according to a noise index value corresponding to the target image sensor, a third image is obtained, and then the noise distribution of the third image is adjusted according to the second image to obtain a noise image corresponding to the first image. Since the third image is a noisy image generated for the noise index value corresponding to the target image sensor, and the third image is optimized using the real noise image captured by the target image sensor, that is, the second image, the final noise image can be more targeted to the target image sensor, and the noise in the generated noise image is also closer to the noise of the image actually captured by the target image sensor, thereby improving the accuracy of the subsequent training process of the image denoising model for the target sensor.

[0076] Based on the above steps 110-140, in a possible embodiment, as Figure 3 As shown, step 120 may specifically include steps 1201-1202, wherein:

[0077] Step 1201 , determining a target Poisson noise index value and a target Gaussian noise index value corresponding to a target image sensor.

[0078] Here, regarding the noise index value noiseVariance=Ax+B, where A may be a target Poisson noise index value corresponding to the target image sensor, B may be a target Gaussian noise index value corresponding to the target image sensor, and x may be a pixel value of each pixel in the first image.

[0079] Exemplarily, when the target Poisson noise index value A and the target Gaussian noise index value B are determined, the noise index value noiseVariance of the target image sensor corresponding to each pixel point can be determined.

[0080] Based on this, in an optional implementation manner, step 1201 may specifically include:

[0081] Acquire N fourth images;

[0082] Traversing the N fourth images, respectively calculating the first pixel average value and the first pixel variance value of the pixel points contained in each fourth image;

[0083] Dividing the first pixel variance value by the first pixel average value to obtain a Poisson noise index value corresponding to each fourth image;

[0084] Determine a first mapping relationship between the Poisson noise index value and the sensitivities according to the N sensitivities and the N Poisson noise index values ​​corresponding to the N fourth images;

[0085] According to the first mapping relationship, M Poisson noise index values ​​corresponding to the M target sensitivities are determined as target Poisson noise index values ​​corresponding to the target image sensor.

[0086] Here, the fourth image may be an image of a standard color chart acquired at different sensitivities using the target image sensor, N may be a positive integer, and N≥2. The M target sensitivities may be M sensitivities determined from the sensitivity interval corresponding to the target image sensor, M may be a positive integer, and M≥2.

[0087] In a specific example, different shooting devices have different ISO segments. In order to make the generated noise image closer to the real scene, the ISO value can be randomly selected or selected at equal intervals in the ISO segment corresponding to the target image sensor. The ISO can be calculated by the analog gain and digital gain set by the target image sensor. 24 color card images are shot under different ISO conditions, and the average value and variance value of the pixels contained in each image of the 24 color card images are calculated. Each variance value is divided by the average value to obtain 10 Poisson noise index values ​​corresponding to the 10 24 color card images. Based on the maximum likelihood estimation algorithm, according to the 10 sensitivities and 10 Poisson noise index values ​​corresponding to the 10 24 color card images, the mapping relationship A=a0·ISO+a1 between the Poisson noise index value and the sensitivity is determined, where a0 and a1 can both be parameters of the target image sensor. According to the mapping relationship, 5 Poisson noise index values ​​corresponding to the 5 randomly selected target sensitivities can be determined as the 5 target Poisson noise index values ​​A corresponding to the target image sensor.

[0088] In this way, by determining the first mapping relationship between the Poisson noise index value and the sensitivity, multiple target Poisson noise index values ​​can be obtained, thereby generating multiple third images that can basically cover the sensitivity range corresponding to the target image sensor, so that finally multiple noise images corresponding to the first image are obtained, which can fully simulate the noise environment of the target image sensor regarding Poisson noise in different scenarios.

[0089] In addition, in an optional implementation manner, step 1201 may further specifically include:

[0090] Acquire K fifth images;

[0091] Traversing the K fifth images, respectively calculating the second pixel variance values ​​of the pixels contained in each image, and using the second pixel variance values ​​corresponding to the K fifth images respectively as K Gaussian noise index values ​​corresponding to the K fifth images;

[0092] Based on a maximum likelihood estimation algorithm, according to K sensitivities and K Gaussian noise index values ​​corresponding to the K fifth images, determining a second mapping relationship between the Gaussian noise index value and the sensitivity;

[0093] According to the second mapping relationship, M Gaussian noise index values ​​corresponding to the M target sensitivities are determined as target Gaussian noise index values ​​corresponding to the target image sensor.

[0094] Here, the fifth image may be an image captured by the target image sensor at different sensitivities, the image may be a black image, K may be a positive integer, and K≥2. Specifically, the fifth image may be obtained by shooting a black image using the target image sensor, or by shooting an image while blocking the lens of the target image sensor.

[0095] In a specific example, 20 all-black images can be taken under different ISO conditions, and the variance value of the pixels contained in each of the 20 all-black images is calculated. The 20 variance values ​​are used as 20 Gaussian noise index values ​​corresponding to the 20 all-black images. Based on the maximum likelihood estimation algorithm, the mapping relationship B=b0·ISO·ISO+b1·ISO between the Gaussian noise index value and the sensitivity is determined, wherein b0 and b1 can both be parameters of the target image sensor. According to the mapping relationship, 10 Gaussian noise index values ​​corresponding to 10 target sensitivities can be determined as the 10 Gaussian noise index values ​​B corresponding to the target image sensor.

[0096] In this way, by determining the second mapping relationship between the Gaussian noise index value and the sensitivity, multiple target Gaussian noise index values ​​can be obtained, thereby generating multiple third images that can basically cover the sensitivity range corresponding to the target image sensor, so that finally multiple noise images corresponding to the first image are obtained, which can fully simulate the noise environment of the target image sensor regarding Gaussian noise in different scenarios.

[0097] Step 1202 , calculating a noise index value corresponding to a target image sensor according to a target Poisson noise index value and a target Gaussian noise index value.

[0098] In a specific example, according to a plurality of target Poisson noise index values ​​A and a plurality of target Gaussian noise index values ​​B, a noise index value noiseVariance=Ax+B corresponding to the target image sensor can be calculated.

[0099] In this way, through the above process, Gaussian distributed noise and Poisson distributed noise can be synthesized simultaneously, making the noise distribution more diverse and further improving the authenticity of the noise image.

[0100] In order to better describe the entire solution, based on the above embodiments, a specific example is given. Figure 4 As shown, the noise image generation method may include steps 410-450, which are explained in detail below.

[0101] Step 410: Acquire a first image and a second image.

[0102] Here, a high-definition RGB image, that is, a first image, and a noisy RGB image captured by using a target image sensor, that is, a second image, can be obtained.

[0103] Step 420: Convert the first image into a RAW image.

[0104] Here, the noise distribution in the RGB image is complex and difficult to process, so noise can be added based on the RAW image. However, it is difficult to obtain high-definition RAW images. Therefore, the RGB image can be obtained first, and then the RGB image can be converted into a RAW image. The specific conversion method will not be repeated here.

[0105] Step 430: calibrate the noise index value of the sensor.

[0106] Here, since different sensors have different noise intensities, it is necessary to calibrate the noise index values ​​for different sensors. The noise model can be represented by noise Variance = Ax + B, where A and B are the noise index values ​​that need to be calibrated, A can be the target Poisson noise index value, B can be the target Gaussian noise index value, x can be the pixel value of each pixel in the RAW image, and noise Variance can be the noise variance value corresponding to each pixel of the target image sensor, that is, the noise index value. The specific calibration process will not be repeated here.

[0107] Step 440: Generate a third image based on the RAW image.

[0108] Here, noise addition is performed based on the RAW image, which makes it easier to handle noise distribution.

[0109] Step 450: Input the third image and the second image into an optimized discriminant network.

[0110] Here, the initial noise image, i.e., the third image, and the second image are input into the optimized discriminant network for multiple optimization and discrimination, so that a noise image closer to the actual scene can be obtained. Of course, the first image and one or more noise images output by the optimized discriminant network can be used to form a noise-noise sample image pair for training the image denoising model corresponding to the target image sensor.

[0111] Therefore, by acquiring a noise-free first image and a noisy second image captured by a target image sensor, and then adding noise to the first image according to a noise index value corresponding to the target image sensor, a third image is obtained, and then the noise distribution of the third image is adjusted according to the second image to obtain a noise image corresponding to the first image. Since the third image is a noisy image generated for the noise index value corresponding to the target image sensor, and the third image is optimized using the real noise image captured by the target image sensor, that is, the second image, the final noise image can be more targeted to the target image sensor, and the noise in the generated noise image is also closer to the noise of the image actually captured by the target image sensor, thereby improving the accuracy of the subsequent training process of the image denoising model for the target sensor.

[0112] Based on the same inventive concept, the present application also provides a noise image generating device. Figure 5 The noise image generating device provided in the embodiment of the present application is described in detail.

[0113] Figure 5 The figure is a structural block diagram of a noise image generating device according to an exemplary embodiment.

[0114] like Figure 5 As shown, the noise image generating device 500 may include:

[0115] An acquisition module 501 is used to acquire a first image and a second image; wherein the first image is a noise-free image, and the second image is a noisy image acquired using a target image sensor;

[0116] A determination module 502, configured to determine a noise index value corresponding to a target image sensor;

[0117] A noise adding module 503, configured to add noise to the first image according to the noise index value to obtain a third image;

[0118] The adjustment module 504 is used to adjust the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image.

[0119] The noise image generating device 500 is described in detail below, as follows:

[0120] In one embodiment, the determination module 502 may include:

[0121] A determination submodule, used to determine a target Poisson noise index value and a target Gaussian noise index value corresponding to a target image sensor;

[0122] The calculation submodule is used to calculate a noise index value corresponding to a target image sensor according to a target Poisson noise index value and a target Gaussian noise index value.

[0123] In one embodiment, the determining submodule may include:

[0124] A first acquisition unit is used to acquire N fourth images; wherein the fourth images are images of a standard color card acquired at different sensitivities using a target image sensor, N is a positive integer, and N≥2;

[0125] A first calculation unit, used for traversing the N fourth images, and respectively calculating a first pixel average value and a first pixel variance value of pixel points contained in each fourth image;

[0126] a second calculation unit, configured to divide the first pixel variance value by the first pixel average value to obtain a Poisson noise index value corresponding to each fourth image;

[0127] a first relationship determining unit, configured to determine a first mapping relationship between a Poisson noise index value and a light sensitivity according to N light sensitivity values ​​and N Poisson noise index values ​​corresponding to the N fourth images;

[0128] The first indicator determination unit is used to determine, according to a first mapping relationship, M Poisson noise indicator values ​​corresponding to M target sensitivities as target Poisson noise indicator values ​​corresponding to the target image sensor; wherein the M target sensitivities are M sensitivities determined from the sensitivity range corresponding to the target image sensor, M is a positive integer, and M≥2.

[0129] In one embodiment, the determining submodule may further include:

[0130] A second acquisition unit is used to acquire K fifth images; wherein the fifth images are images acquired using a target image sensor at different sensitivities, K is a positive integer, and K≥2;

[0131] A third calculation unit is used to traverse the K fifth images, calculate the second pixel variance values ​​of the pixels contained in each fifth image respectively, and use the second pixel variance values ​​corresponding to the K fifth images respectively as K Gaussian noise index values ​​corresponding to the K fifth images;

[0132] A second relationship determining unit, configured to determine a second mapping relationship between the Gaussian noise index value and the sensitivities according to the K sensitivities and the K Gaussian noise index values ​​corresponding to the K fifth images;

[0133] The second index determination unit is used to determine, according to the second mapping relationship, M Gaussian noise index values ​​corresponding to the M target sensitivities as target Gaussian noise index values ​​corresponding to the target image sensor.

[0134] In one embodiment, the adjustment module 504 includes:

[0135] The image input submodule is used to input the target image into P consecutive convolutional layers to obtain P feature information output by the P convolutional layers;

[0136] A feature input submodule, used for inputting the feature information output by the Pth convolutional layer into consecutive P deconvolutional layers, and outputting a sixth image;

[0137] Wherein, P is a positive integer, P ≥ 2, the P convolutional layers correspond one to one to the P deconvolutional layers, the input information of the first deconvolutional layer is the first feature information output by the first convolutional layer and the second feature information output by the second deconvolutional layer, the first convolutional layer is any convolutional layer among the P convolutional layers, the first deconvolutional layer is the deconvolutional layer among the P deconvolutional layers corresponding to the first convolutional layer, and the first deconvolutional layer is the next deconvolutional layer of the second deconvolutional layer.

[0138] In one embodiment, when the number of the third images is M, the adjustment module 504 may further include:

[0139] A target image processing submodule, used for inputting the target image into the first network to output a sixth image before inputting the third image into P consecutive convolutional layers in the first network to obtain P feature information output by the P convolutional layers; wherein the target image is any image among the M third images;

[0140] An acquisition submodule, used to acquire a first noise distribution feature corresponding to the sixth image and a second noise distribution feature corresponding to the second image;

[0141] A feature processing submodule, used for inputting the first noise distribution feature and the second noise distribution feature into the second network, and outputting a similarity value between the first noise distribution feature and the second noise distribution feature;

[0142] The adjustment submodule is used to adjust the network parameters of the first network according to the similarity value and its corresponding loss value when the similarity value is less than a preset threshold value, until the first network converges to obtain a trained first network.

[0143] In one embodiment, the first image is a noise-free RGB image;

[0144] The noise image generating device 500 may further include:

[0145] A conversion module 505, configured to convert the first image from an RGB image into an original image file before adding noise to the first image according to the noise index value to obtain a third image;

[0146] The noise adding module 503 may include:

[0147] A noise adding submodule, used for adding noise to the original image file according to the noise index value to obtain a third image;

[0148] The conversion submodule is used to convert the third image from an original image file into an RGB image.

[0149] Therefore, by acquiring a noise-free first image and a noisy second image captured by a target image sensor, and then adding noise to the first image according to a noise index value corresponding to the target image sensor, a third image is obtained, and then the noise distribution of the third image is adjusted according to the second image to obtain a noise image corresponding to the first image. Since the third image is a noisy image generated for the noise index value corresponding to the target image sensor, and the third image is optimized using the real noise image captured by the target image sensor, that is, the second image, the final noise image can be more targeted to the target image sensor, and the noise in the generated noise image is also closer to the noise of the image actually captured by the target image sensor, thereby improving the accuracy of the subsequent training process of the image denoising model for the target sensor.

[0150] The noise image generating device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0151] The noise image generating device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0152] The noise image generation device provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0153] Alternatively, if Figure 6 As shown, the embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned noise image generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0154] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0155] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0156] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.

[0157] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0158] The input unit 704 is used to obtain a first image and a second image; wherein the first image is a noise-free image, and the second image is a noisy image acquired using a target image sensor;

[0159] Processor 710 is used to determine a noise index value corresponding to a target image sensor; add noise to a first image according to the noise index value to obtain a third image; and adjust the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image.

[0160] Therefore, by acquiring a noise-free first image and a noisy second image captured by a target image sensor, and then adding noise to the first image according to a noise index value corresponding to the target image sensor, a third image is obtained, and then the noise distribution of the third image is adjusted according to the second image to obtain a noise image corresponding to the first image. Since the third image is a noisy image generated for the noise index value corresponding to the target image sensor, and the third image is optimized using the real noise image captured by the target image sensor, that is, the second image, the final noise image can be more targeted to the target image sensor, and the generated noise image is more realistic, thereby improving the accuracy of the subsequent image denoising model training process.

[0161] Optionally, the processor 710 is configured to determine a target Poisson noise index value and a target Gaussian noise index value corresponding to the target image sensor;

[0162] According to the target Poisson noise index value and the target Gaussian noise index value, a noise index value corresponding to the target image sensor is calculated.

[0163] Optionally, the input unit 704 is specifically used to obtain N fourth images; wherein the fourth images are images of a standard color card acquired at different sensitivities using a target image sensor, N is a positive integer, and N≥2;

[0164] Processor 710 is specifically used to traverse N fourth images, and respectively calculate the first pixel average value and the first pixel variance value of the pixel points contained in each fourth image; divide the first pixel variance value by the first pixel average value to obtain a Poisson noise index value corresponding to each fourth image; determine a first mapping relationship between the Poisson noise index value and the sensitivity according to N sensitivities corresponding to the N fourth images and the N Poisson noise index values; determine M Poisson noise index values ​​corresponding to M target sensitivities according to the first mapping relationship as the target Poisson noise index values ​​corresponding to the target image sensor; wherein the M target sensitivities are M sensitivities determined from the sensitivity range corresponding to the target image sensor, M is a positive integer, and M≥2.

[0165] Optionally, the input unit 704 is further configured to obtain K fifth images; wherein the fifth images are images acquired using a target image sensor at different sensitivities, K is a positive integer, and K≥2;

[0166] Processor 710 is specifically used to traverse K fifth images, calculate the second pixel variance values ​​of the pixel points contained in each fifth image respectively, and use the second pixel variance values ​​corresponding to the K fifth images as K Gaussian noise index values ​​corresponding to the K fifth images; determine the second mapping relationship between the Gaussian noise index value and the sensitivity according to the K sensitivities corresponding to the K fifth images and the K Gaussian noise index values; and determine M Gaussian noise index values ​​corresponding to M target sensitivities according to the second mapping relationship as the target Gaussian noise index values ​​corresponding to the target image sensor.

[0167] Optionally, the processor 710 is further specifically used to input the third image into P consecutive convolutional layers in the first network to obtain P feature information output by the P convolutional layers; wherein the first network is trained based on the second image; the feature information output by the Pth convolutional layer is input into P consecutive deconvolutional layers in the first network, and a noise image corresponding to the first image is output; wherein P is a positive integer, P≥2, the P convolutional layers correspond one-to-one to the P deconvolutional layers, the input information of the first deconvolutional layer is the first feature information output by the first convolutional layer and the second feature information output by the second deconvolutional layer, the first convolutional layer is any convolutional layer among the P convolutional layers, the first deconvolutional layer is the deconvolutional layer among the P deconvolutional layers corresponding to the first convolutional layer, and the first deconvolutional layer is the next deconvolutional layer of the second deconvolutional layer.

[0168] Optionally, the processor 710 is further specifically used to, when the number of third images is M, input the target image into the first network, and output a sixth image; wherein the target image is any image among the M third images; obtain a first noise distribution feature corresponding to the sixth image, and a second noise distribution feature corresponding to the second image; input the first noise distribution feature and the second noise distribution feature into the second network, and output a similarity value between the first noise distribution feature and the second noise distribution feature; when the similarity value is less than a preset threshold, adjust the network parameters of the first network according to the similarity value and its corresponding loss value until the first network converges to obtain a trained first network.

[0169] Optionally, the processor 710 is further specifically used to convert the first image from an RGB image to an original image file; add noise to the original image file according to the noise index value to obtain a third image; and convert the third image from an original image file to an RGB image.

[0170] Therefore, by simultaneously synthesizing Gaussian distributed noise and Poisson distributed noise, the noise distribution is made more diverse, and the authenticity of the noise image can be further improved.

[0171] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 14041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 709 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 710.

[0172] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned noise image generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0173] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0174] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned noise image generation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0175] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0176] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0177] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0178] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for generating a noise image, It is characterized in that include: Acquire a first image and a second image; wherein the first image is a noise-free image, and the second image is a noisy image acquired using a target image sensor; Determining a noise index value corresponding to the target image sensor; Adding noise to the first image according to the noise index value to obtain a third image; adjusting the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image; The step of adjusting the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image includes: Inputting the third image into P consecutive convolutional layers in the first network to obtain P feature information output by the P convolutional layers; wherein the first network is trained based on the second image; Inputting feature information output by the Pth convolutional layer into P consecutive deconvolutional layers in the first network, and outputting a noise image corresponding to the first image; Wherein, P is a positive integer, P≥2, the P convolutional layers correspond one-to-one to the P deconvolutional layers, the input information of the first deconvolutional layer is the first feature information output by the first convolutional layer and the second feature information output by the second deconvolutional layer, the first convolutional layer is any convolutional layer among the P convolutional layers, the first deconvolutional layer is the deconvolutional layer among the P deconvolutional layers corresponding to the first convolutional layer, and the first deconvolutional layer is the next deconvolutional layer of the second deconvolutional layer.

2. The method according to claim 1, It is characterized in that The determining of the noise index value corresponding to the target image sensor includes: Determining a target Poisson noise index value and a target Gaussian noise index value corresponding to the target image sensor; A noise index value corresponding to the target image sensor is calculated according to the target Poisson noise index value and the target Gaussian noise index value.

3. The method according to claim 2, It is characterized in that The determining of a target Poisson noise index value corresponding to the target image sensor includes: Acquire N fourth images; wherein the fourth images are images of a standard color card acquired at different sensitivities using the target image sensor, N is a positive integer, and N≥2; Traversing the N fourth images, and respectively calculating a first pixel average value and a first pixel variance value of pixel points contained in each fourth image; Dividing the first pixel variance value by the first pixel average value to obtain a Poisson noise index value corresponding to each fourth image; Determining a first mapping relationship between the Poisson noise index value and the sensitivities according to the N sensitivities and the N Poisson noise index values ​​corresponding to the N fourth images; According to the first mapping relationship, M Poisson noise index values ​​corresponding to M target sensitivities are determined as the target Poisson noise index values ​​corresponding to the target image sensor; wherein the M target sensitivities are M sensitivities determined from the sensitivity range corresponding to the target image sensor, M is a positive integer, and M≥2.

4. The method according to claim 2, It is characterized in that The determining of a target Gaussian noise index value corresponding to the target image sensor includes: Acquire K fifth images; wherein the fifth images are images acquired using the target image sensor at different sensitivities, K is a positive integer, and K≥2; Traversing the K fifth images, respectively calculating second pixel variance values ​​of pixels contained in each fifth image, and using the second pixel variance values ​​respectively corresponding to the K fifth images as K Gaussian noise index values ​​corresponding to the K fifth images; Determining a second mapping relationship between the Gaussian noise index value and the sensitivities according to the K sensitivities corresponding to the K fifth images and the K Gaussian noise index values; According to the second mapping relationship, M Gaussian noise index values ​​corresponding to the M target sensitivities are determined as target Gaussian noise index values ​​corresponding to the target image sensor.

5. The method according to claim 1, It is characterized in that When the number of the third images is M, before inputting the third images into P consecutive convolutional layers in the first network to obtain P pieces of feature information output by the P convolutional layers, the method further includes: Inputting a target image into the first network, and outputting a sixth image; wherein the target image is any image among the M third images; Acquire a first noise distribution feature corresponding to the sixth image and a second noise distribution feature corresponding to the second image; Inputting the first noise distribution feature and the second noise distribution feature into a second network, and outputting a similarity value between the first noise distribution feature and the second noise distribution feature; When the similarity value is less than a preset threshold, the network parameters of the first network are adjusted according to the similarity value and its corresponding loss value until the first network converges to obtain a trained first network.

6. A noise image generating device, It is characterized in that include: An acquisition module, used to acquire a first image and a second image; wherein the first image is a noise-free image, and the second image is a noisy image acquired using a target image sensor; A determination module, used to determine a noise index value corresponding to the target image sensor; A noise adding module, used for adding noise to the first image according to the noise index value to obtain a third image; an adjustment module, configured to adjust the noise distribution of the third image according to the second image to obtain a noise image corresponding to the first image; The adjustment module comprises: An image input submodule, used to input the target image into P consecutive convolutional layers to obtain P feature information output by the P convolutional layers; A feature input submodule, used for inputting the feature information output by the Pth convolutional layer into consecutive P deconvolutional layers, and outputting a sixth image; Wherein, P is a positive integer, P≥2, the P convolutional layers correspond one-to-one to the P deconvolutional layers, the input information of the first deconvolutional layer is the first feature information output by the first convolutional layer and the second feature information output by the second deconvolutional layer, the first convolutional layer is any convolutional layer among the P convolutional layers, the first deconvolutional layer is the deconvolutional layer among the P deconvolutional layers corresponding to the first convolutional layer, and the first deconvolutional layer is the next deconvolutional layer of the second deconvolutional layer.

7. The device according to claim 6, It is characterized in that The determination module comprises: A determination submodule, used to determine a target Poisson noise index value and a target Gaussian noise index value corresponding to the target image sensor; The calculation submodule is used to calculate a noise index value corresponding to the target image sensor according to the target Poisson noise index value and the target Gaussian noise index value.

8. The device according to claim 7, It is characterized in that The determination submodule comprises: A first acquisition unit is used to acquire N fourth images; wherein the fourth images are images of a standard color card acquired at different sensitivities using the target image sensor, N is a positive integer, and N≥2; A first calculation unit, used for traversing the N fourth images, and respectively calculating a first pixel average value and a first pixel variance value of pixel points contained in each fourth image; a second calculation unit, configured to divide the first pixel variance value by the first pixel average value to obtain a Poisson noise index value corresponding to each fourth image; a first relationship determining unit, configured to determine a first mapping relationship between the Poisson noise index value and the sensitivities according to the N sensitivities and the N Poisson noise index values ​​corresponding to the N fourth images; The first indicator determination unit is used to determine, according to the first mapping relationship, M Poisson noise indicator values ​​corresponding to the M target sensitivities as the target Poisson noise indicator values ​​corresponding to the target image sensor; wherein the M target sensitivities are M sensitivities determined from the sensitivity range corresponding to the target image sensor, M is a positive integer, and M≥2.

9. The device according to claim 7, It is characterized in that The determination submodule comprises: A second acquisition unit is used to acquire K fifth images; wherein the fifth images are images acquired using the target image sensor at different sensitivities, K is a positive integer, and K≥2; A third calculation unit is used to traverse the K fifth images, calculate the second pixel variance values ​​of the pixels contained in each fifth image respectively, and use the second pixel variance values ​​corresponding to the K fifth images respectively as K Gaussian noise index values ​​corresponding to the K fifth images; a second relationship determining unit, configured to determine, based on a maximum likelihood estimation algorithm, a second mapping relationship between the Gaussian noise index value and the sensitivities according to the K sensitivities corresponding to the K fifth images and the K Gaussian noise index values; The second index determination unit is used to determine, according to the second mapping relationship, M Gaussian noise index values ​​corresponding to the M target sensitivities as target Gaussian noise index values ​​corresponding to the target image sensor.

10. The device according to claim 6, It is characterized in that When the number of the third images is M, the adjustment module further includes: A target image processing submodule, used for inputting the target image into the first network to output a sixth image before inputting the third image into P consecutive convolutional layers in the first network to obtain P feature information output by the P convolutional layers; wherein the target image is any image among the M third images; an acquisition submodule, used to acquire a first noise distribution feature corresponding to the sixth image and a second noise distribution feature corresponding to the second image; a feature processing submodule, configured to input the first noise distribution feature and the second noise distribution feature into a second network, and output a similarity value between the first noise distribution feature and the second noise distribution feature; The adjustment submodule is used to adjust the network parameters of the first network according to the similarity value and its corresponding loss value when the similarity value is less than a preset threshold, until the first network converges to obtain a trained first network.

11. An electronic device, It is characterized in that The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the noise image generating method according to any one of claims 1 to 5.

12. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the noise image generation method according to any one of claims 1 to 5 are implemented.