A low-light image enhancement method based on adaptive RetinexNet under a fusion strategy

Through the adaptive RetinexNet method, combined with DecomNet, RestorationNet and EnhanceNet, using HSV color space and camera response model, the problems of color distortion and detail loss in low-light image enhancement are solved, and the effects of contrast improvement and detail retention are achieved.

CN115035011BActive Publication Date: 2024-09-06JIANGXI JIULING INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202210644966.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2024-09-06
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

The existing Retinex image enhancement method easily causes color distortion and loss of edge details in low-light environments, making it difficult to effectively improve the details and contrast of the image.

Method used

The adaptive RetinexNet method under the fusion strategy is used to separate and enhance the illumination and reflectivity of the image through the combination of DecomNet, RestorationNet and EnhanceNet. The HSV color space and camera response model are used for image fusion, and the saturation is adaptively adjusted to generate optimized images. Enhance images.

Benefits of technology

When processing low-light images, it can effectively retain the edge and texture details of the image, improve the contrast and visual effects of the image, reduce color distortion, and improve the retention of image detail information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035011B
    Figure CN115035011B
Patent Text Reader

Abstract

The present invention relates to the technical field of image processing, and in particular to a low-illumination image enhancement method of an adaptive RetinexNet under a fusion strategy, comprising: inputting a V channel image of a low-illumination image and a normal light image pair into DecomNet to obtain the illumination and reflectivity of the image; inputting the reflectivity and illumination of the low-illumination image into RestorationNet, using the illumination to guide reflectivity denoising, and obtaining the reflectivity after denoising; inputting the reflectivity and illumination of the low-illumination image into EnhanceNet, enhancing the illumination of the low-illumination image, and obtaining the enhanced illumination; reconstructing the image to obtain a coarse enhanced image; obtaining a virtual overexposed image of the low-illumination image, and fusing the virtual overexposed image with the low-illumination image and the coarse enhanced image; the present invention improves the color distortion phenomenon after image enhancement, and meets the requirement of effectively suppressing noise while retaining edge structure and detail information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a low-illumination image enhancement method of an adaptive RetinexNet under a fusion strategy. Background Art

[0002] The popularity of the Internet has brought mankind into the information age. People's demand for various types of information is increasing. The information obtained through the human visual system accounts for about 75% of the total information obtained by humans. Among them, images are one of the important carriers for human eyes to obtain information. As an important information carrier, in order to make images meet the needs of various application fields, image processing technology has also become a hot field of research. In real life, due to factors such as the equipment and environment for obtaining images, some low-quality pictures are often obtained. Part of the reason is caused by abnormal weather factors, and part of the reason is caused by equipment and other reasons (such as underexposure). Such images generally have problems such as overall darkness, poor contrast, and unclear details, which affect people's observation of the image content and subsequent use of the image.

[0003] In order to extract important information from low-quality images as much as possible, it is necessary to process such images, and image processing technologies such as image enhancement were born. Using image enhancement technology to reproduce the content of the image can, on the one hand, enhance the visual experience and meet people's visual appreciation needs; on the other hand, image enhancement, as one of the preprocessing methods of computer vision, reproduces the detailed information in the image, which can greatly improve the accuracy of production applications such as detection and recognition in the field of computer vision and extraction of pathological feature information in the field of biomedicine.

[0004] At present, image enhancement in low-light environments includes histogram equalization enhancement, wavelet transform image enhancement, and Retinex theory enhancement. In comparison, image enhancement based on Retinex theory has a good enhancement effect on most images and has a wide range of applications. The Retinex image enhancement method also has good effects on night images, foggy images, and low-light images. However, there is also obvious color distortion and loss of certain edge detail information. Summary of the invention

[0005] In order to improve the details and contrast of the image and make the image contain rich texture details and good visual effects, the present invention proposes a low-illumination image enhancement method of adaptive RetinexNet under a fusion strategy, which specifically includes the following steps:

[0006] Obtaining an original image and a synthesized low-light image corresponding to the original image from historical data, taking the original image as a normal-light image, and taking the synthesized low-light image as a low-light image;

[0007] Input the V channel image of the low-light image and the normal-light image into DecomNet to obtain the illumination and reflectivity of the normal-light image, as well as the illumination and reflectivity of the low-light image;

[0008] The reflectivity and illumination of the obtained low-light image are input into RestorationNet, and the reflectivity denoising is guided by illumination to obtain the reflectivity after denoising.

[0009] The reflectivity and illumination of the low-light image are input into EnhanceNet to enhance the illumination of the low-light image and obtain the enhanced illumination.

