A single-step image defogging method and system based on structure perception

By adopting a structure-aware single-step image dehazing method, the problem of balancing real-time performance and detail fidelity in existing technologies is solved, achieving efficient and clear image dehazing results, which are suitable for high real-time scenarios such as autonomous driving and drone inspection.

CN122175828APending Publication Date: 2026-06-09EAST CHINA UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
EAST CHINA UNIV OF SCI & TECH
Filing Date
2026-03-27
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing dehazing methods struggle to balance real-time performance with detail fidelity. Traditional methods suffer from high computational complexity and processing latency, while fast methods have weak structure perception capabilities, resulting in blurred or detail-loss images after dehazing. These methods fail to meet the demands of high real-time scenarios such as autonomous driving and drone inspection.

Method used

A structure-aware, single-step image dehazing method is adopted. The fog region is segmented by pixel distribution analysis, high-frequency details and contour information are extracted by local gradient analysis, fog interference is removed by a preset filtering mechanism, and sharpness verification and wavelet transform are performed by combining an edge detection model to generate optimized image data.

Benefits of technology

It achieves reduced computational complexity while maintaining high fidelity, meets real-time requirements, improves image clarity and detail fidelity, adapts to visual clarity and color naturalness under adverse weather conditions, and enhances the availability and transmission efficiency of image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175828A_ABST
    Figure CN122175828A_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer vision technology and discloses a structure-aware, single-step image dehazing method and system. The method includes: performing pixel distribution analysis and fog region segmentation on a foggy image; extracting key structural cues based on the segmentation results using local gradient analysis; using a filtering mechanism to remove fog interference and enhance contour details; generating an intermediate image by combining contrast enhancement and dynamic range expansion; constructing a single-step inversion mapping function that fuses structural features and pixel distribution to quickly map the intermediate image to generate a dehazed image; and verifying sharpness using an edge detection model and performing local sharpening correction on blurred areas. This method solves the problem in existing dehazing techniques where real-time performance and detail fidelity cannot be simultaneously achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a single-step image dehazing method and system based on structure awareness. Background Technology

[0002] Currently, in the field of computer vision technology, image dehazing technology is a key component in ensuring the reliability of outdoor vision systems. In applications such as autonomous driving, remote video surveillance, and drone inspection, the system needs to recover a clear scene in real time from visual data interfered with by fog and dust to ensure high-precision perception of the environment and accurate target recognition. This places extremely high demands on the processing speed and detail restoration capabilities of the underlying image processing algorithms.

[0003] In existing technologies, mainstream dehazing solutions often employ restoration methods based on atmospheric scattering physics models or multi-step iterative methods based on deep learning. These methods typically estimate transmittance and atmospheric light values ​​through global search or multiple iterative calculations, thereby achieving image enhancement and dehazing. However, this processing logic often ignores the inherent structural features of the image. Quality-focused methods, due to their complex computational steps and time-consuming parameter optimization, struggle to meet the frame rate requirements of real-time processing; while speed-oriented methods often oversimplify the physical model, failing to accurately separate high-frequency details from hazy images, resulting in blurred object edges, texture distortion, or halo effects after dehazing. For example, in traffic monitoring scenarios, if the algorithm cannot accurately distinguish between vehicle outlines and fog boundaries, simple contrast stretching can cause the loss of key structural information such as license plate characters, leading to recognition failure.

[0004] Specifically, traditional dehazing methods based on atmospheric scattering models, such as Dark Channel Prior (DCP) and its improved algorithms, typically require step-by-step estimation of atmospheric light values ​​and transmittance, and optimization of the transmittance map through complex iterative processes such as soft matting or multi-scale refinement. This results in high computational complexity and significant processing latency, making it difficult to meet the demands of real-time applications. Furthermore, during global unified processing, these methods are prone to edge halo effects in regions with abrupt changes in depth, and are susceptible to structural information loss or color distortion in dense fog or sparsely textured areas (such as the sky), leading to insufficient fidelity in key structures.

[0005] On the other hand, deep learning-based dehazing methods, such as AOD-Net and DehazeFormer, have made significant progress in dehazing performance, but their large number of model parameters and high inference computation overhead make them difficult to deploy efficiently on edge or embedded devices. At the same time, the multi-step iterative network structure leads to high inference latency, which cannot meet the frame rate requirements of high real-time scenarios such as autonomous driving and drone inspection.

[0006] In addition, while existing single-step inference dehazing methods have improved speed, their structure perception capabilities are generally weak, and they lack explicit extraction and protection mechanisms for high-frequency edge and texture information. This results in blurred key contours and loss of details in the dehazed image, which in turn affects the accuracy of downstream target recognition tasks.

[0007] In summary, existing dehazing methods generally suffer from a contradiction between "high-fidelity dehazing requires complex iterations and has poor real-time performance" and "fast dehazing sacrifices structural fidelity," making it difficult to simultaneously achieve both real-time performance and detail fidelity. Summary of the Invention

[0008] This invention provides a structure-aware single-step image dehazing method and system to solve the problem that existing dehazing processes cannot simultaneously achieve real-time performance and detail fidelity.

[0009] In a first aspect, to address the aforementioned technical problems, the present invention provides a structure-aware, single-step image dehazing method, comprising:

[0010] The input foggy image is acquired, and pixel distribution analysis is performed on the foggy image to obtain the original pixel distribution information. Then, the fog region is segmented based on the original pixel distribution information to obtain the fog-affected area map.

[0011] Based on the fog-affected area map, local gradient analysis is performed to extract high-frequency details and contour information. The location of key structural clues is determined based on the high-frequency details and contour information to obtain a structural feature mapping map.

[0012] The structure feature map is subjected to fog interference removal processing using a preset filtering mechanism to obtain the stripped contour information, and the stripped contour information is subjected to detail enhancement processing to obtain an optimized contour feature map.

[0013] The pixel distribution of the foggy image is adjusted based on the optimized contour feature map to obtain an intermediate image;

[0014] A single-step inversion mapping function based on the fusion of structural features and pixel distribution is constructed. The intermediate image is substituted into the single-step inversion mapping function for mapping processing to obtain a dehazed image.

[0015] The sharpness of the dehazed image is verified using a preset edge detection model to obtain a gradient feature distribution matrix. Local sharpening correction is then performed on the blurred edge regions in the gradient feature distribution matrix to obtain the final dehazed image.

[0016] The final dehazed image is subjected to wavelet transform to obtain low-frequency approximate subbands and high-frequency detail subbands, which are then encoded to generate optimized image data.

[0017] Secondly, the present invention provides a structure-aware single-step image dehazing system, comprising:

[0018] The fog region segmentation module is used to acquire the input foggy image, perform pixel distribution analysis on the foggy image to obtain the original pixel distribution information, and perform fog region segmentation based on the original pixel distribution information to obtain the fog-affected area map.

[0019] The structural feature extraction module is used to perform local gradient analysis based on the fog-affected area map, extract high-frequency details and contour information, and determine the location of key structural clues based on the high-frequency details and contour information to obtain a structural feature mapping map.

[0020] The interference stripping and optimization module is used to perform fog interference stripping processing on the structural feature map using a preset filtering mechanism to obtain the stripped contour information, and to perform detail enhancement processing on the stripped contour information to obtain an optimized contour feature map.

