Image processing method, device, learning model manufacturing method and image processing system
By using multi-layer neural networks to perform noise processing on images, the problem of noise amplification is solved, image resolution and contrast are improved, noise changes are suppressed, and image quality is improved.
Patent Information
- Application Number
- CN202010141303.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-05
- Filing Date
- 2020-03-04
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-03-04
AI Technical Summary
The existing technology cannot effectively distinguish objects and noise when improving image resolution and contrast, resulting in image noise amplification and inability to effectively suppress noise changes.
By generating mutually correlated noise applied to real images and training images, a multi-layer neural network is used to learn, generate estimated images and perform denoising processing to suppress noise changes while enhancing resolution and contrast.
It is possible to suppress noise changes in image processing while improving image resolution and contrast, enhancing image quality, and avoiding the problem of noise amplification.
Smart Images

Figure CN111667416B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to image processing methods configured to suppress image noise variations associated with image processing. Background Art
[0002] Japanese Patent Publication No. ("JP") 2011-123589 discloses a method of obtaining a high-resolution image from a captured image by correcting blur caused by aberration using a process based on a Wiener filter.
[0003] However, the method disclosed in JP 2011-123589 cannot distinguish between an object and noise, and thus amplifies image noise as the resolution and contrast become higher. Summary of the invention
[0004] The present invention provides an image processing method and the like that can suppress changes in image noise associated with image processing.
[0005] An image processing method according to one aspect of the present invention includes: a first step configured to obtain a first real image and a first training image; a second step configured to generate a second real image and a second training image by applying mutually correlated noise to the first real image and the first training image; and a third step configured to enable a neural network to learn based on the second real image and the second training image.
[0006] A method of producing a learned model following the above-described image processing method constitutes another aspect of the present invention.
[0007] As an aspect of the present invention, an image processing method includes the following steps: inputting a captured image into a neural network and generating an estimated image, performing at least one of resolution enhancement processing, contrast enhancement processing and brightness improvement processing on the estimated image, and performing denoising processing on an image based on the estimated image.
[0008] An image processing apparatus configured to execute the above-mentioned image processing method also constitutes another aspect of the present invention.
[0009] Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a diagram showing the flow of neural network learning according to the first embodiment.
[0011] Figure 2 is a block diagram of an image processing system according to the first embodiment.
[0012] Figure 3is an external view of the image processing system according to the first embodiment.
[0013] Figure 4 is a flowchart related to weight learning according to the first embodiment.
[0014] Figure 5 is a flowchart related to output image generation according to the first embodiment.
[0015] Figure 6 is a block diagram of an image processing system according to a second embodiment.
[0016] Figure 7 is an external view of the image processing system according to the second embodiment.
[0017] Figure 8 is a flowchart related to weight learning according to the second embodiment.
[0018] Fig. 9 is a diagram showing the flow of neural network learning according to the second embodiment.
[0019] Fig.10 is a flowchart related to generation of an output image according to the second embodiment.
[0020] Fig.11 is a diagram showing generation of a noise image when generating an output image according to the second embodiment.
[0021] Fig.12 is a block diagram of an image processing system according to a third embodiment.
[0022] Fig.13 is a flowchart related to generation of an output image according to the third embodiment. DETAILED DESCRIPTION
[0023] Now, with reference to the accompanying drawings, a detailed description of embodiments according to the present invention will be given. Corresponding elements in the various drawings will be denoted by the same reference numerals, and their description will be omitted.
[0024] First, before describing the embodiments in detail, the gist of the present invention will be given. The present invention uses a multi-layer neural network for image processing in order to suppress image noise variations associated with image processing (resolution enhancement, contrast enhancement, brightness improvement, etc.). Weights (such as filters and biases) are used in weight learning in the multi-layer neural network to apply mutually correlated noise to a first real image and a first training image, and generate a second real image and a second training image. The mutually correlated noise is, for example, based on the same random number. For example, when the image processing to be performed is resolution enhancement, the first training image is a low-resolution image, and the first real image is a high-resolution image. The second training image is input into the multi-layer neural network, and the weights are optimized so that the error between the output and the second real image is small. In this case, the second real image and the second training image have mutually correlated noise, for example, based on the same random number. Therefore, the neural network can learn weights for resolution enhancement while suppressing noise variations. That is, a learned model that can enhance resolution while suppressing noise variations can be generated.
[0025] Although the description has been made taking resolution enhancement as an example, the following embodiments can also be applied to image processing such as contrast enhancement, brightness improvement, defocus blur conversion, and illumination conversion while suppressing noise variations.
[0026] First embodiment
[0027] Now, an image processing system according to a first embodiment of the present invention will be described. This embodiment causes a multi-layer neural network to learn and perform blur correction. However, the present invention is not limited to blur correction, but can be applied to other image processing.
[0028] Figure 2 is a block diagram of an image processing system 100 according to this embodiment. Figure 3 : is an external view of the image processing system 100. The image processing system 100 includes a learning device (image processing device) 101, an imaging device 102, an image estimation device (image processing device) 103, a display device 104, a recording medium 105, an output device 106, and a network 107. The learning device 101 includes a memory 101a, an obtainer 101b, a generator 101c, and an updater (learner) 101d.
[0029] The imaging device 102 includes an optical system 102a and an image sensor 102b. The optical system 102a converges light entering the imaging device 102 from the object space. The image sensor 102b receives (photoelectrically converts) an optical image (object image) formed via the optical system 102a, and obtains a captured image. The image sensor 102b is, for example, a CCD (charge coupled device) sensor or a CMOS (complementary metal oxide semiconductor) sensor. The captured image obtained by the imaging device 102 includes blur caused by aberration and diffraction of the optical system 102a and noise caused by the image sensor 102b.
[0030] The image estimation device 103 includes a memory 103a, an acquirer 103b, a blur corrector (estimator) 103c and a denoiser 103d. The image estimation device 103 obtains a captured image, performs blur correction while suppressing noise variations, and generates an estimated image. Blur correction uses a multi-layer neural network, and weight information is read from the memory 103a. The weight (weight information) is learned in the learning device 101, and the image estimation device 103 reads out the weight information from the memory 101a via the network 107 in advance, and records the weight information on the memory 103a. The weight information to be recorded may be the weight value itself, or may be an encoding format. Details related to weight learning and deblurring processing using weights will be described later. The image estimation device 103 generates an output image by correcting blur on the estimated image and adjusting the intensity of denoising (denoising processing).
[0031] The output image is output to at least one of the display device 104, the recording medium 105, and the output device 106. The display device 104 is, for example, a liquid crystal display or a projector. The user can perform editing work or the like while checking the image being processed via the display device 104. The recording medium 105 is, for example, a semiconductor memory, a hard disk drive, a server on a network, etc. The output device 106 is a printer or the like. The image estimation device 103 has a function of performing development processing or other image processing as needed.
[0032] Reference now Figure 1 and Figure 4 , a description will be given of a weight (weight information) learning method (a method of producing a learned model) performed by the learning device 101 in this embodiment. Figure 1 The process of weight learning of a neural network is shown. Figure 4 is a flowchart related to weight learning. Mainly, the acquirer 101b, the generator 101c or the updater 101d of the learning device 101 executes Figure 4 Each step in .
[0033] First, in Figure 4In step S101 of , the obtainer 101b obtains a real patch (first real image) and a training patch (first training image). In this embodiment, the real patch is a high-resolution (high-quality) image with a small amount of blur caused by aberrations and diffraction of the optical system 102b. The training patch having the same captured object as that of the real patch is a low-resolution (low-quality) image with a large amount of blur caused by aberrations and diffraction of the optical system 102b. That is, the real patch is an image with a relatively small amount of blur, and the training patch is an image with a relatively large amount of blur.
[0034] A patch refers to an image with a predetermined number of pixels (e.g., 64×64 pixels). The number of pixels of the real patch and the training patch may not necessarily be equal to each other. This embodiment uses mini-batch learning for weight learning of a multi-layer neural network. Step S101 obtains multiple groups of real patches and training patches. However, the present invention is not limited thereto, and online learning or batch learning may be used.
[0035] This embodiment uses the following method to obtain real patches and training patches, but the present invention is not limited to this. This embodiment uses multiple original images recorded as objects on the memory 101a to perform imaging simulation, and generates multiple high-resolution captured images that are basically free of aberration and diffraction, and multiple low-resolution captured images with aberration and diffraction. Multiple real patches and training patches are obtained by extracting partial areas at the same position from each of the multiple high-resolution captured images and the low-resolution captured images. In this embodiment, the original image is an undeveloped RAW (original) image, and the real patch and the training patch are also RAW images. However, the present invention is not limited to this, and developed images can be used. The position of the partial area indicates the center of the partial area. Multiple original images are images with various objects, that is, images with edges, textures, gradients, flat parts, etc. of various intensities and directions. The original image can be a captured image or can be an image generated by CG (computer graphics).
[0036] The original image may have a signal value higher than the brightness saturation value of the image sensor 102b. When the imaging device 102 performs imaging under a specific exposure condition, even the actual object may not fall within the brightness saturation value. A high-resolution captured image is generated by reducing the original image and cutting the signal at the brightness saturation value of the image sensor 102b. Specifically, when the captured image is used as the original image, the captured image has been blurred due to aberrations and diffraction, and the reduction can reduce the blur effect and provide a high-resolution (high-quality) image. If the original image contains high-frequency components sufficiently, it cannot be reduced. A low-resolution captured image is generated by reducing in the same manner as the reduction of the high-resolution captured image, by applying blur caused by aberrations and diffraction of the optical system 102a, and by cutting the image at the brightness saturation value. The optical system 102a has different aberrations and different diffractions depending on a plurality of lens states (zoom, aperture, and focus states), image heights, and azimuths. Therefore, a plurality of low-resolution captured images are generated by applying blur caused by aberrations and diffraction of different lens states, image heights, and azimuths to the original image.
[0037] The order in which reduction and blur are applied can be reversed. When blur is applied first, it is necessary to make the sampling rate of blur higher in consideration of reduction. In the case of PSF (point spread function), the sampling points in space can be made finer, and in the case of OTF (optical transfer function), the maximum frequency can be made higher. If necessary, components such as an optical low-pass filter included in the imaging device 101 can be added to the blur to be applied. The blur to be applied during the generation of the image captured at a low resolution does not include distortion. If the distortion is large, the position of the object changes, and the object may be different between the real patch and the training patch. Therefore, this embodiment does not correct the distortion during neural network learning. After blur correction, the distortion is corrected separately using bilinear interpolation, bicubic interpolation, etc.
[0038] Next, a partial area of a specified pixel size is extracted from the generated high-resolution captured image and used as a real patch. A partial area is extracted from the same position as the extracted position in the low-resolution captured image and used as a training patch. In order to use small batch learning, this embodiment obtains multiple real patches and training patches from multiple generated high-resolution captured images and generated low-resolution captured images. In actual imaging, noise occurs in the image sensor 102b, but noise application is performed in step S103 described later. However, the original image may have a noise component. In this case, it can be considered that the real patch and the training patch are generated by assuming that the object including the noise in the original image is the object. Therefore, the noise in the original image is not particularly important.
[0039] Next, in step S102, the generator 101c generates a random number sequence. The generator 101c applies noise to the real patch and the training patch based on the generated random number sequence. A random number generator corresponding to the noise characteristics of the image sensor 102b is used to generate the random number sequence. This embodiment uses normal random numbers to generate the random number sequence, but the present invention is not limited to this, and a pseudo-random number generator using a uniform random number or an irrational number can be used. The number of elements in the random number sequence is the same as the larger of the number of pixels of the real patch and the training patch. That is, a numerical value generated by a random number is assigned to each pixel of the real patch and the training patch. Since not all elements of the random number sequence have the same numerical value except in the case of extremely low probability, different numerical values are assigned to at least two pixels of the real patch (and the training patch). When the real patch and the training patch have multiple channels, a numerical value is assigned to each channel. Since multiple real patches and training patches are obtained, this embodiment generates a corresponding number of different random number sequences. The order of step S101 and step S102 may be reversed.
[0040] In step S103, the generator 101c generates a noisy real patch (a second real image) and a noisy training patch (a second training image). Figure 1 The flow from step S103 to step S105 is shown. The generator 101c applies noise based on the random number sequence 203 to the real patch 201 and the training patch 202, and generates a noisy real patch 211 and a noisy training patch 212. The following expression (1) is used to apply the noise.
[0041] s noise (x,y)=s org (x,y)+σ(x,y)r(x,y) (1)
[0042] In expression (1), (x, y) is the coordinate in two-dimensional space, s org (x, y) is the signal value of the pixel at (x, y) of the real patch 201 (or the training patch 202). r(x, y) is the value of the random number sequence 203 at (x, y), and s noise (x, y) is the signal value of the pixel at (x, y) of the noise real patch 211 (or the noise training patch 212). σ(x, y) represents the standard deviation of the noise (σ 2 (x, y) is the deviation) and is given by the following expression (2).
[0043]
[0044] In expression (2), s0 is the signal value of optical black (image at black level), S ISOis the ISO sensitivity, and k1 and k0 are a proportional coefficient and a constant for a signal value at an ISO sensitivity of 100. k1 indicates the influence of shot noise, and k0 indicates the influence of dark current and read noise. The noise characteristics of the image sensor 102b determine the values of k1 and k0. Noise according to the corresponding signal value is applied to each corresponding pixel (hereinafter referred to as corresponding pixel) of the real patch 201 and the training patch 202 based on a common random number, and a noisy real patch 211 and a noisy training patch 212 are generated. The corresponding pixels are pixels that image the same position in the object space. Alternatively, the corresponding pixels are pixels at corresponding positions in the real patch 201 and the training patch 202. A plurality of noisy real patches 211 and a plurality of noisy training patches 212 are generated by similarly applying noise to the plurality of real patches 201 and the training patches 202 obtained in step S101. When the image sensor 102b supports various ISO sensitivities, noise of different ISO sensitivities is applied to a plurality of real patches 201 and training patches 202. This embodiment applies noise based on each signal value of the real patch 201 and the training patch 202, but the same noise may be applied to both. Since the captured image corresponds to the training patch 202, the noise σ(x, y)·r(x, y) is calculated for the training patch 202 using expression (1), and the noise σ(x, y)·r(x, y) is applied to the real patch 201.
[0045] Next, in step S104, the generator 101c inputs the noise training patch (second training image) 212 into the multi-layer neural network and generates an estimated patch (estimated image) 213. The estimated patch 213 is the noise training patch 212 in which noise variation is suppressed and blur is corrected, and can be consistent with the noise real patch (second real image) 211. This embodiment uses Figure 1 The neural network configuration shown in , but the present invention is not limited to this. Figure 1In , CN represents a convolution layer, and DC represents a deconvolution layer. Each of CN and DC calculates the convolution of the input and the filter and the sum of the bias, and performs a nonlinear transformation on the result using an activation function. The initial value of each component of the filter and the bias is arbitrary and is determined by a random number in this embodiment. As an activation function, for example, ReLU (rectified linear unit) or a sigmoid function can be used. Except for the last layer, the output of each layer is called a feature map. Skip connections 222 and 223 combine feature maps output from discontinuous layers. The combination of feature maps can be the sum of each element, or can be connected (cascaded) in the channel direction. This embodiment uses the sum of each element. The skip connection 221 generates an estimated patch 213 by taking the residual of the noise training patch 212 and the estimated noise real patch 211 and the noise training patch 212. An estimated patch 213 is generated for each of multiple noise training patches 212.
[0046] Next, in step S105, the updater 101d updates the weights (weight information) for the neural network based on the error between the estimated patch 213 and the noisy real patch (second real image) 211. The weights include the bias and filter components of each layer. The weights are updated using the back propagation method, but the present invention is not limited to this. Since it is a small batch learning, the errors of multiple noisy real patches 211 and the corresponding estimated patches 213 are calculated, and the weights are updated. For example, the L2 norm or the L1 norm can be used as the error function (loss function).
[0047] In step S106, the updater 101d determines whether the weight learning is completed. Completion can be determined based on whether the number of iterations of learning (weight update) has reached a specified value or whether the amount of weight change during the update is less than a specified value. If it is determined that the weight learning is not yet completed, the process returns to step S101 to regain multiple real patches and training patches. On the other hand, if it is determined that the weight learning is completed, the learning device 101 (updater 101d) terminates the learning and records the weight information on the memory 101a. By learning blur correction using noisy training patches and noisy real patches to which noise based on the same random number is applied, the neural network can learn by separating the object from the applied noise, and can correct only the object blur while suppressing noise changes.
[0048] Reference now Figure 5 , a description will be given of an output image generated by the image estimation device 103 in this embodiment. Figure 5 is a flowchart related to the generation of an output image. Mainly, the acquirer 103b, blur corrector 103c or denoiser 103d in the image estimation device 103 performs Figure 5 Each step in .
[0049] In step S201, the obtainer 103b obtains information about the captured image and the weights. In this embodiment, the captured image and the learning are undeveloped RAW images and are sent from the imaging device 102. The weight information has been sent from the learning device 101 and recorded on the memory 103a.
[0050] Next, in step S202, the blur corrector 103c inputs the captured image into the multi-layer neural network to which the obtained weights are applied, and generates an estimated image. The estimated image is an image obtained from the captured image in which blur caused by aberration and diffraction of the optical system 102a is corrected while noise variation is suppressed. Therefore, the amount of noise in the captured image is equivalent to the amount of noise in the estimated image. Figure 1 The neural network with the same configuration as shown generates an estimated image. When the captured image is input into the neural network, there is no need to cut the captured image into the same size as the training patch used for learning.
[0051] In step S203, the blur corrector 103c adjusts the intensity of blur correction based on the user's selection. Using the captured image I represented by the following expression (3): org and the estimated image I inf The weighted average of the blur correction is used to adjust the strength of the blur correction.
[0052] I out =(1-α)I org +αI inf (3)
[0053] In expression (3), I out is the output image whose blur correction strength is adjusted, and the weight α takes any value from 0 to 1 based on the user's selection. The closer the weight α is to 1, the greater the blur correction strength. org Compared to the estimated image I inf The noise variation in is suppressed, so the output image I is the weighted average of the two out The noise variation is suppressed.
[0054] In step S204, the denoiser 103d adjusts the denoising intensity for the output image based on the user's selection. The denoising method is not limited to the method in this embodiment. As a denoising method, for example, a method using a bilateral filter, an NLM (non-local mean) filter, a BM3D (block matching and 3D filtering) or a method using a multi-layer neural network can be used. A parameter (denoising parameter) for determining the denoising intensity can be determined based on the optical black signal value of the captured image. The optical black signal value can be used to estimate the amount of noise present in the captured image. Since the present invention can suppress the noise variation associated with blur correction, the amount of noise of the captured image and the amount of noise of the estimated image are substantially consistent with each other. Therefore, the denoising of the output image can be determined by the denoising parameter determined based on the information about the optical black of the captured image. The denoising parameter used during the denoising performed on the output image can be the same as the parameter used during the denoising of the captured image. Since the output image is a RAW image, the development process is performed as needed.
[0055] According to the above configuration, since deblurring and denoising are processed separately, the user can set the corresponding strengths separately and perform editing as expected. If a noise training patch is input into a neural network and learning is performed using the error between the estimated patch and the real patch without noise, the neural network learns both blur correction and denoising. If the deblurring strength is adjusted in the neural network in step S203, the denoising strength also changes at the same time. That is, in this case, the deblurring and denoising strengths may not be set separately, and the user may not be able to perform editing as expected. Therefore, a configuration that implements blur correction with suppressed noise changes and performs denoising separately on the image after blur correction can ensure flexibility in editing and support user editing as expected.
[0056] A description will now be given of how an estimated image changes if noise based on different random numbers is applied to a real patch and a training patch. In this case, the noises in the noisy real patch and the noisy training patch are uncorrelated with each other. A neural network is trained to change the noise component in the noisy training patch to a different noise. For each patch group in a plurality of patch groups (a group of noisy real patches and noisy training patches), the noise changes randomly. Figure 1 The CNN (Convolutional Neural Network) shown in learns the average value of random changes. That is, the random noise to be output is averaged by learning multiple patch groups, and as a result, the estimated image is a denoised image. Therefore, in this case, as described above, the editing flexibility is reduced for the user.
[0057] Although this embodiment describes the correction of blur caused by aberration and diffraction, the present invention is equally effective for blur caused by other factors (defocus, jitter, etc.) In learning, by changing the blur to be applied to the training patch to blur for defocus, jitter, etc., blur caused by defocus, etc. can be corrected while noise variation is suppressed.
[0058] In addition to deblurring, the present invention can also be applied to upsampling for higher resolution. A detailed description of learning will now be given taking a one-dimensional upsampling rate of 2 as an example. A noisy real patch is obtained by applying noise to a real patch based on a random number sequence in the same manner as blur correction. Subsequently, a training patch is generated by sampling one pixel for every two pixels in the real patch (downsampling to 1 / 2 in one dimension). Similarly, a random number sequence is alternately sampled, and a noisy training patch is obtained by applying noise to the training patch based on the downsampled random number sequence. In previous upsampling, the generated noisy training patch is directly input into the neural network as is to calculate errors and learn weights. In previous upsampling, bilinear interpolation or the like performs upsampling on the noisy training patch, and the noisy training patch is input into the neural network and error calculation and weight learning are performed.
[0059] The present invention can be applied to brightness improvement processing such as peripheral light amount correction. At this time, the neural network learns as follows. For one same original image, a captured equivalent image generated by reducing the brightness according to the peripheral light attenuation and an ideal equivalent image without brightness reduction (or less brightness reduction than the captured equivalent image) are generated. A plurality of training patches and real patches are extracted from the plurality of generated captured equivalent images and the generated ideal equivalent images, and learning is performed in the same manner as the learning of the first embodiment. Even during the brightness improvement processing, noise changes can be suppressed.
[0060] The present invention can be applied to defocus blur conversion. Defocus blur conversion is a process of converting the defocus blur in a captured image into a shape and distribution desired by a user. The defocus blur in the captured image may contain fragmentation caused by vignetting, double-line blur, a ring pattern caused by cutting marks of an aspherical lens, an obscured center caused by a catadioptric optical system, and the like. The neural network converts these defocus blurs into a shape and distribution desired by the user (for example, a flat circle or a normal distribution function). The neural network learns as follows. For the same original image, for each of a plurality of defocus amounts, a captured equivalent image obtained by applying the defocus blur generated in the captured image and an ideal equivalent image obtained by applying the defocus blur desired by the user are generated. However, since the defocus blur conversion is required not to affect the object at the focusing distance, an ideal equivalent image and a captured equivalent image with zero defocus amount are also generated. By extracting a plurality of training patches and real patches from each of the generated plurality of captured equivalent images and ideal equivalent images and by learning in the same manner as the learning of the first embodiment, noise changes can be suppressed even during defocus blur conversion.
[0061] The present invention can be applied to illumination conversion. Illumination conversion refers to the process of changing the illumination of a captured image to a different illumination. The neural network learns illumination conversion by the following method. A captured equivalent image is generated by rendering an original image of the same normal map under a light source environment assumed in the captured image. Similarly, an ideal equivalent image is generated by rendering a normal map under a light source environment desired by a user. A plurality of training patches and real patches are extracted from the captured equivalent image and the ideal equivalent image, respectively, and learning is performed in the same manner as the learning of the first embodiment, so that noise changes can be suppressed even during illumination conversion.
[0062] The present invention can also be applied to contrast improvement processing. This will be described in detail in the second embodiment.
[0063] This embodiment describes an example in which the learning device 101 and the image estimation device 103 are separate components, but the present invention is not limited to this embodiment. The learning device 101 and the image estimation device 103 may be integrated with each other. That is, the learning ( Figure 4 treatment shown) and estimates ( Figure 5 shown).
[0064] According to the above configuration, this embodiment can provide an image processing system that suppresses changes in image noise associated with image processing.
[0065] Second embodiment
[0066] Next, an image processing system according to a second embodiment of the present invention is described. This embodiment causes a multi-layer neural network to learn and perform defogging, which makes the contrast higher. However, this embodiment is applicable to other image processing as well as the first embodiment.
[0067] Figure 6 is a block diagram of an image processing system 300 according to this embodiment. Figure 7 300 is an external view of the image processing system 300. The image processing system 300 includes a learning device (image processing device) 301 and an imaging device 302 connected via a network 303. The learning device 301 includes a memory 301, an acquirer 312, a generator 313 and an updater (learner) 314, and learns weights (weight information) to perform defogging in a neural network. The imaging device 302 obtains a captured image by imaging the object space, and removes fog from the captured image using the read weight information. A detailed description of the weight learning performed by the learning device 301 and the defogging performed by the imaging device 302 will be given. The imaging device 302 includes an optical system 321 and an image sensor 322. The contrast of the object in the captured image obtained by the image sensor 322 is reduced due to the fog present in the object space. The image estimator 323 includes an acquirer 323a and an estimator 323b, and performs defogging on the captured image using the weight information recorded on the memory 324.
[0068] The weight information is learned in advance by the learning device 301 and is stored in the memory 311. The imaging device 302 reads out the weight information from the memory 311 via the network 303 and records the weight information in the memory 324. The recording medium 325 records the captured image (output image) on which defogging is performed. When the user issues an instruction on the display unit of the output image, the recorded output image is read out and displayed on the display unit 326. The captured image recorded on the recording medium 325 can be read out, and the image estimator 323 can perform defogging. The system controller 327 performs the above control.
[0069] Reference now Figure 8 and Fig. 9 , a description will be given of weight learning (weight information) performed by the learning device 301 in this embodiment. Figure 8 The process of weight learning in a neural network is shown. Fig. 9 is a flowchart related to weight learning. Mainly, the acquirer 312, the generator 313 or the updater 314 in the learning device 301 executes Figure 8 Each step in .
[0070] The first embodiment applies noise to a patch having a predetermined number of pixels. In contrast, this embodiment applies noise to an image having a size larger than the patch and extracts the patch therefrom. This embodiment inputs not only a noise training patch (a patch having fog and noise) but also a noise reference patch (a patch indicating the amount of noise for a specific signal value) to the neural network. This embodiment directly inputs the amount of noise into the neural network through the noise reference patch and increases the robustness against noise.
[0071] First, in Figure 8 In step S301, the acquirer 312 acquires a fog-free image (first real image) 401 and a foggy image (first training image) 402. As in the first embodiment, this embodiment generates one or more sets of fog-free images 401 and foggy images 402 by applying various concentrations of fog to one or more original images recorded on the memory 311 using simulation. The foggy image 402 is a whitish image having a lower contrast than the fog-free image 401 due to scattered light caused by fog. The fog-free image and the foggy image are undeveloped RAW images.
[0072] In step S302, the generator 313 generates a random number sequence. This embodiment generates two random number sequences for a group of fog-free images 401 and foggy images 402. The subsequent steps apply noise to the fog-free images 401 and foggy images 402 based on the first random number sequence 404, and generate a noise image 413 based on the second random number sequence 405. The first random number sequence 404 and the second random number sequence 405 have different numerical values from each other. The number of elements of the first random number sequence 404 is consistent with the number of pixels in the fog-free image 401 or the foggy image 402. The number of elements of the second random number sequence 405 is N0, and it is not necessary to be consistent with the number of elements of the first random number sequence 404. When there are multiple groups of fog-free images 401 and foggy images 402, a first random number sequence 404 and a second random number sequence 405 are generated for each group. The first random number sequence 404 of each group has a different numerical value. The same applies to the second random number sequence 405.
[0073] In step S303, the generator 313 generates a fog-free image (second real image) 411 with noise, a foggy image (second training image) 412 with noise, and a noise image 413. The fog-free image 411 with noise is generated by applying noise based on the first random number sequence 404 to the fog-free image 401. The foggy image 412 with noise is generated by applying noise to the foggy image 402 in the same manner. The method of applying noise is the same as that of the first embodiment. Noise based on the same random number is applied to the pixels of the foggy image 402 and the fog-free image 401 that capture the same position in the object space. The noise image 413 is generated by applying noise based on the second random number sequence 405 to a specific signal value. Although there is no particular limitation on the specific signal value, this embodiment uses the signal value s0 of optical black in the image sensor 322. Noise based on the second random number sequence 405 is applied to an image 403 with a pixel number N0 and a signal value of s0. The noise image 413 is an image to which noise is applied and arranged so that the image has the same number of pixels as the second training image 412. The standard deviation of the noise applied to the noise image 413 is determined under the same conditions as the second training image 412 is generated. Therefore, the standard deviation of the noise between the pixels having the signal value s0 in the noise image 413 and the second training image 412 is the same. When there are a plurality of groups of fog-free images 401 and foggy images 402, the same process is performed on each group.
[0074] Subsequently, in step S304, the generator 313 extracts a plurality of noise real patches 421, noise training patches 422, and noise reference patches 423. The noise real patch 421 is extracted from the second real image 411, the noise training patch 422 is extracted from the second training image 412, and the noise reference patch 423 is extracted from the noise image 413. Each of the noise real patch 421 and the noise training patch 422 includes an area for imaging the same position in the object space, but the number of pixels may not necessarily be equal to each other. The noise training patch 422 and the noise reference patch 423 are partial areas at the same position in the second training image 412 and the noise image 413, respectively, and both have a number of pixels of N0. For each group of the second real image 411 and the second training image 412, a plurality of patch groups (each patch group includes the noise real patch 421, the noise training patch 422, and the noise reference patch 423) are extracted.
[0075] In step S305, the obtainer 312 selects a patch group for use in mini-batch learning. In this embodiment, the obtainer 312 selects two or more patch groups from the multiple patch groups extracted in step S304. In step S306, the generator 313 inputs the noise training patch 422 and the noise reference patch 423 from the selected patch group into the multi-layer neural network, and generates an estimated patch 424. The noise training patch 422 and the noise reference patch 423 are connected in the channel direction and input into the multi-layer neural network. The skip connections 432 and 433 are the same as those of the first embodiment. The skip connection 431 calculates the sum of the output of the final layer and each element of the noise training patch 422. For each of the multiple selected patch groups, the same process is performed.
[0076] In step S307, the updater 314 updates the weight of the neural network according to the error between the estimated patch 424 and the noise true patch 421. Next, in step S308, the updater 314 determines whether the learning is completed. If it is determined that the learning is not completed, the process returns to step 305 and a plurality of patch groups are reselected. If it is determined that the learning is completed, the updater 314 records the weight information on the memory 311.
[0077] Reference now Fig.10 , a description will be given of the defogging process of the captured image performed by the image estimator 323 according to this embodiment. Fig.10 FIG. 3 is a flowchart related to the defogging process (output image generation performed by the image estimator 323). Mainly, the obtainer 323a or the estimator 323b in the image estimator 323 performs Fig.10 Each step in .
[0078] First, in step S401, the obtainer 323a obtains information about the captured image and weights. In step S402, the obtainer 323a extracts a partial area from the optical black (black level image) of the captured image and generates a noise image. Fig.11 Describe this. Fig.11The generation of a noise image when generating an output image according to the embodiment is shown. The captured image 501 is an undeveloped RAW image, and has an image area 502 and an optical black 503. The obtainer 323a extracts a partial area 504 from the optical black 503. The number of pixels of each partial area 504 is N0, and the partial area 504 is arranged to generate a noise image 505. The noise image 505 has the same number of pixels as the number of pixels of the image area 502. The image area 502 and the noise image 505 are connected in the channel direction and input into the neural network. However, the present invention is not limited to this. For example, the noise image 505 may have the same number of pixels as the number of pixels of the captured image 501, and the two may be connected and input into the neural network.
[0079] exist Fig.10 In step S403, the estimator 323b generates an estimated image for input by connecting the image area and the noise image using a neural network using the learned weights. This embodiment does not adjust the defogging strength, but uses the estimated image as an output image as it is. The above processing can estimate a high-contrast image with fog removed with high accuracy while noise variations are suppressed. The same processing can obtain the same effect when imaging through another scatterer such as fog. This embodiment can provide an image processing system that suppresses image noise variations associated with image processing.
[0080] Third embodiment
[0081] A description will now be given of an image processing system according to a third embodiment of the present invention. Unlike the first and second embodiments, the image processing system according to this embodiment includes a processing device (computer) that sends a captured image as an image processing target to an image estimation device and receives a processed output image from the image estimation device.
[0082] Fig.126 is a block diagram of an image processing system 600 according to the embodiment. The image processing system 600 includes a learning device 601, an imaging device 602, an image estimation device 603, and a processing device (computer) 604. The learning device 601 and the image estimation device 603 are, for example, servers. The computer 604 is, for example, a user terminal (personal computer or smart phone). The computer 604 is connected to the image estimation device 603 via a network 605. The image estimation device 603 is connected to the learning device 601 via a network 606. That is, the computer 604 and the image estimation device 603 can communicate with each other, and the image estimation device 603 and the learning device 601 can communicate with each other. The computer 604 corresponds to the first device, and the image estimation device 603 corresponds to the second device. The configuration of the learning device 601 is the same as that of the learning device 101 in the first embodiment, and its description will be omitted. The configuration of the imaging device 602 is the same as that of the imaging device 102 in the first embodiment, and its description will be omitted.
[0083] The image estimation device 603 includes a memory 603a, an obtainer 603b, a blur corrector 603c, a denoiser 603d and a communicator (receiver) 603e. The memory 603a, the obtainer 603b, the blur corrector 603c and the denoiser 603d correspond to the memory 103a, the obtainer 103b, the blur corrector 103c and the denoiser 103d in the image estimation device 103 in the first embodiment, respectively. The communicator 603e has a function of receiving a request sent from the computer 604, and a function of sending an output image generated by the image estimation device 603 to the computer 604.
[0084] The computer 604 includes a communicator (transmitter) 604a, a display unit 604b, an image processor 604c, and a recorder 604d. The communicator 604a has a function of sending a request to the image estimation device 603 for the image estimation device 603 to process a captured image, and a function of receiving an output image processed by the image estimation device 603. The display unit 604b has a function of displaying various information. The information displayed on the display unit 604b includes, for example, a captured image sent to the image estimation device 603 and an output image received from the image estimation device 603. The image processor 604c has a function of performing further image processing on the output image received from the image estimation device 603. The recorder 604d records the captured image obtained from the imaging device 602, the output image received from the image estimation device 603, and the like.
[0085] Next, we will refer to Fig.13 The image processing according to this embodiment is described. The image processing in this embodiment is equivalent to the deblurring processing described in the first embodiment ( Figure 5 ). Fig.13604. Fig.13 The image processing shown in is started. The operation of the computer 604 will be described.
[0086] In step S701, the computer 604 sends a request to process the captured image to the image estimation device 603. The method of sending the captured image to be processed to the image estimation device 603 is not important. For example, the captured image may be uploaded to the image estimation device 603 at the same time as step S701, or may be uploaded to the image estimation device 603 before step S701. The captured image may be an image recorded on a server different from the image estimation device 603. In step S701, the computer 604 may send ID information for authenticating a user, etc. together with the request to process the captured image.
[0087] In step S702, the computer 604 receives the output image generated in the image estimation device 603. Similar to the first embodiment, the output image is an image obtained by deblurring the captured image.
[0088] Next, the operation of the image estimation device 603 will be described. In step S801, the image estimation device 603 receives a request to process a captured image from the computer 604. The image estimation device 603 determines that processing (deblurring) of the captured image is instructed, and processes it in step S802 and subsequent steps.
[0089] In step S802, the image estimation device 603 obtains weight information. The weight information is obtained using the same method as the first embodiment ( Figure 4 ) learned information (learned model). Image estimation device 603 may obtain weight information from learning device 601, or may obtain weight information that has been previously acquired from learning device 601 and recorded in memory 603a. Steps S803 to S805 are the same as steps S202 to S204 of the first embodiment. In step S806, image estimation device 603 sends the output image to computer 604.
[0090] Although this embodiment describes the deblurring process of the first embodiment, the present invention is similarly applicable to the defogging process ( Fig.10). In this embodiment, an example is described in which the image estimation device 603 adjusts the deblurring and denoising (noise reduction) strengths at the same time, but the image processor 604c in the computer 604c may also adjust them. When the image estimation device 603 performs the denoising process as in this embodiment, the image estimation device 603 can bear the processing load of the denoising process, and the processing power required on the computer 604 can be reduced. When the image processor 604c in the computer 604 performs the denoising process, the user does not need to operate to communicate with the image estimation device 603 every time the denoising process is performed.
[0091] As described above, as in this embodiment, the computer 604 communicably connected to the image estimating device 603 may be configured to control the image estimating device 603 .
[0092] As described above, in each embodiment, the image processing device (learning device 101 and 301) includes an acquirer (acquirer 101b and 312), a generator (generator 101c and 313), and a learner (updater 101d and 314). In the first step, the acquirer acquires a first real image and a first training image. In the second step, the generator generates a second real image and a second training image by applying mutually correlated noise to the first real image and the first training image. In the third step, the learner causes the multilayer neural network to learn based on the second real image and the second training image.
[0093] The second step may generate a second real image and a second training image by applying correlated noise to each corresponding pixel in the first real image and the first training image, respectively. The corresponding pixel may be an image that images the same position in the object space in each of the first real image and the first training image. The corresponding pixel may be a pixel at the same position in the first real image and the first training image.
[0094] The noise may be based on the same random number. The random number may have different values for at least two pixels in the first real image. Among the noise, the noise applied to the first real image may be determined based on the signal value of the pixel in the first real image, and among the noise, the noise applied to the first training image may be determined based on the signal value of the pixel in the first training image. The dispersion of the noise may include a proportional component proportional to the signal value of the pixel in each of the first real image and the first training image, and a constant component.
[0095] The noise given to the first real image and the first training image may be the same. The noise may be determined based on the signal value of the pixel in the first training image. The learner may input at least a portion of the second training image and a noise reference patch generated based on noise different from the noise and generated based on the noise into the multi-layer neural network. The learner compares the output estimated patch with at least a portion of the second real image.
[0096] Each of the first real image and the first training image may be an image generated (created by simulation) by performing different processing on the same original image. At least one of the values of resolution, contrast and brightness in the first training image may be lower than the values of resolution, contrast and brightness in the first real image. The first real image and the first training image may be images generated based on the same original image. The first training image is an image on which at least one of downsampling processing, blurring processing, contrast reduction processing and brightness reduction processing is performed on the original image. The learner may enable the multi-layer neural network to learn so that the multi-layer neural network has at least one function of upsampling processing, deblurring processing, contrast improvement processing and brightness improvement processing. Each of the first real image and the first training image may be an image generated by applying different blurs to at least a portion of the same original image. The first real image and the first training image may be images generated by rendering the same normal map under different light source environments.
[0097] In each embodiment, the image processing device (image estimation device 103 and image estimator 323) includes an estimator (blur corrector 103c and estimator 323b) and a processor (denoiser 103d and estimator 323b). The estimator inputs the captured image to the multi-layer neural network, and generates an estimated image that performs at least one of resolution enhancement processing, contrast improvement processing, and brightness improvement processing. The processor performs denoising processing on the image based on the estimated image. The amount of noise in the captured image and the amount of noise in the estimated image may be substantially the same. In this article, "substantially the same" not only indicates a case where the amount of noise is the same in a strict sense, but also indicates a case where the amount of noise is evaluated to be substantially the same (equivalent). The multi-layer neural network may be based on a learned model learned using a learning method, and the learning method includes a first step, a second step, and a third step.
[0098] In each embodiment, the image processing system includes a first device and a second device that can communicate with the first device. The first device has a transmitter configured to send a request for the second device to process a captured image. The second device includes: a receiver configured to receive the request sent by the transmitter; and an estimator configured to input the captured image into a multi-layer neural network and configured to generate an estimated image, performing at least one of a resolution enhancement process, a contrast enhancement process, and a brightness improvement process on the estimated image. At least one of the first device and the second device also includes a denoiser configured to perform a denoising process on an image based on the estimated image.
[0099] Other embodiments
[0100] The (one or more) embodiments of the present invention may also be implemented by a computer of a system or device that reads and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be more completely referred to as a "non-transitory computer-readable storage medium") to perform the functions of one or more of the above (one or more) embodiments and / or includes one or more circuits (e.g., application-specific integrated circuits (ASICs)) for performing the functions of one or more of the above (one or more) embodiments, and by a method executed by a computer of a system or device, for example, by reading and executing computer executable instructions from a storage medium to perform the functions of one or more of the above (one or more) embodiments and / or controlling one or more circuits to perform the functions of one or more of the above (one or more) embodiments. The computer may include one or more processors (e.g., a central processing unit (CPU), a microprocessing unit (MPU)), and may include a network of separate computers or separate processors to read and execute computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or a storage medium. The storage medium may include, for example, a hard disk, a random access memory (RAM), a read-only memory (ROM), a memory of a distributed computing system, an optical disk (such as a compact disk (CD), a digital versatile disk (DVD), or a Blu-ray disk (BD)) TM ), one or more of flash memory devices, memory cards, etc.
[0101] Other embodiments
[0102] The embodiments of the present invention may also be implemented by providing software (program) for performing the functions of the above-described embodiments to a system or device via a network or various storage media, and a computer or a central processing unit (CPU) or a microprocessing unit (MPU) of the system or device reads and executes the program.
[0103] According to the above embodiments, it is possible to provide an image processing method or the like that can suppress changes in image noise associated with image processing.
[0104] While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims
1. An image processing method, characterized in that include: The first step is configured to obtain a first real image and a first training image, wherein the first real image and the first training image are respectively generated by performing different processes on the same original image; A second step is configured to generate a second real image and a second training image by applying mutually correlated noise to the first real image and the first training image; and The third step is configured to enable the neural network to learn based on the second real image and the second training image, wherein an estimated image is generated by inputting at least a portion of the second training image into the neural network, and weight information of the neural network is updated based on an error between the estimated image and at least a portion of the second real image.
2. The image processing method according to claim 1, characterized in that: The second step generates a second real image and a second training image by applying mutually correlated noise to corresponding pixels in the first real image and the first training image.
3. The image processing method according to claim 1, characterized in that: The noise is based on the same random numbers.
4. The image processing method according to claim 3, characterized in that: The random number is a different value for at least two pixels in the first real image.
5. The image processing method according to claim 1, characterized in that: Among the noise, determining the noise applied to the first real image based on the signal values of the pixels in the first real image, and Noise applied to the first training image is determined based on signal values of pixels in the first training image.
6. The image processing method according to claim 1, characterized in that: The dispersion of noise includes: proportional components proportional to the signal values of pixels in the first real image and the first training image, respectively; and Constant component.
7. The image processing method according to claim 1, characterized in that: The noise applied to the first real image and the first training image is the same.
8. The image processing method according to claim 7, characterized in that: Noise is determined based on signal values of pixels in the first training image.
9. The image processing method according to claim 1, characterized in that: The third step inputs at least a portion of the second training image and a noise reference patch into the neural network, wherein the noise reference patch is generated based on noise different from at least one of the noises and generated based on the at least one noise, and compares the output estimated patch and at least a portion of the second real image with each other, The patch is an image with a predetermined number of pixels.
10. The image processing method according to claim 1, characterized in that: In the first training image, at least one of the values of resolution, contrast, and brightness is lower than the at least one of the values of resolution, contrast, and brightness in the first real image.
11. The image processing method according to claim 1, characterized in that: generating a first real image and a first training image based on the same original image, and The first training image is formed by performing at least one of a down-sampling process, a blurring process, a contrast reduction process, and a brightness reduction process on the original image.
12. The image processing method according to claim 11, characterized in that: The third step enables the neural network to learn so that the neural network has at least one function of upsampling processing, deblurring processing, contrast enhancement processing, and brightness enhancement processing.
13. The image processing method according to any one of claims 1 to 12, comprising: The fourth step is configured to generate a corrected image by inputting the input image to the neural network whose weight information is updated at the third step.
14. An image processing device, characterized in that include: an obtainer configured to obtain a first real image and a first training image, wherein the first real image and the first training image are respectively generated by performing different processes on the same original image; a generator configured to generate a second real image and a second training image by applying mutually correlated noise to the first real image and the first training image; and A learner is configured to cause a neural network to learn based on a second real image and a second training image, wherein an estimated image is generated by inputting at least a portion of the second training image into the neural network, and weight information of the neural network is updated based on an error between the estimated image and at least a portion of the second real image.