[0010] Image reconstruction, that is, the H channel, V channel and S channel of the optimized image are synthesized into an RGB image using the color channel, that is, a coarse enhanced image;

[0011] A virtual overexposed image of the low-light image is obtained, and the low-light image, the coarse enhanced image and the virtual overexposed image are fused to obtain a final optimized enhanced image.

[0012] Furthermore, before the image is input into DecomNet, the color channel of the training set or the real-time low-light image to be enhanced is converted to convert the image from RGB image to HSV image.

[0013] Furthermore, the image input to DecomNet is subjected to feature extraction using a convolutional layer with a convolution kernel of 3×3, that is, feature extraction is performed in sequence through 5 convolutional layers with ReLU and a convolution kernel of 3×3, wherein each convolutional layer is used to extract features, and ReLU is used to map the obtained features to reflectivity and illumination; after mapping, a convolutional layer with a convolution kernel of 3×3 and a sigmoid function are sequentially passed through to obtain an image with 4 channels, and the first 3 channels of the image are taken as the reflectivity R of the image, and the last channel is taken as the illumination I of the image, that is, the reflectivity R and illumination I are projected from the feature space of the image through a convolutional layer with a convolution kernel of 3×3, and the Sigmoid function is used to constrain the projected value to be within the range of [0, 1].

[0014] Furthermore, the illumination of the low-illuminance image is enhanced, and the process of obtaining the enhanced illumination includes:

[0015] The illumination of the low-light image and the reflectivity after denoising are concatenated and used as the input of the EnhanceNet network;

[0016] The encoder-decoder architecture of the EnhanceNet network obtains contextual information in large areas of the input image;

[0017] In the EnhanceNet network, three consecutive downsampling modules are used to downsample the input image to different sizes; for example, if the original image size is 600x400, the image needs to be reduced to 75x50 after 3 downsamplings;

[0018] The image after each downsampling is spliced ​​with the context information respectively, and the spliced ​​image is reconstructed by upsampling to obtain the enhanced illumination. Each splicing is element-wise summed, and a jump connection is introduced from the upsampling block to its corresponding mirror upsampling, followed by multi-scale splicing. The final scale is then adjusted by nearest neighbor interpolation and connected to a channel feature map, and finally a 3*3 convolution is performed to obtain the final illumination map.

[0019] Furthermore, DecomNet is trained by back propagation through the loss function of DecomNet. The loss function L1 of DecomNet is composed of the reconstruction loss function L recon , reflection component consistency loss function L ir And the structural smoothing loss function L is The composition is expressed as:

[0020] L1=L recon +λ ir L ir +λ is L is ;

[0021]

[0022] L ir =||R low -R normal ||1;

[0023]

[0024] Among them, λ ir represents the reflectivity consistency coefficient, λ is Represents the lighting smoothness coefficient; low represents the low-light image dataset, normal represents the normal-light image dataset; λ ij is the balance coefficient of reconstruction loss; R i is the reflectivity when i is low or normal; when j = low, I j is the illumination of the low-light image. When j = normal, I j is the illumination of the normal light image; when j = low, S j represents a low-light image. When j = normal, S j Represents normal light image; R low Represents the reflectivity of low-light images; R normalrepresents the reflectivity of the normal light image; ▽ represents the gradient; λ g is the balance structure perception strength coefficient; ||||2 represents the 2-norm; ||||1 represents the 1-norm, where L recon The 1-norm in is used to find the reconstruction loss of all training images, L ir The 1-norm in is used to find the difference in the reflection maps of all training images; ▽ means finding the gradient; ||||2 means the 2-norm, which is used to find the modulus;

[0025] RestorationNet is trained by back propagation through the loss function of RestorationNet. The loss function of RestorationNet is expressed as:

[0026]

[0027] in, is the loss function of RestorationNet; is the reflection image after noise reduction; R h is the reflectivity of the normal light image; for With R h Structural similarity measure between ;

[0028] EnhanceNet is trained by back propagation through the loss function of EnhanceNet. The loss function of EnhanceNet is composed of the reconstruction loss function L recon And the structural smoothing loss function L is The composition is expressed as:

[0029] L2=L recon +λ is L is ;

[0030] Among them, L2 is the loss function of EnhanceNet.

[0031] Furthermore, after obtaining the enhanced V channel image, the S channel image is adaptively adjusted, and the adjustment process is expressed as:

[0032] s′(x,y)=s(x,y)+t[v′(x,y)-v(x,y)]×λ(x,y);