[0021] An intermediate image generation module is used to adjust the pixel distribution of the hazy image based on the optimized contour feature map to obtain an intermediate image;

[0022] The single-step dehazing mapping module is used to construct a single-step inversion mapping function based on the fusion of structural features and pixel distribution. The intermediate image is substituted into the single-step inversion mapping function for mapping processing to obtain the dehazed image.

[0023] The edge verification and correction module is used to verify the sharpness of the dehazed image using a preset edge detection model, obtain a gradient feature distribution matrix, and perform local sharpening correction on the blurred edge areas in the gradient feature distribution matrix to obtain the final dehazed image.

[0024] The data compression output module is used to perform wavelet transform on the final dehazed image to obtain low-frequency approximate subbands and high-frequency detail subbands, and then encode them to generate optimized image data.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] (1) The present invention performs pixel distribution analysis and fog region segmentation on the input foggy image, and extracts structural feature map based on the segmentation results using local gradient analysis to determine the distribution location of key structural clues. Through this structural perception processing, the system can accurately separate the masked high-frequency details and object contours from the visual data affected by fog, ensuring that the subsequent processing faithfully restores the original structure of the image, and effectively avoids the texture loss or edge blurring problems caused by the global uniform processing of traditional defogging methods.

[0027] (2) The present invention uses a preset filtering mechanism to remove fog interference from structural features and combines contrast enhancement technology to perform dynamic range expansion of low-frequency background areas of the image. Through this layered processing and dynamic adjustment, the algorithm can adaptively stretch the brightness level of low-contrast areas while removing background noise, thereby significantly improving the visual clarity and color naturalness of the image under bad weather conditions and improving the perception quality of human eyes or machine vision systems.

[0028] (3) The present invention constructs a single-step inversion mapping function based on the fusion of structural features and pixel distribution, and substitutes the optimized intermediate image into the function for direct mapping processing. This single-step mapping mechanism abandons the complex iterative optimization process in the prior art to solve the transmittance and atmospheric light value, which greatly reduces the computational complexity and time delay of the algorithm, thereby ensuring high-fidelity defogging effect while effectively meeting the application scenarios with strict real-time requirements such as autonomous driving and video surveillance.

[0029] (4) The present invention introduces an edge sharpness verification and local sharpening correction mechanism. It uses a pre-trained edge detection model to perform closed-loop detection on the dehazed image and automatically calculates correction coefficients for the identified blurred edge areas to perform secondary sharpening. This process constitutes a quality control closed loop, which can specifically repair the slight blur or detail distortion that may remain in the single-step dehazing process, further improving the edge sharpness and information integrity of the final output image and enhancing the usability of image data.

[0030] (5) The present invention performs data compression and encoding processing on the final dehazed image, and separates the high and low frequency sub-bands based on discrete wavelet transform and adopts lossless prediction and sparse coding strategies respectively. This data optimization processing effectively compresses the image data volume while preserving key structural features and high frequency texture details, adapts to the bandwidth-limited fast transmission environment, and improves the transmission efficiency and response speed of the system in remote real-time sensing tasks. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of a single-step image dehazing method based on structure awareness provided in the first embodiment of the present invention;

[0032] Figure 2 This is a schematic diagram of a structure-aware single-step image dehazing system provided in the second embodiment of the present invention. Detailed Implementation

[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0034] Reference Figure 1 The first embodiment of the present invention provides a structure-aware single-step image dehazing method, comprising the following steps:

[0035] S11, acquire the input foggy image, perform pixel distribution analysis on the foggy image to obtain the original pixel distribution information, and perform fog region segmentation based on the original pixel distribution information to obtain the fog-affected area map;

[0036] S12, perform local gradient analysis based on the fog-affected area map, extract high-frequency details and contour information, and determine the location of key structural clues based on the high-frequency details and contour information to obtain a structural feature mapping map;

[0037] S13, the structure feature map is subjected to fog interference stripping processing using a preset filtering mechanism to obtain the stripped contour information, and the stripped contour information is subjected to detail enhancement processing to obtain an optimized contour feature map.

[0038] S14, adjust the pixel distribution of the foggy image according to the optimized contour feature map to obtain an intermediate image;

[0039] S15, construct a single-step inversion mapping function based on the fusion of structural features and pixel distribution, substitute the intermediate image into the single-step inversion mapping function for mapping processing, and obtain a dehazed image;

[0040] S16, the sharpness of the dehazed image is verified using a preset edge detection model to obtain a gradient feature distribution matrix, and local sharpening correction is performed on the blurred edge areas in the gradient feature distribution matrix to obtain the final dehazed image.

[0041] S17, perform wavelet transform on the final dehazed image to obtain low-frequency approximate subbands and high-frequency detail subbands, and encode them to generate optimized image data.

[0042] In step S11, pixel distribution analysis is performed on the foggy image to obtain original pixel distribution information, and fog region segmentation is performed based on the original pixel distribution information to obtain a fog-affected area map, including:

[0043] The local brightness difference is calculated based on the original pixel distribution matrix of the foggy image, and a contrast analysis value distribution map is generated.

[0044] If the local region value in the contrast analysis value distribution map is lower than the preset contrast threshold, then the grayscale distribution features of the local region are extracted, the boundary range of the fogged area is locked, and a binary logic mask is generated based on the boundary range.

[0045] The binarized logical mask is overlaid onto the foggy image to obtain a fog-affected area map.

[0046] It should be noted that, to avoid misidentifying large, flat, bright areas (such as the sky, white buildings, etc.) as fog areas, this method introduces a sky region identification and protection mechanism during fog region segmentation. Specifically, for candidate regions in the contrast analysis value distribution map that are below the contrast threshold, a further determination is made by combining a brightness threshold (e.g., taking a high multiple of the global brightness mean) and structural tensor features: if the region simultaneously meets the conditions of high brightness, low gradient variance, and isotropic structural tensor feature values ​​(i.e., no obvious edge directionality), it is determined to be a sky or a bright, flat region, rather than a fog region. Regions determined to be sky are excluded when generating the binarized logical mask, and a smoothing constraint is introduced in the subsequent transmittance estimation to prevent color distortion or over-enhancement caused by overestimation of transmittance.

[0047] Specifically, the input hazy image data is first acquired, and an original pixel distribution matrix containing overall image brightness information is constructed. For example, the RGB format input image is converted to a grayscale color space, forming a two-dimensional grayscale intensity matrix. The dimension of this matrix is ​​consistent with the resolution of the input image, and each element in the matrix corresponds to the brightness value of a pixel. Local brightness differences are calculated based on the original pixel distribution matrix, generating a contrast analysis value distribution map reflecting changes in sharpness. During this process, a sliding window of a preset size (e.g., ...) is defined. or (Pixels) Traverse the original pixel distribution matrix. For each local area covered by the sliding window, calculate the standard deviation of all pixel grayscale values ​​within that area. This standard deviation represents the degree of brightness difference in that local area; the smaller the standard deviation, the flatter and blurrier the local area, and the greater the possibility of it being obscured by fog. Fill the calculated standard deviation into a matrix of the same size as the original image to generate a contrast analysis value distribution map.

