A low-light enhancement method and system based on multispectral image reconstruction
Through multispectral image reconstruction technology, combined with deep learning models, it solves the problem of traditional low-light image enhancement methods ignoring the physical process of imaging, achieves more effective low-light image information recovery, and significantly improves image quality.
Patent Information
- Application Number
- CN202410450838.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-04-15
AI Technical Summary
Traditional low-light image enhancement methods ignore the physical process of digital camera imaging, resulting in color information shift and loss, and limited image enhancement effects.
The low-illumination enhancement method based on multi-spectral image reconstruction collects low-illumination/normal illumination image data sets, uses imaging physical models to calculate multi-spectral images, builds a deep learning spectral reconstruction model, and monitors the spectral reconstruction errors of the training set and verification set until Convergence, achieving spectral reconstruction of low-light images and restoration of color images.
It significantly improves the color and texture information recovery effect of low-light images, is superior to traditional methods, and provides a more effective low-light image enhancement solution.
Smart Images

Figure CN118333873B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer digital image processing, and in particular relates to a low illumination enhancement method and system based on multi-spectral image reconstruction. Background Art
[0002] Visual cells can perceive light radiation within the visible light range and transmit the resulting stimulus signals to the cerebral cortex, allowing humans to perceive the colorful world. Similarly, color digital cameras can record the radiation spectrum information of natural scenes as an RGB image that conforms to human visual effects by simulating the visual perception mechanism, using color filter array sensors and image post-processing technology. Images taken under insufficient exposure intensity cannot achieve ideal imaging conditions. The camera image under low exposure environment has very limited ability to represent color and surface texture information of objects. In the field of computer vision, low-light image enhancement is a hot topic in the field of image processing research. Low-light image enhancement technology can effectively restore the color and texture information contained in the image, but traditional low-light image enhancement directly calculates from low-light to normal-light images, ignoring the basic principles of imaging, and the image enhancement effect is limited.
[0003] Traditional low-light enhancement algorithms include histogram equalization and retinal theory. The low-light enhancement theory based on histogram equalization achieves the effect of low-light image correction by changing the pixel histogram distribution of the image. However, the algorithm does not consider the physical process of digital camera imaging and only enhances the image from the image space after imaging, which easily leads to color information offset and loss. The retinal theory is a classic low-light enhancement model, which splits the image into illumination component and reflection component, and uses the illumination component and reflection component obtained by decomposition to achieve end-to-end enhancement of low-light images. However, the existing related research is still carried out from the image space, and has not conducted in-depth research on the underlying space of the reflectance component - the spectral space. Therefore, the image enhancement effect is still limited. Summary of the invention
[0004] The purpose of the present invention is to solve the problem described in the background technology and to propose a low illumination enhancement method based on multispectral image reconstruction.
[0005] In view of the problems existing in the above-mentioned existing research, the present invention proposes a method to solve the problem, firstly, collect the existing publicly available low-illumination / normal-illumination image data sets; then, based on the imaging physical model, calculate the normal-illumination multispectral image corresponding to each normal-illumination image; then, divide the complete sample set into a training sample set and a verification sample set according to the ratio of M:N, and construct a complete sample set containing paired data based on the normal-illumination multispectral image and its low-illumination image; after completing the data preparation, construct a deep learning spectral reconstruction model framework, and use the data samples to obtain the loss function results to adjust the model parameters, monitor the spectral reconstruction errors of the training set and the verification sample set, until the spectral reconstruction errors of the training set and the verification set reach a convergence state, and obtain a low-illumination enhanced multispectral reconstruction model; finally, use the low-illumination enhanced multispectral reconstruction model to perform spectral reconstruction on the low-illumination image to obtain a normal-illumination multispectral image, and use colorimetry theory to calculate the normal-illumination color image corresponding to the normal-illumination multispectral image.
[0006] The technical solution of the present invention is a low-light enhancement method based on multispectral image reconstruction, which specifically includes the following steps:
[0007] Step 1: Collect existing publicly available low-light / normal-light image datasets;
[0008] Step 2, based on the imaging physical model, calculating the normal illumination multispectral image corresponding to each normal illumination image;
[0009] Step 3: Divide the complete sample set into a training sample set and a validation sample set according to the ratio of M:N;
[0010] Step 4, constructing a complete sample set containing paired data based on the normal illumination multispectral image and its low illumination image;
[0011] Step 5, construct a deep learning spectral reconstruction model framework;
[0012] Step 6: Use the data sample to get the loss function result to adjust the model parameters;
[0013] Step 7, monitoring the spectral reconstruction errors of the training set and the validation sample set until the spectral reconstruction errors of the training set and the validation set reach a convergence state, thereby obtaining a low-illumination enhanced multi-spectral reconstruction model;
[0014] Step 8, using the low-illumination enhanced multispectral reconstruction model to perform spectral reconstruction on the low-illumination image to obtain a normal-illumination multispectral image corresponding to the low-illumination image;
[0015] Step 9, using colorimetry theory to calculate the normal illumination multispectral image corresponding to the normal illumination color image.
[0016] Furthermore, in step 2, based on the imaging theory imaging model, the method for calculating the multispectral image corresponding to each normal illumination image is as follows:
[0017] At each pixel of a multispectral image, a high-resolution radiation spectrum is recorded. The relationship between a multispectral image and an RGB image can be expressed as:
[0018]
[0019] where d i represents the response value of the ith channel at a pixel point (x, y) in the image, l(λ) is the spectral distribution of the illumination source, r(λ) is the spectral reflectance of a point on the surface of the object, t(λ) is the overall transmittance of the camera lens optics, and f i (λ) is the transmittance of the filter of the i-th channel of the camera, s(λ) is the spectral sensitivity function of the camera's photosensitive element, λ represents the wavelength, m i =t(λ)f i (λ)s(λ) represents the overall spectral sensitivity function of the i-th channel of the digital camera. According to the imaging model shown in formula (1), the CIED65 light source is used as the default reference light source l(λ), and the CIE1931 standard observer function is used as the overall sensitivity function m of the camera. i , the spectral reflectance of each pixel can be obtained by the least squares method, and then the multispectral image corresponding to the normal illumination image can be obtained.
[0020] Furthermore, in step 3, the complete sample set is randomly divided into a training sample set and a validation sample set according to the ratio of M:N. Usually, the ratio of the training sample set to the validation sample set is 9:1, that is, for the complete sample set, 90% of it is usually randomly selected as the training sample set to train the model, and the remaining 10% is used as the validation sample set to adjust the model parameters during the model training process.
[0021] Furthermore, in step 4, based on the normal illumination multispectral image and the low illumination color image, a specific implementation method for forming a complete sample set containing paired data is as follows:
[0022] First, read the training multispectral image and low-light image;
[0023] Then, the data were normalized respectively;
[0024] Secondly, the training images are cropped into sample pairs of 40×40 pixels to increase the training data;
[0025] Again, store it as a training data sample for model calling;
[0026] Finally, create a validation data sample using the same steps as above.
[0027] Furthermore, in step 5, the method for constructing a deep learning spectral reconstruction model framework is as follows:
[0028] By using the correlation between RGB values and their corresponding multispectral radiation, a learning-based method is used to directly model the mapping relationship between RGB and multispectral images. Given an RGB image and its corresponding multispectral image, the mapping method between RGB and multispectral images can be described as follows:
[0029] r=f(d) (2)
[0030] In formula (1), it is assumed that the mapping model f(·) from RGB space to spectral space is known, that is, by realizing the feature extraction and feature selection operations of RGB image d, the calculation of spectral information r can be realized. Given any RGB image d, its corresponding spectral image r can be reconstructed. First, a convolution layer including 16 output channels is used to extract shallow features of the input data; then a densely connected network including seven layers of 16 output channel convolutions is used to extract deep feature images. The densely connected network has a higher channel feature utilization rate than the residual structure, and the size of the feature map in the network remains unchanged. The number of channels gradually increases as the network deepens, which greatly reduces the parameters of the network and also alleviates the gradient disappearance problem to a certain extent. The formula is shown as follows:
[0031] x l =F l ([x0,x1,…,x l-1 ]) (3)
[0032] In formula (3), x l represents the output of the lth layer of the dense block, F l (·) represents the nonlinear mapping of layer l, [x0,x1,…,x 1-1 ] means merging the feature maps output by the (0~l-1) layers. Finally, the extracted feature images are reconstructed into 31-dimensional multispectral images using a hybrid attention mechanism and three convolutional layers including 128, 64 and 31 output channels. Each convolution layer in the model uses the Relu activation function, and its formula is described as follows:
[0033] f(x)=max(0,x) (4)
[0034] In the model, a hybrid attention mechanism is inserted between three layers of convolutions including 128, 64 and 31 output channels. The formula is described as follows:
[0035] C=δ(MLP(AvgPool(x)+MaxPool(x))) (5)
[0036] S=δ(f(AvgPool(x);MaxPool(x))) (6)
[0037] Where x is the input, δ represents the Sigmoid activation function, MLP represents the multi-layer perceptron, f represents the convolution, the channel attention feature output is C, and the spatial attention feature output is S. Through this operation, the weight of each channel can be adaptively learned, and then the useful features can be enhanced and the less useful features can be suppressed according to this weight.
[0038] Furthermore, in step 6, the method of using the data sample to obtain the loss function result to adjust the model is as follows:
[0039] The loss results are calculated for the training set and validation set used in the model respectively. The loss function used is as follows:
[0040] loss=loss1+loss ssim (7)
[0041] loss1=||M rec -M gro ||1 (8)
[0042] loss ssim =1-ssim(M rec ,M gro ) (9)
[0043] Where ||·||1 represents the first norm, and the calculation formula of structural similarity ssim is as follows:
[0044]
[0045] Where M rec represents the reconstructed spectral image, M gro represents the real spectral image, w x represents the area of image x within window w, Yes x The mean of the variables is the variable w x The variance of Yes x and w y The covariance of y represents the area of image y within window w, Yes y The mean of is the variable w yFinally, the error between the reconstructed multispectral image and the real multispectral image of the training sample set and the validation sample set in the model is calculated according to Formula 7, and the reconstruction error of the training sample set and the validation sample set is used to update and adjust the weights and hyperparameters in the model.
[0046] Furthermore, in step 7, the method for judging whether the spectral reconstruction error of the training sample set and the verification sample set has reached a convergence state is: setting an error threshold Th and an error fluctuation threshold Td, and when the error changes between n consecutive iterations are lower than Th, and the error fluctuation thresholds are all lower than Td, it is judged that the model has reached a convergence state, and the trained model is saved.
[0047] Furthermore, in step 8, a normal illumination multispectral image corresponding to the low illumination image is reconstructed using a low illumination enhanced multispectral reconstruction model.
[0048] Furthermore, in step 9, the color calculation process of the normal illumination image corresponding to the normal illumination multispectral image is as follows:
[0049] Use the CIE 1964 color matching functions and the CIE D65 illuminant to convert to CIE XYZ tristimulus values, and then convert CIEXYZ to the sRGB standard color space, as shown in formula 11-12:
[0050]
[0051]
[0052]
[0053] r(λ) is the spectral reflectance of the object, s(λ) is the spectral power distribution, x(λ)y(λ)z(λ) is the CIE standard observer matching function, dλ represents the wavelength interval, the integration range of λ can be 400nm-700nm, XYZ is the CIE XYZ tristimulus value, and RGB is the color value corresponding to the sRGB color space.
[0054] The present invention also provides a low-light enhancement system based on multispectral image reconstruction, comprising the following modules:
[0055] A data collection module, used to collect existing publicly available low-illumination / normal-illumination image datasets;
[0056] A calculation module, used for calculating a normal illumination multispectral image corresponding to each normal illumination image based on an imaging physical model;
[0057] The sample partitioning module is used to divide the complete sample set into a training sample set and a validation sample set according to the ratio of M:N;
[0058] A sample set building module is used to build a complete sample set containing paired data based on the normal illumination multispectral image and its low illumination image;
[0059] Model building module, used to build a deep learning spectral reconstruction model framework;
[0060] A model parameter adjustment module is used to adjust the model parameters by using the loss function results obtained using data samples;
[0061] An error monitoring module is used to monitor the spectral reconstruction error of the training set and the verification sample set until the spectral reconstruction error of the training set and the verification set reaches a convergence state, thereby obtaining a low-illuminance enhanced multi-spectral reconstruction model;
[0062] A reconstruction module is used to perform spectral reconstruction on the low-illumination image using a low-illumination enhanced multispectral reconstruction model to obtain a normal-illumination multispectral image corresponding to the low-illumination image;
[0063] The enhancement module is used to calculate the normal illumination color image corresponding to the normal illumination multispectral image by using the colorimetry theory.
[0064] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows: Starting from the basic imaging process, this study proposes a low-illumination image enhancement method based on spectral reconstruction. This method first uses a multispectral reconstruction algorithm to obtain a normal-illumination multispectral image of a normal-illumination color image, and uses the low-illumination image and the normal-illumination multispectral image as a training data pair. Then, a deep learning model is used to learn the end-to-end mapping relationship from the low-illumination image to the normal-illumination multispectral image, and the reconstruction of any low-illumination image to the normal-illumination multispectral image is realized. Finally, the normal-illumination color image corresponding to the multispectral image is calculated according to the colorimetry theory, and the enhancement of the low-illumination image is completed. In order to verify the effectiveness of the method, the study takes the LOL dataset commonly used in the field of low-illumination image research as the object, adopts a spectral reconstruction algorithm based on a physical model to obtain a normal-illumination multispectral image, and uses the deep learning spectral reconstruction algorithm proposed by Zhang to establish a mapping relationship between the low-illumination image and the multispectral image, and compares it with advanced methods such as Self-supervised, RetinexNet and RRM. Experimental results show that the low-illumination image enhancement method proposed in this study is significantly better than the traditional method, providing a new reference paradigm for low-illumination image enhancement research. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 is a flow chart of an embodiment of the present invention.
[0066] Figure 2 This is a low-light enhancement model framework based on multispectral image reconstruction according to an embodiment of the present invention.
[0067] Figure 3 These are objective indicators of 15 test images in the embodiment of the present invention. DETAILED DESCRIPTION
[0068] The technical solution of the present invention can be implemented by those skilled in the art using computer software technology, which is described in detail below in conjunction with the embodiments of the present invention.
[0069] like Figure 1 As shown, a low-light enhancement method based on multispectral image reconstruction is provided in the embodiment, which can effectively solve the imaging limitations of the camera in a weak exposure environment. That is, due to the constraints of actual shooting conditions, low-light images cannot accurately reflect the color and texture information of the object, and the application value is limited. The use of low-light image enhancement technology can effectively restore the color and texture information contained in the image. In the example, the LOL low-light / normal-light image dataset is used as the basis, and the Python programming language and Matlab 2020b software platform are used to specifically illustrate the method of the present invention. It should be noted that the present invention is not limited to the above-mentioned data samples and application support, but is also applicable to any device of the same nature that can realize the functions of the above-mentioned devices.
[0070] The embodiment mainly includes the following steps:
[0071] Step 1: Collect existing publicly available multispectral image datasets.
[0072] The collection of existing public multispectral image datasets mainly refers to the datasets that have been publicly published in academic papers, such as the datasets in Reference 1 and Reference 2.
[0073] Reference 1: Wei, Chen, et al. "Deep retinex decomposition for low-light enhancement." arXiv preprint arXiv:1808.04560 (2018).
[0074] Reference 2: Chen, Chen, et al. "Learning to see in the dark." Proceedings of the IEEE conference on computer vision and pattern recognition. 2018.
[0075] In the embodiment, after referring to the data sets published in existing academic papers, the LOL low-light / normal-light image data set is selected as sample data. The data set is taken in real scenes (e.g., houses, campuses, clubs, etc.). It contains 500 low-light / normal-light image pairs with a pixel size of 400*600. 485 pairs of data are used for training and 15 pairs of data are used for testing.
[0076] Step 2: Based on the theoretical imaging model of a digital camera, calculate the multispectral image corresponding to each normal illumination color image.
[0077] At each pixel of a multispectral image, a high-resolution radiation spectrum is recorded. The relationship between a multispectral image and an RGB image can be expressed as:
[0078]
[0079] where d i represents the response value of the ith channel at a pixel point (x, y) in the image, l(λ) is the spectral distribution of the illumination source, r(λ) is the spectral reflectance of a point on the surface of the object, t(λ) is the overall transmittance of the camera lens optics, and f i (λ) is the transmittance of the filter of the i-th channel of the camera, s(λ) is the spectral sensitivity function of the camera's photosensitive element, λ represents the wavelength, m i =t(λ)f i (λ)s(λ) represents the overall spectral sensitivity function of the i-th channel of the digital camera.
[0080] In the embodiment, based on the imaging theory imaging model, CIED65 light source is used as the default reference light source l(λ), and CIE1931 standard observer function is used as the overall sensitivity function m of the camera. i , the spectral reflectance of each pixel can be obtained by the least squares method, and then the multispectral image corresponding to the normal illumination image can be obtained.
[0081] Step 3: Divide the complete sample set into a training sample set and a validation sample set according to the ratio of M:N.
[0082] In the embodiment, the complete sample set is divided into two parts according to the ratio of 9:1, that is, for the complete sample set, 437 image data pairs are randomly selected from 485 training images as the training sample set to train the model weights, and 48 image data pairs are used as the verification sample set to adjust the model hyperparameters during the model training process.
[0083] Step 4: Based on the normal illumination multispectral image and the corresponding low illumination color image, a complete sample set containing paired data is constructed.
[0084] In the embodiment, the specific implementation method of forming a complete sample set of paired data based on the normal illumination multispectral image and the corresponding low illumination image and using the Matlab software platform is as follows:
[0085] First, read the normal illumination multispectral image and its corresponding low illumination image;
[0086] Then, the low-illumination color image data is normalized;
[0087] Secondly, based on the normal illumination multispectral image and the corresponding low illumination color digital image, sample pairs of 40×40 pixels are randomly selected;
[0088] Again, randomly selected samples of 40×40 pixels are stored for model training and verification;
[0089] Finally, the complete sample set is obtained.
[0090] Step 5: Build a deep learning spectral reconstruction model framework to train the low-light enhancement model based on spectral reconstruction.
[0091] In the embodiment, the method for constructing a deep learning spectral reconstruction model framework is as follows:
[0092] By using the correlation between the color image and its corresponding multispectral image, the Python programming language and the Tensorflow deep learning framework are used to directly model the mapping relationship between the low-light color image and the normal-light multispectral image. Assuming that a low-light color image and its corresponding normal-light multispectral image are given, the mapping method between the two can be described as shown in formula (2):
[0093] r=f(d) (2)
[0094] Where d represents the digital image response value, r represents the corresponding spectral reflectance data, and f(·) represents the mapping relationship between the low-light color image and the multi-spectral image. Assuming that the mapping model f(·) from the low-light color space to the normal-light spectral space is known, for any given d, its corresponding spectral reflectance r can be calculated using formula (2).
[0095] Based on the above spectral reconstruction principle, this paper constructs the following Figure 2The deep learning framework shown in Figure 1 is used. First, a convolution layer with 16 output channels is used to extract the shallow features of the input image. Then, a densely connected network with 7 layers of convolutions with 16 output channels is used to extract the deep features of the input image. Compared with the traditional residual structure, the use of a densely connected network can improve the utilization rate of image channel features, greatly reduce network parameters, and alleviate the gradient vanishing problem to a certain extent. The formula is shown as follows:
[0096] x l =F l ([x0,x1,…,x l-1 ]) (3)
[0097] Among them, x l represents the output of the lth layer of the dense block, F l (·) represents the nonlinear mapping of layer l, [x0,x1,…,x 1-1 ] means merging the feature maps output by the (0~l-1) layers.
[0098] Finally, four convolution layers including 128, 64 and 31 output channels are used to reconstruct the extracted feature image into a 31-dimensional multispectral image. Each convolution layer in the model uses the Relu activation function, and its formula is described as follows:
[0099] f(x)=max(0,x) (4)
[0100] Among them, x represents the input, and max() means obtaining the maximum value between the input value x and 0.
[0101] The Convolutional Block Attention Module (CBAM) is added to the neural network as a plug-and-play module. In the Convolutional Block Attention Module, the channel attention uses average pooling and maximum pooling layers to compress the feature information, and then extracts the feature weights through two fully connected layers including activation. The first fully connected layer can reduce the feature dimension to 1 / r of the input, where r is the compression parameter. In this study, r is 32 and 16 respectively. The feature map output by the previous layer is activated by the Relu function and restored to the original dimension by the second fully connected layer. The feature information processed by the second fully connected layer is passed through the Sigmoid function, and the original features are recalibrated in the channel domain. The spatial attention module takes the output of the channel attention as input, integrates the channel feature information using average pooling and maximum pooling, then combines the obtained features, and passes through the convolution kernel size of 1. Finally, the Sigmoid activation function is used to obtain the required mask. Its formula is described as follows:
[0102] C=δ(MLP(AvgPool(x)+MaxPool(x))) (5)
[0103] S=δ(f(AvgPool(x);MaxPool(x))) (6)
[0104] Where x is the input, δ represents the Sigmoid activation function, MLP represents a multi-layer perceptron, f represents convolution, AvgPool represents average pooling, MaxPool represents maximum pooling, the channel attention feature output is C, and the spatial attention feature output is S. Through this operation, the weight of each channel can be adaptively learned, and then the useful features can be enhanced and the less useful features can be suppressed according to this weight.
[0105] Step 6: Use the training sample set to train the model.
[0106] In the embodiment, the method of training the model using the training sample set is specifically as follows:
[0107] First, input paired data samples into the model
[0108] Then, the input data samples are rotated to perform data augmentation
[0109] The loss function is used to calculate the error value to adjust the model. The calculation method is as follows:
[0110] The loss results are calculated for the training sample set and the validation sample set used in the model. The loss function used is as follows:
[0111] loss=loss1+loss ssim (7)
[0112] loss1=||M rec -M gro ||1 (8)
[0113] loss ssim =1-ssim(M rec ,M gro ) (9)
[0114] Where ||·||1 represents the first norm, and the calculation formula of structural similarity ssim is as follows:
[0115]
[0116] Among them, M rec represents the reconstructed spectral image, M gro represents the real spectral image, w x represents the area of image x within window w, Yesx The mean of the variables is the variable w x The variance of Yes x and w y The covariance of y represents the area of image y within window w, Yes y The mean of is the variable w y The variance of w in this example is 11. Finally, the error between the reconstructed multispectral image and the real multispectral image of the training sample set and the validation sample set in the model is calculated according to Formula 7, and the weights and hyperparameters in the model are updated and adjusted using the reconstruction error of the training sample set and the validation sample set.
[0117] Step 7: monitor the spectral reconstruction error between the training sample set and the validation sample set until the spectral reconstruction error between the training sample set and the validation sample set reaches a convergence state, thereby obtaining a spectral reconstruction model.
[0118] In the embodiment, the method for judging whether the spectral reconstruction errors of the training sample set and the verification sample set have reached a convergence state is that when the error changes of 10 consecutive iterations are all lower than 0.1 and the error fluctuation thresholds are all lower than 0.01, the model is judged to have reached a convergence state.
[0119] Step 8: Use the low-illuminance enhanced multispectral reconstruction model to perform spectral reconstruction on the low-illuminance image to obtain a normal-illuminance multispectral image.
[0120] In the embodiment, a low-illuminance color image is input into the model to obtain its corresponding normal-illuminance multispectral image.
[0121] Step 9, using colorimetry theory to calculate the normal illumination multispectral image corresponding to the normal illumination color image.
[0122] In the example, the normal illumination multispectral image is first converted into CIE XYZ tristimulus values using CIE 1964 color matching functions and CIED65 light source as shown in formula 11, and then CIEXYZ is converted into sRGB standard color space as shown in 12 to obtain a normal illumination color image.
[0123]
[0124]
[0125]
[0126] r(λ) is the spectral reflectance of the object, s(λ) is the spectral power distribution, x(λ)y(λ)z(λ) is the CIE standard observer matching function, dλ represents the wavelength interval, the integration range of λ can be 400nm-700nm, XYZ is the CIE XYZ tristimulus value, and RGB is the color value corresponding to the sRGB color space.
[0127] In the embodiment, a spectral reconstruction model is established using the LOL data set as a training sample, and a low-light enhancement result is achieved on the LOL data test sample. Figure 3 The comparison between the method of the present invention and four existing commonly used low-light enhancement methods is given in the table, where 'Proposed' is the method of the present invention, 'M1', 'M2', 'M3', and 'M4' represent the low-light enhancement algorithms proposed in references 3 to 6 respectively, 'M5' is the effect of the multispectral image reconstruction model proposed by Zhang et al. (reference 7) directly applied in the present invention, and 'Proposed' is the effect achieved by the method of the present invention. Figure 3 It can be seen from the results in that the present invention is superior to the existing advanced methods in terms of objective indicators such as color difference and peak signal-to-noise ratio, which proves the superiority of the method proposed in the present invention.
[0128] Reference 3: Wei, Chen, et al. "Deep retinex decomposition for low-light enhancement." arXiv preprint arXiv:1808.04560 (2018).
[0129] Reference 4: Zhang, Yu, et al. "Self-supervised image enhancement network: Training with low light images only." arXiv preprint arXiv:2002.11300(2020).
[0130] Reference 5: Li, Mading, et al. "Structure-revealing low-light imageenhancement via robust retinex model." IEEE Transactions on Image Processing27.6(2018):2828-2841.
[0131] Reference 6: Zhang, Yonghua, Jiawan Zhang, and Xiaojie Guo. "Kindling thedarkness: A practical low-light image enhancer." Proceedings of the 27th ACMinternational conference on multimedia. 2019.
[0132] Reference 7: Zhang, Junchao, et al. "Deep-learning-based hyperspectralrecovery from a single RGB image." Optics Letters 45.20(2020):5676-5679.
[0133] The embodiment of the present invention further provides a low illumination enhancement system based on multispectral image reconstruction, comprising the following modules:
[0134] A data collection module, used to collect existing publicly available low-illumination / normal-illumination image datasets;
[0135] A calculation module, used for calculating a normal illumination multispectral image corresponding to each normal illumination image based on an imaging physical model;
[0136] The sample partitioning module is used to divide the complete sample set into a training sample set and a validation sample set according to the ratio of M:N;
[0137] A sample set building module is used to build a complete sample set containing paired data based on the normal illumination multispectral image and its low illumination image;
[0138] Model building module, used to build a deep learning spectral reconstruction model framework;
[0139] A model parameter adjustment module is used to adjust the model parameters by using the loss function results obtained using data samples;
[0140] An error monitoring module is used to monitor the spectral reconstruction error of the training set and the verification sample set until the spectral reconstruction error of the training set and the verification set reaches a convergence state, thereby obtaining a low-illuminance enhanced multi-spectral reconstruction model;
[0141] A reconstruction module is used to perform spectral reconstruction on the low-illumination image using a low-illumination enhanced multispectral reconstruction model to obtain a normal-illumination multispectral image corresponding to the low-illumination image;
[0142] The enhancement module is used to calculate the normal illumination color image corresponding to the normal illumination multispectral image by using the colorimetry theory.
[0143] The specific implementation method of each module is the same as each step and will not be described in detail in the present invention.
[0144] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A low illumination enhancement method based on multispectral image reconstruction, characterized in that: The following steps are involved: Step 1: Collect existing publicly available low-light / normal-light image datasets; Step 2, based on the imaging physical model, calculating the normal illumination multispectral image corresponding to each normal illumination image; Step 3: Divide the complete sample set into a training sample set and a validation sample set according to the ratio of M:N; Step 4, constructing a complete sample set containing paired data based on the normal illumination multispectral image and its low illumination image; Step 5: Build a deep learning spectral reconstruction model framework; the details are as follows: Using the correlation between RGB values and their corresponding multispectral radiation, a learning-based method is used to directly model the mapping relationship between RGB and multispectral images. Given an RGB image and its corresponding multispectral image, the mapping method between RGB and multispectral images is described as follows: (2); In formula (1), it is assumed that the mapping model f(·) from RGB space to spectral space is known. That is, by realizing the feature extraction and feature selection operations on the RGB image d, the calculation of the spectral information r can be realized. Given any RGB image d, its corresponding spectral image r can be reconstructed. First, a convolution layer including 16 output channels is used to extract shallow features of the input data. Then, a densely connected network including seven layers of convolutions including 16 output channels is used to extract deep feature images. The formula is as follows: (3); In formula (3), x l represents the output of the lth layer of the densely connected network, F l (·) represents a nonlinear mapping of layer l, [x0,x1,…, x l -1 ] means merging the feature maps output by the (0~l-1) layer; finally, the extracted feature images are reconstructed into 31-dimensional multispectral images using a hybrid attention mechanism and three convolutional layers including 128, 64 and 31 output channels; each convolution layer in the model uses the Relu activation function, and its formula is described as follows: (4); In the model, a hybrid attention mechanism is inserted between three layers of convolutions including 128, 64 and 31 output channels. The formula is described as follows: (5); (6); Where x is the input, δ represents the Sigmoid activation function; MLP represents the multi-layer perceptron, and f represents convolution. represents average pooling, Indicates maximum pooling, the channel attention feature output is C, and the spatial attention feature output is S; Step 6: Use the data sample to get the loss function result to adjust the model parameters; Step 7, monitoring the spectral reconstruction errors of the training set and the validation sample set until the spectral reconstruction errors of the training set and the validation set reach a convergence state, thereby obtaining a low-illumination enhanced multi-spectral reconstruction model; Step 8, using the low-illumination enhanced multispectral reconstruction model to perform spectral reconstruction on the low-illumination image to obtain a normal-illumination multispectral image corresponding to the low-illumination image; Step 9, using colorimetry theory to calculate the normal illumination multispectral image corresponding to the normal illumination color image; In step 9, the color calculation process of the normal illumination image corresponding to the normal illumination multispectral image is as follows: Use the CIE 1964 color matching functions and the CIE D65 illuminant to convert to CIE XYZ tristimulus values, and then convert CIEXYZ to the sRGB standard color space, as shown in formulas (11)-(12): (11); (12); r(λ) is the spectral reflectance of the object, s(λ) is the spectral power distribution, x(λ) y(λ) z(λ) are the CIE standard observer matching functions, dλ represents the wavelength interval, λ is the wavelength, XYZ is the CIE XYZ tristimulus value, and RGB is the color value corresponding to the sRGB color space.
2. The low illumination enhancement method based on multispectral image reconstruction according to claim 1, characterized in that: In step 2, based on the imaging theory imaging model, the method for calculating the multispectral image corresponding to each normal illumination image is as follows: At each pixel of the multispectral image, a high-resolution radiation spectrum is recorded. The relationship between the multispectral image and the RGB image is expressed as: (1); where d i represents the response value of the i-th channel at a pixel point (x, y) in the image, l(λ) is the spectral distribution of the illumination source, r(λ) is the spectral reflectance of a point on the surface of the object, t(λ) is the overall transmittance of the camera lens optics, and f i (λ) is the transmittance of the filter of the i-th channel of the camera, s(λ) is the spectral sensitivity function of the camera's photosensitive element, λ represents the wavelength, m i =t(λ)f i (λ)s(λ) represents the overall spectral sensitivity function of the i-th channel of the digital camera. According to the imaging model shown in formula (1), the CIED65 light source is used as the default reference light source l(λ), and the CIE1931 standard observer function is used as the overall sensitivity function m of the camera. i , the spectral reflectance of each pixel can be obtained by the least squares method, and then the multispectral image corresponding to the normal illumination image can be obtained.
3. The low illumination enhancement method based on multispectral image reconstruction according to claim 1, characterized in that: In step 3, the ratio of the training sample set to the validation sample set is 9:
1.
4. The low illumination enhancement method based on multispectral image reconstruction according to claim 1, characterized in that: In step 4, the specific implementation method of forming a complete sample set containing paired data based on the normal illumination multispectral image and the low illumination color image is as follows: First, read the training multispectral image and low-light image; Then, the data were normalized respectively; Secondly, the training images are cropped into sample pairs of a certain pixel size to increase the training data; Again, store it as a training data sample for model calling; Finally, create a validation data sample using the same steps as above.
5. The low illumination enhancement method based on multispectral image reconstruction according to claim 1, characterized in that: In step 6, the method of using the data sample to obtain the loss function result to adjust the model is as follows: The loss results are calculated for the training set and validation set used in the model respectively. The loss function used is as follows: (7); (8); (9); in ||·||1 represents the first norm, where the calculation formula of structural similarity ssim is as follows: (10); In the formula represents the reconstructed spectral image, represents the real spectral image, w x represents the area of image x within window w, w x Yes x The mean of the variable is the variable w x The variance of Yes x and w y The covariance of y represents the area of image y within window w, w y Yes y The mean of is the variable w y variance; finally, the error between the reconstructed multispectral image and the real multispectral image of the training sample set and the validation sample set in the model is calculated according to formula (7), and the reconstruction error of the training sample set and the validation sample set is used to update and adjust the weights and hyperparameters in the model.
6. The low illumination enhancement method based on multispectral image reconstruction according to claim 1, characterized in that: In step 7, the method for judging whether the spectral reconstruction error of the training sample set and the verification sample set has reached a convergence state is as follows: setting the error threshold Th and the error fluctuation threshold Td. When the error changes between n consecutive iterations are lower than Th, and the error fluctuation thresholds are all lower than Td, the model is judged to have reached a convergence state, and the trained model is saved.
7. A low-light enhancement system based on multispectral image reconstruction, characterized in that: Includes the following modules: A data collection module, used to collect existing publicly available low-illumination / normal-illumination image datasets; A calculation module, used for calculating a normal illumination multispectral image corresponding to each normal illumination image based on an imaging physical model; The sample partitioning module is used to divide the complete sample set into a training sample set and a validation sample set according to the ratio of M:N; A sample set building module is used to build a complete sample set containing paired data based on the normal illumination multispectral image and its low illumination image; Model building module, used to build a deep learning spectral reconstruction model framework; the details are as follows: Using the correlation between RGB values and their corresponding multispectral radiation, a learning-based method is used to directly model the mapping relationship between RGB and multispectral images. Given an RGB image and its corresponding multispectral image, the mapping method between RGB and multispectral images is described as follows: (2); In formula (1), it is assumed that the mapping model f(·) from RGB space to spectral space is known. That is, by realizing the feature extraction and feature selection operations on the RGB image d, the calculation of the spectral information r can be realized. Given any RGB image d, its corresponding spectral image r can be reconstructed. First, a convolution layer including 16 output channels is used to extract shallow features of the input data. Then, a densely connected network including seven layers of convolutions including 16 output channels is used to extract deep feature images. The formula is as follows: (3); In formula (3), x l represents the output of the lth layer of the densely connected network, F l (·) represents a nonlinear mapping of layer l, [x0,x1,…, x l -1 ] means merging the feature maps output by the (0~l-1) layer; finally, the extracted feature images are reconstructed into 31-dimensional multispectral images using a hybrid attention mechanism and three convolutional layers including 128, 64 and 31 output channels; each convolution layer in the model uses the Relu activation function, and its formula is described as follows: (4); In the model, a hybrid attention mechanism is inserted between three layers of convolutions including 128, 64 and 31 output channels. The formula is described as follows: (5); (6); Where x is the input, δ represents the Sigmoid activation function; MLP represents the multi-layer perceptron, and f represents convolution. represents average pooling, Indicates maximum pooling, the channel attention feature output is C, and the spatial attention feature output is S; A model parameter adjustment module is used to adjust the model parameters by using the loss function results obtained using data samples; An error monitoring module is used to monitor the spectral reconstruction error of the training set and the verification sample set until the spectral reconstruction error of the training set and the verification set reaches a convergence state, thereby obtaining a low-illuminance enhanced multi-spectral reconstruction model; A reconstruction module is used to perform spectral reconstruction on the low-illumination image using a low-illumination enhanced multispectral reconstruction model to obtain a normal-illumination multispectral image corresponding to the low-illumination image; An enhancement module, used to calculate the normal illumination color image corresponding to the normal illumination multispectral image using colorimetry theory; The color calculation process of the normal illumination image corresponding to the normal illumination multispectral image is as follows: Use the CIE 1964 color matching functions and the CIE D65 illuminant to convert to CIE XYZ tristimulus values, and then convert CIEXYZ to the sRGB standard color space, as shown in formulas (11)-(12): (11); (12); r(λ) is the spectral reflectance of the object, s(λ) is the spectral power distribution, x(λ) y(λ) z(λ) are the CIE standard observer matching functions, dλ represents the wavelength interval, λ is the wavelength, XYZ is the CIE XYZ tristimulus value, and RGB is the color value corresponding to the sRGB color space.
