A method and system for enhancing fog penetration in an adaptive environment
The adaptive environmental fog penetration enhancement method that combines multispectral technology and atmospheric scattering models solves the problem of image degradation in severe weather, achieves high-quality dehazing effects, and improves the ability to extract and identify image information.
Patent Information
- Application Number
- CN202410928974.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-11
AI Technical Summary
In complex and changeable natural environments, especially in harsh weather conditions such as haze and sand and dust, images captured by image acquisition equipment often suffer from serious degradation phenomena such as reduced contrast, color distortion, and blurred details, which affects the effective extraction of image information. and identification.
The adaptive environment fog penetration enhancement method is used to generate multispectral images of the image through multispectral technology. The atmospheric light value and transmission matrix are estimated based on the atmospheric scattering model and dark channel prior algorithm. The gradient descent optimization algorithm is used to iteratively adjust the transmission matrix, and perform Multispectral dehazing process, and finally using the preset fusion model to fuse the dehazed sub-images.
Effectively improve the visual effects of images under haze and harsh weather conditions, improve the extraction and recognition capabilities of image information, significantly improve the contrast and detail expression of images, and generate high-quality dehazed images.
Smart Images

Figure CN118469865B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an adaptive environment fog penetration enhancement method and enhancement system. Background Art
[0002] With the continuous advancement of science and technology, digital image processing technology has been widely used in various fields, especially in video surveillance, remote sensing detection, medical imaging, etc. However, in complex and changeable natural environments, especially in severe weather conditions such as haze and dust, the images captured by image acquisition equipment often show serious degradation phenomena, such as reduced contrast, color distortion, blurred details, etc., which seriously affects the effective extraction and recognition of image information.
[0003] Traditional image enhancement methods, such as grayscale histogram transform, frequency domain analysis, Retinex algorithm, etc., can improve the visual effect of the image to a certain extent, but they are often unable to accurately restore the original information of the image, especially when processing images under weather conditions such as haze, the effect is even more limited.
[0004] Therefore, it is necessary to provide an adaptive environment fog penetration enhancement method and enhancement system to solve the above technical problems. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides an adaptive environmental fog penetration enhancement method and enhancement system, which can make full use of the information of multispectral images, realize adaptive environmental fog penetration enhancement, effectively improve the visual effect of images under severe weather conditions of haze and fog, and improve the ability to extract and recognize image information.
[0006] The present invention provides an adaptive environment fog penetration enhancement method, the enhancement method comprising the following steps:
[0007] S1: Generate a multispectral image of the image to be enhanced by multispectral technology, and obtain multispectral information of the multispectral image;
[0008] S2: based on the atmospheric scattering model, the atmospheric light value and the transmission matrix are estimated by combining the dark channel prior algorithm and the multispectral information of the multispectral image;
[0009] S3: Based on the atmospheric light value, the transmission matrix is iteratively adjusted using the gradient descent optimization algorithm;
[0010] S4: Based on the transfer matrix adjusted by the gradient descent optimization algorithm, the enhanced image is subjected to multispectral dehazing processing to obtain a dehazed sub-image corresponding to each spectral band;
[0011] S5: taking all the obtained defogging sub-images as input, using a preset fusion model to perform image fusion on all the defogging sub-images, and obtaining a defogging image corresponding to the image to be enhanced.
[0012] Preferably, step S1 specifically includes:
[0013] S101: Generate an RGB image of the image to be enhanced;
[0014] S102: taking the RGB image of the image to be enhanced as input, and converting the RGB image of the image to be enhanced using a preset image conversion model to obtain a multispectral image of the image to be enhanced, wherein the image conversion model is a neural network model trained based on a historical RGB image dataset;
[0015] S103: Using a spectral library matching method to match and obtain multispectral information of the multispectral image of the image to be enhanced.
[0016] Preferably, step S2 specifically includes:
[0017] S201: Initializing basic parameters of an atmospheric scattering model, wherein the basic parameters include an atmospheric light value and an initial estimated value of a transmission matrix;
[0018] S202: Calculate the color value of the pixel with the highest brightness in the RGB image of the image to be enhanced by using a dark channel priori algorithm, and use the color value as the atmospheric light value;
[0019] S203: using the obtained atmospheric light value and the initialized atmospheric scattering model to preliminarily estimate the transmission matrix;
[0020] S204: Correcting the initially estimated transmission matrix using the multispectral information of the image to be enhanced.
[0021] Preferably, step S3 specifically includes:
[0022] S301: define the objective function of the gradient descent optimization algorithm;
[0023] S302: Applying a gradient descent optimization algorithm to iteratively process the transfer matrix, in each iteration, calculating the gradient of the objective function with respect to the transfer matrix, and updating the transfer matrix according to the calculated gradient and the learning rate.
[0024] Preferably, step S4 specifically includes:
[0025] S401: Performing preliminary defogging processing on each spectral band of the multispectral image using the atmospheric light value and the adjusted transmission matrix to obtain a preliminary defogging image, wherein the formula for preliminary defogging processing is:
[0026]
[0027] in, For the The image of the spectral bands, For the The initial dehazed image of spectral bands, For the The atmospheric light value of each spectral band, For the The transmission matrix of the spectral bands, is the position in the image to be enhanced;
[0028] S402: Constraining the preliminary dehazed image corresponding to each spectral band based on the dark channel prior algorithm, wherein the constraint formula is:
[0029]
[0030]
[0031] in, For the The definition of dark channel prior for spectral bands, is the weight factor, They are The values of the three color channels: red, green, and blue;
[0032] S403: After the initial defogging image corresponding to each spectral band completes the constraints, a series of defogging sub-images are obtained .
[0033] Preferably, step S5 specifically includes:
[0034] S501: performing image registration on all dehazed sub-images based on a similarity metric to align all dehazed sub-images in space;
[0035] S502: All defogging sub-images that have undergone image registration are taken as input, and the convolution layer of the preset fusion model based on the convolutional neural network model is used for forward propagation to capture the image features of each defogging sub-image, and the image features of all defogging sub-images are recombined in the fully connected layer of the fusion model to finally generate a defogging image corresponding to the image to be enhanced, wherein the forward propagation formula is:
[0036]
[0037] in, is the input dehazed image, and are weights and biases respectively, is the convolution operation, is the activation function, is the output of the convolutional layer.
[0038] Preferably, in step S502, the step of constructing the fusion model includes:
[0039] Training images containing multiple spectral bands and corresponding labels are collected, and the loss function of the fusion model based on convolutional neural network is defined. The weights of the fusion model are iteratively updated using back propagation to minimize the loss function, and the final fusion model is obtained after verification.
[0040] The present invention also provides an adaptive environment fog penetration enhancement system, which is used to perform an adaptive environment fog penetration enhancement method. The enhancement system includes:
[0041] A multispectral image generation module, used to generate a multispectral image of the image to be enhanced by using a multispectral technology, and to obtain multispectral information of the multispectral image;
[0042] An estimation module, used for estimating the atmospheric light value and the transmission matrix based on an atmospheric scattering model, in combination with a dark channel priori algorithm and multispectral information of the multispectral image;
[0043] An iterative adjustment module, used for iteratively adjusting the transmission matrix using a gradient descent optimization algorithm based on the atmospheric light value;
[0044] A defogging processing module is used to perform multispectral defogging processing on the image to be enhanced based on the transmission matrix adjusted by the gradient descent optimization algorithm to obtain a defogging sub-image corresponding to each spectral band;
[0045] The fusion module is used to take all the obtained defogging sub-images as input, use a preset fusion model to perform image fusion on all the defogging sub-images, and obtain a defogging image corresponding to the image to be enhanced.
[0046] Compared with the related art, the adaptive environment fog penetration enhancement method and enhancement system provided by the present invention have the following beneficial effects:
[0047] The present invention generates a multispectral image of the image to be enhanced by multispectral technology, and estimates the atmospheric light value and the transmission matrix based on the atmospheric scattering model, combined with the dark channel prior algorithm and the multispectral information of the multispectral image. Then, the gradient descent optimization algorithm is used to iteratively adjust the transmission matrix, and the defogging sub-image corresponding to each spectral band is obtained by multispectral defogging. Finally, a preset fusion model is used to fuse all the defogging sub-images to obtain the defogging image corresponding to the image to be enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flow chart of an adaptive environment fog penetration enhancement method provided by the present invention;
[0049] Figure 2 A module structure diagram of an adaptive environment fog penetration enhancement system provided by the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.
[0051] It should also be noted that, for ease of description, only the parts related to the present invention, but not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the various operations (or steps) as being processed sequentially, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the various operations can be rearranged. The processing can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0052] Embodiment 1
[0053] The present invention provides an adaptive environment fog penetration enhancement method, referring to Figure 1 As shown, the enhancement method includes the following steps:
[0054] S1: Generate a multispectral image of the image to be enhanced by using a multispectral technology, and obtain multispectral information of the multispectral image.
[0055] In this embodiment, a multispectral image of the acquired image to be enhanced is generated using a multispectral technology, wherein the multispectral technology combines an image conversion model and a spectral library matching method, specifically: the image to be enhanced is first converted into an RGB image, and then the RGB image is converted into a multispectral image using the image conversion model, and finally a spectral library matching method is used to compare and match the multispectral image of the image to be enhanced from a known spectral library to identify and quantify the spectral characteristics of the target object, so that the multispectral information of the image to be enhanced can be collected, thereby providing more accurate and detailed input data for the subsequent atmospheric scattering model analysis, which is helpful to improve the dehazing effect and detail retention capability of the final image.
[0056] S2: Based on the atmospheric scattering model, the atmospheric light value and the transmission matrix are estimated by combining the dark channel prior algorithm and the multispectral information of the multispectral image.
[0057] In this embodiment, in the atmospheric scattering model, the degradation of the image is mainly determined by the atmospheric light value and the transmission matrix, wherein the atmospheric light value reflects the scattered light intensity of suspended particles in the atmosphere, and the transmission matrix represents the attenuation degree of light when it passes through the atmosphere to reach the sensor. The atmospheric light value can be preliminarily estimated by using the dark channel prior algorithm, and then combined with the multispectral information of the multispectral image, the estimation of the transmission matrix can be further optimized, making the model more in line with the actual scene, effectively overcoming the limitations of estimation under a single spectrum, thereby improving the accuracy and robustness of the dehazing effect.
[0058] S3: Based on the atmospheric light value, the transmission matrix is iteratively adjusted using the gradient descent optimization algorithm.
[0059] In this embodiment, based on the atmospheric light value obtained in S2, the transfer matrix is iteratively adjusted using a gradient descent optimization algorithm, wherein gradient descent is a commonly used optimization algorithm that can gradually update parameters by calculating the gradient of the loss function to achieve the purpose of minimizing the loss. In this application, the loss function is designed to measure the accuracy of the transfer matrix estimation. Through continuous iterative adjustment, the transfer matrix is made more in line with the actual situation, thereby improving the quality of the dehazed image and reducing residual fog effects and artifacts.
[0060] S4: Based on the transfer matrix adjusted by the gradient descent optimization algorithm, the enhanced image is subjected to multispectral dehazing processing to obtain a dehazed sub-image corresponding to each spectral band.
[0061] In this embodiment, after obtaining the optimized transfer matrix, it is applied to the atmospheric scattering model to perform dehazing on the original multispectral image. This process is performed separately for each spectral band to generate a series of dehazed sub-images. Each sub-image reflects the dehazing effect under a specific spectral band. Then, the image quality under each spectral band can be optimized separately, and the contrast and detail expression of the image can be improved, so that the final dehazed image has significant improvements in visual effect and information content.
[0062] S5: taking all the obtained defogging sub-images as input, using a preset fusion model to perform image fusion on all the defogging sub-images, and obtaining a defogging image corresponding to the image to be enhanced.
[0063] In this embodiment, the dehazed sub-image set obtained in S4 is input into a preset fusion model, which is a convolutional neural network architecture based on deep learning. The model learns the image features under different spectral bands, automatically selects and fuses the most appropriate pixel values, and generates the final dehazed image. Finally, through image fusion, the advantages of different spectral bands are fully utilized, and the possible defects of a single spectral band are eliminated, thereby generating a high-definition dehazed image that integrates multi-spectral information, is rich in details, and has accurate colors, which greatly improves the visual effect and practicality of the image.
[0064] Specifically, step S1 specifically includes:
[0065] S101: Generate an RGB image of the image to be enhanced.
[0066] In this embodiment, it is first necessary to ensure that the image to be enhanced exists in a compatible format, common formats include TIFF, BMP, JPEG or PNG, etc.; next, use including but not limited to image processing software or programming library to read the image file and convert it into RGB color space, and for images in non-RGB color space, corresponding color space conversion is required to ensure that the output image has three color channels of red, green and blue.
[0067] S102: Taking the RGB image of the image to be enhanced as input, and using a preset image conversion model to convert the RGB image of the image to be enhanced to obtain a multispectral image of the image to be enhanced, wherein the image conversion model is a neural network model trained based on a historical RGB image dataset.
[0068] In this embodiment, the image conversion model is a pre-trained neural network model, which is trained to convert RGB images into multispectral images. This model is trained on a large number of data sets with RGB and multispectral correspondences. For example, a remote sensing image data set with RGB and multispectral annotations is used. The input of the model is an RGB image, and the output is a multispectral image with multiple spectral bands. In actual operation, the RGB image is passed to the model, and the model extracts, converts and reconstructs features through its internal multi-layer neural network structure, and finally outputs a multispectral image, which can overcome the problem of insufficient spectral information in traditional methods and improve the accuracy of object recognition and detail retention in the image. The neural network model is able to learn complex RGB to multispectral mapping relationships, and can maintain a high conversion accuracy even under low light or complex lighting conditions, which is crucial for subsequent image analysis and dehazing processing.
[0069] S103: Using a spectral library matching method to match and obtain multispectral information of the multispectral image of the image to be enhanced.
[0070] In this embodiment, the spectral features of each pixel in the multispectral image obtained by step S102 are compared and matched with the data in the spectral library. Specifically, by calculating similarity metrics, including but not limited to Euclidean distance and spectral angle distance, the spectral library entry closest to each pixel is determined. In this way, the spectral features of different objects in the image can be identified and quantified, providing accurate multispectral information for subsequent atmospheric scattering model analysis.
[0071] Specifically, step S2 specifically includes:
[0072] S201: Initializing basic parameters of the atmospheric scattering model, wherein the basic parameters include an atmospheric light value and an initial estimated value of a transmission matrix.
[0073] In this embodiment, before starting the calculation of the atmospheric scattering model, the basic parameters of the model need to be initialized, including the initial estimation of the atmospheric light value and the transmission matrix. The atmospheric light value reflects the intensity of the scattered light of suspended particles in the atmosphere, while the transmission matrix represents the attenuation of the light when it passes through the atmosphere to reach the sensor. For the atmospheric light value, a relatively high value can be assumed, because the atmospheric light value is often large in a foggy environment. For the transmission matrix, a reasonable initial value can be set based on an empirical formula. Generally, the transmission value of a distant object will be lower because more light will be scattered during long-distance transmission.
[0074] S202: Calculate the color value of the pixel with the highest brightness in the RGB image of the image to be enhanced by using a dark channel priori algorithm, and use the color value as the atmospheric light value.
[0075] In this embodiment, the dark channel prior algorithm is an observation-based method, which assumes that in a fog-free scene, most non-sky areas have a dark channel in at least one color channel. However, in foggy images, the dark channel will be affected by the fog and become less dark, especially those areas that are severely obscured by fog. By finding the color value of the brightest pixel in the image, the atmospheric light value can be estimated. Specifically, each pixel in the image is traversed, its dark channel is calculated, and then the pixel with the highest brightness in the dark channel is found, and its corresponding RGB color value is used as a preliminary estimate of the atmospheric light value.
[0076] S203: Preliminarily estimate the transmission matrix using the obtained atmospheric light value in combination with the initialized atmospheric scattering model.
[0077] In this embodiment, after determining the estimation of the atmospheric light value, the transmission matrix is initially estimated in combination with the transmission matrix initialized in step S201. Specifically, the atmospheric light value and the assumed transmission matrix are input into the atmospheric scattering model formula, and the transmission matrix is obtained through calculation.
[0078] S204: Correcting the initially estimated transmission matrix using the multispectral information of the image to be enhanced.
[0079] In this embodiment, the multispectral information obtained in step S103 is used to correct the initially estimated transmission matrix, wherein the multispectral information provides detailed data on the spectral characteristics of the objects in the image, which helps to more accurately evaluate the scattering and attenuation effects of fog on light of different wavelengths. The correction process adjusts the values of the corresponding positions in the transmission matrix by comparing the brightness changes of the objects in different bands in the multispectral image to more realistically reflect the distribution of the fog. For example, if the brightness of the object in a certain spectral band is significantly lower than expected (taking into account the atmospheric light value and the initial estimate of the transmission matrix), it can be inferred that the transmission value of the area needs to be reduced, and vice versa; the multispectral data provides additional constraints to help the model fit the actual distribution of fog more accurately, thereby reducing the generation of artifacts and improving the visual quality and detail retention of the defogged image.
[0080] Specifically, step S3 specifically includes:
[0081] S301: Define the objective function of the gradient descent optimization algorithm.
[0082] In this embodiment, the objective function reflects the accuracy of the transmission matrix estimation. Taking into account the physical constraints of the atmospheric scattering model, the objective function includes two main components: one is the difference between the transmission matrix estimation and the actual atmospheric conditions, which can be achieved by comparing the transmission matrix estimation with the result of the prior estimation of the dark channel in the multispectral image; the other is the regularization term, which is used to penalize excessively large transmission matrix values, avoid overfitting, and ensure the stability of the solution.
[0083] S302: Applying a gradient descent optimization algorithm to iteratively process the transfer matrix, in each iteration, calculating the gradient of the objective function with respect to the transfer matrix, and updating the transfer matrix according to the calculated gradient and the learning rate.
[0084] In this embodiment, in each iteration, the gradient of the objective function with respect to the transfer matrix is first calculated by numerical differentiation. After the gradient is obtained, the transfer matrix is updated according to the learning rate to gradually adjust the transfer matrix to make it closer to the actual atmospheric conditions. As the iteration proceeds, the quality of the defogging image continues to improve, the fog effect and artifacts are gradually reduced, and the clarity and realism of the image are significantly enhanced.
[0085] Specifically, step S4 specifically includes:
[0086] S401: Performing preliminary defogging processing on each spectral band of the multispectral image using the atmospheric light value and the adjusted transmission matrix to obtain a preliminary defogging image, wherein the formula for preliminary defogging processing is:
[0087]
[0088] in, For the The image of the spectral bands, For the The initial dehazed image of spectral bands, For the The atmospheric light value of each spectral band, For the The transmission matrix of the spectral bands, is the position in the image to be enhanced.
[0089] In this embodiment, a preliminary dehazing process is performed on each spectral band of the multispectral image using the transmission matrix adjusted by the gradient descent optimization algorithm in step S3 and the atmospheric light value estimated in step S2. The mathematical model of the processing follows the basic principle of the atmospheric scattering model, that is, the degradation of the image can be expressed as a combination of the direct transmission part and the atmospheric scattering part, which can ultimately effectively remove the blurring and contrast reduction effects caused by atmospheric scattering in the multispectral image.
[0090] S402: Constraining the preliminary dehazed image corresponding to each spectral band based on the dark channel prior algorithm, wherein the constraint formula is:
[0091]
[0092]
[0093] in, For the The definition of dark channel prior for spectral bands, is the weight factor, They are The values of the red, green, and blue color channels.
[0094] In this embodiment, after the preliminary dehazing, in order to further improve the image quality, especially to avoid oversaturation and artifacts, it is necessary to impose constraints of a dark channel prior algorithm on the preliminary dehazed image of each spectral band. The dark channel prior algorithm assumes that in a haze-free natural image, most areas that do not contain the sky will have lower pixel intensity values on at least one color channel, which can ensure that the dehazed image will not be too bright or oversaturated in color, while avoiding image artifacts caused by overcompensation, such as color distortion or structural errors.
[0095] S403: After the initial defogging image corresponding to each spectral band completes the constraints, a series of defogging sub-images are obtained .
[0096] In this embodiment, after completing the preliminary dehazing process and dark channel prior algorithm constraints for each spectral band, a series of preliminary dehazing and constrained images will be obtained, and these images correspond to different spectral bands. Each image is the result of optimization processing under a specific spectral band, and they together constitute an important part of the dehazing process, providing a diverse source of information for subsequent image fusion.
[0097] Specifically, step S5 specifically includes:
[0098] S501: performing image registration on all dehazed sub-images based on a similarity metric, so that all dehazed sub-images are spatially aligned.
[0099] In this embodiment, during the image registration process, since the multispectral image may have a slight position shift in different spectral bands, it is necessary to ensure that all dehazed sub-images are accurately aligned in space before image fusion. Specifically, a similarity metric is used to evaluate the degree of match between each pair of images, and the position of the images is adjusted according to the evaluation results to achieve optimal alignment.
[0100] S502: All defogging sub-images that have undergone image registration are taken as input, and the convolution layer of the preset fusion model based on the convolutional neural network model is used for forward propagation to capture the image features of each defogging sub-image, and the image features of all defogging sub-images are recombined in the fully connected layer of the fusion model to finally generate a defogging image corresponding to the image to be enhanced, wherein the forward propagation formula is:
[0101]
[0102] in, is the input dehazed image, and are weights and biases respectively, is the convolution operation, is the activation function, is the output of the convolutional layer.
[0103] In this embodiment, at the image fusion stage, first, all the registered dehazed sub-images are input into the convolutional layer of the model, which extracts features from the image through a series of filters (weights) and bias terms. These filters can detect local patterns and textures in the image and capture image features in different spectral bands. Subsequently, the output of the convolutional layer is passed to the fully connected layer, where the image features from different spectral bands are recombined and the final fused image is generated by weighted summation. The weights and bias terms of the fully connected layer are optimized through the training process to minimize the gap between the fused image and the ideal target.
[0104] Finally, the image features under different spectral bands can be efficiently captured and fused to generate a high-definition dehazed image that integrates multi-spectral information, is rich in details, and has accurate colors. This method can automatically select and fuse the most appropriate pixel values, fully utilize the advantages of different spectral bands, eliminate the defects that may exist in a single spectral band, and greatly improve the visual effect and practicality of the image.
[0105] Specifically, in step S502, the steps of constructing the fusion model include:
[0106] Training images containing multiple spectral bands and corresponding labels are collected, and the loss function of the fusion model based on convolutional neural network is defined. The weights of the fusion model are iteratively updated using back propagation to minimize the loss function, and the final fusion model is obtained after verification.
[0107] In this embodiment, training images containing multiple spectral bands and their corresponding labels are collected. These images should cover a wide range of scenes and lighting conditions to ensure the generalization ability of the model.
[0108] Define the fusion model architecture based on convolutional neural network, including convolutional layer and fully connected layer. At the same time, set the loss function to measure the gap between the model prediction results and the actual labels.
[0109] The weights of the model are iteratively updated using the back-propagation algorithm to minimize the loss function. The training process may include regularization techniques, data augmentation strategies, and the choice of optimization algorithms.
[0110] Evaluate model performance on an independent validation set and adjust hyperparameters until the model performs optimally on the validation set.
[0111] Constructing and optimizing a fusion model based on convolutional neural networks can achieve automatic learning and intelligent fusion of multispectral image features. The generated dehazed images have significant improvements in visual effects and information content.
[0112] The working principle of an adaptive environment fog penetration enhancement method provided by the present invention is as follows: a multispectral image of an image to be enhanced is generated by multispectral technology, and based on an atmospheric scattering model, a dark channel prior algorithm and multispectral information of the multispectral image are combined to estimate the atmospheric light value and the transmission matrix, then, a gradient descent optimization algorithm is used to iteratively adjust the transmission matrix, and a defogged sub-image corresponding to each spectral band is obtained through multispectral defogging processing, and finally, a preset fusion model is used to perform image fusion on all defogged sub-images to obtain a defogged image corresponding to the image to be enhanced. The present invention can make full use of the information of the multispectral image to achieve adaptive environment fog penetration enhancement, effectively improve the visual effect of the image under severe weather conditions of haze and fog, and improve the ability to extract and recognize image information.
[0113] Embodiment 2
[0114] The present invention also provides an adaptive environment fog penetration enhancement system for executing an adaptive environment fog penetration enhancement method, referring to Figure 2 As shown, the enhanced system includes:
[0115] The multispectral image generation module 100 is used to generate a multispectral image of the image to be enhanced by using a multispectral technology, and to obtain multispectral information of the multispectral image.
[0116] The estimation module 200 is used to estimate the atmospheric light value and the transmission matrix based on the atmospheric scattering model in combination with the dark channel priori algorithm and the multispectral information of the multispectral image.
[0117] The iterative adjustment module 300 is used to iteratively adjust the transmission matrix based on the atmospheric light value by using a gradient descent optimization algorithm.
[0118] The defogging processing module 400 is used to perform multispectral defogging processing on the image to be enhanced based on the transmission matrix adjusted by the gradient descent optimization algorithm to obtain a defogging sub-image corresponding to each spectral band.
[0119] The fusion module 500 is used to take all the obtained defogging sub-images as input, and use a preset fusion model to perform image fusion on all the defogging sub-images to obtain a defogging image corresponding to the image to be enhanced.
[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, the storage medium including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically-erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0122] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or includes elements that are inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.
Claims
1. An adaptive environment fog penetration enhancement method, characterized in that: The enhancement method includes the following steps: S1: Generate a multispectral image of the image to be enhanced by multispectral technology, and obtain multispectral information of the multispectral image; S2: based on the atmospheric scattering model, the atmospheric light value and the transmission matrix are estimated by combining the dark channel prior algorithm and the multispectral information of the multispectral image; Step S2 specifically includes: S201: Initializing basic parameters of an atmospheric scattering model, wherein the basic parameters include an atmospheric light value and an initial estimated value of a transmission matrix; S202: Calculate the color value of the pixel with the highest brightness in the RGB image of the image to be enhanced by using a dark channel priori algorithm, and use the color value as the atmospheric light value; S203: using the obtained atmospheric light value and the initialized atmospheric scattering model to preliminarily estimate the transmission matrix; S204: using the multispectral information of the image to be enhanced, correcting the initially estimated transmission matrix; S3: Based on the atmospheric light value, the transmission matrix is iteratively adjusted using the gradient descent optimization algorithm; S4: Based on the transfer matrix adjusted by the gradient descent optimization algorithm, the enhanced image is subjected to multispectral dehazing processing to obtain a dehazed sub-image corresponding to each spectral band; S401: Performing preliminary defogging processing on each spectral band of the multispectral image using the atmospheric light value and the adjusted transmission matrix to obtain a preliminary defogging image, wherein the formula for preliminary defogging processing is: Among them, I i (x) is the image of the i-th spectral band, J i (x) is the initial dehazed image of the i-th spectral band, A i is the atmospheric light value of the i-th spectral band, t i (x) is the transmission matrix of the i-th spectral band, and x is the position in the image to be enhanced; S402: Constraining the preliminary dehazed image corresponding to each spectral band based on the dark channel prior algorithm, wherein the constraint formula is: I d,i (x)=min(J R,i (x),J G,i (x),J B,i (x)) Among them, J d,i (x) is the definition of the dark channel prior of the i-th spectral band, ω is the weight factor, J R,i (x), J G,i (x), J B,i (x) are J i (x) The value of the red, green, and blue color channels; S403: After the initial defogging image corresponding to each spectral band completes the constraints, a series of defogging sub-images [J1(x), J2(x), ..., J i (x)]; S5: taking all the obtained defogging sub-images as input, using a preset fusion model to perform image fusion on all the defogging sub-images, and obtaining a defogging image corresponding to the image to be enhanced.
2. The method for enhancing fog penetration in an adaptive environment according to claim 1, characterized in that: Step S1 specifically includes: S101: Generate an RGB image of the image to be enhanced; S102: taking the RGB image of the image to be enhanced as input, and converting the RGB image of the image to be enhanced using a preset image conversion model to obtain a multispectral image of the image to be enhanced, wherein the image conversion model is a neural network model trained based on a historical RGB image dataset; S103: Using a spectral library matching method to match and obtain multispectral information of the multispectral image of the image to be enhanced.
3. The method for enhancing fog penetration in an adaptive environment according to claim 1, characterized in that: Step S3 specifically includes: S301: define the objective function of the gradient descent optimization algorithm; S302: Applying a gradient descent optimization algorithm to iteratively process the transfer matrix, in each iteration, calculating the gradient of the objective function with respect to the transfer matrix, and updating the transfer matrix according to the calculated gradient and the learning rate.
4. The method for enhancing fog penetration in an adaptive environment according to claim 3, characterized in that: Step S5 specifically includes: S501: performing image registration on all dehazed sub-images based on a similarity metric to align all dehazed sub-images in space; S502: All defogging sub-images that have undergone image registration are taken as input, and the convolution layer of the preset fusion model based on the convolutional neural network model is used for forward propagation to capture the image features of each defogging sub-image, and the image features of all defogging sub-images are recombined in the fully connected layer of the fusion model to finally generate a defogging image corresponding to the image to be enhanced, wherein the forward propagation formula is: y=f(W*z+b) Among them, z is the input dehazed sub-image, W and b are weights and biases respectively, * is the convolution operation, f is the activation function, and y is the output of the convolution layer.
5. The method for enhancing fog penetration in an adaptive environment according to claim 4, characterized in that: In step S502, the steps of constructing the fusion model include: Training images containing multiple spectral bands and corresponding labels are collected, and the loss function of the fusion model based on convolutional neural network is defined. The weights of the fusion model are iteratively updated using back propagation to minimize the loss function, and the final fusion model is obtained after verification.
6. An adaptive environment fog penetration enhancement system, used to execute an adaptive environment fog penetration enhancement method as claimed in any one of claims 1 to 5, characterized in that: Enhanced systems include: A multispectral image generation module, used to generate a multispectral image of the image to be enhanced by using a multispectral technology, and to obtain multispectral information of the multispectral image; An estimation module, used for estimating the atmospheric light value and the transmission matrix based on an atmospheric scattering model, in combination with a dark channel priori algorithm and multispectral information of the multispectral image; An iterative adjustment module, used for iteratively adjusting the transmission matrix using a gradient descent optimization algorithm based on the atmospheric light value; A defogging processing module is used to perform multispectral defogging processing on the image to be enhanced based on the transmission matrix adjusted by the gradient descent optimization algorithm to obtain a defogging sub-image corresponding to each spectral band; The fusion module is used to take all the obtained defogging sub-images as input, use a preset fusion model to perform image fusion on all the defogging sub-images, and obtain a defogging image corresponding to the image to be enhanced.