[0048] Next, it is determined whether the values ​​in local areas of the contrast analysis value distribution map are lower than a preset contrast threshold. This preset contrast threshold is not a fixed constant, but rather adaptively calculated based on image statistical features. Specifically, it is calculated by statistically analyzing the global average value of the entire contrast analysis value distribution map and setting a specific proportion of this global average value (exemplarily 0.3 to 0.4 times) as the contrast threshold. If the value in a local area is lower than this threshold, that area is determined to be a potential fog-covered area.

[0049] Subsequently, for local areas determined to be below a threshold, grayscale distribution features are extracted to pinpoint the boundary range of the fogged area. Since foggy areas typically have high brightness and smooth texture, a gradient search method is used to determine the boundary. Specifically, at the edge of the potential fog-covered area, the gradient rate of change of grayscale values ​​is calculated along the horizontal and vertical directions. Pixel locations where the gradient rate of change undergoes a step change (i.e., transitioning from a flat high-brightness area to a textured background area) are marked as boundary points. All connected boundary points are closed, and a binary logical mask is generated based on the boundary range. In this binary logical mask, pixel locations inside the boundary are assigned a value of 1, and pixel locations outside the boundary are assigned a value of 0.

[0050] Finally, the binarized logical mask is overlaid onto the hazy image. Specifically, a pixel-by-pixel masking operation is performed on the original data of the hazy image and the binarized logical mask, retaining the image regions corresponding to a mask value of 1 and filtering out regions with a mask value of 0, thus obtaining a haze-affected region map containing only the parts affected by fog. This process achieves precise physical segmentation of the foggy region, providing an accurate spatial positioning basis for subsequent targeted dehazing processing.

[0051] In step S12, local gradient analysis is performed based on the fog-affected area map to extract high-frequency details and contour information. The locations of key structural clues are determined based on the high-frequency details and contour information to obtain a structural feature mapping map, including:

[0052] Construct the pixel neighborhood matrix of the fog-affected area map, and use the discrete differential operator to convolve the pixel neighborhood matrix to obtain the gradient components;

[0053] A gradient magnitude matrix is ​​synthesized based on the gradient components, and high-frequency detail candidate regions are extracted based on the gradient magnitude matrix;

[0054] A structure tensor matrix is ​​constructed for the high-frequency detail candidate region, and pixels whose feature values ​​in the structure tensor matrix satisfy the preset linear structure condition are selected as key structural clues.

[0055] By aggregating the key structural clues, a structural feature mapping map is generated.

[0056] Specifically, firstly, a pixel neighborhood matrix of the fog-affected area map is constructed, and then the pixel neighborhood matrix is ​​convolved using a discrete differential operator to obtain gradient components. During this process, a preset size (e.g., ) is established centered on each pixel in the fog-affected area map. The pixel neighborhood is calculated. The Sobel operator is chosen as the discrete differential operator, which includes templates in both horizontal and vertical directions. These two templates are then convolved with the pixel neighborhood, i.e., a weighted sum of the pixel grayscale values ​​within the neighborhood. This operation yields the gradient components in the horizontal and vertical directions for that pixel, respectively. The magnitudes of these two components directly reflect the degree of change in image brightness in the corresponding directions.

[0057] Next, a gradient magnitude matrix is ​​synthesized based on the gradient components, and high-frequency detail candidate regions are extracted based on this matrix. For each pixel location, the vector magnitude of the horizontal and vertical gradient components is calculated using the Pythagorean theorem to obtain the gradient magnitude. A gradient magnitude matrix is ​​generated by iterating through all pixels. To adaptively filter high-frequency regions, the mean and standard deviation of all non-zero elements in the gradient magnitude matrix are calculated, and the mean is added to the standard deviation by a specific multiple, exemplarily set to 0.5, as a high-frequency determination threshold. Regions with gradient magnitudes greater than this high-frequency determination threshold are marked as high-frequency detail candidate regions. These regions typically correspond to areas in the image with significant brightness variations, containing both true object edges and potentially high-intensity noise.

[0058] A structure tensor matrix is ​​constructed for high-frequency detail candidate regions, and pixels whose eigenvalues ​​satisfy a preset linear structure condition are selected as key structural clues. To remove cluttered noise and preserve coherent edges from the candidate regions, a local structure tensor is calculated for each pixel within the candidate region. This process is achieved by Gaussian-weighted smoothing of the gradient product within the local window, resulting in a covariance matrix describing the local geometric features. Subsequently, eigenvalue decomposition is performed on this matrix to obtain two non-negative eigenvalues. The larger eigenvalue represents the intensity of the most significant gradient change in the local neighborhood (i.e., the direction perpendicular to the edge), while the smaller eigenvalue represents the intensity of change in the orthogonal direction.

[0059] The preset linear structure condition is determined by calculating the anisotropy degree, which is the ratio of the difference between two eigenvalues ​​to the sum of the two eigenvalues. If this ratio is greater than a preset linearity threshold, for example, between 0.5 and 0.7, it indicates that the local neighborhood has significant directionality, that is, it exhibits linear structure features (such as straight lines or curved edges), rather than isotropic noise or flat regions. Pixels that meet this condition are identified as key structural cues.

[0060] Finally, key structural cues are aggregated to generate a structural feature map. A mapping matrix with the same size as the original image is created, marking all pixel locations identified as key structural cues with specific values ​​(such as preserving their original gradient magnitudes), while setting other background or noise locations that do not meet the criteria to zero. This map visually preserves the contour information of the image that is obscured by fog but still has complete structures, providing clear structural guidance for subsequent dehazing and restoration.

[0061] In step S13, a preset filtering mechanism is used to perform fog interference removal processing on the structural feature map to obtain the stripped contour information. Then, the stripped contour information is subjected to detail enhancement processing to obtain an optimized contour feature map, including:

[0062] The structural feature map is convolved using a multi-scale guided filter operator to decompose it into a high-frequency contour information layer.

[0063] Calculate the local variance statistics of the high-frequency contour information layer;

[0064] Based on the local variance statistics, the background noise distribution matrix is ​​removed from the high-frequency contour information layer to obtain the stripped contour information.

[0065] If the sharpness value of the stripped contour information is lower than the preset sharpness threshold, a mask for the region to be enhanced is generated, and a detail supplementation matrix is ​​constructed based on the mask for the region to be enhanced.

[0066] The detailed supplementary matrix is ​​weighted and fused with the stripped contour information to obtain an optimized contour feature map.

[0067] Specifically, firstly, a multi-scale guided filtering operator is used to convolve the structure feature map to decompose it into a high-frequency contour information layer. To simultaneously capture subtle texture changes and macroscopic object boundaries in the image, two different sized filtering windows are used in parallel processing. For example, a small window is set to preserve fine edges, and a large window is set to maintain the overall structure. Using the original hazy image (or its single-channel grayscale image) as the guiding image, the structure feature map is filtered and smoothed using the two windows mentioned above to obtain the corresponding low-frequency background components. Subsequently, the pixel values ​​of the original structure feature map are subtracted from the corresponding low-frequency background components to obtain a residual map containing only high-frequency information. The residual maps at different scales are fused (e.g., taking the maximum response value at the corresponding pixel position) to synthesize the high-frequency contour information layer. This process effectively separates high-frequency edge signals in the image through multi-scale difference operations.