[0033] Wherein, s′(x,y) is the saturation of the pixel at the xth row and yth column of the coarse enhanced image; s(p,q) is the saturation of the pixel at the xth row and yth column of the low-light image; v′(x,y) is the brightness of the pixel at the xth row and yth column of the coarse enhanced image; v(p,q) is the brightness of the pixel at the xth row and yth column of the low-light image; t is the proportional constant; λ(x,y) is the correlation coefficient between v(p,q) and s(p,q).

[0034] Furthermore, the correlation coefficient λ(x,y) between v(p,q) and s(p,q) is expressed as:

[0035]

[0036] Where v(p,q) is the brightness of the pixel at position (p,q) in the neighborhood window of the pixel point (x,y), and s(p,q) is the saturation of the pixel at position (p,q) in the neighborhood window of the pixel point (x,y). is the mean brightness of the pixel (x, y) in the neighborhood window w, is the mean saturation value of the pixel (x, y) in the neighborhood window w; v (x, y) is the brightness variance of the pixel (x, y) in the neighborhood window w, δ s (x,y) is the saturation variance of the pixel (x,y) in the neighborhood window w; w is an n×n window centered on the pixel (x,y).

[0037] Furthermore, the camera response model is used to obtain a virtual overexposed image, which is expressed as:

[0038] P = f(E);

[0039] Among them, P is the image obtained by camera imaging, that is, the virtual overexposed image; E is the irradiance of the low-light image; f is the nonlinear response function of the camera

[0040] Furthermore, the process of fusing the original low-light image, the coarse enhanced image and the virtual over-exposed image to obtain the final optimized enhanced image includes:

[0041] The original low-light image, the coarse enhanced image and the virtual over-exposed image are column-vectorized using the image block decomposition method;

[0042] Get the maximum value of the block signal strength of the image after column vectorization, recorded as

[0043] Get the expected block structure of the image after column vectorization, denoted as It is expressed as:

[0044]

[0045] in, is the weighting function, expressed as To remove the image block with the average value, it is expressed as x k represents an image block, For image block x k The average value; p is the weight parameter; S k is a unit length vector; K is the exposure rate; s k is the block structure of the image with exposure rate k;

[0046] The weighted linear fusion mechanism is used to obtain the average strength of the block, denoted as It is expressed as:

[0047]

[0048] Among them, L(μ k ,l k ) is to transform the image X k The global average μ k and the current image block x k The local average of is used as the input weighting function; k Represents the average intensity of pixel blocks with different exposure rates;

[0049] The stacked Restored to the RGB channel, the optimized enhanced image is represented as:

[0050]

[0051] The present invention can well depict the edge and texture area of ​​the image in the process of processing texture image noise, and can retain the low-frequency information of the image as much as possible while distinguishing the high-frequency information of the image. It is suitable for denoising images rich in complex texture details. Compared with the traditional RetinexNet method, the present invention has the following advantages:

[0052] 1. Use the independent characteristics of each channel in the HSV color space model to enhance the brightness component.

[0053] 2. Use the correlation coefficient to make the saturation component adaptively adjusted as the brightness component changes to avoid changes in image color.

[0054] 3. Based on UNet, a reflectivity denoising model is constructed by combining different areas of the illumination-enhanced image with different levels of noise.

[0055] 4. The camera response model is introduced to generate a virtual overexposed image that is complementary to the original image. Based on the original image, the image enhancement effect is improved, the brightness is more uniform, and the image detail information is better preserved. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a flowchart of a low-light image enhancement method of adaptive RetinexNet under a fusion strategy in the prior art;

[0057] Figure 2 A schematic diagram of the EnhanceNet network structure used in the present invention;

[0058] Figure 3 A schematic diagram of the RestorationNet network structure used in the present invention;

[0059] Figure 4 A schematic diagram of a low-light image enhancement method of an adaptive RetinexNet under a fusion strategy of the present invention;

[0060] Figure 5 Schematic diagram of the comparison of enhanced images obtained according to the method of the present invention, wherein (a) is low-light data, (b) is a rough enhanced image of (a) obtained according to the present invention, and (c) is the final optimized enhanced image of (a) obtained according to the present invention. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0062] The present invention provides a low-light image enhancement method based on an adaptive RetinexNet under a fusion strategy. Figure 1 , specifically including the following steps:

[0063] Obtaining an original image and a synthesized low-light image corresponding to the original image from historical data, taking the original image as a normal-light image, and taking the synthesized low-light image as a low-light image;

