Windshield condensation fog image generation method and system based on multi-physical field coupling
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING JIAOTONG UNIV
- Filing Date
- 2026-05-14
- Publication Date
- 2026-08-07
AI Technical Summary
[0006]针对上述现有技术的不足,本发明所要解决的技术问题是:如何提供一种基于多物理场耦合的挡风玻璃凝结雾图像生成方法及系统,用于解决现有合成方法依赖场景深度导致物理失真、真实数据难以规模化获取的问题,为挡风玻璃雾气视觉检测模型提供具有物理一致性的高质量训练数据
[0068]The windshield condensation fog image generation method of this invention does not rely on random or simplified assumptions. Instead, it accurately recreates real physical boundaries such as dashboard heat dissipation, human respiration moisture sources, and solar radiation by simulating modules such as solid-fluid heat transfer, laminar flow, and rarefaction material transport. Through a modeling method based on thermodynamic mechanisms, the generated temperature field and water vapor concentration field can realistically reflect the microscopic environment of fog formation on the windshield surface. Simultaneously, this invention converts water vapor concentration into relative humidity and calculates local dew point temperature using the Magnus-Tetens approximation formula, enabling the generated effective condensation temperature difference field to accurately define the spatiotemporal location of fog occurrence (i.e., the area where the glass surface temperature is lower than the dew point temperature). This causal-based driving mechanism ensures that the subsequently generated fog distribution is not only highly similar to real fogging in macroscopic morphology (such as burr-like edges and accumulated bottoms) but also maintains consistency in microscopic physical causes. Therefore, the data generated by this invention has extremely high semantic credibility, providing a solid data foundation for training visual detection models capable of understanding real physical scenes.
Smart Images