[0068] It should be noted that the multi-scale processing aims to take into account edge structures with different thicknesses. In practice, a set of scale parameters can be predefined, such as a sequence of filtering radii in pixels, like 3, 7, and 15. For each scale, guided filtering is performed independently, and the difference between the original feature map and the filtering results of each scale is used as the high-frequency residual at that scale. The final high-frequency contour information layer can be formed by fusing the maximum absolute value (or weighted sum) of the residual maps at the corresponding pixel positions of all scales, thereby ensuring that edge structures of different sizes can be effectively captured.

[0069] Next, the local variance statistic of the high-frequency contour information layer is calculated. A local statistical window is defined, which traverses every pixel position in the high-frequency contour information layer. For all pixel values ​​within the window's coverage area, their statistical variance is calculated. This local variance statistic intuitively reflects the degree of fluctuation in pixel values ​​within a local region. Real object contours typically exhibit larger numerical fluctuations, while random background noise or smooth regions exhibit smaller numerical fluctuations.

[0070] Subsequently, the background noise distribution matrix is ​​removed from the high-frequency contour information layer based on the local variance statistics, yielding the stripped contour information. In this step, a preset noise variance threshold is set. This threshold is determined based on the statistical characteristics of flat regions in the image. Specifically, the sky or road surface region with the least texture in the image is selected as a reference, the average variance of this region is calculated, and a specific multiple of this average variance (e.g., 1.5 to 2 times) is used as the noise variance threshold. During processing, the local variance statistics of each pixel location are checked one by one. If the variance value at a certain location is lower than the threshold, the location is determined to be background noise, and its value in the high-frequency contour information layer is set to zero; if it is higher than the threshold, its original value is retained. In this way, messy noise is effectively stripped from the clear contours.

[0071] Furthermore, if the sharpness value of the stripped contour information is lower than a preset sharpness threshold, a mask for the region to be enhanced is generated, and a detail supplementation matrix is ​​constructed based on the mask. The preset sharpness threshold is set by calculating the average intensity value of all retained pixels in the stripped contour information and using a certain percentage (e.g., 50%) of this average intensity value as the sharpness threshold. Next, the average contour intensity of each local region is checked. If it is lower than the sharpness threshold, it indicates that the texture information of the region is weak or damaged and needs to be enhanced. These regions are marked in the mask to generate a mask for the region to be enhanced. For the marked regions in the mask, a high-pass filter (such as the Laplacian operator) is used to directly extract the high-frequency signal at the corresponding position from the original hazy image to construct a detail supplementation matrix to recover weak details that may have been lost during the stripping process.

[0072] It should be noted that the signal source for constructing the detailed supplementary matrix is ​​not the high-frequency part of the original image that is severely attenuated by fog. In fact, it is based on the mask of the region to be enhanced. The contour information after preliminary noise stripping but still insufficient clarity, or its association information with the intermediate image, is amplified by high-pass filtering, such as the Laplacian operator, to amplify its inherent, weak gradient change pattern. The purpose of constructing this matrix is ​​to perform homologous enhancement on the extracted but insufficient contour information.

[0073] Finally, the detail supplementation matrix and the stripped contour information are weighted and fused to obtain the optimized contour feature map. A linear weighting method is used: the stripped contour information is multiplied by a preservation weight coefficient (e.g., 0.6), and the detail supplementation matrix is ​​multiplied by an enhancement weight coefficient (e.g., 0.4). The products are then summed pixel-by-pixel. This fusion operation results in an optimized contour feature map that removes most of the fog interference noise while significantly enhancing key structural details.

[0074] In step S14, the pixel distribution of the hazy image is adjusted according to the optimized contour feature map to obtain an intermediate image, including:

[0075] The gradient magnitude information of the optimized contour feature map is extracted using the gradient operator to generate a region index matrix that distinguishes high-frequency texture regions from low-frequency background regions.

[0076] Calculate the cumulative probability density distribution for the low-frequency background region identified by the region index matrix, and construct a grayscale mapping model;

[0077] The grayscale mapping model is used to perform a brightness stretching transformation on the low-frequency background region to generate adjusted brightness component data.

[0078] The luminance component data and the high-frequency texture region are weighted and recombined to obtain an intermediate image.

[0079] Specifically, firstly, the pixel values ​​of the optimized contour feature map itself are extracted as structural strength values, and a region index matrix is ​​generated to distinguish high-frequency texture regions from low-frequency background regions based on their amplitude. During this process, the Prewitt operator or Sobel operator is used as the gradient operator to perform a convolution operation on the optimized contour feature map, calculating the gradient values ​​in the horizontal and vertical directions respectively, and using the vector composite magnitude of these two gradient values ​​as the gradient amplitude information. To distinguish between texture and background, a frequency segmentation threshold needs to be set. This threshold is set by statistically analyzing the average gradient amplitude of the entire optimized contour feature map and using a specific multiple of this average gradient amplitude as the frequency segmentation threshold, for example, 1.0 to 1.2 times. Each pixel in the image is traversed, and pixels with gradient amplitudes higher than the threshold are marked as 1, representing high-frequency texture regions, such as object edges or complex leaf textures; pixels with gradient amplitudes lower than the threshold are marked as 0, representing low-frequency background regions, such as the sky, road surface, or smooth areas covered by fog. This forms a binary matrix of the same size as the original image, i.e., the region index matrix.

[0080] It should be noted that the features on which the region index matrix for generating the distinction between high-frequency texture regions and low-frequency background regions depends should be the pixel values ​​of the optimized contour feature map itself, i.e., the structural intensity values, rather than its gradient; the frequency segmentation threshold is a statistical measure of the structural intensity value, such as the average value; specifically, the intensity value of each pixel in the optimized contour feature map is compared with the threshold, and regions with high intensity values ​​(corresponding to significant edges and textures) are indexed as high-frequency texture regions; regions with low or zero intensity values ​​(corresponding to flat or uniformly foggy regions) are indexed as low-frequency background regions; this correction ensures the consistency of the technical logic, that is, directly using the extracted and optimized structural features themselves to guide the differential processing of the image.

[0081] Next, the cumulative probability density distribution is calculated for the low-frequency background regions identified by the region index matrix, constructing a grayscale mapping model. Specifically, only the original grayscale values ​​corresponding to the pixel positions marked as 0 in the region index matrix are extracted. Grayscale histogram statistics are performed on these low-frequency background pixels to calculate the probability of each grayscale level. Then, starting from the smallest grayscale level, the probability values ​​are accumulated level by level to obtain the cumulative probability density distribution. This grayscale mapping model is essentially a nonlinear transformation function based on the cumulative probability density distribution. To avoid excessive amplification of background noise, the original distribution curve is not directly used as the mapping relationship; instead, it is smoothed and corrected. For example, a contrast threshold is introduced to clip the peaks of grayscale levels with excessively high frequencies in the histogram, redistributing the portion exceeding the threshold to other grayscale levels. Then, the cumulative probability density distribution is recalculated based on the corrected histogram, forming the final adaptive nonlinear grayscale mapping model. This model defines the mapping relationship between input grayscale values ​​and output grayscale values.