[0064] Input the V channel image of the low-light image and the normal-light image into DecomNet to obtain the illumination and reflectivity of the normal-light image, as well as the illumination and reflectivity of the low-light image;

[0065] The reflectivity and illumination of the obtained low-light image are input into RestorationNet, and the reflectivity denoising is guided by illumination to obtain the reflectivity after denoising.

[0066] The reflectivity and illumination of the low-light image are input into EnhanceNet to enhance the illumination of the low-light image and obtain the enhanced illumination.

[0067] Image reconstruction is to use the color channel to synthesize the H channel, V channel and S channel of the optimized image into an RGB image, i.e., a coarse enhanced image. In this embodiment, the reconstruction mainly includes three steps: obtaining an enhanced V channel image by using the retinex theory for the enhanced illumination and the reflectivity after noise reduction; adaptively adjusting the S channel image according to the enhanced V channel image to maintain the contrast of the image; not transforming the H channel image, and synthesizing the RGB image through the images of the three channels of the V channel, the S channel and the H channel;

[0068] A virtual overexposed image of the low-light image is obtained, and the low-light image, the coarse enhanced image and the virtual overexposed image are fused to obtain a final optimized enhanced image.

[0069] In this embodiment, a RetinexNet illumination component enhancement method for the HSV color space is proposed. This method separates the V channel image from the RGB image, and better solves the distortion problem of the color image. On this basis, a reflectivity restoration model based on the UNet network is proposed, and illumination is used to assist in restoring the reflectivity. Finally, a camera response model is introduced, and a fusion strategy is designed in combination with image block decomposition.

[0070] In this embodiment, by analyzing the HSV model and utilizing the independent relationship between channels, the color information of the low-light image is completely retained, and the color distortion problem of the enhanced image is improved; at the same time, the saturation is adaptively adjusted to avoid color deviation; the image is reconstructed and converted into RGB space to obtain the final enhancement effect. Changes in image brightness will cause changes in image contrast, resulting in color deviation in the enhanced image. The relative coefficient is used to adaptively adjust the image saturation to maintain the image contrast:

[0071] s′(x,y)=s(x,y)+t[v′(x,y)-v(x,y)]×λ(x,y);

[0072] in, v(x,y) is the brightness of the corresponding pixel in the original image, v′(x,y) is the brightness of the enhanced pixel, s(x,y) is the saturation of the corresponding pixel in the original image, s′(x,y) is the saturation of the corrected pixel, t is the proportional constant, t=0.4 is taken in the experiment, λ(x,y) is the correlation coefficient between v(x,y) and s(x,y), n×n is the size of the neighborhood window w, and are the mean values ​​of brightness and saturation of the pixel (x, y) in the neighborhood window w, δ v (x,y) and δ s (x, y) are the variances of the brightness and saturation of the pixel (x, y) in the neighborhood window w, v(p, q) is the brightness of the pixel corresponding to the neighborhood window, s(p, q) is the saturation of the pixel corresponding to the neighborhood window, and (p, q)∈w represents a pixel in the domain window.

[0073] The obtained V channel image and the original normal light image are used as the input of the DecomNet network. First, a 3*3 convolution kernel is used to extract features from the input image, and then 5 3*3 convolution layers with ReLU are used to map the RGB image to R and I. Finally, a 3*3 convolution is performed and a sigmoid function is used to obtain an image with 4 channels. The images of the first 3 channels are taken as the reflection component, and the image of the last channel is taken as the illumination component. The reflectivity and illumination of normal light and the reflectivity and illumination of low-illuminance images are obtained; the loss function of the decomposition network model mainly consists of three parts: reconstruction loss function, reflection component consistency loss function and structural smoothness loss function, which specifically include:

[0074] L=L recon +λ ir L ir +λ is L is ;

[0075] Among them, λ ir and λ is Represent the reflectivity consistency coefficient and lighting smoothness coefficient respectively.

[0076] The model is decomposed into reflection component and illumination component, and recombined to construct the original image. The reconstruction loss function can be expressed as follows:

[0077]

[0078] The purpose of introducing a shared reflectivity loss function is to maintain the consistency of reflectivity. Its expression is as follows:

[0079] L ir =||R low -R normal ||1;

[0080] The gradient of the reflectivity map is used to weight the original TV function, and the structural smoothing loss function L is The expression formula is:

[0081]

[0082] Among them, ▽ includes the horizontal gradient (▽ h ) and vertical gradient (▽ v ), λ g Represents the balanced structure perception strength coefficient; when the weight is exp(-λ g ▽R i ), L is The constraints on the smoothness of the area with large reflectivity gradient are reduced, that is, at the location where the image structure is located, the constraints on the smoothness of the discontinuous position corresponding to the illumination are reduced, the smoothness of the image structure is maintained, and a clearer illumination image is obtained.

