Remote sensing image defogging method based on maximum haze line optimization
Through the method based on the maximum haze line optimization, the problems of color drift and high calculation costs during fog removal in the prior art are solved, and better image recovery effect and accuracy of atmospheric light value selection are achieved.
Patent Information
- Application Number
- CN202411820621.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art has limitations when dealing with haze images, especially when dealing with images with smaller color changes, which may not be effective in eliminating color drifts, and there are problems of color distortion and high computational costs.
The remote sensing image defog removal method based on the maximum haze line optimization is adopted. The environmental atmospheric light value is obtained through minimum value filtering and box filtering, and the coordinate system of pixel points to the environmental atmospheric light value is converted, and the haze propagation distance is clustered and noise discriminated, the transmittance is corrected, and the transmittance image is optimized through guide filtering and relative total variational smoothing methods.
The partial sky transmittance of the foggy degraded image is effectively optimized, the overall quality of the image is restored, the halo effect is avoided, and the selection of atmospheric light values is more accurate, reducing color shift.
Smart Images

Figure CN119863391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a remote sensing image defogging method based on maximum haze line optimization. Background Art
[0002] With the rapid development of image processing, using digital images to obtain scene information has become an effective means. However, the suspended particles in haze will scatter light, resulting in blurred outlines of objects in the image, making it difficult to accurately identify and segment the shape and structure of the target object. Secondly, haze causes the image contrast to decrease. The scattered light in haze will weaken the light and dark changes in the image, reducing the dynamic range of the image and making it difficult to distinguish the details and textures in the image. For computer vision systems, it will be difficult to accurately obtain information from foggy degraded images.
[0003] In recent years, single-image based dehazing methods have made significant progress. These methods are able to restore clear scene information by relying solely on the input haze image without the need for additional auxiliary information. At present, the mainstream dehazing methods can generally be divided into three categories: color correction-based methods, image enhancement methods based on Retinex theory, and dehazing methods based on atmospheric degradation models. Generally speaking, the dehazing method based on the atmospheric degradation model has better results than the first two methods, because the first two methods do not take into account the degradation mechanism of fog on the image; however, all three methods have certain limitations and are not robust in dealing with special cases. For example, Dhara et al. use chromatic diffusion to identify whether the image has color cast and optimize the color cast atmospheric light through MOS value. However, for images with small color changes, the repaired image may not eliminate color drift; Goa et al. proposed an MSRCR method based on adaptive scale to solve the halo effect problem caused by Retinex theory and is suitable for low-light enhancement tasks, but this method still has problems such as color distortion and high computational cost; Tan proposed a method based on maximizing the local contrast of the image based on the prior knowledge that clear images usually have higher contrast than haze images, estimated the atmospheric light in the Markov random field framework, and applied the graph cut method for optimization, but because color restoration was not considered, the dehazing result may be distorted in color, and a halo effect will appear when processing areas with discontinuous depth. Summary of the invention
[0004] The purpose of the present invention is to provide a remote sensing image defogging method based on maximum haze line optimization to overcome the problems existing in the prior art. The present invention can optimize the transmittance of the sky part of foggy degraded images, obtain a transmittance that is more suitable for the scene, and effectively restore the overall quality of the image.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows: A remote sensing image defogging method based on maximum haze line optimization includes the following steps: S1, obtain the foggy degraded image under haze weather, denoted as I hazy ; S2, the result obtained by S1 I hazy Perform minimum filtering to obtain the minimum channel image I min ,right I min Use the box filter model to perform box filtering, and take the point with the largest pixel brightness in the box filter result image as the ambient atmospheric light value A ; S3, I hazy of RGB Any pixel point in the spatial coordinate system ( i, j ) is converted to the ambient atmospheric light value at the origin A The coordinate point in the coordinate system of is denoted as the mapping coordinate ( i, j ), and define I hazy The distance of haze transmission L ; S4, 800 points are uniformly selected on the surface of a unit sphere with a radius of 1 according to the angle and recorded as p ; Then, Converted to spherical coordinates and expressed in p As the initial sampling center, the nearest neighbor search is used to find I hazy The pixels are classified into different categories and the clustering results are obtained. ; Then change S3 L according to Classify and for each category, calculate the standard deviation of the haze propagation distance corresponding to the pixel point and the maximum haze propagation distance image , and obtain a rough estimate of the transmittance ; S5, based on the preset noise discrimination formula of the rough estimated transmittance, obtain the noise area of the rough estimated transmittance ; S6, obtained through S5 And S4 obtained ,calculate Maximum haze propagation distance ; Then get The maximum value of , using a uniform step size Sampling within interval n Initial cluster centers; The data points in the cluster are classified into the cluster group with the smallest absolute distance to the cluster center. For each cluster group, the average value of the data points contained in it is calculated as the new cluster center. Repeat this process until the k Iteration n The coordinates of the cluster center points are k -1 iteration n The difference in the coordinates of the cluster center points is less than the error threshold e r ,get n The coordinates of cluster centers [ u 1, u 2, u 3… u n ] and the corresponding n Class pixel set , stretch the pixel point set to obtain the maximum haze propagation distance after noise correction , and calculate the corrected transmittance ; S7, obtained using S2 I min , calculate the guided image of the guided filtering , and for S6 we get Perform guided filtering to obtain the transmittance image after guided filtering ; S8, take the clustering result of S4 The front with the largest number of pixels n class, find the class with the largest standard deviation of haze propagation distance within the class, recorded as ; Then S4 obtains the The maximum haze propagation distance of a pixel is recorded as , and define the relative total variation smoothing weight ; S9, what S7 got Using S8 Perform relative total variation smoothing to obtain the final transmittance map ; S10, derived from S9 , output restored foggy degraded image .
[0006] Furthermore, the specific expression of S2 is: ; ; Where BF is a box filter, r b is the filter radius, is the output image of the box filter, ( i, j ) is the pixel coordinates in the box filtering result; The box filter model in S2 is: ; ; In the formula, , For the input image The cumulative sum of pixels in the x and y directions, a is the pixel index in the x direction of the box operator inside the filter, b is the pixel index in the y direction of the box operator, h is the number of pixels in the x direction of the input image, w is the number of pixels in the y direction of the input image.
[0007] Furthermore, the haze propagation distance of an image is defined in S3 L The formula is: ; ; In the formula, I hazy In the example, any pixel point ( i, j ) is mapped to A In the coordinate system with the origin as the mapping coordinate ; , , for I d exist RGB The three channel values in the model; A R , A G , A B for A exist RGB The three channel values in the model; for I hazy exist RGB The three channel values in the model.
[0008] Furthermore, the clustering result is obtained in S4 The specific expression is: ; ; In the formula, For mapping coordinates The modulus value, and In the spherical coordinate system The elevation and azimuth angles; KD is the nearest neighbor search process, It means there are 800 categories in total; The rough estimated transmittance is obtained in S4 The specific expression is: ; ; ; In the formula, and Pixels The The pixels in the categories correspond to L The standard deviation and maximum value of .
[0009] Furthermore, the noise discrimination formula for roughly estimating the transmittance in S5 is: ; For S4 t e , according to the noise discrimination formula t e Whether the transmittance point in belongs to noise, define is the selected noise threshold; , then it is considered that n The transmittance estimation corresponding to the pixel point of this class is inaccurate, and it belongs to the noise class. The coordinates of all the pixels in the noise class are saved to obtain the noise area. ; , then it is considered that n The transmittance corresponding to the class pixel is estimated accurately, and the transmittance of this class is retained.
[0010] Furthermore, the specific expression for stretching the pixel point set in S6 is: ; The calculation in S6 The specific expression is: ; ;
[0011] In the formula, Degraded image for foggy weatherI hazy Corrected maximum haze propagation distance.
[0012] Furthermore, the transmittance image after the guided filtering process in S7 The specific expression is: ; ; In the formula, I guide is a guide image for processing the transmittance image, w is the guidance coefficient, r G is the filter kernel radius, eps is the regularization coefficient, GF is the guided filter; The GF model is: ; In the formula, v i is the output image of the filter, i and k is the pixel index, a k and b k For the core ω lie in k Weights and biases at position; Said a k and b k The specific expression is obtained by the least square method: ; ; In the formula, for In the filter core The average value in For guided images I guide in the filter kernel The variance in The filter kernel The number of pixels in The image to be filtered In the window The mean value in .
[0013] Furthermore, the specific expression of S8 is: ;
[0014] ; In the formula, is the standard deviation of the propagation distance of each type of haze obtained according to S4, It means taking the top 10 classes with the largest number of pixels in the S6 clustering results. for middle The largest category, C is the smoothing coefficient.
[0015] Furthermore, the final transmittance map is obtained in S9 The specific expression is: ; In the formula, To control the maximum value of the texture element, is the clarity parameter, is the number of iterations; The relative total variation smoothing model in S9 is: ; in: ; ; ; ; In the formula, q For p The index of all pixels in a rectangular window area centered at point. Representative p A rectangular area centered on and represents the partial differentials in two directions, g is the Gaussian kernel function; in: ; In the formula, , , and So p , q The coordinate value of the index.
[0016] Furthermore, the restored foggy degraded image is obtained in S10 The specific expression is: .
[0017] The above technical solution has the following advantages or beneficial effects: The present invention provides a remote sensing image defogging method based on maximum haze line optimization, introduces the maximum haze line optimization method, and designs a noise discrimination function, which performs one-dimensional clustering of the noise part in the image into n The method comprises the following steps: first, selecting the maximum haze propagation distance of each type of noise point and stretching the maximum haze propagation distance of each type of noise point to the cluster center of the adjacent area to correct the transmittance of the noise area. Then, the method comprises the guided filtering and the relative total variation method to make the transmittance image smoother while retaining the texture and depth information, thereby avoiding the halo effect. The result obtained by the defogging method of the present invention is greatly improved in selecting the atmospheric ambient light value and optimizing the scene transmittance compared with the traditional method. The processed image conforms to the perception law of the human eye, the defogging effect on the sky part is significantly improved, and the halo effect in the near field is effectively avoided. The method is more accurate in selecting the atmospheric light value, and the color shift of the white building in the near field is effectively avoided while ensuring the defogging effect in the distant field. The method solves the problem that when estimating the scene transmittance, the simple use of the haze propagation distance and the maximum haze propagation distance within the class may lead to the misjudgment of the sky part in the image due to the limitations of the clustering method, thereby making the estimated value of the maximum haze propagation distance within the class of the sky part too small. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The figure is a flowchart of a remote sensing image dehazing method based on maximum haze line optimization.
[0019] Figure 2 and Figure 3 The denoising effect of the present invention on fogged and degraded images under haze weather is compared with other image defogging methods, including: (a) original noisy image, (b) image processed by dark channel defogging method, (c) image processed by fast convex optimization defogging method, and (d) image processed by remote sensing image defogging method based on maximum haze line optimization. DETAILED DESCRIPTION
[0020] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it. In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention. It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0021] Embodiment 1: A remote sensing image defogging method based on maximum haze line optimization includes the following steps: (1) Obtain a foggy degraded image under haze weather, denoted as I hazy ; (2) Substituting (1) for I hazy Perform minimum filtering to obtain the minimum channel image I min ,right I min Use the box filter model to perform box filtering, and take the point with the largest pixel brightness in the box filter result image as the ambient atmospheric light value A ; The specific expression is: ; ; In the formula, BF For box filtering, r b is the filter radius, is the output image of the box filter, ( i, j ) is the pixel coordinates in the box filtering result; The box filter model is: ; ; In the formula, , For the input image The cumulative sum of pixels in the x and y directions, a is the pixel index in the x direction of the box operator inside the filter, b is the pixel index in the y direction of the box operator, h is the number of pixels in the x direction of the input image, wis the number of pixels in the y direction of the input image; (3) I hazy of RGB Any pixel point in the spatial coordinate system ( i, j ) is converted to the ambient atmospheric light value at the origin A The coordinate point in the coordinate system of is denoted as the mapping coordinate ( i, j ), and define the foggy image I hazy The distance of haze transmission L , the formula is: ; ; In the formula, I hazy In the example, any pixel point ( i, j ) is mapped to A In the coordinate system with the origin as the mapping coordinate ; , , for I d exist RGB The three channel values in the model; A R , A G , A B for A exist RGB The three channel values in the model; for I hazy exist RGB The three channel values in the model; (4) 800 points are uniformly selected on the surface of a unit sphere with a radius of 1 and recorded as p ; Then use (3) Converted to spherical coordinates and expressed in p is the initial sampling center, and the nearest neighbor search is used to convert (1) I hazy The pixels are classified into different categories and the clustering results are obtained. , the specific expression is: ; ; In the formula, For mapping coordinates The modulus value, and In the spherical coordinate system The elevation and azimuth angles; KD is the nearest neighbor search process, It means there are 800 categories in total; Then put (3) L according to Classify and for each category, calculate the standard deviation of the haze propagation distance corresponding to the pixel point and the maximum haze propagation distance image , and obtain a rough estimate of the transmittance , the specific expression is: ; ; ; In the formula, and Pixels The The pixels in the categories correspond to L The standard deviation and maximum value of (5) Based on the preset noise discrimination formula of rough estimated transmittance, the noise area of rough estimated transmittance is obtained ; The noise discrimination formula for roughly estimating transmittance is: ; For (4), we get t e , according to the noise discrimination formula t e Whether the transmittance point in belongs to noise, define is the selected noise threshold; , then it is considered that n The transmittance estimation corresponding to the pixel point of this class is inaccurate, and it belongs to the noise class. The coordinates of all the pixels in the noise class are saved to obtain the noise area. ; , then it is considered that n The transmittance corresponding to the class pixel is estimated accurately, and the transmittance of this class is retained; (6) Obtained through (5) And (4) we get ,calculate Maximum haze propagation distance ; Then get The maximum value of , using a uniform step size Sampling within interval n Initial cluster centers; The data points in the cluster are classified into the cluster group with the smallest absolute distance to the cluster center. For each cluster group, the average value of the data points contained in it is calculated as the new cluster center. Repeat this process until the k Iteration n The coordinates of the cluster center points are k -1 iteration n The difference in the coordinates of the cluster center points is less than the error threshold e r ,get n The coordinates of cluster centers [ u 1, u 2, u 3… u n ] and the corresponding n Class pixel set , stretch the pixel point set to obtain the maximum haze propagation distance after noise correction , and calculate the corrected transmittance ; The specific expression for stretching the pixel point set is: ; calculate The specific expression is: ; ;
[0022] In the formula, Degraded image for foggy weather I hazy Corrected maximum haze propagation distance; (7) Using (2) I min , calculate the guided image of the guided filtering , and the obtained value of (6) is Perform guided filtering to obtain the transmittance image after guided filtering , the specific expression is: ; ; In the formula, w is the guidance coefficient, is the filter kernel radius, eps is the regularization coefficient, GF To guide the filtering; GF The model is: ; In the formula, For the output image, I i For guided images, i and k is the pixel index, a k and b k For the core lie in k Weights and biases at position; a k and b k The specific expression is obtained by the least square method: ; ; In the formula, for In the filter core The average value in for In the filter core The variance in The filter kernel The number of pixels in The image to be filtered In the window The mean value in ; (8) Take the clustering result of (4) The front with the largest number of pixels n class, find the class with the largest standard deviation of haze propagation distance within the class, recorded as ; Then use (4) to obtain the The maximum haze propagation distance of a pixel is recorded as , and define the relative total variation smoothing weight , the specific expression is: ;
[0023] ; In the formula, is the standard deviation of the propagation distance of each type of haze obtained according to (4), It means taking the top 10 classes with the largest number of pixels in the clustering results of (6), for middle The largest category, C is the smoothing coefficient; (9) for (7) Using (8) we get Perform relative total variation smoothing to obtain the final transmittance map ; The relative total variation smoothing model is: ; in: ; ; ; ; In the formula, q For p The index of all pixels in a rectangular window area centered at point. Representative p A rectangular area centered on and represents the partial differentials in two directions, g is the Gaussian kernel function; in: ; In the formula, , , and So p , q is the coordinate value of the index; Get the final transmittance map The specific expression is: ; In the formula, To control the maximum value of the texture element, is the clarity parameter, is the number of iterations; (10) From (9) we get , output restored foggy degraded image , the specific expression is: .
[0024] Embodiment 2: A remote sensing image defogging method based on maximum haze line optimization includes the following steps: (1) Obtain a foggy degraded image under haze weather, denoted as I hazy ; (2) Substituting (1) for I hazy Perform minimum filtering to obtain the minimum channel image I min ,right Imin Use the box filter model to perform box filtering, and take the point with the largest pixel brightness in the box filter result image as the ambient atmospheric light value A ; The specific expression is: ; ; In the formula, BF For box filtering, r b is the filter radius, r b Take 10, is the output image of the box filter, ( i, j ) is the pixel coordinates in the box filtering result; The box filter model is: ; ; In the formula, , For the input image The cumulative sum of pixels in the x and y directions, a is the pixel index in the x direction of the box operator inside the filter, b is the pixel index in the y direction of the box operator, h is the number of pixels in the x direction of the input image, w is the number of pixels in the y direction of the input image; (3) I hazy of RGB Any pixel point in the spatial coordinate system ( i, j ) is converted to the ambient atmospheric light value at the origin A The coordinate point in the coordinate system of is denoted as the mapping coordinate ( i, j ), and define the haze propagation distance of an image L , the formula is: ; ; In the formula, I hazy In the example, any pixel point ( i, j ) is mapped to A In the coordinate system with the origin as the mapping coordinate ; , , for I d exist RGBThe three channel values in the model; A R , A G , A B for A exist RGB The three channel values in the model; for I hazy exist RGB The three channel values in the model; (4) 800 points are uniformly selected on the surface of a unit sphere with a radius of 1 and recorded as p ; Then use (3) Converted to spherical coordinates and expressed in p is the initial sampling center, and the nearest neighbor search is used to convert (1) I hazy The pixels are classified into different categories and the clustering results are obtained. , the specific expression is: ; ; In the formula, For mapping coordinates The modulus value, and In the spherical coordinate system The elevation and azimuth angles; KD is the nearest neighbor search process, It means there are 800 categories in total; Then put (3) L according to Classify and for each category, calculate the standard deviation of the haze propagation distance corresponding to the pixel point and the maximum haze propagation distance image , and obtain a rough estimate of the transmittance , the specific expression is: ; ; ; In the formula, and Pixels The The pixels in the categories correspond to L The standard deviation and maximum value of (5) Based on the preset noise discrimination formula of rough estimated transmittance, the noise area of rough estimated transmittance is obtained ; The noise discrimination formula for roughly estimating transmittance is: ; For (4), we get t e , according to the noise discrimination formula t e Whether the transmittance point in belongs to noise, define is the selected noise threshold, noise point threshold Take 0.15; , then it is considered that n The transmittance estimation corresponding to the pixel point of this class is inaccurate, and it belongs to the noise class. The coordinates of all the pixels in the noise class are saved to obtain the noise area. ; , then it is considered that n The transmittance corresponding to the class pixel is estimated accurately, and the transmittance of this class is retained; (6) Obtained through (5) And (4) we get ,calculate Maximum haze propagation distance ; Then get The maximum value of , using a uniform step size Sample 5 initial cluster centers within the interval; then The data points in the cluster are classified into the cluster group with the smallest absolute distance to the cluster center. For each cluster group, the average value of the data points contained in it is calculated as the new cluster center. Repeat this process until the k The coordinates of the five cluster center points in the first iteration are k - The difference of the coordinates of the 5 cluster center points in 1 iteration is less than the error threshold e r , error threshold e r Take 0.00001 to get the coordinates of the 5 cluster center points And the corresponding 5 types of pixel points , stretch the pixel point set to obtain the maximum haze propagation distance after noise correction , and calculate the corrected transmittance ; The specific expression for stretching the pixel point set is: ; calculate The specific expression is: ; ;
[0025] In the formula, Degraded image for foggy weather I hazy The corrected maximum haze propagation distance; Limit at Within the range of , avoid excessive defogging that affects image quality; (7) Using (2) I min , calculate the guided image of the guided filtering , and the obtained value of (6) is Perform guided filtering to obtain the transmittance image after guided filtering , the specific expression is: ; ; In the formula, I guide is a guide image for processing the transmittance image, w is the guidance coefficient, is the filter kernel radius, eps is the regularization coefficient, GF To guide the filtering; GF The model is: ; In the formula, For the output image, i and k is the pixel index, a k and b k For the core lie in k Weights and biases at position; To make the output image consistent with the image to be filtered p The edge information gap between a k and b k The specific expression is obtained by the least square method: ; ; In the formula, for In the filter core The average value in For oriented images I gudie In the filter core The variance in The filter kernel The number of pixels in The image to be filtered In the window The mean value in ; (8) Take the clustering result of (4) Among the top 10 categories with the largest number of pixels, find the category with the largest standard deviation of haze propagation distance within the category, and record it as ; Then use (4) to obtain the The maximum haze propagation distance of a pixel is recorded as , and define the relative total variation smoothing weight , the specific expression is: ;
[0026] ; In the formula, is the standard deviation of the propagation distance of each type of haze obtained according to (4), It means taking the top 10 classes with the largest number of pixels in the clustering results of (6), for middle The largest category, C is the smoothing coefficient, C Take 0.005; (9) for (7) Using (8) we get Perform relative total variation smoothing to obtain the final transmittance map ; The relative total variation smoothing model is: ; in: ; ; ; ; In the formula, q For p The index of all pixels in a rectangular window area centered at point. Representative p A rectangular area centered on and represents the partial differentials in two directions, g is the Gaussian kernel function; in: ; In the formula, , , and So p , q is the coordinate value of the index; Get the final transmittance map The specific expression is: ; In the formula, To control the maximum value of the texture element, Take 3, is the clarity parameter, Take 0.03, is the number of iterations, Take 4; (10) From (9) we get , output restored foggy degraded image , the specific expression is: .
[0027] Comparative Example 1: Table 1 Evaluation coefficients of comparison group 1
[0028] This table compares the effects of processed images by comparing information entropy, average gradient and haze concentration estimator. It can be seen from this table that the average gradient and information entropy of the original image are low, and the FADE of the haze concentration estimator is relatively high. After processing by dark channel, fast convex optimization and this method, the average gradient and information entropy are significantly improved, and FADE is significantly reduced.
[0029] Comparative Example 2: Table 2 Evaluation coefficients of comparison group 2
[0030] It can be seen from this table that the average gradient and information entropy of the original image are low, and the FADE of the haze concentration estimator is relatively high. After being processed by the dark channel, fast convex optimization and this method, the average gradient and information entropy are significantly improved, and the FADE is significantly reduced.
[0031] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A remote sensing image defogging method based on maximum haze line optimization, characterized in that: The following steps are involved: S1, obtain the foggy degraded image under haze weather, denoted as I hazy ; S2, the result obtained by S1 I hazy Perform minimum filtering to obtain the minimum channel image I min ,right I min Use the box filter model to perform box filtering, and take the point with the largest pixel brightness in the box filter result image as the ambient atmospheric light value A ; S3, I hazy of RGB Any pixel point in the spatial coordinate system ( i,j ) is converted to the ambient atmospheric light value at the origin A The coordinate point in the coordinate system of is denoted as the mapping coordinate ( i,j ), and define I hazy The distance of haze transmission L ; S4, 800 points are uniformly selected on the surface of a unit sphere with a radius of 1 according to the angle and recorded as p ; Then, Converted to spherical coordinates and expressed in p As the initial sampling center, the nearest neighbor search is used to find I hazy The pixels are classified into different categories and the clustering results are obtained. ; Then change S3 L according to Classify and for each category, calculate the standard deviation of the haze propagation distance corresponding to the pixel point and the maximum haze propagation distance image , and obtain a rough estimate of the transmittance ; S5, based on the preset noise discrimination formula of the rough estimated transmittance, obtain the noise area of the rough estimated transmittance ; S6, obtained through S5 And S4 obtained ,calculate Maximum haze propagation distance ; Then get The maximum value of , using a uniform step size Sampling within interval n Initial cluster centers; The data points in the cluster are classified into the cluster group with the smallest absolute distance to the cluster center. For each cluster group, the average value of the data points contained in it is calculated as the new cluster center. Repeat this process until the k Iteration n The coordinates of the cluster center points are k -1 iteration n The difference in the coordinates of the cluster center points is less than the error threshold e r ,get n The coordinates of cluster centers [ u 1, u 2, u 3… u n ] and the corresponding n Class pixel set , stretch the pixel point set to obtain the maximum haze propagation distance after noise correction , and calculate the corrected transmittance ; S7, obtained using S2 I min , calculate the guided image of the guided filtering , and for S6 we get Perform guided filtering to obtain the transmittance image after guided filtering ; S8, take the clustering result of S4 The front with the largest number of pixels n class, find the class with the largest standard deviation of haze propagation distance within the class, recorded as ; Then S4 obtains the The maximum haze propagation distance of a pixel is recorded as , and define the relative total variation smoothing weight ; S9, what S7 got Using S8 Perform relative total variation smoothing to obtain the final transmittance map ; S10, derived from S9 , output restored foggy degraded image .
2. The remote sensing image defogging method based on maximum haze line optimization according to claim 1, characterized in that: The specific expression of S2 is: ; ; Where BF is a box filter, r b is the filter radius, is the output image of the box filter, ( i,j ) is the pixel coordinates in the box filtering result; The box filter model in S2 is: ; ; In the formula, , For the input image The cumulative sum of pixels in the x and y directions, a is the pixel index in the x direction of the box operator inside the filter, b is the pixel index in the y direction of the box operator, h is the number of pixels in the x direction of the input image, w is the number of pixels in the y direction of the input image.
3. The remote sensing image defogging method based on maximum haze line optimization according to claim 1 is characterized in that: The haze propagation distance of an image is defined in S3 L The formula is: ; ; In the formula, I hazy In the example, any pixel point ( i,j ) is mapped to A In the coordinate system with the origin as the mapping coordinate ; , , for I d exist RGB The three channel values in the model; A R , A G , A B for A exist RGB The three channel values in the model; for I hazy exist RGB The three channel values in the model.
4. The remote sensing image defogging method based on maximum haze line optimization according to claim 1 is characterized in that: The clustering results are obtained in S4 The specific expression is: ; ; In the formula, For mapping coordinates The modulus value, and In the spherical coordinate system The elevation and azimuth angles; KD is the nearest neighbor search process, It means there are 800 categories in total; The rough estimated transmittance is obtained in S4 The specific expression is: ; ; ; In the formula, and Pixels The The pixels in the categories correspond to L The standard deviation and maximum value of .
5. The remote sensing image defogging method based on maximum haze line optimization according to claim 1, characterized in that: The noise discrimination formula for roughly estimating the transmittance in S5 is: ; For S4 t e , according to the noise discrimination formula t e Whether the transmittance point in belongs to noise, define is the selected noise threshold; , then it is considered that n The transmittance estimation corresponding to the pixel point of this class is inaccurate, and it belongs to the noise class. The coordinates of all the pixels in the noise class are saved to obtain the noise area. ; , then it is considered that n The transmittance corresponding to the class pixel is estimated accurately, and the transmittance of this class is retained.
6. The remote sensing image defogging method based on maximum haze line optimization according to claim 1, characterized in that: The specific expression for stretching the pixel point set in S6 is: ; The S6 calculation The specific expression is: ; ; In the formula, Degraded image for foggy weather I hazy Corrected maximum haze propagation distance.
7. The remote sensing image defogging method based on maximum haze line optimization according to claim 1, characterized in that: The transmittance image after the guided filtering process in S7 The specific expression is: ; ; In the formula, I guide is a guide image for processing the transmittance image, w is the guidance coefficient, r G is the filter kernel radius, eps is the regularization coefficient, GF is the guided filter; The GF model is: ; In the formula, v i is the output image of the filter, i and k is the pixel index, a k and b k For the core ω lie in k Weights and biases at position; Said a k and b k The specific expression is obtained by the least square method: ; ; In the formula, for In the filter kernel The average value in For guided images I guide in the filter kernel The variance in The filter kernel The number of pixels in The image to be filtered In the window The mean value in .
8. The remote sensing image defogging method based on maximum haze line optimization according to claim 1, characterized in that: The specific expression of S8 is: ; ; In the formula, is the standard deviation of the propagation distance of each type of haze obtained according to S4, Indicates taking the top 10 classes with the largest number of pixels in the S6 clustering results. for middle The largest category, C is the smoothing coefficient.
9. The remote sensing image defogging method based on maximum haze line optimization according to claim 1, characterized in that: The final transmittance map is obtained in S9 The specific expression is: ; In the formula, To control the maximum value of the texture element, is the clarity parameter, is the number of iterations; The relative total variation smoothing model in S9 is: ; in: ; ; ; ; In the formula, q For p The index of all pixels in a rectangular window area centered at point. Representative p A rectangular area centered on and represents the partial differentials in two directions, g is the Gaussian kernel function; in: ; In the formula, , , and So p , q The coordinate value of the index.
10. The remote sensing image defogging method based on maximum haze line optimization according to claim 1, characterized in that: The foggy weather degraded image is restored in S10 The specific expression is: 。