[0082] Subsequently, a grayscale mapping model is used to perform a brightness stretching transformation on the low-frequency background region, generating adjusted brightness component data. All pixels in the low-frequency background region are traversed, and their original grayscale values ​​are used as input, substituted into the aforementioned grayscale mapping model for calculation. This involves finding the corrected distribution curve to obtain the mapped new grayscale value. This process non-linearly stretches the background brightness distribution, originally concentrated in the dark or gray-white range, to a wider dynamic range, such as 0 to 255, making the dark areas of the background darker and the bright areas brighter, thereby enhancing the visual sense of depth.

[0083] Finally, the luminance component data and high-frequency texture regions are weighted and recombined to obtain an intermediate image. To enhance background contrast while maintaining the sharpness of object edges, a linear weighted superposition method is used for recombination. Two weighting coefficients are defined here: a background preservation coefficient and a texture enhancement coefficient. For example, the background preservation coefficient is set to 0.3 to 0.5, and the texture enhancement coefficient is set to 0.5 to 0.7, and their sum is usually 1. For each pixel in the image, if the pixel is located in a low-frequency background region, the adjusted luminance component data is mainly used; if the pixel is located in a high-frequency texture region, the weighted combination of high-frequency information in the optimized contour feature map and the original luminance is mainly used. Using a region index matrix as a soft switch, the adjusted background luminance data and the preserved high-frequency texture details are synthesized pixel by pixel according to the above weights, thereby generating an intermediate image with both a high-contrast background and a clear edge structure.

[0084] In step S15, a single-step inversion mapping function based on the fusion of structural features and pixel distribution is constructed. The intermediate image is substituted into the single-step inversion mapping function for mapping processing to obtain a dehazed image, including:

[0085] Construct the dark channel prior matrix of the intermediate image and extract the structural feature tensor of the intermediate image;

[0086] The structural feature tensor is used to perform weighted guided filtering on the dark channel prior matrix to obtain a transmittance distribution map. It should be noted that, to achieve adaptive processing for different fog concentrations, this method introduces a local fog concentration estimation mechanism in the transmittance estimation and subsequent enhancement stages. Specifically, based on the transmittance distribution map obtained in step S15, the mean transmittance of each local region is calculated as a fog concentration indicator for that region. In the detail enhancement stage of step S13 and the local sharpening correction stage of step S16, the filtering intensity, enhancement coefficient, and sharpening coefficient are dynamically adjusted according to this fog concentration factor: for regions with high fog concentration (low transmittance), the detail enhancement intensity and sharpening gain are appropriately increased to compensate for the loss of edge information caused by fog attenuation; for regions with low fog concentration (high transmittance), the enhancement intensity is reduced to avoid over-processing and introducing noise. This adaptive adjustment mechanism ensures the robustness and processing consistency of the algorithm under different fog concentration scenarios.

[0087] Construct a single-step inversion mapping function based on the aforementioned transmittance distribution map;

[0088] More specifically, this single-step inversion mapping function is constructed based on an atmospheric scattering physics model, and its mathematical expression is:

[0089] ;

[0090] Where I(x) is the pixel value at pixel x in the input intermediate image, A is the global atmospheric light value, t(x) is the value of the transmittance distribution map estimated in step S15 at pixel x, and t0 is the lower limit threshold of transmittance (usually set to 0.1) to avoid numerical instability or noise amplification due to excessively low transmittance. J(x) is the restored radiance value of the fog-free scene.

[0091] The physical meaning of this mapping function is that by subtracting the atmospheric light component from the hazy image and then dividing by the transmittance to compensate for the attenuation effect of fog on light, the true brightness of the original scene is ultimately restored. It should be noted that, unlike traditional methods that require multiple iterations to optimize transmittance, this method directly generates a refined transmittance through weighted guided filtering guided by structural features. This transmittance is then substituted into the aforementioned closed-form expression for a single calculation to obtain the dehazing result, avoiding repeated iterations and significantly improving computational efficiency.

[0092] Substitute the intermediate image into the single inversion mapping function to generate the scene radiance matrix;

[0093] The scene radiance matrix is ​​subjected to color space recombination and dynamic range normalization to obtain a dehazed image.

[0094] Specifically, first, a prior matrix for the dark channel of the intermediate image is constructed, and the structural feature tensor of the intermediate image is extracted. For constructing the dark channel prior matrix, each pixel in the intermediate image is traversed, and its pixel values ​​in the red, green, and blue channels are compared, selecting the minimum value. Then, a minimum value filtering window of a preset size is used, for example, a size of [missing information]. A rectangular window is used to filter the aforementioned minimum value image, and the minimum value within the window is assigned to the center pixel, thus obtaining the dark channel prior matrix reflecting the local fog concentration. Simultaneously, to obtain fine geometric information of the image, the gradients of the intermediate image in the horizontal and vertical directions are calculated. A Gaussian smoothing function is used to perform a weighted summation of the gradient products to construct the structural feature tensor corresponding to each pixel. This tensor is a... The symmetric matrix has eigenvalues ​​that directly characterize whether a pixel is located in a flat region, an edge region, or a corner region, providing structural guidance for subsequent transmittance optimization.

[0095] Next, a weighted guided filter is applied to the dark channel prior matrix using the structural feature tensor to obtain the transmittance distribution map. In this process, the intermediate image serves as the guide image, and the dark channel prior matrix serves as the input image. Unlike traditional guided filtering, a weighting mechanism based on the structural feature tensor is introduced here. Specifically, the trace or maximum eigenvalue of the structural feature tensor is calculated as an edge intensity index. In regions with high edge intensity, the smoothing strength of the filter is reduced or the regularization parameter is adjusted to maintain edge sharpness; in flat regions, the smoothing strength is increased to eliminate halo effects. Through this structure-weighted filtering operation, a refined transmittance distribution map is calculated, which accurately depicts the distribution of fog at different depths of the scene and maintains good fit at object edges.

[0096] It is worth noting that for each pixel, the maximum eigenvalue or the sum of eigenvalues ​​of its structural feature tensor is calculated, and this value is normalized and used as the structural saliency weight for that point. Within the local window of the guided filter solving for linear coefficients, a regularization term adjustment factor related to the structural saliency weight is introduced. For example, in flat regions where the structural saliency weight is small, a larger regularization parameter is used for strong smoothing to suppress block effects; in edge regions where the structural saliency weight is large, a smaller regularization parameter is used to protect the edges. By incorporating the structural saliency weight into the original normal equation of the guided filter, adaptive fine-grained smoothing of the transmittance estimation is achieved. In this way, the structural features substantially affect the transmittance estimation result by adjusting the local smoothing intensity of the filter.

[0097] Subsequently, a single-step inversion mapping function is constructed by combining the transmittance distribution map. This function is designed based on an atmospheric scattering physics model and aims to describe the mathematical relationship between fog-free scenes, foggy images, transmittance, and atmospheric light values. First, the global atmospheric light value is estimated, for example, by selecting the top 0.1% of the brightest pixels in the dark channel prior matrix, and taking the average color value of the corresponding position of these pixels in the intermediate image as the atmospheric light value. Based on this atmospheric light value and the transmittance distribution map, a linear inverse transformed function expression is constructed. This function is defined as: the target scene pixel value equals the intermediate image pixel value minus the atmospheric light value, the difference is divided by the corresponding transmittance, and finally the atmospheric light value is added.