[0083] The network adjustment stage mainly consists of two parts: denoising operation (RestorationNet) and enhancement network (EnhanceNet), which respectively realize the denoising of low-light reflection images and the enhancement of illuminated images.

[0084] For RestorationNet, a typical 5-layer UNet structure is used followed by a convolutional layer and a Sigmoid layer, and its loss function is in represents the restored reflection map, SSIM() is the structural similarity metric, and the restored result With the target result R h The L2 distance of the last item keeps the texture detail information consistent.

[0085] The structure of RestorationNet is as follows Figure 3As shown in the figure, the input data passes through four cascaded convolution + pooling structures. The convolution + pooling structure includes a convolution module and a pooling module. The convolution module includes a 3*3 convolution operation (Cov) and a Rule activation function (Rule). The pooling module includes a 3*3 convolution operation, a Rule activation function, and a 2*2 maximum pooling operation (MaxPooling); the four cascaded convolution + pooling structures are followed by four convolution + upsampling structures. The convolution + upsampling structure includes a convolution module and an upsampling module. The convolution module includes a 3*3 convolution operation (Cov) and a Rule activation function (Rule). The pooling module includes a 3*3 convolution operation (Cov), a Rule activation function (Rule) and an upsampling operation (UpSampling). The upsampling module is based on Figure 3 As shown in the figure, a jump connection is made with the pooling module, and the last level output of the convolution + upsampling structure is output after a 3*3 convolution operation and a Sigmoid operation.

[0086] The illumination enhancement network (EnhanceNet) is used to adjust the illumination intensity. In the enhancement network, the reflection component map and the illumination component map are input, connected and input into the network layer, where the convolution kernel size of the convolution layer is 3×3, and the convolution kernel size of the pooling layer is 2×2. At this time, combined with the U-Net idea, the nearest neighbor interpolation method is used to enlarge the image and upsample it. It ensures that the size of the feature map combined with it is consistent, and the corresponding sum is added, and then the features are fused to obtain a feature map with more complete details. Finally, the network is fine-tuned end-to-end using gradient descent. The overall encoding and decoding structure is used to obtain image information. The input image can be continuously downsampled to obtain a large number of illumination reflection images.

[0087] The EnhanceNet used in this embodiment is as follows Figure 2As shown in the figure, the EnhanceNet network as a whole is an encoder-decoder architecture. The input data is extracted through a convolution layer with a convolution kernel of 3 and a stride of 1. The extracted data is sequentially input into the first downsampling, the second downsampling and the third downsampling. Each downsampling consists of a convolution layer with a stride of 2 and an activation function, that is, the structure of the downsampling is Conv+ReLU; after the third downsampling, it is processed through a convolution layer with a convolution kernel of 3, and then upsampled. After each upsampling, it is processed through a convolution layer with a convolution kernel of 3. After the first upsampling, it is processed through a convolution layer with a convolution kernel of 3 and then jump-connected with the output of the second upsampling as the input of the second upsampling, and the spliced ​​data is used as the input of the second upsampling. As the output result of the first downsampling, and so on, the output of the convolution layer following the second upsampling is jump-connected with the output of the first downsampling as the output of the second upsampling, and the output of the convolution layer following the third upsampling is jump-connected with the input of the first downsampling as the output of the third upsampling, wherein each upsampling layer uses resize-convolutional, that is, the upsampling layer consists of a nearest neighbor interpolation operation and a convolution layer with a step size of 1 plus an activation function, that is, the Conv+ReLU structure; the outputs of the first upsampling, the second upsampling, and the third upsampling are spliced, and the spliced ​​data passes through a 1×1 convolution layer to restore the cascade features to C channels; finally, a 3×3 convolution layer is used to reconstruct the illumination map.

[0088] In this way, a large amount of illumination information is utilized, and the local illumination distribution image is reconstructed through upsampling to obtain an improved illumination image. At the same time, multi-scale connections are introduced to improve the adaptability of the network model.

[0089] Similar to the loss function of the decomposition model, the loss function of the enhanced network model is also mainly composed of the reconstruction loss function and the structural smoothing loss function, and its expression is shown in the following formula:

[0090] L=L recon +λ is L is ;

[0091] The final enhanced brightness component image, H channel image, and S channel image are mapped to the RGB space to obtain a coarse enhanced image.

