A single image defogging method based on adaptive pixel selection and saturation line prior
By constructing a priori relationships of saturation lines within local image blocks and adaptive pixel selection in the single-image dehazing method, the problem of unstable dehazing performance in existing technologies is solved, and higher accuracy and robust transmittance estimation are achieved, thereby improving the dehazing effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANCHANG HANGKONG UNIVERSITY
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-17
AI Technical Summary
Existing single-image dehazing methods struggle to maintain stable dehazing performance in heavily foggy areas, low-light areas, or areas with discontinuous depth. Furthermore, they are prone to color distortion or insufficient detail recovery under complex conditions, and lack effective utilization of high-level distribution relationships between pixels.
By constructing a prior linear relationship between the saturation component and the reciprocal of the brightness component of pixels within a local image patch, an adaptive pixel selection strategy is executed to filter reliable pixels. The transmittance estimate is calculated using the prior linear relationship of the saturation line, and the image is restored by combining it with an atmospheric scattering model.
It significantly improves the accuracy and stability of transmittance estimation, enhances the robustness of the method in complex scenes, improves computational efficiency and defogging effect, and ensures accuracy under different fog concentrations and scene types.
Smart Images

Figure CN122415394A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and particularly relates to a single-image dehazing method based on adaptive pixel selection and saturation line prior. Background Technology
[0002] Single-image dehazing is an important research direction in computer vision, aiming to recover clear scene content from a single, degraded image in foggy conditions. Existing dehazing methods are mainly divided into two categories: prior-based methods and data-driven methods. Prior-based methods alleviate the underdeterminism problem caused by insufficient information in single-image foggy observations by introducing hand-designed image statistical properties as constraints. For example, dark channel priors utilize the statistical law that the intensity of at least one color channel in the non-sky region of a fog-free image tends to zero, combined with an atmospheric scattering model to achieve transmittance estimation and scene restoration; color attenuation priors predict scene depth by constructing a linear model of brightness and saturation attributes; saturation-guided transmittance estimation methods use pixel-level saturation information to design intensity functions to enhance dehazing effects; fog line priors and color line models are based on assumptions of non-local pixel distribution or monochrome structure of local image patches, respectively, and show good performance in dense fog scenes or high-fidelity restoration. Furthermore, convolutional neural network-based methods, by training end-to-end models on large-scale paired synthetic datasets, can learn the complex mapping relationship between foggy inputs and fog-free outputs, achieving significant progress in various dehazing tasks. The above methods effectively improve the visibility of foggy images and the performance of subsequent visual tasks in different application scenarios, and promote the development of single-image dehazing technology.
[0003] However, existing methods still have the following shortcomings. On the one hand, most prior-based methods rely on pixel-level saturation or intensity information for transmittance estimation, lacking effective utilization of higher-level distribution relationships between pixels. This makes it difficult to maintain stable dehazing performance in heavily foggy areas, low-light areas, or areas with discontinuous depth. Furthermore, some methods rely on soft matting or iterative optimization, resulting in significant computational overhead. On the other hand, while learning-based methods have strong representational capabilities, their performance is highly dependent on the quality and distribution of large-scale paired training data. Domain differences between synthetic data and real foggy scenes often limit the model's generalization ability, leading to color distortion or insufficient detail recovery under complex conditions such as non-uniform fog, nighttime fog, or drastic changes in lighting. In addition, existing methods still do not adequately model the intrinsic relationships between pixels within local image patches, especially in areas with rich edge textures or extremely low saturation (such as the sky and water surfaces). It is difficult to construct robust transmittance estimation models, thus limiting the detail preservation and color fidelity of the dehazing results. Therefore, how to fully explore the structural relationships between pixels in single-image dehazing tasks and improve the adaptability of the method under different fog concentrations and scene types remains an urgent technical problem to be solved. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes a single-image dehazing method based on adaptive pixel selection and saturation line prior, thereby resolving the issues present in the prior art.
[0005] To achieve the above objectives, this invention provides a single-image dehazing method based on adaptive pixel selection and saturation line prior, comprising: A foggy image is acquired, and atmospheric light normalization is performed on the foggy image based on an atmospheric scattering model to obtain a normalized foggy image. In the normalized hazy image, a prior linear relationship between the saturation component and the reciprocal of the brightness component of pixels within a local image patch is constructed. Execute an adaptive pixel selection strategy: select a reference pixel, calculate the slope between the reference pixel and other pixels in the local image block, count the percentage of pixels whose slope falls within a preset range, and dynamically filter out reliable pixels for constructing saturation lines based on the percentage of pixels and local contrast information. Based on the prior linear relationship of the saturation line, using the reliable pixels, a saturation line is constructed in the coordinate space formed by the inverse of the saturation component and the luminance component, and the transmittance estimate of the local image patch is calculated according to the slope and intercept of the saturation line. Based on the estimated transmittance and the estimated atmospheric light, a fog-free image is reconstructed from the foggy image using the inverse process of the atmospheric scattering model.
[0006] Preferably, the preset interval is (-1, 0).
[0007] Preferably, in the adaptive pixel selection strategy, the pixel ratio is calculated using the following formula: ; in, and Here, M represents the pixel coordinates, and M represents the total number of pixels in the image patch. For saturation components, F(⋅) is the reciprocal of the luminance component, β is the indicator function, β is a constant controlling the effect of contrast, and Contrast(H) is the local contrast of the foggy image.
[0008] Preferably, the adaptive pixel selection strategy further includes: when the pixel proportion corresponding to the reference pixel is greater than or equal to a preset threshold, determining that the reference pixel belongs to the reliable pixel.
[0009] Preferably, in the step of constructing the saturation line: based on the reliable pixels, the slope and intercept of the saturation line are calculated using linear fitting, and the transmittance estimate of the local image patch is calculated based on the slope and intercept of the saturation line, using the following formula: ; in, This is an estimate of the transmittance. The slope of the saturation line. This is the intercept of the saturation line.
[0010] Preferably, the method further includes a step of determining the validity of the saturation line: when the number of reliable pixels is less than a first threshold or the length of the saturation line is less than a second threshold, the saturation line construction is determined to have failed.
[0011] Preferably, the method further includes a transmittance fusion step: for local image patches where saturation line construction fails, a boundary constraint transmittance of the image patch is calculated using a boundary constraint-based transmittance estimation method, and the boundary constraint transmittance is used to replace the transmittance estimate.
[0012] Preferably, the method further includes an adaptive transmittance lower bound constraint step: obtaining the transmittance estimates corresponding to all successfully constructed saturation lines in the foggy image, calculating the mean of a preset percentage in the set of minimum values as the adaptive lower bound, and comparing the currently used transmittance with the adaptive lower bound, taking the maximum value of the two as the final transmittance.
[0013] Preferably, the local image block is obtained by sampling the entire foggy image through a non-overlapping grid, and various pixel groups are generated using multiple block-segmentation strategies. The final transmittance of each pixel is obtained by averaging its transmittance estimates under multiple block-segmentation strategies.
[0014] Preferably, the method further includes a transmittance refinement step: using guided filtering to perform edge-preserving smoothing filtering on the calculated transmittance map to eliminate block artifacts.
[0015] Compared with the prior art, the present invention has the following advantages and technical effects: This invention transforms transmittance estimation into a saturation line construction problem by establishing a prior linear relationship between saturation and the reciprocal of the luminance component. This technique allows transmittance estimation to no longer rely on single-pixel saturation values, but instead utilizes the linear distribution patterns among local pixels, thus significantly improving the accuracy and stability of transmittance estimation.
[0016] This invention employs an adaptive pixel selection strategy, which involves selecting a reference pixel, calculating its slope relative to other pixels, statistically analyzing the percentage of pixels whose slope falls within a preset range, and dynamically filtering reliable pixels based on local contrast information. This technique effectively eliminates off-target pixels caused by the invalidation of the local monochromatic surface assumption or depth discontinuities, especially at edges, in areas with rich textures, and in regions with abrupt depth changes. This ensures the reliability of saturation line construction and enhances the robustness of the method in complex scenes.
[0017] This invention constructs a saturation line in a coordinate space formed by the inverses of the saturation and luminance components, based on selected reliable pixels, and directly calculates the transmittance estimate based on the slope and intercept of the saturation line. This technique enables rapid analytical calculation of transmittance, avoiding the error accumulation caused by random sampling or iterative optimization in existing technologies, thus improving computational efficiency and estimation accuracy.
[0018] Through the synergistic effect of technical features, the transmittance estimation process fully explores the intrinsic relationships between local pixels and can adaptively adjust pixel selection criteria based on local image contrast. This allows for more accurate and reliable transmittance maps to be obtained under different fog concentrations and scene types, laying the foundation for subsequent scene restoration. Attached Figure Description
[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the prior distribution related to saturation lines in an embodiment of the present invention; (a) is the original foggy input; (b)–(c) are details of local image patches obtained by cropping the corresponding regions in (a); (d) is the saturation line estimation result corresponding to the image content in (b); (e) is the saturation line estimation result corresponding to the image content in (c); (f) is the transmittance. The gray shaded areas represent regions where the ASLE method has limitations; (g) is the restored dehazed image; Figure 2 This is a schematic diagram of saturation line construction under complex conditions according to an embodiment of the present invention; (a) original foggy input; (b) magnified result of local image patch corresponding to the red rectangular area in (a); (c) saturation line constructed based on the local image patch in (b); the selected pixel is highlighted in blue; Figure 3 This is a schematic diagram of the pixel selection process according to an embodiment of the present invention; Figure 4 Different selected pixel numbers in embodiments of the present invention A schematic diagram of the saturation line construction result in the complex region below; Figure 5 Different line lengths in embodiments of the present invention A schematic diagram of the saturation line construction result in the complex region below; Figure 6 The diagram illustrates different image block segmentation strategies according to embodiments of the present invention; (a) Input foggy image; (b) Image blocks obtained using different segmentation strategies; (c) Estimated transmittance. (d) Dehazing result image; Figure 7 Color channels in embodiments of the present invention upper boundary constraint diagram, where (a) is Less than (a) is the case; (b) is Greater than The situation; Figure 8 This is a schematic diagram comparing the noise suppression performance in the sky region according to an embodiment of the present invention; (a) Input image with fog; (b) Using a fixed... (c) Dehazing results of the DCP method; ASLE defogging results. Detailed Implementation
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0022] Example 1 This embodiment provides a single-image dehazing method based on adaptive pixel selection and saturation line prior, including: Step 1: Acquire a foggy image and perform atmospheric light normalization on the foggy image based on an atmospheric scattering model to obtain a normalized foggy image; Specifically, the fog imaging model includes: Under the widely used atmospheric scattering model, the haze degradation imaging process can be written as: (1) in, Images showing observations affected by fog. This indicates the corresponding radiance in a fog-free scene. Indicates pixel position Transmittance at that location Atmospheric light is typically approximated as a uniform constant in a given foggy scenario. Under the assumption of spatially uniform fog, the transmission term... It can be represented as: (2) in, Indicates the atmospheric scattering coefficient. This represents the scene depth. As shown in the formula above, when the distance between the scene area and the observation position approaches infinity, the transmittance will approach zero. Further, the formula above shows that the corresponding area... The pixel intensity is mainly determined by atmospheric light. The decision can therefore be made from the sky region in the fog map. In obtaining atmospheric light With transmission diagram Then, based on the above formula, the observed images can be... Reconstructing the radiance of a fog-free scene .
[0023] Linear models based on saturation include: Inspired by research representing natural images as a set of projected surfaces, this embodiment employs the local monochromatic assumption in image modeling. Under this assumption, the following form can be obtained: (3) (4) in, This is a three-dimensional reflectivity coefficient vector. The light and dark components representing spatial variations, local reflectance vector In the neighborhood The interior is treated as a constant. In fact, by... The model is constructed as segmented constant components, which enables effective separation of local image blocks.
[0024] For a given image Its saturation component It can be represented as: (5) in, Indicates the color channel index.
[0025] According to atmospheric light After normalization, the following relationship can be obtained: (6) In this embodiment, the normalized forms of the foggy image and the fog-free image are denoted as follows: and After algebraic simplification of formula (6), it can be written as: (7) Normalized fog-free image It satisfies the following properties: Proposition 1. Under the assumption of a locally monochromatic surface, The saturation component remains constant in the local region.
[0026] Proof: According to From the definition, we can obtain (8) From the above formula, we can see that The saturation term satisfies (9) Can be rewritten as (10) It is important to emphasize that, for the same fog image, atmospheric light is usually assumed to be... It remains unchanged in space. Therefore, It exhibits constant characteristics within local image patches.
[0027] Based on the above formula, the normalized fog map The saturation term can be written as: (11) make and They represent The maximum and minimum values in the color channels. Rearranging formula (11), we obtain an equivalent form: (12) In addition, it can also be written in an equivalent form: (13) According to the above formula, due to the transmission coefficient Consistent across different color channels and The maximum value corresponds to the same channel, therefore it can be written as: (14) in, express The largest component. And it has Furthermore, we can obtain: (15) This can be further simplified to: (16) According to the definition of brightness in the HSV color space, brightness is given by the maximum channel value, i.e. Therefore, equation (16) above can be rewritten as: (17) From Proposition 1, we know that It is approximately constant within each local block, denoted as . Meanwhile, assuming transmittance Within a local block, the space remains unchanged, denoted as... Therefore, for each local region Equation (17) above can be rewritten as: (18) For ease of analysis, the above formula can also be expressed as: (19) in, linear parameters and Let the slope and intercept represent the slope and intercept respectively, and their expressions are as follows: (20) (twenty one) From equations (20) and (21) above, it can be seen that when and When the transmittance is known, It can be obtained directly from the following formula: (twenty two) This embodiment will use the above formula in... and The linear relationship is called the saturation line prior. Using this prior, transmittance estimation can be reconstructed as a saturation line construction problem, and further analysis can be performed on this prior. and Solving is achieved by calculating the local pixel distribution in space.
[0028] Step 2: In the normalized hazy image, construct the a priori linear relationship between the saturation component and the reciprocal of the brightness component of pixels within a local image patch; Step 3: Execute an adaptive pixel selection strategy: Select a reference pixel, calculate the slope between the reference pixel and other pixels in the local image block, count the percentage of pixels whose slope falls within a preset range, and dynamically select reliable pixels for constructing saturation lines based on the percentage of pixels and local contrast information. Furthermore, the preset interval is (-1, 0).
[0029] Furthermore, the adaptive pixel selection strategy also includes: when the pixel proportion corresponding to the reference pixel is greater than or equal to a preset threshold, the reference pixel is determined to belong to the reliable pixel.
[0030] Furthermore, the local image blocks are obtained by sampling the entire foggy image through a non-overlapping grid, and various pixel groups are generated using multiple block-segmentation strategies. The final transmittance of each pixel is obtained by averaging its transmittance estimates under multiple block-segmentation strategies.
[0031] Specifically, to illustrate the construction process of the saturation lines, Figure 1(a) shows two representative foggy images. For the selected local image patches (Figure 1(b) and Figure 1(c)), its and The correspondence between them is shown in Figure 1(d) and Figure 1(e). It can be observed from the global pixel distribution that... and The relationship between them is approximately linear, consistent with the conclusion of the above equation. However, the pixel distribution does not strictly fall on a single straight line, and significant outliers deviating from the linear trend can still be observed. This phenomenon can be mainly attributed to two reasons: first, the color change of some pixels within a local block is extremely small, thus violating the assumption of a local monochromatic surface corresponding to these pixels; second, the depth is inconsistent within local regions, especially when there is depth discontinuity, the assumption of constant local transmittance no longer holds.
[0032] While the aforementioned factors can be effectively suppressed in most scenarios with limited impact on the overall distribution of local pixels, their effects can be significantly amplified in extreme cases. As shown in Figure 2(c), saturation line estimation is significantly impaired when the perturbation introduced by the deviating pixels increases. Therefore, in complex regions, a suitable pixel selection strategy should be prioritized to robustly establish saturation lines.
[0033] To facilitate a clearer understanding of the pixel selection process, an example containing 10 pixels is provided. Figure 3 shows the corresponding pixel selection results. For simplified analysis, this embodiment selects a representative case: consisting of 8 regular pixels and 2 offset pixels (Figure 3(a)). Any pixel pair The resulting slope is denoted as As shown in Figure 3(b), the goal is to eliminate off-center pixels to achieve reliable saturation line construction. It should be noted that... The range of values is And transmittance lie in From the above equation, we can see that the slope of the saturation line is... Limited by the range Therefore, when two pixels in the same image patch are both located on the saturation line, their corresponding slopes should satisfy the following condition: This phenomenon can be observed in Figure 3(b). and Observed. Conversely, if the assumption of constant local transmittance and a local monochromatic surface does not hold, the slope is no longer constrained by that interval, as shown in Figure 3(b). , and As shown. Based on this, for a given image patch, any pixel can be chosen as a reference point, and the remaining pixels can be divided into two categories according to the slope formed by the reference point and other pixels: i) the slope is located at... ii) The slope exceeds the pixel; The pixels. Then, the proportion of the previous type of pixels can be used as a criterion to determine whether the reference pixel is located on the saturation line. Taking Figure 3(c) as an example, when the regular pixels are located on the saturation line... When selected as a reference point, the remaining pixels are divided into two groups. and Because only and Falling in the range In addition. Conversely, when deviating from a pixel When selected as a reference point, the remaining pixels are divided into and Two groups, because there are only Falling in the range Internally. Therefore, the proportion of the first type of pixels... for ,right for As can be seen, when the reference pixel is located on the saturation line, its corresponding proportion is higher. Therefore, the proportion value can be used as an effective indicator to measure the reliability of the reference pixel: the larger the proportion, the higher the confidence in using the pixel to construct the saturation line. After adopting this pixel selection strategy, most off-center pixels can be effectively removed (see Figure 3(d)), which helps to robustly construct the saturation line, as shown in Figure 3(e).
[0034] Based on the above observations, for a size of Image blocks Relative to pixels The percentage of the remaining pixels that satisfy the slope constraint can be expressed as: (twenty three) in, and Here, M represents the pixel coordinates, and M represents the total number of pixels in the image patch. For saturation components, F(⋅) is the reciprocal of the luminance component, β is the indicator function, β is a constant controlling the effect of contrast, and Contrast(H) is the local contrast of the foggy image.
[0035] When the input is in the range The value is 1 if true and 0 otherwise. Accordingly, the pixel selection criterion can be written as: (twenty four) in, Represents the set of selected pixels. These are preset parameters.
[0036] Step 4: Based on the prior linear relationship of the saturation line, using the reliable pixels, construct the saturation line in the coordinate space formed by the inverse of the saturation component and the luminance component, and calculate the transmittance estimate of the local image patch according to the slope and intercept of the saturation line. Furthermore, in the step of constructing the saturation line: based on the reliable pixels, the slope and intercept of the saturation line are calculated using linear fitting, and the transmittance estimate of the local image patch is calculated based on the slope and intercept of the saturation line.
[0037] Furthermore, it also includes a step of determining the validity of the saturation line: when the number of reliable pixels is less than a first threshold or the length of the saturation line is less than a second threshold, the saturation line construction is determined to have failed.
[0038] Furthermore, it also includes a transmittance fusion step: for local image patches where saturation line construction fails, a boundary constraint transmittance method based on boundary constraints is used to calculate the boundary constraint transmittance of the image patch, and the boundary constraint transmittance is used to replace the transmittance estimate.
[0039] Furthermore, it also includes an adaptive transmittance lower bound constraint step: obtaining the transmittance estimates corresponding to all successfully constructed saturation lines in the foggy image, calculating the mean of a preset percentage in the set of minimum values as the adaptive lower bound, and comparing the currently used transmittance with the adaptive lower bound, taking the maximum value of the two as the final transmittance.
[0040] Furthermore, it also includes a transmittance refinement step: using guided filtering to perform edge-preserving smoothing filtering on the calculated transmittance map to eliminate block artifacts.
[0041] Specifically, in order to enable the constructed saturation lines to capture more information about the dominant regions of image patches, this embodiment takes... This means that the slope formed by the selected pixel and at least half of the remaining pixels must lie within the interval [0, 1]. . This is a constant used to control the effect of contrast on pixel selection. This represents local contrast. Local contrast is defined as the standard deviation of pixel intensity within a small neighborhood of an image. It effectively characterizes local details, edge and texture variations, and its calculation form is: (25) in, Indicates the pixel intensity within a local neighborhood. This is the mean of the neighborhood. The neighborhood size is used. Local contrast allows the pixel selection criterion to adaptively adjust based on local image details, which is particularly suitable for edge-dominated or texture-rich areas. This adaptive strategy enables the dehazing algorithm to present differentiated enhancement intensities in different regions, thereby improving overall dehazing performance while preserving details.
[0042] (26) in, Represents a set Number of pixels and Representing sets superior and The mean.
[0043] This strategy enables pixel selection to be performed by... and In the constructed coordinate space, discrimination is performed based on the relative positional relationships of pixels, thereby effectively utilizing the inherent correlation between pixels during the saturation line construction process. The intermediate results generated by the above steps can be observed in Figure 1 (d)(e) and Figure 2 (c): the selected pixels are marked in blue, and the corresponding saturation lines are displayed in red. It can be seen that the proposed pixel selection strategy can effectively suppress the influence of most deviating pixels, enabling the constructed saturation lines to more accurately capture the underlying linear distribution of local pixels (see Figure 2 (c)).
[0044] Once the saturation lines are constructed, the transmittance of the image patch can be expressed by the above formula: (27) in, and The slope and intercept of the saturation line in Figure 3(d) are represented, respectively. Furthermore, the length of the constructed saturation line is... Defined as: (28) The results are shown in Figure 3(e). To obtain a more accurate transmittance estimate, in addition to adjusting the slope... In addition to imposing constraints, this embodiment further limits the number of selected pixels. With saturation line length Introduce the following conditions: (29) (30) in, and Set a threshold for the user. The saturation line is considered successfully constructed when both of the above conditions are met.
[0045] Defined as the number of selected pixels The lower bound. Larger. This indicates that the proposed ASLE holds true for more pixels, thus facilitating the construction of more reliable saturation lines, as shown in Figure 4. Conversely, too small... This means that the constructed saturation line only incorporates a small amount of pixel information, resulting in a captured linear distribution that is difficult to represent the overall features of most pixels, as shown in Figure 4(a)(b). Therefore, this embodiment sets a minimum threshold. This avoids the problem, thus providing a reliable basis for constructing saturation lines for accurate transmittance estimation. However, if Setting the value too high may introduce overly strict constraints in areas where ASLE could be effectively applied, as shown in Figure 4(c). To achieve a balance between robustness and applicability, this embodiment takes... This setting eliminates saturation lines constructed from fewer than 12 pixels; it effectively eliminates low-quality saturation lines while preserving performance in most areas.
[0046] parameter Indicates saturation line length The minimum allowable value. Larger. This helps ensure that the constructed saturation line is at its edge. The axis has sufficient variability. Considering... The range of values is located in From the above formula, we can see that if If it is too small, then along Insufficient axis variation. In this case, the denominator of the above equation approaches 0, leading to a decrease in the model's stability to small perturbations. These perturbations mainly originate from two sources: i) unavoidable noise introduced during imaging; ii) a small number of incompletely filtered-out off-target pixels, exhibiting irregular behavior. Therefore, this embodiment applies a threshold to the saturation line length. To ensure along The axis exhibits sufficient variation. Similar to... To avoid negative impacts on the potential effective area of ASLE (see (c)(d) in Figure 5), this embodiment empirically adopts the following settings. As a compromise, saturation lines with a length less than 0.12 are removed, thereby achieving a more robust modeling of the linear distribution and ensuring reliable construction of saturation lines.
[0047] From an efficiency perspective, this embodiment uses a non-overlapping grid to sample image blocks across the entire image. Furthermore, to enhance image block diversity, this embodiment employs multiple image segmentation methods, as shown in Figure 6(b). It can be observed that different segmentation strategies result in differentiated local pixel groups, thereby facilitating effective saturation line construction in different regions. For each pixel, its transmittance is obtained by averaging two independent calculations. The transmittance map corresponds to Figure 6(a). As shown in Figure 6(c), the corresponding defogging result is shown in Figure 6(d).
[0048] Specifically, transmittance refinement is crucial. Although the proposed ASLE demonstrates strong effectiveness across a wide range of scenarios, its performance may still degrade under specific conditions. As shown in Figure 1(f), performance degradation mainly occurs in two types of regions: (i) sky regions with saturation close to 0; and (ii) non-sky regions with minimal chromaticity variation (such as river surfaces). To compensate for the insufficient estimation in these regions, this embodiment introduces boundary constraints. These constraints have been widely used for transmittance initialization estimation and can provide the necessary transmittance values for these challenging regions.
[0049] For observed hazy pixels, the dehazing operation shifts their intensity away from the direction of atmospheric light across all three color channels. For simplicity, the following discussion focuses on a single color channel. ,in .remember and Let these be the lower boundary and the upper boundary, respectively, and denote them as follows: and For its passage The corresponding component on the surface. Boundary constraints are determined by estimating the transmittance for the following scenario: After dehazing, the pixel reaches a given lower boundary. or upper boundary As shown in Figure 7.
[0050] Furthermore, the final transmittance is taken as the maximum value among the three channels, corresponding to the pixel reaching the lower boundary in a certain channel after dehazing. or upper boundary Under these conditions, the corresponding transmittance can be expressed as... (31) in (32) The boundary value in this embodiment is , To maintain consistency with the assumption of constant local transmittance proposed in the previous section, this embodiment adopts the local block form of the above formula, which can be written as: (33) in, Indicated by The image patch centered on the neighborhood.
[0051] In summary, the transmittance estimate obtained based on ASLE and boundary constraints can be expressed as: (34) By introducing boundary constraints, satisfactory dehazing results can still be obtained even when relying solely on ASLE is insufficient, thereby improving overall reliability. Furthermore, since excessively low transmittance in the sky region typically leads to significant noise amplification, this embodiment estimates transmittance... Further imposing a lower bound constraint, denoted as (35) in, Defined as smallest among The average transmittance value. It should be noted that... The transmittance of most non-sky areas is estimated (see (f) in Figure 1). Therefore, The minimum value typically corresponds to the transmittance of the farthest non-sky region. Using this value as the lower bound of transmittance can suppress noise amplification in the sky region while maintaining the defogging quality in the non-sky region. In this embodiment, Depend on The smallest 4% value was calculated, that is... .
[0052] Unlike traditional methods, which use a fixed lower bound on transmittance for all images (typically 0.1), this embodiment proposes... The lower bound of transmittance is then adaptively determined based on the content of each hazy image. This adaptive strategy enables the method in this embodiment to determine a more suitable lower bound of transmittance for different images, thereby producing more satisfactory dehazing results, as shown in Figure 8.
[0053] The proposed method assumes constant local transmittance, which may introduce blocky artifacts. To mitigate this problem, a guided filter is used to refine the estimated transmittance map, as shown in the following formula: (36) in This represents the guided filter operator.
[0054] Step 5: Based on the estimated transmittance and the estimated atmospheric light, the fog-free image is reconstructed from the foggy image using the inverse process of the atmospheric scattering model.
[0055] Atmospheric light Atmospheric light estimates can be estimated using various existing methods. These methods yield only minor differences in atmospheric light estimates for most scenes because they typically rely on pixels from the farthest region to determine atmospheric light values. Based on the above equation, scene radiance can be reconstructed as follows: (37) The overall process of the proposed defogging method is summarized in Algorithm 1: Input: Foggy image .
[0056] Parameter configuration: , , , , .
[0057] step: Calculate atmospheric light ; use right Normalization is performed to obtain ; Calculate according to equation (27) ; Calculate according to equation (31) ; Calculate based on equations (33) and (34) ; Calculate according to equation (35) ; Calculate according to formula (36) ; Restore the haze-free image according to equation (37). .
[0058] Output: Final dehazing result .
[0059] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A single-image dehazing method based on adaptive pixel selection and saturation line prior, characterized in that, Includes the following steps: A foggy image is acquired, and atmospheric light normalization is performed on the foggy image based on an atmospheric scattering model to obtain a normalized foggy image. In the normalized hazy image, a prior linear relationship between the saturation component and the reciprocal of the brightness component of pixels within a local image patch is constructed. Execute an adaptive pixel selection strategy: select a reference pixel, calculate the slope between the reference pixel and other pixels in the local image block, count the percentage of pixels whose slope falls within a preset range, and dynamically filter out reliable pixels for constructing saturation lines based on the percentage of pixels and local contrast information. Based on the prior linear relationship of the saturation line, using the reliable pixels, a saturation line is constructed in the coordinate space formed by the inverse of the saturation component and the luminance component, and the transmittance estimate of the local image patch is calculated according to the slope and intercept of the saturation line. Based on the estimated transmittance and the estimated atmospheric light, a fog-free image is reconstructed from the foggy image using the inverse process of the atmospheric scattering model.
2. The method according to claim 1, characterized in that, The preset interval is (-1, 0).
3. The method according to claim 2, characterized in that, In the adaptive pixel selection strategy, the pixel ratio is calculated using the following formula: ; in, and Here, M represents the pixel coordinates, and M represents the total number of pixels in the image patch. For saturation components, F(⋅) is the reciprocal of the luminance component, β is the indicator function, β is a constant controlling the effect of contrast, and Contrast(H) is the local contrast of the foggy image.
4. The method according to claim 2, characterized in that, The adaptive pixel selection strategy further includes: when the pixel proportion corresponding to the reference pixel is greater than or equal to a preset threshold, the reference pixel is determined to belong to the reliable pixel.
5. The method according to claim 1, characterized in that, In the step of constructing the saturation line: based on the reliable pixels, the slope and intercept of the saturation line are calculated using linear fitting, and the transmittance estimate of the local image patch is calculated based on the slope and intercept of the saturation line, using the following formula: ; in, This is an estimate of the transmittance. The slope of the saturation line. This is the intercept of the saturation line.
6. The method according to claim 5, characterized in that, It also includes a step of determining the validity of the saturation line: when the number of reliable pixels is less than a first threshold or the length of the saturation line is less than a second threshold, the saturation line construction is determined to have failed.
7. The method according to claim 6, characterized in that, It also includes a transmittance fusion step: for local image patches where saturation line construction fails, the boundary constraint transmittance of the image patch is calculated using a boundary constraint-based transmittance estimation method, and the boundary constraint transmittance is used to replace the transmittance estimate.
8. The method according to claim 7, characterized in that, It also includes an adaptive transmittance lower bound constraint step: obtaining the transmittance estimates corresponding to all successfully constructed saturation lines in the foggy image, calculating the mean of a preset percentage in the set of minimum values as the adaptive lower bound, and comparing the currently used transmittance with the adaptive lower bound, taking the maximum value of the two as the final transmittance.
9. The method according to claim 1, characterized in that, The local image blocks are obtained by sampling the entire foggy image through non-overlapping grids, and various pixel groups are generated using multiple block-segmentation strategies. The final transmittance of each pixel is obtained by averaging its transmittance estimates under multiple block-segmentation strategies.
10. The method according to claim 1, characterized in that, It also includes a transmittance refinement step: a guided filter is used to perform edge-preserving smoothing filtering on the calculated transmittance map to eliminate block artifacts.