[0098] Next, the intermediate image is substituted into a single-step inversion mapping function to generate the scene radiance matrix. Each pixel of the intermediate image is iterated over, and its RGB value is used as an input variable in the above function for calculation. To prevent overflow during division or excessive noise due to low transmittance, a lower transmittance threshold is set, for example, 0.1. When the transmittance value is below this threshold, it is forcibly set to 0.1. After performing this algebraic operation, the scene radiance matrix that restores the true scene lighting information is obtained.

[0099] Finally, the scene radiance matrix is ​​reorganized in color space and normalized in dynamic range to obtain a dehazed image. Since the radiance values ​​obtained through inversion calculations may exceed the standard display range (e.g., 0 to 255) or have color deviations, post-processing is required. Min-max normalization is performed on the data in the scene radiance matrix, linearly mapping it back to the valid grayscale range. Simultaneously, any potential color channel imbalances are checked and corrected to ensure a natural overall image tone. The processed three-channel data is then recombined to output a final dehazed image with vibrant colors and clear details.

[0100] In step S16, the sharpness of the dehazed image is verified using a preset edge detection model to obtain a gradient feature distribution matrix. Local sharpening correction is then applied to the blurred edge regions within the gradient feature distribution matrix to obtain the final dehazed image, including:

[0101] The dehazed image is input into a preset edge detection model based on the Sobel operator to generate a gradient feature distribution matrix;

[0102] Identify the pixel locations in the gradient feature distribution matrix where the gradient magnitude is lower than a preset gradient threshold, mark the pixel locations, and generate a mask for the region to be corrected;

[0103] Texture detail components are extracted based on the mask of the region to be corrected, and the difference ratio between the average gradient magnitude within the mask of the region to be corrected and the gradient threshold is calculated. The local sharpening coefficient is determined based on the difference ratio.

[0104] The texture detail component is weighted using the local sharpening coefficient to obtain an enhanced texture detail component, and the enhanced texture detail component is superimposed on the dehazed image to obtain the final dehazed image.

[0105] Specifically, the dehazed image is first input into a pre-defined Sobel-based edge detection model to generate a gradient feature distribution matrix. This model internally includes standard horizontal and vertical Sobel convolution kernels. When the dehazed image enters the model, the system performs convolution operations pixel-by-pixel, calculating the horizontal and vertical gradient components respectively. The square root of the sum of the squares of these two components is then used to determine the gradient magnitude of each pixel. The gradient magnitudes of all pixels are arranged according to their original coordinates to form the gradient feature distribution matrix. This matrix visually reflects the spatial distribution of edge intensity in the image.

[0106] Next, the pixel locations in the gradient feature distribution matrix whose gradient magnitude is lower than a preset gradient threshold are identified and marked to generate a mask for the region to be corrected. It is important to clarify the basis for setting the preset gradient threshold, which is determined based on the statistical characteristics of a large number of clear images. During system initialization, the gradient magnitude distribution of a batch of fog-free clear images is statistically analyzed, and the values ​​corresponding to specific percentiles (e.g., 40% to 50% percentiles) in the cumulative distribution function are selected as the gradient threshold. During the verification process, the gradient feature distribution matrix is ​​traversed, and pixels with magnitudes less than the threshold are identified as blurry points or weak edge points, marked as valid values ​​(e.g., 1) in the binarized mask. Pixels with magnitudes greater than or equal to the threshold are marked as invalid values ​​(e.g., 0), thus generating a mask for the region to be corrected.

[0107] Subsequently, texture detail components are extracted based on the mask of the area to be corrected, and the difference ratio between the average gradient magnitude and the gradient threshold within the mask of the area to be corrected is calculated. The local sharpening coefficient is determined based on the difference ratio. During operation, a high-pass filter (such as a Laplacian filter) is used to filter only the area covered by the mask, extracting weak high-frequency signals as texture detail components. Simultaneously, the gradient magnitude of all pixels within the mask area is statistically analyzed and its average value is calculated. The difference ratio is defined as the difference between the gradient threshold and this average value, divided by the gradient threshold. This ratio is a normalized value; a larger value indicates a higher degree of blur in the area and a greater gap from the sharpness standard. An adaptive mapping relationship is established to determine the local sharpening coefficient. For example, a base coefficient of 1.0 and a gain cap of 2.0 are set, and the sharpening coefficient is equal to the base coefficient plus the product of the difference ratio and the gain range. This design ensures that areas with more severe blur receive greater enhancement.

[0108] Finally, the texture detail component is weighted using a local sharpening coefficient to obtain an enhanced texture detail component, which is then superimposed on the dehazed image to obtain the final dehazed image. A multiplication operation is performed, multiplying each pixel value of the extracted texture detail component by the calculated local sharpening coefficient, significantly amplifying the originally weak edge signals. This enhanced component is then added back to the original dehazed image pixel by pixel. To prevent the superimposed value from exceeding the image display range (e.g., 0 to 255), truncation or dynamic range compression is performed to ensure the validity of the output data. After this step, the edges in the image that were blurred due to the smoothing effect of the dehazing algorithm are specifically sharpened and restored, significantly improving visual clarity.

[0109] In step S17, wavelet transform is performed on the final dehazed image to obtain low-frequency approximate subbands and high-frequency detail subbands, which are then encoded to generate optimized image data, including:

[0110] Perform a discrete wavelet transform on the final dehazed image to decompose it into a low-frequency approximate subband and a high-frequency detail subband;

[0111] Lossless predictive coding is performed on the low-frequency approximate subband to generate the infrastructure data stream;

[0112] Based on the energy distribution of the high-frequency detail subbands, key high-frequency details are screened to generate a high-frequency sparse feature matrix;

[0113] The basic structure data stream and the high-frequency sparse feature matrix are combined and arithmetically encoded to generate optimized image data.

[0114] Specifically, the final dehazed image is first subjected to a discrete wavelet transform, decomposing it into a low-frequency approximation subband and a high-frequency detail subband. During this process, a suitable transform basis function for image compression is selected, such as the Daubechies 9 / 7 wavelet or the Legall 5 / 3 wavelet. Low-pass filtering and high-pass filtering are applied to the rows and columns of the image, respectively, followed by downsampling. After this transform, the image is decomposed into four subbands: the low-frequency approximation subband LL, containing the main structural information; and the high-frequency detail subbands LH, HL, and HH, containing detail information in the horizontal, vertical, and diagonal directions, respectively. The low-frequency subband concentrates most of the image's energy, reflecting the overall contour and brightness distribution of the scene; while the high-frequency subband represents sparse texture edge signals.

[0115] Next, lossless predictive coding is performed on the low-frequency approximate subband to generate a basic structure data stream. Considering the extremely strong spatial correlation of low-frequency data, differential pulse code modulation (DPCM) is employed. The specific algorithm logic involves using the values ​​of the neighboring pixels to the left and above the current pixel to calculate the predicted value of the current pixel through linear weighting. Then, the residual between the actual pixel value and the predicted value is calculated. Since the residual values ​​are usually concentrated near zero, their entropy value is much smaller than the original pixel value. These residual data are then entropy-coded (e.g., Huffman coding) to generate a compact and lossless basic structure data stream, ensuring that the basic image quality remains intact after image restoration.