[0092] Under the same conditions, a better exposed image can provide more detailed information. Therefore, by constructing a camera response model as a supplement to the original image, a virtual overexposed image can be obtained. The model of the camera response model is:

[0093] P = f(E);

[0094] Where E is the image irradiance, P is the image obtained by camera imaging, and f is the camera nonlinear response function.

[0095] For low-light image enhancement problems, the functional form of f can be indirectly obtained by simulating the brightness transfer function (BTF). BTF is a mapping function between two images P0 and P1 of the same scene with different exposures.

[0096]

[0097] Among them, g is the brightness conversion function, k is the exposure rate, and β and γ are parameters determined by the camera parameters and the exposure rate k. By solving the above formula, the camera response model can be obtained, that is:

[0098]

[0099] When a = -0.3293, b = -1.1258, it can adapt to most cameras. In order to use the input image and the generated image to express as much information as possible, it is necessary to find the best exposure ratio k so that the synthesized image is well exposed where the original image is underexposed.

[0100] Determine the optimal exposure based on the principle of "maximizing image entropy" , image entropy is expressed as:

[0101]

[0102] The image entropy maximization process is expressed as:

[0103]

[0104] in, represents image entropy, N is the maximum gray value of the image, p i Represents the probability of gray value i appearing; The image entropy representing the brightness conversion function g(B,k).

[0105] To get the best exposure After that, the virtual overexposure Δk can be obtained, and then the brightness transfer function (BTF) is used to generate the virtual overexposure image. The parameter Δk is set to 0.5.

[0106] There are three images that need to be fused. For each image p, the image block decomposition method is used for column vectorization, which is expressed as:

[0107] P = c·s+l;

[0108] Where c is the block signal strength, s is the block structure, and l is the average strength of the block.

[0109] Considering that all input pixel blocks are real images of the scene, the pixel block with the highest contrast has the best visibility. Therefore, the signal strength of the required fused image block is determined by the maximum signal strength of all source image blocks. The maximum value of the block signal strength of the column vectorized image is obtained, which is recorded as (In general, the higher the contrast, the better the visibility. Considering that all input source image patches are true captures of the scene, the patch with the highest contrast among them will correspond to the best visibility. Therefore, the expected signal strength of the fused image patch is determined by the highest signal strength of all source image patches.) It is expressed as:

[0110]

[0111] in, Represents x k The signal strength of k}={x k |1≤k≤K} is a set of image patches extracted from the same spatial position of a source sequence containing K multiple exposure images. Here, all K x k is CN 2 A column vector of dimension C, where C is the number of color channels of the input image and N is the spatial size of the square patch.

[0112] Unlike signal strength, the unit length structure vector s k Point to CN 2 A specific direction in the dimensional space. The expected structure of the fused image block is expected to best represent the structure of all the original image blocks, and the block structure value of the column vectorized image is calculated by the expectation of the block structure of the column vectorized image. A simple implementation of this relationship is as follows:

[0113]

[0114] in, is a weighting function that determines the contribution of each original image block in the fused image block structure; K is the exposure rate; S k is a unit length vector. The contribution increases with the intensity of the image fragment, using the power weighting function given by:

[0115]

[0116] Where P is a weighting parameter, p≥0 is an exponential parameter, and different choices of p values ​​produce weighting functions with different physical meanings. The larger p is, the more image blocks have relatively greater intensity.

[0117] Regarding the average intensity of the local image, a weighted linear fusion mechanism is used to obtain the average intensity of the block, which is denoted as It is expressed as:

[0118]

[0119] Among them, L(μ k ,l k ) is to transform the image X k The global average μ k and the current patch x k The local average of is used as the input weighting function; k represents the average intensity of the pixel block with exposure rate k. k ,l k ) quantifies X k Medium k Good exposure for X k or x k A large penalty is given when the exposure is under / overexposed. As a preferred implementation, this embodiment uses a two-dimensional Gaussian distribution to specify this measure, which is expressed as:

[0120]

[0121] Among them, σ g and σ l Control the curve along μ k and l k The distribution of dimensions, μ c and l c is a constant of medium intensity value. Medium intensity here refers to the median value between the maximum and minimum values ​​of a parameter. For example, if the parameter range is [0, 1], the medium intensity value of the parameter is 0.5, μ c and l c The values ​​of μ are determined according to k and l k The maximum and minimum values ​​are determined.

[0122] The stacked Restored to the RGB channel, the optimized enhanced image is represented as:

[0123]