Figure CN122530360A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent vehicle visual perception technology, specifically to a method and system for generating windshield condensation fog images based on multi-physics coupling. Background Technology
[0002] With the rapid development of autonomous driving and advanced driver assistance systems (ADAS) technologies, in-vehicle vision perception systems are playing an increasingly important role in driving safety. During autumn and winter driving, the temperature and humidity difference between the inside and outside of the vehicle makes it prone to condensation on the windshield, forming a fog layer that obstructs vision. This phenomenon not only significantly reduces driver visibility but also seriously interferes with vision-based perception algorithms.
[0003] Existing technologies specify clear requirements for windshield defogging: within the driver's core line-of-sight area (Area A), fogging should be allowed to cover only 10% of the area within 10 minutes of the defogging system being activated. However, existing defogging solutions largely rely on dew point estimation methods using temperature and humidity sensors, which suffer from low spatial resolution and response lag. Image-based detection methods using computer vision can directly perceive fog distribution from the imaging end, representing a more promising solution.
[0004] The primary challenge in developing a data-driven visual detection model for windshield fog is the lack of large-scale, high-quality training data. Real-world windshield fogging data is difficult to collect on a large scale due to weather conditions, and existing image synthesis methods are all based on classical atmospheric scattering models, using scene depth maps as the driving variable for transmittance. However, windshield condensation fog and natural atmospheric fog differ fundamentally in their physical mechanisms: the transmittance of natural atmospheric fog decreases exponentially with increasing scene depth; while windshield condensation fog adheres to the glass surface, and its spatial distribution is determined by the glass surface temperature field and local airflow, and is not directly related to scene depth. Directly applying depth-information-dependent synthesis methods to windshield scenes inevitably leads to physical distortion of the synthesized data, making it unsuitable for effectively supporting the training of visual detection models.
[0005] Therefore, the existing technology has the following problems: (1) It is difficult to acquire windshield condensation fog data on a large scale, which restricts the training and evaluation of data-driven methods; (2) The existing synthesis methods rely on the classic assumption of scene depth, which systematically fails in the windshield condensation fog scene, resulting in physical distortion of the synthesized data; (3) There is a lack of physical modeling methods for windshield condensation fog characteristics, making it difficult to generate synthesized data with physical consistency. Summary of the Invention
[0006] To address the shortcomings of the existing technologies, the technical problem to be solved by this invention is: how to provide a method and system for generating windshield condensation fog images based on multi-physics coupling, in order to solve the problems of physical distortion caused by the reliance on scene depth in existing synthesis methods and the difficulty in obtaining real data on a large scale, and to provide high-quality training data with physical consistency for windshield fog visual detection models.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0008] A method for generating images of condensation fog on car windshields based on multi-physics coupling includes:
[0009] S1: Simulation is performed based on the in-vehicle multiphysics coupling simulation model to generate the temperature field and water vapor concentration field on the windshield surface; the temperature field and water vapor concentration field include the temperature and water vapor concentration of each pixel on the windshield surface.
[0010] S2: Based on the temperature field and water vapor concentration field of the windshield surface, calculate the effective condensation temperature difference field of the windshield surface; where the effective condensation temperature difference field includes the effective condensation temperature difference of each pixel on the windshield surface;
[0011] S3: Input the effective condensation temperature difference field on the windshield surface into the transmittance attenuation model that replaces the scene depth information with the temperature difference field, and generate a pixel-level transmittance map of the windshield.
[0012] S4: By combining a clear scene image with the effective condensation temperature difference field of the windshield, a local scattering brightness map of the windshield is generated.
[0013] S5: Perform image synthesis on the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield to generate a composite image of windshield condensation fog; perform pixel-level transmittance annotation on the composite image of windshield condensation fog based on the pixel-level transmittance map of the windshield.
[0014] S6: Repeat steps S1 to S5 to generate a labeled dataset containing a composite image of windshield condensation and its pixel-level transmittance.
[0015] Preferably, in step S1, the temperature field and water vapor concentration field on the windshield surface are generated through the following steps:
[0016] S101: Establish an in-vehicle simulation model on a multiphysics simulation platform, including the windshield, dashboard, air domain, and / or breathing heat source.
[0017] S102: Perform multiphysics coupling on the in-vehicle simulation model to generate an in-vehicle multiphysics coupling simulation model for joint solution of the three fields of heat, humidity and flow.
[0018] S103: In the multi-physics coupling simulation model inside the vehicle, the solar radiation heat flux is used as the boundary condition of the outer surface of the windshield, and the heat and water vapor generated by human respiration are used as the internal volume source terms for time-domain transient numerical simulation.
[0019] S104: Perform linear interpolation on the discrete point data output from the time-domain transient numerical simulation to generate a spatially continuous temperature field and water vapor concentration field on the windshield surface.
[0020] Preferably, in step S102, the multiphysics coupling of the in-vehicle simulation model includes the coupling of solid and fluid heat transfer modules, laminar flow modules, rare matter transfer modules and / or non-isothermal flow modules.
[0021] Solid and fluid heat transfer module, used to simulate heat conduction between the dashboard, windshield and air;
[0022] The laminar flow module is used to simulate natural convection within the air domain;
[0023] A rare substance transport module is used to simulate the diffusion and transport of moisture released during human respiration;
[0024] The non-isothermal flow module is used to couple temperature with fluid density and viscosity to achieve natural convection modeling.
[0025] Preferably, in step S2, the effective condensation temperature difference field on the windshield surface is calculated through the following steps:
[0026] S201: The water vapor concentration field on the windshield surface is converted into the relative humidity of each pixel on the windshield surface by using the gas state equation and the saturated water vapor pressure formula;
[0027] S202: Calculate the local dew point temperature based on the relative humidity of each pixel on the windshield surface using the spatialized form of the Magnus-Tetens approximation formula;
[0028] The spatialized form of the Magnus-Tetens approximation formula is expressed as:
[0029] ;
[0030] ;
[0031] In the formula: Indicates the local dew point temperature; Indicates the surface temperature of the windshield; Indicates relative humidity; , This indicates the set empirical parameters;
[0032] S203: Calculate the difference between the temperature of each pixel on the windshield surface and the local dew point temperature, and take the positive part of the difference as the effective condensation temperature difference field on the windshield surface.
[0033] Preferably, in step S3, the pixel-level transmittance map of the windshield is generated through the following steps:
[0034] S301: Normalize the effective condensation temperature difference field on the windshield surface and introduce a minimum amount to obtain the normalized temperature difference field.
[0035] S302: Constructing a transmittance attenuation model based on a normalized temperature difference field, which replaces scene depth information with a temperature difference field;
[0036] The formula for the transmittance attenuation model is expressed as:
[0037] ;
[0038] In the formula: A pixel-level transmittance map of the windshield; Represents the normalized temperature difference field; Indicates the scattering intensity coefficient;
[0039] S303: Input the normalized temperature difference field into the transmittance attenuation model to calculate the transmittance of each pixel and generate a pixel-level transmittance map.
[0040] Preferably, in step S4, the local scattering brightness map of the windshield is generated through the following steps:
[0041] S401: Extract the local mean of a clear scene image;
[0042] S402: Mix the local mean of the clear scene image with the white base to obtain the basic scattering brightness map;
[0043] S403: Linearly map the normalized temperature difference field to generate the temperature difference modulation coefficient;
[0044] S404: Multiply the base scattering brightness map by the temperature difference modulation coefficient to obtain the local scattering brightness of each pixel, and generate the local scattering brightness map of the windshield.
[0045] The formula is expressed as:
[0046] ;
[0047] In the formula: A diagram showing the localized scattered brightness of the windshield; Indicates the temperature difference modulation coefficient; This represents the basic scattering brightness diagram.
[0048] Preferably, in step S5, during the image synthesis of the clear scene image, the local scattering brightness map, and the pixel-level transmittance map of the windshield, fog effect superposition is only performed on the condensation fog pixel area. That is, the synthesized image of windshield condensation fog is equal to the product of the clear scene image and the corresponding transmittance, plus the product of the local scattering brightness map and the corresponding transmittance margin; the pixels in the non-fog area keep their original values unchanged.
[0049] The formula is expressed as:
[0050] ;
[0051] In the formula: This represents a composite image of condensation on the windshield. Represents a clear scene image; This represents a local scattering brightness map; This represents a pixel-level transmittance map.
[0052] A system for generating images of condensation fog on automotive windshields based on multi-physics coupling includes:
[0053] The simulation calculation module is used to perform simulations based on the in-vehicle multi-physics coupled simulation model to generate the temperature field and water vapor concentration field on the windshield surface.
[0054] The transmittance modeling module is used to calculate the effective condensation temperature difference field on the windshield surface based on the temperature field and water vapor concentration field on the windshield surface; the effective condensation temperature difference field on the windshield surface is input into the transmittance attenuation model that replaces the scene depth information with the temperature difference field to generate a pixel-level transmittance map of the windshield.
[0055] The image synthesis module is used to generate a local scattering brightness map of the windshield by combining a clear scene image with the effective condensation temperature difference field of the windshield; to synthesize the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield to generate a synthesized image of windshield condensation fog; and to annotate the synthesized image of windshield condensation fog with pixel-level transmittance based on the pixel-level transmittance map of the windshield, generating an annotated dataset containing the synthesized image of windshield condensation fog and its pixel-level transmittance.
[0056] Preferably, it also includes a hardware verification module;
[0057] The hardware verification module includes:
[0058] The image acquisition submodule is used to acquire real-time images of the windshield;
[0059] The data transmission submodule is used to transmit the acquired real-time images of the windshield;
[0060] The cloud-based inference submodule is used to train a lightweight windshield fog visual detection model using a labeled dataset containing composite images of windshield condensation fog and their pixel-level transmittance. The model then inputs real-time images of the windshield into the trained windshield fog visual detection model and outputs the corresponding pixel-level transmittance distribution map and average transmittance value.
[0061] The control execution submodule is used to generate control signals based on the pixel-level transmittance distribution map and the average transmittance value, and to control the operation of the defogging device based on the control signals.
[0062] Preferably, the control execution submodule generates control signals through a hierarchical control strategy to control the operation of the defogging device;
[0063] The logic of a hierarchical control strategy includes:
[0064] The average transmittance value of the pixel-level transmittance distribution map is defined as the mean of all pixel values in the pixel-level transmittance distribution map.
[0065] Fog concentration is defined as 1 minus the average transmittance value. When the pixel-level transmittance distribution map is completely clear, the average transmittance value is approximately 1, and the fog concentration is approximately 0. When the fog is severe, the average transmittance value tends to 0, and the fog concentration tends to 1.
[0066] The design employs a three-level control strategy: when the fog concentration is below the first threshold, it is determined to be light fog with limited visibility impact, and there is no need to activate the defogging device; when the fog concentration is between the first and second thresholds, it is determined to be moderate fog, and the defogging device is activated in low-power mode; when the fog concentration is above or equal to the second threshold, it is determined to be heavy fog, and the defogging device is activated in full-power mode.
[0067] Compared with existing technologies, the windshield condensation fog image generation method and system based on multi-physics coupling in this invention have the following advantages:
[0068] The windshield condensation fog image generation method of this invention does not rely on random or simplified assumptions. Instead, it accurately recreates real physical boundaries such as dashboard heat dissipation, human respiration moisture sources, and solar radiation by simulating modules such as solid-fluid heat transfer, laminar flow, and rarefaction material transport. Through a modeling method based on thermodynamic mechanisms, the generated temperature field and water vapor concentration field can realistically reflect the microscopic environment of fog formation on the windshield surface. Simultaneously, this invention converts water vapor concentration into relative humidity and calculates local dew point temperature using the Magnus-Tetens approximation formula, enabling the generated effective condensation temperature difference field to accurately define the spatiotemporal location of fog occurrence (i.e., the area where the glass surface temperature is lower than the dew point temperature). This causal-based driving mechanism ensures that the subsequently generated fog distribution is not only highly similar to real fogging in macroscopic morphology (such as burr-like edges and accumulated bottoms) but also maintains consistency in microscopic physical causes. Therefore, the data generated by this invention has extremely high semantic credibility, providing a solid data foundation for training visual detection models capable of understanding real physical scenes.
[0069] This invention utilizes a normalized effective condensation temperature difference field as the independent variable to construct an exponential decay model conforming to the Beer-Lambert law, which aligns with the physical law of light scattering and attenuation in condensed fog layers. A larger temperature difference means easier condensation, resulting in lower transmittance and denser fog. This invention's modeling method abandons the depth-dependent assumptions of traditional atmospheric scattering models, enabling the generated pixel-level transmittance map to accurately reflect the spatial distribution differences in fog droplet density on the glass surface. Visually, the fog effect boundary transitions generated by this invention's temperature-difference-based exponential model are natural. Therefore, the transmittance map generated by this invention exhibits a high degree of consistency with real fog in statistical characteristics, effectively supporting the training and evaluation of high-precision defogging algorithms.
[0070] This invention innovatively extracts the local mean of a clear image and mixes it with a white base. Then, spatial modulation is performed using a temperature difference modulation coefficient. This results in areas with high fog concentration (large temperature difference) where the scattering brightness is not only affected by global illumination but also significantly brightened due to the dense scattering of local fog droplets, presenting a realistic "local whitening" phenomenon. This accurately simulates the physical process of light being scattered multiple times by micron-sized droplets on a glass surface. In the image synthesis stage, this invention fuses a clear scene image, a local scattering brightness map, and a transmittance map based on a physical formula to generate a realistic image that includes background information and is obscured by fog. Simultaneously, the pixel-level transmittance map directly generated based on the physical model serves as ground truth annotation, obtaining massive amounts of training data with precise physical parameters without manual annotation. The images generated by this invention's synthesis method highly match the windshield fogging situation in real driving environments in terms of both statistical and semantic features, providing a high-quality training foundation for autonomous driving visual perception systems. Attached Figure Description
[0071] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:
[0072] Figure 1 A schematic diagram illustrating the physical mechanism of fogging on a car windshield.
[0073] Figure 2 This is a logic block diagram of a method for generating images of condensation fog on a car windshield based on multi-physics coupling.
[0074] Figure 3 This is a logic block diagram of a system for generating images of condensation fog on a car windshield based on multi-physics coupling. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0076] The following detailed explanation illustrates the specific implementation methods:
[0077] Example 1:
[0078] like Figure 1 As shown, the applicant discovered that windshield fogging is a surface condensation process driven by thermodynamic conditions. Its physical mechanism differs fundamentally from natural atmospheric fog and is unrelated to scene depth. When the windshield surface temperature is lower than or equal to the dew point temperature of the air inside the vehicle, water vapor in the air condenses on the glass surface, forming a layer of micron-sized droplets. These droplets significantly scatter incident light, reducing transmittance and weakening image contrast, ultimately leading to blurred vision for the driver and increasing driving safety risks. This process consists of four components: high-temperature, high-humidity air inside the vehicle, low-temperature glass surface, water vapor condensation, and light scattering.
[0079] This embodiment discloses a method for generating images of condensation fog on a car windshield based on multi-physics coupling.
[0080] like Figure 2As shown, a method for generating images of condensation fog on a car windshield based on multi-physics coupling includes:
[0081] S1: Simulation is performed based on the in-vehicle multiphysics coupling simulation model to generate the temperature field and water vapor concentration field on the windshield surface; the temperature field and water vapor concentration field include the temperature and water vapor concentration of each pixel on the windshield surface.
[0082] S2: Based on the temperature field and water vapor concentration field of the windshield surface, calculate the effective condensation temperature difference field of the windshield surface; where the effective condensation temperature difference field includes the effective condensation temperature difference of each pixel on the windshield surface;
[0083] S3: Input the effective condensation temperature difference field on the windshield surface into the transmittance attenuation model that replaces the scene depth information with the temperature difference field, and generate a pixel-level transmittance map of the windshield.
[0084] S4: By combining a clear scene image with the effective condensation temperature difference field of the windshield, a local scattering brightness map of the windshield is generated.
[0085] S5: Perform image synthesis on the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield to generate a composite image of windshield condensation fog; perform pixel-level transmittance annotation on the composite image of windshield condensation fog based on the pixel-level transmittance map of the windshield.
[0086] S6: Repeat steps S1 to S5 to generate a labeled dataset containing composite images of windshield condensation fog and their pixel-level transmittance, which will be used to train a windshield fog visual detection model.
[0087] The beneficial effects of this invention include:
[0088] (1) Breaking through the classic assumption that existing synthesis methods rely on scene depth, a transmittance model is constructed based on the thermodynamic physical mechanism of windshield fogging. The generated synthetic data and real condensation fog images have high consistency in both statistical and semantic features.
[0089] (2) The local scattering brightness modulation model more accurately describes the physical characteristics of non-uniform scattering of fog droplets.
[0090] (3) The embedded end-to-cloud collaborative prototype system provides a closed-loop engineering verification method, which verifies the feasibility of the synthesis method in actual driving scenarios.
[0091] To better illustrate the technical solution of the present invention, this embodiment will be described in more detail through the following parts.
[0092] I. Multiphysics Simulation
[0093] In the specific implementation process, the temperature field and water vapor concentration field on the windshield surface are generated through the following steps:
[0094] S101: Establish an in-vehicle simulation model on a multiphysics simulation platform, including a windshield, dashboard, air domain, and / or breathing heat source; in order to obtain physical data that can realistically reflect the temperature and humidity distribution on the glass surface under fogging conditions inside the vehicle, construct a simplified in-vehicle simulation model on the multiphysics simulation platform. The model includes four main components: windshield, dashboard, air domain, and breathing heat source.
[0095] S102: Perform multiphysics coupling on the in-vehicle simulation model to generate an in-vehicle multiphysics coupling simulation model for joint solution of the three fields of heat, humidity and flow.
[0096] The multiphysics coupling of the in-vehicle simulation model includes the coupling of solid and fluid heat transfer modules, laminar flow modules, rare matter transfer modules and / or non-isothermal flow modules;
[0097] Solid and fluid heat transfer module, used to simulate heat conduction between the dashboard, windshield and air;
[0098] The laminar flow module is used to simulate natural convection within the air domain;
[0099] A rare substance transport module is used to simulate the diffusion and transport of moisture released during human respiration;
[0100] The non-isothermal flow module is used to couple temperature with fluid density and viscosity to achieve natural convection modeling.
[0101] S103: In the multi-physics coupling simulation model inside the vehicle, the solar radiation heat flux is used as the boundary condition of the outer surface of the windshield, and the heat and water vapor generated by human respiration are used as the internal volume source terms for time-domain transient numerical simulation, with a time range of 0 to 200 seconds.
[0102] The boundary conditions are set as follows: solar radiation heat flux is applied to the outer surface of the glass as an external thermal excitation; a constant power heat source and a water vapor volume source term are loaded in the breathing heat source region. The metabolic rate of the human body at rest is approximately 58.15 watts per square meter, and the total power is 80 to 100 watts, of which breathing heat accounts for approximately 25% to 35%. The simulation time range is 0 to 200 seconds, with a step size of 0.1 seconds. The initial conditions are a temperature of 293 K, zero water vapor concentration, and zero velocity.
[0103] Among them, the temperature field control equation is based on the law of conservation of energy, and the water vapor transport control equation is based on the law of conservation of mass. The two are solved by multi-physics coupling through a non-isothermal flow module.
[0104] S104: Perform linear interpolation on the discrete point data output from the time-domain transient numerical simulation to generate a spatially continuous temperature field and water vapor concentration field on the windshield surface.
[0105] After the simulation is completed, the exported discrete point data is spatially reconstructed using a linear interpolation method to obtain a continuous glass surface temperature field and water vapor concentration field, providing high-quality continuous input data for subsequent transmittance calculations.
[0106] II. Effective condensation temperature difference field
[0107] In the specific implementation process, the effective condensation temperature difference field on the windshield surface is calculated through the following steps:
[0108] S201: The water vapor concentration field on the windshield surface is converted into the relative humidity of each pixel on the windshield surface by using the gas state equation and the saturated water vapor pressure formula;
[0109] The relative humidity was obtained by converting the water vapor molar concentration field obtained from the simulation into the gas state equation and the saturated water vapor pressure formula. The saturated water vapor pressure was calculated based on the Antoine equation.
[0110] S202: Calculate the local dew point temperature based on the relative humidity of each pixel on the windshield surface using the spatialized form of the Magnus-Tetens approximation formula;
[0111] The spatialized form of the Magnus-Tetens approximation formula is expressed as:
[0112] ;
[0113] ;
[0114] In the formula: Indicates the local dew point temperature; Indicates the surface temperature of the windshield; Indicates relative humidity; , This indicates the set empirical parameters;
[0115] Transmittance calculations depend on the spatial distribution of local dew point temperature and glass surface temperature. The dew point temperature is calculated using a spatialized form of the Magnus-Tetens approximation, applicable to a temperature range of 0°C to 60°C and a relative humidity range of 0% to 100%, based on empirical parameters. Take 17.27, Take 237.7 degrees Celsius.
[0116] S203: Calculate the temperature difference between each pixel on the windshield surface and the local dew point temperature, and take the positive part of the difference as the effective condensation temperature difference field on the windshield surface. When the glass surface temperature is higher than the dew point temperature, the temperature difference is 0, corresponding to a clear area. When the glass surface temperature is lower than or equal to the dew point temperature, the temperature difference is greater than 0, corresponding to a condensation and fogging area.
[0117] The effective condensation temperature difference field is defined as the positive value portion of the difference between the local dew point temperature and the glass surface temperature. The physical basis for taking a positive value is that condensation only occurs when the glass surface temperature is lower than the dew point temperature, and condensation and fogging occur when the temperature difference is positive; when the temperature difference is 0 or negative, the glass surface temperature is higher than the dew point temperature, corresponding to a clear area, and the transmittance remains at 1.
[0118] III. Pixel-level transmittance diagram
[0119] In the specific implementation process, the following steps are used to generate a pixel-level transmittance map of the windshield:
[0120] S301: Normalize the effective condensation temperature difference field on the windshield surface and introduce a minimum amount (to prevent the denominator from being zero) to obtain the normalized temperature difference field.
[0121] S302: A transmittance attenuation model is constructed based on a normalized temperature difference field, replacing scene depth information with the temperature difference field. The transmittance model adopts an exponential decay form, maintaining physical consistency with the Beer-Lambert law that light follows in scattering media. The transmittance attenuation model adopts an exponential decay form consistent with the Beer-Lambert law, with the normalized temperature difference field as the independent variable, and the transmittance monotonically decreases as the temperature difference increases.
[0122] The formula for the transmittance attenuation model is expressed as:
[0123] ;
[0124] In the formula: A pixel-level transmittance map of the windshield; This represents the normalized temperature difference field. The transmittance of each pixel is calculated using the normalized temperature difference field as the independent variable and an exponential decay function. This represents the scattering intensity coefficient, an adjustable parameter used to control the overall fog concentration. The higher the value, the faster the transmittance decays under the same temperature difference, and the more obvious the atomization effect.
[0125] S303: Input the normalized temperature difference field into the transmittance attenuation model to calculate the transmittance of each pixel and generate a pixel-level transmittance map.
[0126] The fundamental difference between the transmittance attenuation model of this invention and the classical atmospheric scattering model lies in the following: transmittance is driven by the temperature difference field rather than depending on scene depth; and scattering brightness is a spatially non-uniform local function rather than a global constant. These two differences accurately reflect the physical causes of condensation fog on windshields and are the core innovations that distinguish this invention from existing methods.
[0127] Specifically, through comparative experiments of four transmittance function forms—linear, exponential, power-law, and sigmoid—the Beer-Lambert law shows that the energy attenuation of light in a scattering medium follows an exponential form. The fog effect generated by the exponential model best matches the boundary transition characteristics of actual condensed fog in terms of visual appearance and has the best physical rationality. Therefore, this invention selects the exponential attenuation model as the basic form for transmittance modeling.
[0128] IV. Local Scattering Brightness Diagram
[0129] Traditional atmospheric scattering models treat atmospheric light as a global constant, failing to reflect the scattering differences of fog droplets in localized areas of the windshield. This invention proposes a localized scattering brightness model that simulates the multiple scattering effect of fog droplets on incident light, resulting in localized areas exhibiting high brightness and low contrast visual characteristics.
[0130] In the specific implementation process, the local scattering brightness map of the windshield is generated through the following steps:
[0131] S401: Extract the local mean of the sharp scene image; take a 31×31 pixel window centered on each pixel in the sharp scene image and calculate the average value of all pixels within this window.
[0132] S402: Mix the local mean of the clear scene image with the white base to obtain the basic scattering brightness map; the basic scattering brightness is obtained by mixing the white base with the local mean of the original image (31×31 pixel window) in proportion, and the whitening degree is controlled by the parameter η, which ranges from 0 to 1.
[0133] S403: The normalized temperature difference field is linearly mapped (to the range of 0.5 to 1.0) to generate a temperature difference modulation coefficient. To reflect the influence of temperature and humidity conditions on the spatial variation of scattering intensity, a temperature difference modulation coefficient is introduced. Its value is linearly mapped from the normalized temperature difference field to the range of 0.5 to 1.0 to ensure that the scattering brightness changes monotonically with the temperature difference within a physically reasonable range: the larger the temperature difference, the higher the scattering brightness, corresponding to a more severe fogging effect.
[0134] S404: Multiply the base scattering brightness map by the temperature difference modulation coefficient to obtain the local scattering brightness of each pixel, and generate the local scattering brightness map of the windshield.
[0135] The formula is expressed as:
[0136] ;
[0137] In the formula: A diagram showing the localized scattered brightness of the windshield; Indicates the temperature difference modulation coefficient; This represents the basic scattering brightness diagram.
[0138] V. Condensation Fog Composite Image
[0139] Specifically, during the image synthesis process of the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield, fog effect superposition is only performed on the condensation fog pixel areas (areas with transmittance less than 1). That is, the synthesized image of windshield condensation fog is equal to the product of the clear scene image and the corresponding transmittance, plus the product of the local scattering brightness map and the corresponding transmittance margin (re-embedding). Pixels in non-fog areas retain their original values to ensure computational efficiency and visual consistency. The clear scene image refers to the real scene image outside the windshield, which can include natural atmospheric fog or a clear scene, because the condensation fog on the glass surface and the image degradation of the external scene are independent physical processes.
[0140] The formula is expressed as:
[0141] ;
[0142] In the formula: This represents a composite image of condensation on the windshield. Represents a clear scene image; This represents a local scattering brightness map; This represents a pixel-level transmittance map.
[0143] Specifically, the method of this invention is applied to the GoProHazy dataset and the Foggy Zurich dataset. 2000 clear images are randomly selected from each dataset for synthesis. The resolution is uniformly 1920×1080. The training set and the test set are divided in an 8:2 ratio to generate a labeled dataset containing synthesized images of windshield condensation fog and their pixel-level transmittance.
[0144] VI. Quantitative Assessment and Engineering Verification
[0145] Specifically, the quality of synthesized windshield condensation fog images was evaluated from two levels: statistical feature similarity and semantic feature similarity. At the statistical feature level, the Wasserstein distance of the dark channel histogram was used to measure the difference in gray-level structure distribution, while the mean brightness and gray-level standard deviation were used to measure the similarity of overall illumination and contrast. At the semantic feature level, cosine similarity of features from the middle layers of the deep neural network was used to measure semantic consistency. Experimental results show that the synthesized fog images have high consistency with real windshield condensation fog images at both levels, and can provide reliable training samples for deep learning models.
[0146] Example 2:
[0147] This embodiment discloses a system for generating images of condensation fog on a car windshield based on multi-physics coupling, which is implemented based on the method for generating images of condensation fog on a car windshield based on multi-physics coupling in Embodiment 1.
[0148] like Figure 3 As shown, a system for generating images of condensation fog on a car windshield based on multi-physics coupling includes:
[0149] The simulation calculation module is used to perform simulations based on the in-vehicle multi-physics coupled simulation model to generate the temperature field and water vapor concentration field on the windshield surface.
[0150] The transmittance modeling module is used to calculate the effective condensation temperature difference field on the windshield surface based on the temperature field and water vapor concentration field on the windshield surface; the effective condensation temperature difference field on the windshield surface is input into the transmittance attenuation model that replaces the scene depth information with the temperature difference field to generate a pixel-level transmittance map of the windshield.
[0151] The image synthesis module is used to generate a local scattering brightness map of the windshield by combining a clear scene image with the effective condensation temperature difference field of the windshield; to synthesize the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield to generate a synthesized image of windshield condensation fog; and to annotate the synthesized image of windshield condensation fog with pixel-level transmittance based on the pixel-level transmittance map of the windshield, generating an annotated dataset containing the synthesized image of windshield condensation fog and its pixel-level transmittance.
[0152] Hardware verification module;
[0153] The hardware verification module includes:
[0154] The image acquisition submodule is used to acquire real-time images of the windshield. The camera is connected to the embedded main control board through a high-speed serial interface. The acquisition resolution is set to 1920×1080, and after acquisition, it is scaled to 256×256 as network input. An interval sampling strategy is adopted (processing 1 frame every 5 frames). At a acquisition frame rate of 30fps, it corresponds to a detection frequency of about 6 frames / second. This sampling frequency is sufficient to capture the state changes of windshield fog on a second-level time scale.
[0155] The data transmission submodule is used to transmit the real-time images of the windshield that have been collected; it uses the HTTP protocol for communication, transmits images in Base64 encoded format, and returns inference results in JSON format.
[0156] The cloud-based inference submodule (based on Raspberry Pi 5) is used to train a windshield fog visual detection model (lightweight transmittance prediction network) using a labeled dataset containing composite images of windshield condensation fog and their pixel-level transmittance. The model then inputs real-time images of the windshield into the trained windshield fog visual detection model and outputs the corresponding pixel-level transmittance distribution map and average transmittance value.
[0157] The control execution submodule is used to generate control signals based on the pixel-level transmittance distribution map and the average transmittance value, and to control the operation of the defogging device based on the control signals (by driving the relay module to control the defogging device through a general-purpose input / output interface).
[0158] This invention constructs a prototype system (corresponding to the hardware verification module) for windshield fog detection, featuring edge-end image acquisition and cloud-based inference collaboration, with a high-performance embedded computing board at its core. The system adopts a layered architecture, consisting of an image acquisition layer (corresponding to the image acquisition submodule), a data transmission layer (corresponding to the data transmission submodule), a cloud inference layer (corresponding to the cloud inference submodule), and a control execution layer (corresponding to the control execution submodule). These modules collaborate via HTTP communication, forming a complete perception-decision-execution closed-loop system. The system deploys the computationally intensive transmittance estimation inference task on a cloud server, while retaining the real-time-critical image acquisition and control execution at the edge, ensuring detection accuracy while meeting the computational constraints of the embedded platform. The advantages of this edge-cloud collaborative architecture are: the edge does not bear the computational burden of deep learning inference, reducing the performance requirements of the embedded hardware; and the cloud model can be flexibly updated and iterated without requiring firmware upgrades for the edge devices.
[0159] Specifically, the control execution submodule generates control signals through a hierarchical control strategy to control the operation of the defogging device;
[0160] The logic of a hierarchical control strategy includes:
[0161] The average transmittance value of the pixel-level transmittance distribution map is defined as the mean of all pixel values in the pixel-level transmittance distribution map.
[0162] Fog concentration is defined as 1 minus the average transmittance value. When the pixel-level transmittance distribution map is completely clear, the average transmittance value is approximately 1, and the fog concentration is approximately 0. When the fog is severe, the average transmittance value tends to 0, and the fog concentration tends to 1.
[0163] A three-level control strategy is designed based on fog concentration: when the fog concentration is below the first threshold (0.3), it is determined to be light fog with limited impact on visibility, and there is no need to activate the defogging device; when the fog concentration is between the first threshold and the second threshold (0.5), it is determined to be moderate fog, and the defogging device is activated in low power mode; when the fog concentration is higher than or equal to the second threshold, it is determined to be heavy fog, and the defogging device is activated in full power mode.
[0164] The aforementioned thresholds were determined based on the transmittance level corresponding to the defogging requirements for Zone A of the windshield in the national standard GB11555-2009 (allowing fogging of 10% area), and were verified in conjunction with actual testing experience. This control strategy constructs a closed-loop control mechanism integrating perception, decision-making, and execution, enabling the system to adaptively adjust the defogging intensity according to changes in fog conditions.
[0165] To verify the closed-loop control capability of the system under dynamic fog conditions, this embodiment also constructed a complete simulated defogging test scenario: a glass plate was used to simulate the windshield of a car, and water vapor was used to heat and humidify the glass. When the temperature and humidity reached the condensation conditions, fog was generated on the glass surface. The system quickly detected the fog status and controlled the defogging device to perform the defogging operation.
[0166] Experimental results show that the system can initiate defogging within one detection cycle after fog is detected, demonstrating good timely response capabilities. It can automatically switch between full power, low power, and standby modes based on fog concentration. After the fog dissipates, the defogging device automatically shuts off, effectively avoiding unnecessary energy consumption. In tests with light to moderate fog and heavy fog scenarios, the system correctly identified the fogging state and triggered the corresponding level of defogging control, verifying the effectiveness of the transmittance estimation model trained on synthetic data in real-world scenarios. This demonstrates the practical feasibility of the fog image generation method of this invention from an engineering perspective.
[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A method for generating images of condensation fog on a car windshield based on multi-physics coupling, characterized in that, include: S1: Simulation is performed based on the in-vehicle multi-physics coupling simulation model to generate the temperature field and water vapor concentration field on the windshield surface; The temperature field and water vapor concentration field include the temperature and water vapor concentration of each pixel on the windshield surface; S2: Based on the temperature field and water vapor concentration field of the windshield surface, calculate the effective condensation temperature difference field of the windshield surface; where the effective condensation temperature difference field includes the effective condensation temperature difference of each pixel on the windshield surface; S3: Input the effective condensation temperature difference field on the windshield surface into the transmittance attenuation model that replaces the scene depth information with the temperature difference field, and generate a pixel-level transmittance map of the windshield. S4: By combining a clear scene image with the effective condensation temperature difference field of the windshield, a local scattering brightness map of the windshield is generated. S5: Perform image synthesis on the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield to generate a composite image of windshield condensation fog; perform pixel-level transmittance annotation on the composite image of windshield condensation fog based on the pixel-level transmittance map of the windshield. S6: Repeat steps S1 to S5 to generate a labeled dataset containing a composite image of windshield condensation and its pixel-level transmittance.
2. The method for generating images of condensation fog on a car windshield based on multi-physics coupling as described in claim 1, characterized in that: In step S1, the temperature field and water vapor concentration field on the windshield surface are generated through the following steps: S101: Establish an in-vehicle simulation model on a multiphysics simulation platform, including the windshield, dashboard, air domain, and / or breathing heat source. S102: Perform multiphysics coupling on the in-vehicle simulation model to generate an in-vehicle multiphysics coupling simulation model for joint solution of the three fields of heat, humidity and flow. S103: In the multi-physics coupling simulation model inside the vehicle, the solar radiation heat flux is used as the boundary condition of the outer surface of the windshield, and the heat and water vapor generated by human respiration are used as the internal volume source terms for time-domain transient numerical simulation. S104: Perform linear interpolation on the discrete point data output from the time-domain transient numerical simulation to generate a spatially continuous temperature field and water vapor concentration field on the windshield surface.
3. The method for generating images of condensation fog on a car windshield based on multi-physics coupling as described in claim 2, characterized in that: In step S102, the multiphysics coupling of the in-vehicle simulation model includes the coupling of solid and fluid heat transfer modules, laminar flow modules, rare matter transfer modules and / or non-isothermal flow modules. Solid and fluid heat transfer module, used to simulate heat conduction between the dashboard, windshield and air; The laminar flow module is used to simulate natural convection within the air domain; A rare substance transport module is used to simulate the diffusion and transport of moisture released during human respiration; The non-isothermal flow module is used to couple temperature with fluid density and viscosity to achieve natural convection modeling.
4. The method for generating images of condensation fog on a car windshield based on multi-physics coupling as described in claim 1, characterized in that: In step S2, the effective condensation temperature difference field on the windshield surface is calculated through the following steps: S201: The water vapor concentration field on the windshield surface is converted into the relative humidity of each pixel on the windshield surface by using the gas state equation and the saturated water vapor pressure formula; S202: Calculate the local dew point temperature based on the relative humidity of each pixel on the windshield surface using the spatialized form of the Magnus-Tetens approximation formula; The spatialized form of the Magnus-Tetens approximation formula is expressed as: ; ; In the formula: Indicates the local dew point temperature; Indicates the surface temperature of the windshield; Indicates relative humidity; , This indicates the set empirical parameters; S203: Calculate the difference between the temperature of each pixel on the windshield surface and the local dew point temperature, and take the positive part of the difference as the effective condensation temperature difference field on the windshield surface.
5. The method for generating images of condensation fog on a car windshield based on multi-physics coupling as described in claim 1, characterized in that: In step S3, the pixel-level transmittance map of the windshield is generated through the following steps: S301: Normalize the effective condensation temperature difference field on the windshield surface and introduce a minimum amount to obtain the normalized temperature difference field. S302: Constructing a transmittance attenuation model based on a normalized temperature difference field, which replaces scene depth information with a temperature difference field; The formula for the transmittance attenuation model is expressed as: ; In the formula: A pixel-level transmittance map of the windshield; Represents the normalized temperature difference field; Indicates the scattering intensity coefficient; S303: Input the normalized temperature difference field into the transmittance attenuation model to calculate the transmittance of each pixel and generate a pixel-level transmittance map.
6. The method for generating images of condensation fog on a car windshield based on multi-physics coupling as described in claim 5, characterized in that: In step S4, the local scattering brightness map of the windshield is generated through the following steps: S401: Extract the local mean of a clear scene image; S402: Mix the local mean of the clear scene image with the white base to obtain the basic scattering brightness map; S403: Linearly map the normalized temperature difference field to generate the temperature difference modulation coefficient; S404: Multiply the base scattering brightness map by the temperature difference modulation coefficient to obtain the local scattering brightness of each pixel, and generate the local scattering brightness map of the windshield. The formula is expressed as: ; In the formula: A diagram showing the localized scattered brightness of the windshield; Indicates the temperature difference modulation coefficient; This represents the basic scattering brightness diagram.
7. The method for generating images of condensation fog on a car windshield based on multi-physics coupling as described in claim 1, characterized in that: In step S5, during the image synthesis of the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield, fog effect superposition is only performed on the condensation fog pixel area. That is, the synthesized image of windshield condensation fog is equal to the product of the clear scene image and the corresponding transmittance, plus the product of the local scattering brightness map and the corresponding transmittance margin; the pixels in the non-fog area keep their original values unchanged. The formula is expressed as: ; In the formula: This represents a composite image of condensation on the windshield. Represents a clear scene image; This represents a local scattering brightness map; This represents a pixel-level transmittance map.
8. A system for generating images of condensation fog on automotive windshields based on multi-physics coupling, characterized in that, The implementation of the method for generating images of condensation fog on a car windshield based on multi-physics coupling as described in claim 1 includes: The simulation calculation module is used to perform simulations based on the in-vehicle multi-physics coupled simulation model to generate the temperature field and water vapor concentration field on the windshield surface. The transmittance modeling module is used to calculate the effective condensation temperature difference field on the windshield surface based on the temperature field and water vapor concentration field on the windshield surface; the effective condensation temperature difference field on the windshield surface is input into the transmittance attenuation model that replaces the scene depth information with the temperature difference field to generate a pixel-level transmittance map of the windshield. The image synthesis module is used to generate a local scattering brightness map of the windshield by combining a clear scene image with the effective condensation temperature difference field of the windshield; to synthesize the clear scene image, local scattering brightness map, and pixel-level transmittance map of the windshield to generate a synthesized image of windshield condensation fog; and to annotate the synthesized image of windshield condensation fog with pixel-level transmittance based on the pixel-level transmittance map of the windshield, generating an annotated dataset containing the synthesized image of windshield condensation fog and its pixel-level transmittance.
9. The automotive windshield condensation fog image generation system based on multi-physics coupling as described in claim 8, characterized in that: It also includes a hardware verification module; The hardware verification module includes: The image acquisition submodule is used to acquire real-time images of the windshield; The data transmission submodule is used to transmit the acquired real-time images of the windshield; The cloud-based inference submodule is used to train a windshield fog visual detection model using a labeled dataset containing composite images of windshield condensation fog and their pixel-level transmittance. It also inputs real-time images of the windshield into the trained windshield fog visual detection model and outputs the corresponding pixel-level transmittance distribution map and average transmittance value. The control execution submodule is used to generate control signals based on the pixel-level transmittance distribution map and the average transmittance value, and to control the operation of the defogging device based on the control signals.
10. The automotive windshield condensation fog image generation system based on multi-physics coupling as described in claim 9, characterized in that: The control execution submodule generates control signals through a hierarchical control strategy to control the operation of the defogging device. The logic of a hierarchical control strategy includes: The average transmittance value of the pixel-level transmittance distribution map is defined as the mean of all pixel values in the pixel-level transmittance distribution map. Fog concentration is defined as 1 minus the average transmittance value. When the pixel-level transmittance distribution map is completely clear, the average transmittance value is approximately 1, and the fog concentration is approximately 0. When the fog is severe, the average transmittance value tends to 0, and the fog concentration tends to 1. The design employs a three-level control strategy: when the fog concentration is below the first threshold, it is determined to be light fog with limited visibility impact, and there is no need to activate the defogging device; when the fog concentration is between the first and second thresholds, it is determined to be moderate fog, and the defogging device is activated in low-power mode; when the fog concentration is above or equal to the second threshold, it is determined to be heavy fog, and the defogging device is activated in full-power mode.