[0116] Subsequently, key high-frequency details are selected based on the energy distribution of the high-frequency detail subbands to generate a high-frequency sparse feature matrix. Here, the energy of a high-frequency coefficient is defined as the square of its value. The energy value of each coefficient in the LH, HL, and HH subbands is calculated to form an energy distribution map. To achieve a balance between compression ratio and detail preservation, an energy preservation threshold is set. This threshold is determined by calculating the total energy of the high-frequency subbands and finding a quantile such that the sum of the energies of coefficients above this quantile accounts for a specific proportion of the total energy, for example, 85% to 90%. The high-frequency subbands are traversed, retaining key coefficients with energy values ​​greater than this threshold; these coefficients typically correspond to significantly enhanced object edges after dehazing. Non-key coefficients with energy values ​​less than this threshold are directly set to zero. Through this thresholding process, the originally dense high-frequency data is transformed into a sparse matrix containing a large number of zero elements, i.e., the high-frequency sparse feature matrix.

[0117] Finally, arithmetic coding is performed on the combined basic structural data stream and the high-frequency sparse feature matrix to generate optimized image data. Arithmetic coding is an efficient entropy coding method that maps the entire input data stream to a real number interval between 0 and 1. The probability of each symbol appearing in the basic structural data stream and the high-frequency sparse feature matrix is ​​statistically analyzed, and the interval width is dynamically divided according to the probability. Symbols with higher probabilities are assigned to larger intervals, and symbols with lower probabilities are assigned to smaller intervals. By continuously subdividing the intervals, a binary code stream that can uniquely represent each interval is finally output. This code stream is encapsulated into a standard data packet format as the final optimized image data output. This data packet is small in size and retains key visual information, making it very suitable for bandwidth-constrained real-time transmission scenarios.

[0118] It should be noted that most adaptive thresholds in this method, such as contrast threshold, high-frequency judgment threshold, sharpness threshold, and gradient verification threshold, follow a unified setting principle. They are determined based on global statistics of the corresponding feature maps, such as the contrast distribution map, gradient magnitude matrix, and contour intensity map, such as the mean, median, and specific quantiles, multiplied by or added to an empirical coefficient. For example, the contrast threshold can be explicitly defined as the mean of all elements in the contrast analysis value distribution map multiplied by a coefficient, which can be between 0.3 and 0.4. The gradient verification threshold can be explicitly defined as the median of the gradient magnitude matrix of the dehazed image multiplied by a coefficient, which can be between 1.2 and 1.5. For the high-frequency judgment threshold used to extract candidate regions in step S12, it can be uniformly expressed as the mean of the gradient magnitude matrix plus 0.5 to 1.0 times its standard deviation. The specific value range of each coefficient can be obtained by tuning based on typical test sets, ensuring the adaptability and operability of the threshold setting.

[0119] It is worth noting that while this method involves multiple processing steps, its real-time advantage is primarily reflected in two aspects. First, the core dehazing step employs a single-step inversion mapping, eliminating the complex iterative processes such as iterative optimization and soft matting required in traditional physical models to accurately estimate atmospheric light and transmittance, thus significantly reducing the number of iterations and time required for the core dehazing operation. Second, each preprocessing and postprocessing step, such as gradient analysis, filtering, enhancement, and sharpening, can be implemented using highly parallelized local operators, such as convolution and pixel-by-pixel operations, making it highly suitable for pipelined or parallel acceleration on GPUs, DSPs, or dedicated image processors. The entire process is designed as a feedforward, loop-free structure, ensuring deterministic and predictable processing latency. Therefore, compared to traditional high-quality dehazing algorithms that rely on iterative loops, this solution maintains detail recovery capabilities while offering significant advantages in computational efficiency, meeting the real-time frame rate processing requirements of scenarios such as autonomous driving and video surveillance.

[0120] In summary, this invention discloses a structure-aware single-step image dehazing method, which includes performing pixel distribution analysis and fog region segmentation on a foggy image; extracting key structural clues based on the segmentation results using local gradient analysis; using a filtering mechanism to remove fog interference and enhance contour information for detail; generating an intermediate image by combining contrast enhancement and dynamic range expansion; constructing a single-step inversion mapping function that fuses structural features and pixel distribution to quickly map the intermediate image to generate a dehazed image; and using an edge detection model to verify sharpness and perform local sharpening correction on blurred areas. This solves the problem in existing technologies where dehazing processing cannot simultaneously achieve real-time performance and detail fidelity.

[0121] Reference Figure 2 The second embodiment of the present invention provides a structure-aware single-step image dehazing system, comprising:

[0122] The fog region segmentation module is used to acquire the input foggy image, perform pixel distribution analysis on the foggy image to obtain the original pixel distribution information, and perform fog region segmentation based on the original pixel distribution information to obtain the fog-affected area map.

[0123] The structural feature extraction module is used to perform local gradient analysis based on the fog-affected area map, extract high-frequency details and contour information, and determine the location of key structural clues based on the high-frequency details and contour information to obtain a structural feature mapping map.

[0124] The interference stripping and optimization module is used to perform fog interference stripping processing on the structural feature map using a preset filtering mechanism to obtain the stripped contour information, and to perform detail enhancement processing on the stripped contour information to obtain an optimized contour feature map.

[0125] An intermediate image generation module is used to adjust the pixel distribution of the hazy image based on the optimized contour feature map to obtain an intermediate image;

[0126] The single-step dehazing mapping module is used to construct a single-step inversion mapping function based on the fusion of structural features and pixel distribution. The intermediate image is substituted into the single-step inversion mapping function for mapping processing to obtain the dehazed image.

[0127] The edge verification and correction module is used to verify the sharpness of the dehazed image using a preset edge detection model, obtain a gradient feature distribution matrix, and perform local sharpening correction on the blurred edge areas in the gradient feature distribution matrix to obtain the final dehazed image.

[0128] The data compression output module is used to perform wavelet transform on the final dehazed image to obtain low-frequency approximate subbands and high-frequency detail subbands, and then encode them to generate optimized image data.

[0129] It should be noted that the structure-aware single-step image dehazing system provided in this embodiment of the invention is used to execute all the process steps of the structure-aware single-step image dehazing method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0130] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0131] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A structure-aware, single-step image dehazing method, characterized in that, include: The input foggy image is acquired, and pixel distribution analysis is performed on the foggy image to obtain the original pixel distribution information. Then, the fog region is segmented based on the original pixel distribution information to obtain the fog-affected area map. Based on the fog-affected area map, local gradient analysis is performed to extract high-frequency details and contour information. The location of key structural clues is determined based on the high-frequency details and contour information to obtain a structural feature mapping map. The structure feature map is subjected to fog interference removal processing using a preset filtering mechanism to obtain the stripped contour information, and the stripped contour information is subjected to detail enhancement processing to obtain an optimized contour feature map. The pixel distribution of the foggy image is adjusted based on the optimized contour feature map to obtain an intermediate image; A single-step inversion mapping function based on the fusion of structural features and pixel distribution is constructed. The intermediate image is substituted into the single-step inversion mapping function for mapping processing to obtain a dehazed image. The sharpness of the dehazed image is verified using a preset edge detection model to obtain a gradient feature distribution matrix. Local sharpening correction is then performed on the blurred edge regions in the gradient feature distribution matrix to obtain the final dehazed image. The final dehazed image is subjected to wavelet transform to obtain low-frequency approximate subbands and high-frequency detail subbands, which are then encoded to generate optimized image data.