[0124] This embodiment also provides a specific implementation example. The deep learning framework used in this example is Tensorflow1.13GPU, and the NumPy computing library and PIL image processing library are installed. The software development environment of the experiment is Pycharm2019 and python3.7. The implementation results are as follows: Figure 5 As shown, (a) is a low-light image, (b) is a coarse enhanced image, and (c) is the final enhanced image. It can be seen that the image processed by the present invention has higher detail information and smaller image distortion, and the image quality is effectively improved.

[0125] The implementation process of the specific example proposed by the present invention is as follows Figure 4 , in the training process according to S normal Generate the corresponding V channel image S of the low-light image low During the training process, reflectivity and illumination are generated according to Decomposition, and according to the normal image S normal Illumination I normal The V channel image S of the low illumination image low Illumination I ow And the normal image S normal The reflectivity R normal The V channel image S of the low illumination image low The reflectivity R ow The loss function is calculated based on the difference between them to update the network parameters. Similarly, RestorationNet and EnhanceNet are updated. The S channel image of the low-light image is adaptively adjusted according to the coarse enhanced image of the V channel. The coarse enhanced image of the V channel, the adaptively adjusted S channel image and the H channel image are synthesized into an RGB image, i.e., a coarse enhanced image. A virtual overexposed image is generated based on the low-light image. The virtual overexposed image, the low-light image and the coarse enhanced image are synthesized to obtain the final enhanced image. The loss of this image and the normal image is used to update the network parameters. In the real-time data stage, the low-light image is taken as input. The trained Decomposition obtains the reflectivity and illumination corresponding to the image of the V channel of the low-light image, denoises the reflectivity through RestorationNet, enhances the illumination through EnhanceNet, and then synthesizes the denoised reflectivity and enhanced illumination to obtain the enhanced image of the S channel. The image of the S channel of the low-light image is adaptively enhanced according to the coarsely enhanced image, and the processed S and V channel images are synthesized with the H channel to obtain an RGB image, i.e., a coarsely enhanced image; a virtual overexposed image of the low-light image is generated, and it is synthesized with the low-light image and the coarsely enhanced image to obtain the final virtual image.

[0126] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A low-light image enhancement method based on adaptive RetinexNet under a fusion strategy, characterized in that: The specific steps include: Obtaining an original image and a synthesized low-light image corresponding to the original image from historical data, taking the original image as a normal-light image, and taking the synthesized low-light image as a low-light image; Input the V channel image of the low-light image and the normal-light image into DecomNet to obtain the illumination and reflectivity of the normal-light image, as well as the illumination and reflectivity of the low-light image; The reflectivity and illumination of the obtained low-light image are input into RestorationNet, and the reflectivity denoising is guided by illumination to obtain the reflectivity after denoising. The reflectivity and illumination of the low-light image are input into EnhanceNet, and the illumination of the low-light image is enhanced to obtain the enhanced illumination. After obtaining the enhanced V channel image, the S channel image is adaptively adjusted, and the adjustment process is expressed as: s′(x,y)=s(x,y)+t[v′(x,y)-v(x,y)]×λ(x,y); Where s′(x,y) is the saturation of the pixel at the xth row and yth column of the coarse enhanced image; s(x,y) is the saturation of the pixel at the xth row and yth column of the low-light image; v′(x,y) is the brightness of the pixel at the xth row and yth column of the coarse enhanced image; v(x,y) is the brightness of the pixel at the xth row and yth column of the low-light image; t is the proportional constant; λ(x,y) is the correlation coefficient between v(x,y) and s(x,y), expressed as: Where v(p,q) is the brightness of the pixel at position (p,q) in the neighborhood window of the pixel point (x,y), and s(p,q) is the saturation of the pixel at position (p,q) in the neighborhood window of the pixel point (x,y). is the mean brightness of the pixel (x, y) in the neighborhood window w, is the mean saturation of the pixel (x, y) in the neighborhood window w; v (x, y) is the variance of the brightness of the pixel (x, y) in the neighborhood window w, δ s (x,y) is the variance of the saturation of the pixel (x,y) in the neighborhood window w; w is an n×n window centered on the pixel (x,y); Image reconstruction, that is, the H channel, V channel and S channel of the optimized image are synthesized into an RGB image using the color channel, that is, a coarse enhanced image; A virtual overexposed image of the low-light image is obtained, and the low-light image, the coarse enhanced image and the virtual overexposed image are fused to obtain a final optimized enhanced image.

2. According to the low-light image enhancement method of adaptive RetinexNet under a fusion strategy according to claim 1, it is characterized in that: Before the image is input into DecomNet, the color channel of the training set or the real-time low-light image to be enhanced is converted to convert the image from RGB image to HSV image.