2. The structure-aware single-step image dehazing method according to claim 1, characterized in that, The step of performing pixel distribution analysis on the foggy image to obtain original pixel distribution information, and then segmenting the foggy region based on the original pixel distribution information to obtain a fog-affected area map, includes: The local brightness difference is calculated based on the original pixel distribution matrix of the foggy image, and a contrast analysis value distribution map is generated. If the local region value in the contrast analysis value distribution map is lower than the preset contrast threshold, then the grayscale distribution features of the local region are extracted, the boundary range of the fogged area is locked, and a binary logic mask is generated based on the boundary range. The binarized logical mask is overlaid onto the foggy image to obtain a fog-affected area map.

3. The structure-aware single-step image dehazing method according to claim 1, characterized in that, The process of performing local gradient analysis based on the fog-affected area map, extracting high-frequency details and contour information, and determining the location of key structural clues based on the high-frequency details and contour information to obtain a structural feature mapping map includes: Construct the pixel neighborhood matrix of the fog-affected area map, and use the discrete differential operator to convolve the pixel neighborhood matrix to obtain the gradient components; A gradient magnitude matrix is ​​synthesized based on the gradient components, and high-frequency detail candidate regions are extracted based on the gradient magnitude matrix; A structure tensor matrix is ​​constructed for the high-frequency detail candidate region, and pixels whose feature values ​​in the structure tensor matrix satisfy the preset linear structure condition are selected as key structural clues. By aggregating the key structural clues, a structural feature mapping map is generated.

4. The structure-aware single-step image dehazing method according to claim 1, characterized in that, The process of using a preset filtering mechanism to remove fog interference from the structural feature map to obtain the stripped contour information includes: The structural feature map is convolved using a multi-scale guided filter operator to decompose it into a high-frequency contour information layer. Calculate the local variance statistics of the high-frequency contour information layer; The background noise distribution matrix is ​​removed from the high-frequency contour information layer based on the local variance statistics to obtain the stripped contour information; wherein, the background noise distribution matrix is ​​obtained by analyzing the low variance region in the high-frequency contour information layer.

5. The structure-aware single-step image dehazing method according to claim 1, characterized in that, The step of performing detail enhancement processing on the stripped contour information to obtain an optimized contour feature map includes: If the sharpness value of the stripped contour information is lower than the preset sharpness threshold, a mask for the region to be enhanced is generated, and a detail supplementation matrix is ​​constructed based on the mask for the region to be enhanced. The detailed supplementary matrix is ​​weighted and fused with the stripped contour information to obtain an optimized contour feature map.

6. The structure-aware single-step image dehazing method according to claim 1, characterized in that, The step of adjusting the pixel distribution of the hazy image based on the optimized contour feature map to obtain an intermediate image includes: The gradient magnitude information of the optimized contour feature map is extracted using the gradient operator to generate a region index matrix that distinguishes high-frequency texture regions from low-frequency background regions. Calculate the cumulative probability density distribution for the low-frequency background region identified by the region index matrix, and construct a grayscale mapping model; The grayscale mapping model is used to perform a brightness stretching transformation on the low-frequency background region to generate adjusted brightness component data. The luminance component data and the high-frequency texture region are weighted and recombined to obtain an intermediate image.

7. The structure-aware single-step image dehazing method according to claim 1, characterized in that, The construction of a single-step inversion mapping function based on the fusion of structural features and pixel distribution, and the substituting the intermediate image into the single-step inversion mapping function for mapping processing to obtain a dehazed image, includes: Construct the dark channel prior matrix of the intermediate image and extract the structural feature tensor of the intermediate image; The transmittance distribution map is obtained by performing a weighted guided filter on the dark channel prior matrix using the structural feature tensor. Construct a single-step inversion mapping function based on the aforementioned transmittance distribution map; Substitute the intermediate image into the single inversion mapping function to generate the scene radiance matrix; The scene radiance matrix is ​​subjected to color space recombination and dynamic range normalization to obtain a dehazed image.

8. The structure-aware single-step image dehazing method according to claim 1, characterized in that, The process of using a pre-set edge detection model to verify the sharpness of the dehazed image, obtaining a gradient feature distribution matrix, and then performing local sharpening correction on the blurred edge regions in the gradient feature distribution matrix to obtain the final dehazed image includes: The dehazed image is input into a preset edge detection model based on the Sobel operator to generate a gradient feature distribution matrix; Identify the pixel locations in the gradient feature distribution matrix where the gradient magnitude is lower than a preset gradient threshold, mark the pixel locations, and generate a mask for the region to be corrected; Based on the mask of the region to be corrected, extract the texture detail components, calculate the difference ratio between the average gradient magnitude within the mask of the region to be corrected and the gradient threshold, and determine the local sharpening coefficient based on the difference ratio; The texture detail component is weighted using the local sharpening coefficient to obtain an enhanced texture detail component, and the enhanced texture detail component is superimposed on the dehazed image to obtain the final dehazed image.

9. A structure-aware, single-step image dehazing method according to claim 1, characterized in that, The process of performing wavelet transform on the final dehazed image to obtain low-frequency approximate subbands and high-frequency detail subbands, and then encoding them to generate optimized image data includes: Perform a discrete wavelet transform on the final dehazed image to decompose it into a low-frequency approximate subband and a high-frequency detail subband; Lossless predictive coding is performed on the low-frequency approximate subband to generate the infrastructure data stream; Based on the energy distribution of the high-frequency detail subbands, key high-frequency details are screened to generate a high-frequency sparse feature matrix; The basic structure data stream and the high-frequency sparse feature matrix are combined and arithmetically encoded to generate optimized image data.

10. A structure-aware, single-step image dehazing system, characterized in that, include: The fog region segmentation module is used to acquire the input foggy image, perform pixel distribution analysis on the foggy image to obtain the original pixel distribution information, and perform fog region segmentation based on the original pixel distribution information to obtain the fog-affected area map. The structural feature extraction module is used to perform local gradient analysis based on the fog-affected area map, extract high-frequency details and contour information, and determine the location of key structural clues based on the high-frequency details and contour information to obtain a structural feature mapping map. The interference stripping and optimization module is used to perform fog interference stripping processing on the structural feature map using a preset filtering mechanism to obtain the stripped contour information, and to perform detail enhancement processing on the stripped contour information to obtain an optimized contour feature map. An intermediate image generation module is used to adjust the pixel distribution of the hazy image based on the optimized contour feature map to obtain an intermediate image; The single-step dehazing mapping module is used to construct a single-step inversion mapping function based on the fusion of structural features and pixel distribution. The intermediate image is substituted into the single-step inversion mapping function for mapping processing to obtain the dehazed image. The edge verification and correction module is used to verify the sharpness of the dehazed image using a preset edge detection model, obtain a gradient feature distribution matrix, and perform local sharpening correction on the blurred edge areas in the gradient feature distribution matrix to obtain the final dehazed image. The data compression output module is used to perform wavelet transform on the final dehazed image to obtain low-frequency approximate subbands and high-frequency detail subbands, and then encode them to generate optimized image data.