3. According to the low-light image enhancement method of adaptive RetinexNet under a fusion strategy of claim 1, it is characterized in that: The image input to DecomNet is extracted using a convolution layer with a convolution kernel of 3×3, and the extracted features are mapped in turn through 5 convolution layers with ReLU and a convolution kernel of 3×3. After mapping, a convolution layer with a convolution kernel of 3×3 and a sigmoid function is passed in turn to obtain an image with 4 channels. The first 3 channels of the image are used as the reflectivity R of the image, and the last channel is used as the illumination I of the image.

4. According to the low-light image enhancement method of adaptive RetinexNet under a fusion strategy of claim 1, it is characterized in that: The illumination of a low-light image is enhanced, and the process of obtaining the enhanced illumination includes: The illumination of the low-light image and the reflectivity after denoising are concatenated and used as the input of the EnhanceNet network; The encoder-decoder architecture of the EnhanceNet network obtains contextual information in large areas of the input image; In the EnhanceNet network, three consecutive downsampling modules are used to downsample the input image to different sizes; The downsampled image is concatenated with the context information each time, and the concatenated image is reconstructed by upsampling to obtain enhanced illumination.

5. According to the low-light image enhancement method of adaptive RetinexNet under a fusion strategy of claim 1, it is characterized in that: DecomNet is trained by back propagation through the loss function of DecomNet. The loss function L1 of DecomNet is composed of the reconstruction loss function L recon , reflection component consistency loss function L ir And the structural smoothing loss function L is The composition is expressed as: L1=L recon +λ ir L ir +λ is L is ; L ir =||R low -R normal ||1; Among them, λ ir represents the reflectivity consistency coefficient, λ is Represents the lighting smoothness coefficient; low represents the low-light image dataset, normal represents the normal-light image dataset; λ ij is the balance coefficient of reconstruction loss; R i is the reflectivity when i is low or normal; when j = low, I j is the illumination of the low-light image. When j = normal, I j is the illumination of the normal light image; when j = low, S j represents a low-light image. When j = normal, S j Represents normal light image; R low Represents the reflectivity of low-light images; R normal represents the reflectance of the normal light image; || ||1 represents the 1-norm; ▽ represents the gradient; λ g is the balance structure perception strength coefficient; || ||1 represents 1-norm; ▽ represents gradient; || ||2 represents 2-norm; RestorationNet is trained by back propagation through the loss function of RestorationNet. The loss function of RestorationNet is expressed as: in, is the loss function of RestorationNet; is the reflection image after noise reduction; R h is the reflectivity of the normal light image; for With R h Structural similarity measure between ; EnhanceNet is trained by back propagation through the loss function of EnhanceNet. The loss function of EnhanceNet is composed of the reconstruction loss function L recon And the structural smoothing loss function L is The composition is expressed as: L2=L recon +λ is L is ; Among them, L2 is the loss function of EnhanceNet.

6. The low-light image enhancement method of adaptive RetinexNet under a fusion strategy according to claim 1, characterized in that: The virtual overexposed image is obtained using the camera response model, which is expressed as: P = f(E); Among them, P is the image obtained by camera imaging, that is, the virtual overexposed image; E is the irradiance of the low-illuminance image; and f is the nonlinear response function of the camera.

7. The low-light image enhancement method of adaptive RetinexNet under a fusion strategy according to claim 1, characterized in that: The process of fusing the original low-light image, the coarse enhanced image and the virtual over-exposed image to obtain the final optimized enhanced image includes: The original low-light image, the coarse enhanced image and the virtual over-exposed image are column-vectorized using the image block decomposition method; Get the maximum value of the block signal strength of the image after column vectorization, recorded as Get the expected block structure of the image after column vectorization, denoted as It is expressed as: in, is the weighting function, expressed as To remove the image block with the average value, it is expressed as x k represents an image block, For image block x k The average value; p is the weight parameter; S k is a unit length vector; K is the exposure rate; s k is the block structure of the image with exposure rate k; The weighted linear fusion mechanism is used to obtain the average strength of the block, denoted as It is expressed as: Among them, L(μ k ,l k ) is to transform the image X k The global average μ k and the current image block x k The local average of is used as the input weighting function; k Represents the average intensity of pixel blocks with different exposure rates; The stacked Restored to the RGB channel, the optimized enhanced image is represented as:

Citation Information

Cited By

  • RetinexNet improved low-illumination image enhancement method based on CMOS image sensor and electronic equipment

    CN119831915A