Temperature control method and system for heating anti-fog camera and camera
By acquiring multi-source environmental temperature and humidity data and using gradient preheating control, combined with real-time feedback from image sensors, intelligent temperature control of the heated anti-fog camera has been achieved. This solves the problems of lens material fatigue and power consumption peaks in traditional heating anti-fog methods, improves equipment lifespan and energy efficiency, and enables stable operation in harsh environments.
Patent Information
- Application Number
- CN202511548611.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2025-12-09
AI Technical Summary
Traditional heating anti-fog methods cause lens material fatigue and cracking in extremely cold environments, and peak power consumption can overload the power supply system or cause insufficient power supply capacity of battery-powered equipment, making it impossible to operate stably for a long time in harsh environments.
By collecting environmental temperature and humidity data from multiple sources, calculating the dew point temperature difference, constructing a gradient preheating control strategy, and performing dynamic preheating control, combined with real-time image frame data captured by an image sensor for dynamic adjustment of zoned heating, adaptive heating control benchmark data is generated to achieve intelligent temperature control.
It reduces the accumulation of thermal stress in lens materials, avoids power consumption peaks, improves equipment lifespan and energy efficiency, ensures image clarity and stability, adapts to complex and changing environments, and reduces maintenance costs and energy consumption.
Smart Images

Figure CN121099173A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of heating anti-fog camera, and particularly to a heating anti-fog camera temperature control method and system and a camera. BACKGROUND
[0002] Camera devices are installed in various complex environments. When the ambient temperature is far below the dew point temperature, water vapor in the air will quickly condense into water droplets or ice on the relatively cold camera lens surface, forming fog or frost, which not only causes image blurring, contrast reduction, and detail loss, but also damages internal electronic components of the device. Currently, the main anti-fog technologies used in the industry include heating de-fogging, ventilation de-fogging, and coating anti-fogging methods. Among them, heating de-fogging is widely used due to its significant effect and wide application range. Traditional heating de-fogging methods usually use constant temperature heating or simple temperature control heating strategies, that is, when the ambient temperature is detected to be below a set threshold, a high-power heating element is immediately started to quickly raise the lens surface temperature above the dew point temperature to prevent water vapor condensation. However, this traditional heating anti-fog method has obvious defects. First, in a cold environment, to quickly achieve the anti-fog effect, the heating power is suddenly increased to the maximum value when starting, causing the lens to quickly warm up from a very low temperature. This rapid temperature change will generate significant thermal stress in the lens material, which will cause lens material fatigue, cracking, and even permanent damage over time, greatly reducing the service life of the device. Second, the sudden increase in heating power will cause a significant power consumption peak, especially in large-scale monitoring systems, if multiple cameras simultaneously start the heating function, causing the power supply system to overload or the power supply capacity of battery-powered devices to be insufficient. SUMMARY
[0003] Therefore, the present application provides a heating anti-fog camera temperature control method, system, and camera to solve at least one of the above technical problems.
[0004] To achieve the above purpose, a heating anti-fog camera temperature control method includes the following steps: Step S1: Obtain camera operation state data; collect multi-source ambient temperature and humidity based on the camera operation state data, and calculate the temperature difference between the protective cover surface and the air dew point to generate protective cover surface dew point temperature difference data; perform fogging risk assessment based on the protective cover surface dew point temperature difference data to generate potential fogging state snapshot data; Step S2: Construct a gradient preheating control strategy based on the potential fogging state snapshot data; Step S3: Perform gradient preheating trigger judgment based on the potential fogging state snapshot data to generate a gradient preheating trigger signal; perform dynamic preheating control based on the gradient preheating trigger signal through the gradient preheating control strategy, and perform heating drive instruction packaging to generate heating drive instruction data; Step S4: heating control is performed according to the heating driving instruction data, and image frame data under a current heating state is captured in real time by synchronously using an image sensor; water vapor condensation characterization analysis is performed according to the image frame data under the current heating state, and slight fogging image characterization data is obtained; Step S5: dynamic heating regulation and control is performed through the slight fogging image characterization data, and then heating control and picture effect acquisition are re-executed, to obtain secondary regulation and picture effect association data; heating reference parameter iterative optimization is performed according to the secondary regulation and picture effect association data, to generate adaptive heating control reference data.
[0005] Preferably, the present application further provides a heating anti-fog camera temperature control system for executing the heating anti-fog camera temperature control method as described above, and the heating anti-fog camera temperature control system comprises: A dew point risk assessment module is configured to acquire camera operation state data; collect multi-source environmental temperature and humidity according to the camera operation state data, and calculate a temperature difference between a protective cover surface and an air dew point, to generate protective cover surface dew point temperature difference data; and perform fogging risk assessment according to the protective cover surface dew point temperature difference data, to generate potential fogging state snapshot data. A preheating strategy control module is configured to construct a gradient preheating control strategy based on the potential fogging state snapshot data. A gradient preheating execution module is configured to perform gradient preheating trigger judgment according to the potential fogging state snapshot data, to generate a gradient preheating trigger signal; perform dynamic preheating control through the gradient preheating control strategy based on the gradient preheating trigger signal, and perform heating driving instruction packaging, to generate heating driving instruction data. An image state monitoring module is configured to perform heating control according to the heating driving instruction data, and capture image frame data under a current heating state in real time by synchronously using an image sensor; perform water vapor condensation characterization analysis according to the image frame data under the current heating state, to obtain slight fogging image characterization data. An adaptive parameter optimization module is configured to perform dynamic heating regulation and control through the slight fogging image characterization data, and then re-execute heating control and picture effect acquisition, to obtain secondary regulation and picture effect association data; perform heating reference parameter iterative optimization according to the secondary regulation and picture effect association data, to generate adaptive heating control reference data.
[0006] Preferably, the present application further provides a heating anti-fog camera, which comprises: A camera main body is provided with a lens module and an image sensor. A transparent protective cover is arranged in front of the camera main body. A heating control unit is arranged around or attached to the transparent protective cover for heating the transparent protective cover, the heating control unit comprising a center heating area for heating the center area of the transparent protective cover and an edge heating area for heating the edge area of the transparent protective cover; A cover surface temperature sensor is arranged on or near the surface of the transparent protective cover for detecting the surface temperature of the transparent protective cover, the cover surface temperature sensor comprising a center temperature sensing point and an edge temperature sensing point correspondingly; An ambient temperature sensor is arranged outside the transparent protective cover for detecting the ambient temperature of the heating anti-fog camera; An ambient humidity sensor is arranged outside the transparent protective cover for detecting the ambient humidity of the heating anti-fog camera; and a main controller electrically connected to the image sensor, the heating control unit, the cover surface temperature sensor, the ambient temperature sensor and the ambient humidity sensor through a data bus; wherein the main controller is configured to execute the above-mentioned temperature control system of the heating anti-fog camera.
[0007] The present application can accurately predict the risk of fogging by collecting the temperature and humidity of the environment from multiple sources and calculating the dew point temperature difference, realize the pre-warning of anti-fog measures, and avoid the problem of instantaneous image quality decline caused by passive response in traditional methods. The establishment of the gradient preheating control strategy completely solves the problem of thermal stress caused by sudden power increase during cold start in traditional heating methods. Through the gradual increase of temperature, the accumulation of thermal stress in the lens material is greatly reduced, effectively prolonging the service life of the optical components. The dynamic preheating control mechanism not only avoids the peak power consumption problem in traditional methods, but also realizes efficient use of energy by precisely controlling the heating power curve, significantly reducing overall power consumption, which is of great significance to power load balancing of large-scale monitoring systems, and improves the endurance of battery-powered equipment. The introduction of the image sensor real-time feedback mechanism in the scheme enables the system to adjust the heating based on the actual imaging effect rather than relying solely on temperature sensor data, ensuring the optimal balance between anti-fog effect and power consumption. The zoning heating dynamic regulation technology implements differentiated heating strategies for different regions of the lens, which not only improves the defogging efficiency but also further optimizes energy consumption compared to traditional uniform heating. The generation and iterative optimization of adaptive heating control reference data enable the system to continuously improve heating parameters based on historical operation experience, improving the adaptability to complex and variable environments, especially in harsh environments with drastic temperature fluctuations. This method improves hardware performance through software algorithms, significantly improving performance without significantly increasing equipment costs, offering high cost-effectiveness. This intelligent temperature control scheme not only ensures the image clarity and stability of the camera in various complex environmental conditions, but also extends the service life of the equipment and reduces energy consumption, significantly reducing maintenance costs and energy consumption, which has important value in improving the reliability and economy of video monitoring systems. The main innovation lies in the combination of dual-temperature sensor components and image quality analysis, which realizes intelligent anti-fog heating control by monitoring temperature difference and image haze index in real time, and has adaptive optimization and energy management functions. From the perspective of system engineering, this method realizes the unity of anti-fog effect, equipment life and energy efficiency through software and hardware optimization, providing comprehensive protection for the stable operation of camera equipment in harsh environments, especially suitable for important fields such as security monitoring, traffic management and border surveillance that require long-term outdoor work, with broad application prospects and significant social and economic benefits. BRIEF DESCRIPTION OF DRAWINGS
[0008] Fig. 1 The step flow chart of the heating anti-fog camera temperature control method of the present application; Fig. 2 The anti-fog example of the heating anti-fog camera shooting of the present application; The objectives, functional features and advantages of the present application will be further illustrated in conjunction with the embodiments with reference to the accompanying drawings. DETAILED DESCRIPTION
[0009] The technical method of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0010] In addition, the accompanying drawings are only schematic illustrations of the present application, and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated description thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities, which do not necessarily have to correspond to physically or logically independent entities. The functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0011] It should be understood that although the terms "first", "second" and the like can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the exemplary embodiments, a first element can be referred to as a second element, and similarly a second element can be referred to as a first element. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0012] To achieve the above-mentioned purpose, please refer to Figs. 1-2 The present application provides a heating anti-fog camera temperature control method, comprising the following steps: Step S1: Obtain camera operation state data; collect multi-source environment temperature and humidity according to the camera operation state data, and calculate the temperature difference between the surface of the protective cover and the dew point of the air to generate protective cover surface dew point temperature difference data; perform fogging risk assessment according to the protective cover surface dew point temperature difference data to generate potential fogging state snapshot data; Step S2: Construct a gradient preheating control strategy based on the potential fogging state snapshot data; Step S3: Perform gradient preheating trigger judgment according to the potential fogging state snapshot data to generate a gradient preheating trigger signal; perform dynamic preheating control based on the gradient preheating trigger signal through the gradient preheating control strategy, and perform heating driving instruction packaging to generate heating driving instruction data; Step S4: heating control is performed according to the heating driving instruction data, and image frame data in the current heating state is captured in real time by synchronously using an image sensor; water vapor condensation characterization analysis is performed according to the image frame data in the current heating state, and slight fogging image characterization data is obtained; Step S5: dynamic heating regulation and control is performed through the slight fogging image characterization data, and then heating control and picture effect acquisition are re-executed, and secondary regulation and picture effect association data are obtained; heating reference parameter iterative optimization is performed according to the secondary regulation and picture effect association data, so as to generate adaptive heating control reference data.
[0013] In the embodiment of the present application, the heating anti-fog camera temperature control method comprises the following steps: Step S1: camera operation state data is obtained; multi-source environment temperature and humidity is collected according to the camera operation state data, and the temperature difference between the surface of the protective cover and the air dew point is calculated to generate protective cover surface dew point temperature difference data; potential fogging state snapshot data is generated by performing fogging risk assessment according to the protective cover surface dew point temperature difference data; In the embodiment of the present application, the main controller of the heating anti-fog camera first collects the working state information of the camera, including the key parameters such as the boot time length, the image sensor working mode, the lens focal length setting, the field of view angle, the current picture brightness value, etc. The collection process uses a data bus to communicate with an image processing unit to read the internal register state. The collection frequency is set to once every 60 seconds, and in special cases (such as just starting up, environmental mutation), it is increased to once every 10 seconds. The main controller determines the environmental parameter monitoring strategy according to the collected working state: when the camera is in continuous recording mode, the temperature and humidity collection interval is set to 5 seconds; when it is in intermittent trigger mode, the collection interval is set to 30 seconds; when it is in standby state, the collection interval is set to 2 minutes. Then, multi-source environmental temperature and humidity data is collected by multiple sensors: the ambient temperature sensor reads the surrounding air temperature, the environmental humidity sensor reads the relative humidity, and the cover surface temperature sensor detects the surface temperature of the center region and the edge region of the transparent protective cover. After the collected data is digitally filtered, the main controller calculates the difference between the surface of the protective cover and the environmental dew point temperature to generate protective cover surface dew point temperature difference data. The main controller analyzes the time sequence change of the temperature difference data, combines the environmental temperature and humidity change rate, evaluates the fogging risk level, determines the fogging time node and sets the dynamic lens safety temperature threshold, and finally forms the potential fogging state snapshot data containing complete anti-fog judgment basis.
[0014] Step S2: a gradient preheating control strategy is constructed based on the potential fogging state snapshot data; In the embodiment of the present application, the main controller reads the generated potential fogging state snapshot data and extracts key information including target lens safety temperature threshold, fogging time node, fogging risk level, etc. The main controller first collects real-time protective cover surface temperature data as the starting temperature of gradient preheating; the target lens safety temperature threshold in the snapshot data is used as the preheating endpoint target temperature. The total temperature difference is calculated by subtracting the two, and the expected average heating rate is calculated according to the time difference between the current time and the fogging time node, forming the preheating process time characteristic data. The preheating time is generally controlled within 3-15 minutes, depending on the total temperature difference and the urgency of fogging. Subsequently, the main controller designs a complete gradient heating curve based on the starting temperature, target temperature and time characteristics, and uses a modified S-shaped function to ensure smooth and gradual heating to avoid thermal stress damage. The heating curve is divided into multiple temperature control points at 20-second intervals to form a time-temperature target point sequence, and gradient heating curve data is generated. The main controller further divides the entire preheating process into three sub-stages (preparation stage, acceleration stage and stabilization stage), sets appropriate heating power upper limit and temperature detection points for each stage, and forms a staged heating path data. Finally, the main controller converts the gradient heating curve into actual heating power control instruction sequence and designs a feedforward-feedback composite control method to achieve precise temperature control, and constructs a complete gradient preheating control strategy.
[0015] Step S3: Gradient preheating trigger judgment is performed according to the potential fogging state snapshot data, a gradient preheating trigger signal is generated; dynamic preheating control is performed based on the gradient preheating trigger signal through the gradient preheating control strategy, and heating driving instruction packaging is performed, to generate heating driving instruction data; In the embodiment of the present application, the main controller dynamically adjusts the sampling frequency of the environmental temperature and humidity sensor based on the generated potential fogging state snapshot data to obtain higher frequency environmental parameter change information. The sampling frequency adjustment follows the risk level corresponding rule, and the sampling interval is shortened to 5 seconds / time in high risk. The main controller analyzes the high frequency environmental temperature and humidity data, calculates the temperature difference between the current protective cover surface and the environmental dew point, the short-term dew point change trend and the relative humidity level, and evaluates whether the preheating needs to be triggered through a multi-parameter comprehensive judgment formula. When the calculation result exceeds the preset threshold 0.65, or the protective cover surface temperature is close to the dew point temperature (the difference is less than 1.5℃), or the environmental condition is particularly severe, the main controller generates a gradient preheating trigger signal. When the signal is true, the main controller starts the gradient preheating control strategy constructed in step S2, dynamically adjusts the heating power by real-time monitoring the deviation between the protective cover surface temperature and the target temperature, and generates dynamic preheating adjustment data. When the signal is false, the main controller executes the instant heating control logic, determines the appropriate heating power based on the current temperature difference condition, and forms the instant heating control parameters. The main controller obtains the current driving voltage data, and converts the power requirement into current control value according to the driving voltage data, then generates PWM signal through duty cycle modulation technology, and finally encapsulates into standard format heating driving instruction data, which is transmitted to the power driving module through SPI bus to execute heating operation.
[0016] Step S4: heating control according to the heating driving instruction data, and synchronously capturing image frame data in the current heating state by using the image sensor in real time; water vapor condensation characterization analysis according to the image frame data in the current heating state to obtain slight fogging image characterization data; In the embodiment of the present application, the region identifier and the duty cycle value in the heating driving instruction data are parsed according to the heating driving instruction data. The control center heating area or the edge heating area is determined according to the region identifier, and the on-time ratio of the MOSFET switch is controlled according to the duty cycle value, so as to realize accurate power supply for the heating control unit. The heating control unit converts electric energy into heat energy, heats the transparent protective cover, and gradually increases the surface temperature of the transparent protective cover to the target temperature. At the same time, the main controller synchronously drives the image sensor to capture the current scene in real time, collects a video stream with a resolution of 1920*1080 and 15 frames per second, and extracts a key frame as image frame data under the current heating state. The main controller performs a series of processing on the obtained image frame: first, the core monitoring area is extracted, then the edge is detected by the gradient vector method, the spatial frequency is analyzed by the two-dimensional discrete Fourier transform, and the high-frequency component characteristics of the image are calculated. Then, the image contrast is evaluated, the global contrast, local contrast distribution and contrast entropy are calculated by using the multi-scale local contrast analysis method; the image signal-to-noise ratio is calculated, and the image signal quality is evaluated by using the improved peak signal-to-noise ratio method. The main controller comprehensively analyzes each index, constructs an image quality scoring system, and generates real-time image quality data. Finally, based on the real-time image quality data, a water vapor condensation representation model is constructed, a slight fogging feature is identified, and slight fogging image representation data is generated, including fogging representation value, fogging degree level, fogging area distribution and other information.
[0017] Step S5: performing dynamic regulation by partition heating through the slight fogging image representation data, and then re-executing the heating control and the picture effect acquisition to obtain secondary regulation and picture effect association data; and performing heating reference parameter iterative optimization according to the secondary regulation and picture effect association data to generate adaptive heating control reference data.
[0018] In the embodiment of the present application, the preliminary evaluation index of the anti-fogging effect is calculated by the comprehensive scoring mechanism , which comprehensively considers the fogging representation value, the fogging area percentage and the fogging area concentration. When , it is determined that the current picture clarity is unqualified. The main controller immediately triggers the high-frequency temperature sampling program to collect the surface temperatures of the center area and the edge area of the protective cover, and calculates the center area temperature value TC and the edge area temperature value TE, respectively. Based on the difference between and the target lens safety temperature threshold , combined with the unqualified degree and the fogging distribution characteristics, the partition heating temperature difference requirement and The temperature difference value of the surface of the protective cover is calculated at the same time, including the temperature difference between the central region and the edge region and the temperature uniformity index within each region. The main controller dynamically adjusts the PID control parameters according to the temperature difference requirement and the temperature difference, and forms the optimized PID control parameter configuration data. Based on the adjusted parameters, the heating power is recalculated, and a new heating driving instruction is generated to perform accurate control. After heating, the main controller collects images again, analyzes the defogging effect, calculates the defogging effectiveness index and the heating efficiency index. The main controller continuously updates the defogging effect prediction model and the heating reference parameter library, and generates adaptive heating control reference data through iterative optimization to guide the future anti-fog heating control under similar conditions, and realizes the continuous improvement of the system performance.
[0019] Preferably, the multi-source environment temperature and humidity acquisition according to the camera operating state data in step S1 and the calculation of the temperature difference between the surface of the protective cover and the air dew point include: Periodically read the measurement values of the environment temperature sensor, the environment humidity sensor and the cover surface temperature sensor based on the camera operating state data to obtain original multi-source sensor acquisition data; The original multi-source sensor acquisition data is subjected to digital filtering processing and data preprocessing to obtain environment temperature data, environment humidity data and protective cover surface temperature data, respectively; The current environment dew point temperature is calculated according to the environment temperature data and the environment humidity data to generate current environment dew point temperature data; The temperature difference between the surface of the protective cover and the air dew point is calculated by the current environment dew point temperature data on the protective cover surface temperature data to obtain the protective cover surface dew point temperature difference data.
[0020] In the embodiment of the present application, the main controller of the heated anti-fog camera determines the temperature and humidity data collection frequency according to the working state of the camera, and reads the values of each sensor through the data bus at a frequency of once every 5 seconds in the normal monitoring state; when the camera is in the heating state, the collection frequency is increased to once every 1 second. The reading process sends collection instructions to each sensor by the main controller through the interrupt mode, which specifically includes: sending a temperature reading command to the environment temperature sensor to obtain the current environment temperature value, sending a humidity reading command to the environment humidity sensor to obtain the current environment humidity value, sending a center area and edge area temperature reading command to the cover surface temperature sensor to obtain the surface temperature values of different areas of the protective cover. After the collected data is converted by an analog-to-digital converter, it is stored in a special cache area in the main controller to form raw multi-source sensor collection data. The main controller of the heated anti-fog camera determines the temperature and humidity data collection frequency according to the working state of the camera, and reads the values of each sensor through the data bus at a frequency of once every 5 seconds in the normal monitoring state; when the camera is in the heating state, the collection frequency is increased to once every 1 second. The reading process sends collection instructions to each sensor by the main controller through the interrupt mode, which specifically includes: sending a temperature reading command to the environment temperature sensor to obtain the current environment temperature value, sending a humidity reading command to the environment humidity sensor to obtain the current environment humidity value, sending a center area and edge area temperature reading command to the cover surface temperature sensor to obtain the surface temperature values of different areas of the protective cover. After the collected data is converted by an analog-to-digital converter, it is stored in a special cache area in the main controller to form raw multi-source sensor collection data. The current environment dew point temperature is calculated by using the improved Magnus formula. The calculation formula is: wherein, represents the dew point temperature (℃), represents the environment temperature (℃), represents the relative humidity (%), = 17.27, = 237.7 is an empirical constant, , represents the natural logarithm operation. The main controller substitutes the environment temperature and humidity collection data into the formula, first calculates the value of , and then substitutes the value into the main formula to calculate the current environment dew point temperature. The calculation result is saved with a precision of 0.1℃ to generate the current environment dew point temperature data. The preprocessed protective cover surface temperature data and the current environment dew point temperature data are calculated by difference, and the center area temperature difference and the edge area temperature difference are calculated respectively. The calculation formula is: ; wherein, represents the center area temperature difference (℃), represents the edge area temperature difference (℃), represents the surface temperature of the center area of the protective cover (℃), represents the surface temperature of the edge area of the protective cover (℃), This represents the current ambient dew point temperature (°C). The calculated temperature difference data is used to assess the risk of condensation on the protective shield surface. When the temperature difference is negative or close to zero (less than 3°C), it indicates that the surface temperature of the protective shield is below or close to the dew point temperature, posing a risk of condensation. The calculation results generate dew point temperature difference data for the protective shield surface, including temperature difference data for the central area and temperature difference data for the edge area.
[0021] Preferably, the fogging risk assessment in step S1 based on the dew point temperature difference data of the protective cover surface includes: The environmental temperature and humidity change rate analysis is performed to obtain environmental temperature and humidity change state data. The environmental temperature and humidity change state data includes rapid temperature change state and rapid humidity change state. When the temperature change rate exceeds ±0.8℃ / min, it is marked as a rapid temperature change state; when the humidity change rate exceeds ±3%RH / min, it is marked as a rapid humidity change state. Time series analysis was performed on the environmental temperature and humidity change data, and the dew point change trend was predicted based on the dew point temperature difference data on the surface of the protective cover, thus obtaining the predicted dew point change trend data. Fog risk level assessment is conducted based on predicted dew point change trend data, and fog risk level assessment data is generated. By using fogging risk level assessment data to identify fogging time nodes in the predicted dew point change trend data, fogging time nodes are generated. Set the dynamic lens safety temperature threshold based on fogging risk level assessment data; Real-time fogging risk snapshot processing is performed based on the target lens's safe temperature threshold, fogging time point, and fogging risk level assessment data to generate potential fogging state snapshot data.
[0022] In this embodiment of the invention, the rate of change is calculated based on the environmental temperature and humidity data sequence within a time window. Specifically, the main controller reads temperature and humidity data from the data buffer for the most recent 5 minutes, and calculates the temperature and humidity change within each unit, using 30-second intervals as the basic calculation unit. The formula for calculating the rate of temperature change is: ,in This indicates the rate of temperature change (°C / min). This indicates the current temperature value (°C). This indicates the temperature value (°C) at the previous moment. This represents the time interval (min). The formula for calculating the rate of humidity change is: ,in Indicates the rate of change of humidity (%RH / min). This indicates the current humidity value (%RH). This represents the humidity value (%RH) at the previous moment. When calculated, | |>0.8℃ / min, the main controller marks as temperature rapid change state; when |>3%RH / min, marks as humidity rapid change state, generates environment temperature and humidity change state data. Adopting autoregressive moving average model (ARMA model) to carry out time series analysis, predicts dew point temperature change trend in future 30 minutes. For heating anti-fog camera, takes p=2, q=1, that is, adopts ARMA (2, 1) model. Model training data uses environment temperature and humidity history data in recent 4 hours. The main controller first carries out stationary test to the history data, if not satisfying stationary requirement, carries out first-order difference processing. Then estimates model parameters by using least square method , constructs prediction model. After model construction, the main controller inputs current environment temperature and humidity change state data, predicts dew point temperature change trend in future 30 minutes, generates predicted dew point change trend data. Sets four-level fogging risk assessment mechanism, respectively as no risk (0 level), low risk (1 level), medium risk (2 level), high risk (3 level). Assessment process adopts weighted multi-factor scoring method: first, calculates current protective cover surface and dew point temperature difference score, temperature difference greater than 10℃ is 0 point, 5℃ to 10℃ is 1 point, 3℃ to 5℃ is 2 points, 0℃ to 3℃ is 3 points, less than 0℃ is 4 points; second, calculates predicted dew point change trend score, if predicted 30 minutes dew point temperature decreases, then gets 0 point, if predicted dew point temperature is stable, then gets 1 point, if predicted dew point temperature rising speed is less than 0.5℃ / 10min, then gets 2 points, if predicted dew point temperature rising speed is greater than 0.5℃ / 10min, then gets 3 points; third, calculates environment temperature and humidity change state score, non-rapid change state gets 0 point, only humidity rapid change state gets 1 point, only temperature rapid change state gets 1 point, temperature and humidity rapid change state gets 2 points. Three scores are weighted to calculate total score: total score=0.5×temperature difference score+0.3×trend score+0.2×change state score. Total score 0-1 is no risk (0 level), total score 1-2 is low risk (1 level), total score 2-3 is medium risk (2 level), total score 3-4 is high risk (3 level), generates fogging risk level assessment data. Based on predicted dew point change trend data and current protective cover surface temperature, calculates time point of protective cover surface temperature and dew point temperature intersection. Calculation method is: protective cover surface temperature data is fitted as time function , predicted dew point temperature is fitted as time function , wherein t is time variable, is fitting coefficient. Two curve intersection points satisfy equation , that is , solving gets . When , if , then indicates no intersection point; if , then indicates curve overlap; if , indicates that it has been in the fogging state. For the case of intersection, the main controller marks the intersection time as the fogging time node for subsequent heating control decision. If the fogging risk level is high risk (level 3), the actual fogging time node is 5 minutes earlier than the calculated fogging time node, increasing the anti-fogging reserved time. The dynamic lens safety temperature threshold is set according to the fogging risk level to ensure that the surface temperature of the protective cover is always higher than the dew point temperature by a certain safety margin. The dynamic threshold calculation formula is: , wherein represents the lens safety temperature threshold (°C), represents the current environmental dew point temperature (°C), represents the safety temperature margin (°C). The safety temperature margin is dynamically adjusted with the fogging risk level: 3°C when there is no risk (level 0), 5°C when there is low risk (level 1), 7°C when there is medium risk (level 2), and 10°C when there is high risk (level 3). The state of change in environmental temperature and humidity is also considered: when both temperature and humidity are in a state of rapid change, the safety temperature margin is additionally increased by 2°C; when only one is in a state of rapid change, the safety temperature margin is additionally increased by 1°C. The fogging risk related data is comprehensively processed to generate a standardized potential fogging state snapshot data structure. The snapshot data includes the following fields: current timestamp (accurate to seconds), current environmental temperature (°C), current environmental humidity (%RH), current dew point temperature (°C), center region surface temperature (°C), edge region surface temperature (°C), center region temperature difference (°C), edge region temperature difference (°C), environmental temperature change rate (°C / min), environmental humidity change rate (%RH / min), predicted dew point temperature after 30 minutes (°C), fogging risk level (0-3), predicted fogging time node (timestamp), dynamic lens safety temperature threshold (°C). The main controller writes the snapshot data to a dedicated buffer area through the data bus, and establishes a circular buffer to store the snapshot data of the last 24 hours for statistical analysis. When the fogging risk level is medium risk (level 2) or high risk (level 3), the main controller marks the snapshot data in red and triggers the emergency processing flag; when the risk level is low risk (level 1), it is marked in yellow; when the risk level is no risk (level 0), it is marked in green.
[0023] Especially important is that the dynamic lens safety temperature threshold is set according to the fogging risk level evaluation data, specifically: acquire historical fogging image data; perform edge detection processing on the historical fogging image data to obtain image edge sharpness data; perform image haze analysis on the historical fogging image data using the image edge sharpness data to generate time series image haze index data; According to the time sequence image haze index data, haze-temperature difference time sequence pairing is generated, and haze temperature difference time sequence data is generated; The haze temperature difference time sequence data is subjected to haze temperature difference regression analysis and correlation verification, and haze temperature difference correlation data is generated; According to the haze temperature difference correlation data, the anti-fog safety temperature margin is calculated, and the risk level weighting processing is carried out according to the fogging risk level evaluation data, and the dynamic lens safety temperature threshold is obtained.
[0024] In the embodiment of the application, image data under different environmental conditions in the past 30 days is collected by an image sensor to form a historical fogging image database. The collection frequency is set to trigger a high-frequency collection mode when the environmental temperature and humidity change significantly (temperature change exceeds ±0.5℃ / min or humidity change exceeds ±2%RH / min), and an image is collected every 10 seconds; when the environment is stable, an image is collected every 5 minutes. Each image is attached with a time stamp, a current environmental temperature value, an environmental humidity value, a protective cover surface temperature value (central region and edge region), and a dew point temperature difference value. The resolution of the collected image is fixed at 1920x1080 pixels, the color depth is 24 bits, and the image is compressed and stored in JPEG format with a compression quality of 85%. The image data is stored in the non-volatile memory of the main controller according to the date and humidity conditions to form a 2GB capacity circular buffer, and when the storage space is insufficient, the earliest image data is automatically deleted. The historical fogging image data is processed by using an improved Canny edge detection algorithm. First, the image is subjected to Gaussian filtering for noise reduction, the Gaussian kernel size is set to 5x5, and the standard deviation σ=1.4; then the image gradient is calculated, the Sobel operator is used to calculate the first derivative of the horizontal direction and the vertical direction and , the gradient amplitude calculation formula is , and the gradient direction calculation formula is ; then non-maximum suppression is performed to retain the local maximum gradient value point; finally, a double-threshold detection is applied to determine the edge, and the low threshold is set to 50 and the high threshold is set to 150. In order to improve the processing efficiency, the main controller divides the image into a central region (corresponding to the central 70% region of the lens field of view) and an edge region (corresponding to the peripheral 30% region of the lens field of view) for processing. After edge detection, the total number of image edge pixels Ne and the average gradient intensity of edge points Ge are calculated to generate image edge definition data, which includes edge quantity index and edge intensity index. An improved haze evaluation method based on dark channel prior is used to quantitatively analyze the historical fogging image. First, the dark channel prior value of the image is calculated, and the dark channel calculation formula is: , wherein represents the pixel value of the image in the RGB three channels, represents the pixel points within the local window centered at pixel x, with the window size set to 15x15 pixels. Then, an integrated haze evaluation index is established in combination with the edge sharpness data, and the calculation formula is: , wherein represents the image haze index, represents the average value of the dark channel, represents the total number of edge pixel points, represents the average gradient intensity of the edge points, , , are weight coefficients, with values of 0.5, 0.3, and 0.2, respectively. The haze index has a value range of 0-1, and the larger the value, the thicker the fog. The main controller calculates the haze index for each historical image and arranges them in chronological order to generate a time-series image haze index data. The time-series image haze index data is matched and paired with the dew point temperature difference data of the protective cover surface at the corresponding time. In the pairing process, each haze index is associated with the center area temperature difference and the edge area temperature difference at the same time according to the image acquisition timestamp. For data with inconsistent acquisition times, the linear interpolation method is used to calculate the temperature difference value at the corresponding time, and the interpolation formula is: , wherein is the image timestamp, and are the timestamps of adjacent temperature difference data, and are the temperature difference values at the corresponding time. After pairing, a time-series dataset containing the triple is generated, forming the haze temperature difference time-series data. The main controller cleans the dataset by removing outliers: when 10℃ or the value of the haze index abnormally jumps (the difference between the adjacent two measurements is greater than 0.3), the data point is marked as an abnormal point and removed from the dataset. A segmented polynomial regression method is used to establish a quantitative relationship model between the haze and the temperature difference. First, the haze index is taken as the dependent variable, and the temperature difference is taken as the independent variable to establish regression models for the center area and the edge area, respectively. When ≤5℃, a quadratic polynomial model is used: ; when >5℃, a linear model is used: . The model parameters are determined by the least squares method, and different parameter sets are calculated for the center area and the edge area. Then, the correlation of the model is verified, and the determination coefficient and the root mean square error are calculated: , wherein is the residual sum of squares, is the total sum of squares; , wherein is the actual haze value, is the model predicted value, is the sample number. When >0.85 and <0.1, the model is determined to be valid. Based on the validation result, the haze-temperature difference relationship function is obtained, and the haze-temperature difference correlation data is generated. The safety temperature margin required for anti-fogging is determined by using the haze-temperature difference correlation data. First, the critical haze threshold value =0.15 is defined, and when the haze is lower than this value, the image quality meets the monitoring requirements. By solving the equation , the critical temperature difference , i.e., the minimum temperature difference value required to maintain clear images, is obtained. Considering the environmental fluctuation factor, a safety margin is added to the critical temperature difference, and the basic safety temperature margin calculation formula is: . Then, according to the fogging risk level, weighted processing is performed: the weight is 1.0 when there is no risk (level 0), the weight is 1.2 when there is low risk (level 1), the weight is 1.5 when there is medium risk (level 2), and the weight is 2.0 when there is high risk (level 3). The final dynamic lens safety temperature threshold calculation formula is: risk level weight, wherein is the dynamic lens safety temperature threshold (℃), is the current environmental dew point temperature (℃). The calculation results are applied to the center area and the edge area respectively, and the larger value of the two is taken as the final dynamic lens safety temperature threshold.
[0025] Preferably, step S2 comprises the following steps: Step S21: acquiring real-time protective cover surface temperature data; Step S22: taking the real-time protective cover surface temperature data as the starting temperature of gradient preheating, and taking the target lens safety temperature threshold in the potential fogging state snapshot data as the preheating endpoint target temperature data; Step S23: calculating the total temperature difference according to the starting temperature of gradient preheating and the preheating endpoint target temperature data, and calculating the gradient expected average heating rate according to the fogging time node in the potential fogging state snapshot data, to obtain preheating process time characteristic data; Step S24: performing time-temperature target point sequence processing based on the starting temperature of gradient preheating, the preheating endpoint target temperature data, and the preheating process time characteristic data, to generate gradient heating curve data; Step S25: setting staged heating path data according to the gradient heating curve data; Step S26: heating power control sequence processing is performed according to the gradient temperature curve data, and a gradient preheating control strategy is constructed according to the staged preheating monitoring parameters.
[0026] In the embodiment of the application, a high-priority temperature reading instruction is sent to the cover surface temperature sensor through the data bus to obtain real-time protective cover surface temperature data. The reading frequency is set to once every 500 ms to ensure data timeliness. The cover surface temperature sensor uses a PT100 platinum resistance temperature sensor with an accuracy of ±0.1℃ and a measurement range of -50℃ to 150℃. The original temperature signal collected by the temperature sensor is processed by a signal conditioning circuit, including amplification, filtering, and analog-to-digital conversion. The amplification circuit has a gain of 10 times, the filtering circuit uses a second-order Butterworth low-pass filter with a cutoff frequency of 10 Hz to filter out high-frequency interference, and the analog-to-digital conversion uses a 16-bit precision ADC with a sampling rate of 20 Hz. The main controller applies a 5-point median filtering algorithm to the collected digital temperature signal to eliminate sudden noise points, and divides the processed data into center region temperature values and edge region temperature values, which are stored in a real-time temperature data buffer for subsequent gradient preheating control. The center region temperature values (Tc) ) and the edge region temperature values (Te) ) are extracted as the starting temperatures for gradient preheating. At the same time, the dynamic lens safety temperature threshold is read from the potential fogging state snapshot data, which has been calculated based on the environmental dew point temperature and the risk level in the foregoing steps. To ensure anti-fogging effect, the main controller sets the center region preheating end target temperature (Tc_end) ) to the dynamic lens safety temperature threshold plus 1℃, and sets the edge region preheating end target temperature (Te_end) ) to the dynamic lens safety temperature threshold plus 0.5℃. The two sets of temperature values form a quadruple data structure (Tc_end, Te_end, Tc_start, Te_start) ) as the temperature boundary conditions for gradient preheating. When the environmental temperature is detected to be lower than -20℃, the main controller will automatically increase the preheating end target temperature by 2℃ to avoid insufficient preheating due to excessively low environmental temperature. Based on the determined temperature boundary conditions, the center region total temperature difference (ΔTc) and the edge region total temperature difference (ΔTe) are calculated. The calculation formula is: wherein represents the center region total temperature difference (℃), represents the edge region total temperature difference (℃), and represent the center region and edge region preheating end target temperatures (℃), and represent the center region and edge region starting temperatures (℃). Then, the main controller reads the fogging time node from the potential fogging state snapshot data and calculates the time difference (Δt) between the current time and the fogging time node (min). Considering the preheating advance, 10 min is subtracted from the atomization time node as the deadline for completing preheating. The expected average temperature rise rate calculation formula is: wherein represents the expected average temperature rise rate in the central region (°C / min), represents the expected average temperature rise rate in the edge region (°C / min), and 2 represents the temperature stabilization time reserved by the system (min). When the calculated expected average temperature rise rate is greater than 6 °C / min, it is limited to 6 °C / min; when it is less than 0.5 °C / min, it is set to 0.5 °C / min, ensuring that the preheating process is both safe and effective. The improved S-shaped curve model is used to generate the gradient temperature rise curve, avoiding thermal stress damage caused by sudden temperature changes. First, the total preheating time is determined, that is, the greater value of the expected preheating time in the central region and the edge region is taken. Then, within the time range of 0 to , the time points are divided at an interval of 20 seconds, and a total of time nodes are generated. For each time node , the target values of the central temperature and the edge temperature are calculated, and the calculation formula uses the modified S-shaped function: wherein represents the target temperature value at time (°C), represents the initial temperature (°C), represents the total temperature difference (°C), represents the current time point (min), represents the total preheating time (min). This formula ensures that the temperature curve slowly rises at the initial stage, accelerates at the middle stage, and again slowly rises at the end stage, forming a smooth S-shaped temperature rise curve. The main controller organizes the calculation results into a triple sequence ( ), constituting a complete gradient temperature rise curve data structure. The gradient temperature rise curve is divided into three consecutive stages to achieve fine preheating control. The first stage is the preheating initial stage, with a time range of , characterized by synchronous temperature rise in the central region and the edge region, with the temperature rise rate in the central region being slightly higher than that in the edge region; the second stage is the preheating acceleration stage, with a time range of , characterized by the central region and the edge region both reaching the maximum temperature rise rate, with the temperature rise rate in the central region being 40% higher than that in the edge region; and the third stage is the preheating stable stage, with a time range of temperature. For each stage, the main controller sets corresponding temperature detection points and heating rate control parameters. The temperature detection points are evenly distributed at the time points of each stage, with 3 detection points for the first stage, 5 detection points for the second stage, and 4 detection points for the third stage. Each detection point contains the expected center temperature value, the expected edge temperature value, the allowed deviation range (±0.5°C), and the correction parameter. The gradient heating curve data is converted into specific heating power control instruction sequences. First, the relationship between temperature change and heating power is established through a thermal model: wherein represents the heating power (W), represents the thermal efficiency coefficient (value 0.85), represents the shield mass (g), represents the specific heat capacity of the shield material (J / g·°C), represents the heating rate (°C / s), represents the convective heat transfer coefficient (W / m²·°C), represents the shield surface area (m²), represents the shield target temperature (°C), represents the ambient temperature (°C). The required power is calculated for the center heating zone and the edge heating zone, forming a power-time control sequence. The control strategy uses a feedforward-feedback composite control method: feedforward control is based on the pre-calculated power sequence, and feedback control is based on the deviation of real-time temperature from the target temperature. The feedback control uses an improved PID algorithm, with the parameters set as: proportional coefficient KP=2.5, integral coefficient KI=0.08, and differential coefficient KD=0.5. When the actual temperature deviates from the target temperature by more than 0.8°C, the feedback correction mechanism is triggered to adjust the heating power; when the deviation is more than 2°C, the heating curve for the remaining time is automatically re-planned. The main controller also sets power upper limit protection: the maximum power limit for the center heating zone is 20W, and the maximum power limit for the edge heating zone is 15W, to ensure that the shield does not be damaged by overheating. The complete gradient preheating control strategy is implemented in the form of a state machine, including initialization, preheating execution, exception handling, and preheating completion of four main states.
[0027] Preferably, setting the staged heating path data according to the gradient heating curve data comprises: dividing into at least three preheating sub-stages according to the gradient heating curve data, each preheating sub-stage corresponding to an intermediate target temperature node data and a sub-stage duration data; The temperature value of every 10 seconds in the gradient temperature rising curve data is collected, the temperature rising rate between two adjacent temperature values is calculated, when the temperature rising rate of three continuous sampling points is greater than 2.5℃ / min, the temperature rising rate peak area is determined, the maximum temperature rising instantaneous peak value power is obtained by multiplying the maximum temperature rising rate in the temperature rising rate peak area by a safety factor 1.2, and the power value should not exceed 85% of the rated power of the equipment; A preset basic heating power upper limit is set for the intermediate target temperature node data of each preheating sub-stage, the upper limit increases with the stage but is overall lower than the maximum temperature rising instantaneous peak power, and the power constraint data of each sub-stage is obtained; In each preheating sub-stage, the smooth power increase curve is constructed by using a preset ramp function with the power constraint data of each sub-stage as the upper limit, and the smooth power control sequence data of the sub-stage is generated; The intermediate target temperature node data, the sub-stage duration data and the smooth power control sequence data of all sub-stages are combined to form the staged temperature rising path data, wherein the power is smoothly transitioned for 10-15 seconds at the transition point between each preheating sub-stage.
[0028] In the embodiment of the application, the gradient temperature rising curve data is processed in sections, and the whole preheating process is divided into three preheating sub-stages, namely, a preparation stage, an acceleration stage and a stable stage. The division method is based on the change characteristics of the curve slope: first, the first derivative (temperature rising rate) of the gradient temperature rising curve at each time point is calculated, then the second derivative (acceleration) is calculated, and the section points are determined according to the sign change of the second derivative. The specific algorithm is: when the second derivative changes from positive to negative, it is marked as the demarcation point between the acceleration stage and the stable stage; when the second derivative changes from negative to positive, it is marked as the demarcation point between the preparation stage and the acceleration stage. The duration of the preparation stage accounts for about 25% of the total preheating time, the acceleration stage accounts for about 45%, and the stable stage accounts for about 30%. For each preheating sub-stage, the duration data , 2, 3) and the corresponding intermediate target temperature node data , (the central region) and , (the edge region) are determined. The intermediate target temperature node is set as the target temperature value at the end of each stage, which is used as the starting temperature of the next stage. The temperature value sequence is extracted from the gradient temperature rising curve data at 10-second intervals, wherein seconds, is an integer, is the preheating starting time. For each sampling point, the temperature rising rate , in ℃ / min. The main controller scans the temperature rise rate sequence, and marks the interval as the temperature rise rate peak zone when the temperature rise rate of three consecutive sampling points is greater than 2.5 ℃ / min. Among all the identified temperature rise rate peak zones, the maximum temperature rise rate and its corresponding time point are found. According to the thermodynamic model, the temperature rise rate is approximately proportional to the heating power, so the maximum temperature rise rate point corresponds to the maximum power demand point. The maximum temperature rise transient peak power is calculated, where is the heat transfer efficiency coefficient (0.85), is the shield mass (g), is the specific heat capacity of the material (J / g·℃), is the heat transfer coefficient (W / m²·℃), is the shield surface area (m²), is the ambient temperature (℃). The calculated power value is multiplied by a safety factor of 1.2 to obtain the final maximum temperature rise transient peak power , which ensures that the value does not exceed 85% of the rated power of the equipment. Based on the temperature rise characteristics of each preheating sub-stage, stage power constraints are set. The upper limit of the basic heating power of each stage is calculated as follows: ; ; ; where are the upper limits of the basic heating power of the preparation stage, acceleration stage and stabilization stage, respectively (W), is the maximum temperature rise transient peak power (W). Considering the differentiated heating needs of the central and edge regions, the main controller further subdivides the power distribution ratio: the power ratio of the central heating zone to the edge heating zone is 64 in the preparation stage, 73 in the acceleration stage, and 55 in the stabilization stage. The upper limit of the central heating zone power and the upper limit of the edge heating zone power are calculated respectively. The power distribution is determined according to the test results of the thermal conductivity characteristics of the molten shielding material, and is adjusted according to the expected temperature difference between the central and edge regions. In each preheating sub-stage, a modified S-shaped ramp function is used to construct a gentle power increase curve to avoid thermal stress concentration caused by power steps. The expression of the ramp function is: , where P(t) represents the heating power at time t (W), represents the starting power of the sub-stage (W), represents the end power of the sub-stage (W), represents the start time of the sub-stage (s), represents the end time of the sub-stage (s), and For shape parameter, control the steepness of the curve. Preparation stage takes = 0.8, = 0.2; acceleration stage takes = 0.5, = 0.2; stable stage takes = 0.2, = 0.8. The main controller calculates the power curve for the center heating area and the edge heating area respectively, with a sampling interval of 5 seconds, to generate sub-stage smooth power control sequence data. When the calculated power value exceeds the corresponding stage power constraint, it is automatically truncated to the constraint value to ensure the safety and controllability of the heating process. The control data of the three preheating sub-stages are integrated into a complete staged temperature rising path data structure. The data structure contains five parallel arrays: time series, center area target temperature series, edge area target temperature series, center heating area power series, and edge heating area power series. To ensure smooth transition between stages, the main controller inserts a 15-second transition interval at the junction of adjacent sub-stages. The power in the transition interval is smoothly connected to the power values of the previous and next stages using a cubic spline interpolation method. The transition formula is: where is the start time of the transition interval, is the spline coefficient, determined by solving the equation set. The coefficient solving conditions include four boundary conditions: the start power value, the end power value, the start power derivative value, and the end power derivative value. The temperature target in the transition interval also uses a spline interpolation method to ensure continuity. The final generated staged temperature rising path data contains a complete time series (from the start of preheating to the end, with a sampling interval of 5 seconds) and corresponding temperature and power control points.
[0029] Preferably, step S3 comprises the following steps: Step S31: Adjust the sampling frequency of the environment temperature sensor and the environment humidity sensor through the fogging risk level evaluation data in the potential fogging state snapshot data, and obtain high-frequency environment temperature and humidity data; Step S32: Perform gradient preheating trigger judgment on the high-frequency environment temperature and humidity data through the preset gradient preheating start threshold to generate a gradient preheating trigger signal; Step S33: When the gradient preheating trigger signal is true, start gradient preheating and perform dynamic preheating adjustment based on the gradient preheating control strategy to generate dynamic preheating adjustment data; Step S34: When the gradient preheating trigger signal is false, do not start gradient preheating, and perform immediate heating control parameter processing to generate immediate heating control parameters; Step S35: Obtain current stage driving voltage data; Step S36: target driving current value calculation based on current stage driving voltage data, target heating current data is generated by dynamic preheating adjustment data and real-time heating control parameters; Step S37: target heating current data is duty cycle modulated, and heating driving instruction encapsulation is performed to generate heating driving instruction data.
[0030] In the embodiment of the application, the sampling frequency of the environmental sensor is dynamically adjusted according to the fogging risk level evaluation data in the potential fogging state snapshot data. The sampling frequency adjustment follows the risk level corresponding table: the sampling frequency is set to 30 seconds / time when there is no risk (level 0), 20 seconds / time when there is low risk (level 1), 10 seconds / time when there is medium risk (level 2), and 5 seconds / time when there is high risk (level 3). The main controller sends a sampling frequency modification instruction to the environmental temperature sensor and the environmental humidity sensor through the data bus to modify the internal timer trigger interval. At the same time, the main controller allocates a special buffer area for high-frequency temperature and humidity data, with a size of 512 bytes, which is stored in a circular coverage manner. After each sampling, the short-term change rate of temperature and humidity is calculated in real time: and , wherein and is the current sampling temperature and humidity value, and is the last sampling temperature and humidity value, is the sampling interval (seconds). When or , the sampling frequency is automatically increased by one level, up to 2 seconds / time, to capture rapidly changing environmental data. The high-frequency environmental temperature and humidity data is analyzed using a multi-parameter combination judgment method to determine whether to trigger gradient preheating. First, the temperature difference between the current protective cover surface and the environmental dew point is calculated , wherein is the protective cover surface temperature (℃), is the current environmental dew point temperature (℃). Then the short-term dew point change trend is calculated , wherein is the current dew point temperature, is the dew point temperature 5 minutes ago, and 12 is the hour conversion coefficient, in units of ℃ / h. Then the preheating trigger judgment formula is constructed: , wherein is the temperature difference influence function, is the dew point trend influence function, is the humidity level influence function, RH is the relative humidity value (%), is the weight coefficient. When the calculated value is greater than the preset threshold value 0.65, a gradient preheating trigger signal is generated as true; otherwise, it is false. In special cases, when 1.5℃, no matter Preheating is triggered regardless of the value; when the ambient temperature is below -10℃ and the humidity is above 85%, preheating is triggered directly. When the gradient preheating trigger signal is true, the main controller immediately starts the gradient preheating program. The main controller first loads the constructed gradient preheating control strategy, including staged heating path data and heating power control sequence. Preheating is executed using a real-time control loop with a control cycle of 500ms. Within each control cycle, the main controller reads the current surface temperature of the protective cover (center area temperature). and edge region temperature ), and the target temperature at the current moment ( and Compare and calculate the temperature deviation: The heating power is adjusted based on the deviation value, and the adjustment method employs an improved PID control algorithm: ,in Power adjustment amount (W). This is a scaling factor (2.0 for the central region and 1.8 for the edge region). The integral coefficient is 0.05 for the central region and 0.04 for the edge region. This is the differential coefficient (0.5 for the central region and 0.4 for the edge region). It automatically increases when the ambient temperature is below 0℃. A 20% value is added to enhance the integral effect. The real-time calculated power adjustment is superimposed on the preset power control sequence to generate dynamic preheating adjustment data, including power adjustment values for the central and edge regions. When the gradient preheating trigger signal is false, the main controller executes instantaneous heating control logic. Instantaneous heating control determines control parameters based on the difference between the current surface temperature of the protective cover and the ambient dew point temperature. Control parameter processing follows these rules: First, the temperature difference in the central region is calculated. Temperature difference in edge areas ,in and The surface temperatures (°C) are for the central region and the edge region, respectively. The ambient dew point temperature (°C). At that time, set the heating power of the central area. ,in The base power value is 8W; when hour, That is, no heating. Similarly, when At that time, set the heating power of the edge area. ,in The base power value is 6W; when hour, Calculated and The instant heating control parameters are constituted, and the target heating power values of the center region and the edge region are respectively represented. When the ambient temperature is lower than -5℃, the values are automatically increased to 10W and 8W respectively to resist the intensified heat dissipation in the low temperature environment. and respectively. The current power supply voltage data of the heated anti-fog camera is obtained through the built-in voltage sampling circuit. The voltage sampling circuit is composed of a precision resistance voltage dividing network and a 16-bit high-precision ADC, and the sampling resolution is 0.1mV. The sampling frequency is set to 4 times per second, and the sampling value is subjected to 5-point median filtering processing to eliminate power supply fluctuation interference. The driving voltage data is used for subsequent current calculation and power control. The main controller sets the voltage monitoring threshold: when the power supply voltage is lower than 11.5V or higher than 13.5V, the voltage abnormality processing program is started. The voltage abnormality processing program first judges the degree of abnormality: if the voltage is within the range of 10.5V-11.5V or 13.5V-14.5V, the warning information is recorded and the running continues; if the voltage is lower than 10.5V or higher than 14.5V, the error information is recorded and the heating function is suspended, and an alarm signal is output. At the same time, the main controller calculates the voltage change trend ΔV / Δt within 1 minute, and when , the dynamic compensation mechanism is started to pre-adjust the subsequent current calculation to adapt to the voltage fluctuation environment. The main controller stores the latest voltage value into the current stage driving voltage data variable. According to Ohm's law and power relationship, the power demand is converted into current control value. When the gradient preheating trigger signal is true, the power value in the dynamic preheating adjustment data is used; when the trigger signal is false, the power value in the instant heating control parameter is used. The current calculation formula is: , wherein is the target current value (A), is the required power value (W), is the current driving voltage value (V). The current values of the center heating area and the edge heating area are calculated respectively: and , wherein and are the target current values (A) of the center region and the edge region respectively, and are the required power values (W) of the corresponding regions respectively, is the current driving voltage value (V). The calculated current value also needs to be corrected by the temperature coefficient: , wherein is the corrected current value (A), is the original calculated current value (A), is the temperature coefficient (-0.002 / ℃), is the current protective cover surface temperature (℃), The reference temperature is 25℃. The main controller limits the corrected current value within a safe range: the maximum current in the central area is limited to 2.0A, and the maximum current in the edge area is limited to 1.5A, generating target heating current data. Pulse Width Modulation (PWM) technology is used to convert the target heating current data into a heating control signal. The PWM basic frequency is set to 20kHz, which is higher than the range of human hearing to avoid noise generation. Duty cycle Calculation formula: ,in Duty cycle (%) The target current value (A). The maximum current value is set to the system current (2.0A in the center area and 1.5A in the edge area). PWM control uses 12-bit precision with a resolution of 0.024% to ensure accurate control of heating power. The main controller encapsulates the calculated duty cycle value into a standard heating drive instruction, with a 32-bit data packet format: [Start Identifier (8 bits)][Area Identifier (4 bits)][Duty Cycle Value (12 bits)][Checksum (8 bits)]. The start identifier is fixed at 0xAA, the area identifier is 0x1 for the center area and 0x2 for the edge area, and the checksum is calculated using the CRC-8 algorithm. The heating drive instruction is transmitted to the power drive module via the SPI bus at a rate of 500kbps. After receiving the instruction, the power drive module executes the corresponding PWM output control. The main controller updates the heating drive instruction every 100ms to ensure the real-time performance and stability of temperature control.
[0031] Most importantly, the dynamic preheating adjustment and real-time heating control parameter processing are specifically as follows: When the gradient preheating trigger signal is true, gradient preheating is started, and the heating power of the current stage is executed according to the gradient preheating control strategy to obtain the current preheating execution power data. Continuously collect measured temperature data of the lens surface and compare it with the intermediate target temperature node data in the gradient preheating control strategy data to obtain preheating temperature control deviation data; PID gradient tracking is performed based on preheating temperature control deviation data, and fine-tuning and optimization are performed based on the sub-stage smooth power control sequence data of the next preheating stage in the gradient preheating control strategy to obtain dynamic preheating adjustment data. When the gradient preheating trigger signal is true, gradient preheating is not started. The full-power target temperature rise is calculated based on the target lens safety temperature data and the measured lens surface temperature data in the potential fogging trend assessment data to obtain the required instantaneous heating temperature rise data. The heating power level is determined based on the required real-time heating temperature rise data, and the real-time heating control parameters are obtained.
[0032] In this embodiment of the invention, upon receiving the gradient preheating trigger signal, the gradient preheating control strategy data is immediately read from the memory. The reading process employs a high-priority interrupt method to ensure a response time of no more than 5 milliseconds. The main controller first determines the current preheating sub-stage by calculating the current time t and the preheating start time. The difference Duration of each sub-stage When comparing, This is the first sub-phase, when This is the second sub-phase, when This is the third sub-stage. After determining the sub-stage, the power value corresponding to the current time moment is extracted from the smoothed power control sequence data of the sub-stage. The extraction method uses lookup table interpolation: finding the two control points closest to the current time moment. and Corresponding power value and Then through linear interpolation Calculate the precise power value at the current moment. The calculation result also includes the power of the central heating zone. and edge heating zone power These factors together constitute the current preheating execution power data. The drive lens cover temperature sensor continuously acquires measured temperature data of the lens surface at a sampling period of 250 milliseconds. During the acquisition process, the signal from the PT100 temperature sensor is oversampled 16 times, and then temperature data fluctuations are eliminated using a Kalman filter algorithm. The filter parameters are set as follows: measurement noise covariance R = 0.1, process noise covariance Q = 0.01, ensuring the stability of the temperature readings. The filtered measured temperature data is divided into central region temperature... and edge region temperature Two parts. The main controller extracts the target temperature value corresponding to the current moment from the gradient preheating control strategy data, using the same lookup table interpolation calculation method. This yields the target temperature for the central region. and target temperature in the edge region Then, calculate the temperature deviation: , Deviation data is recorded in the preheating temperature control deviation data structure, along with the duration and trend of the deviation. When or A warning sign for excessive deviation is triggered when the temperature exceeds 2°C for more than 10 seconds. An improved incremental PID algorithm is used to adjust the heating power in real time. The basic formula for the PID algorithm is: ,in No. Power adjustment amount for each sample. These are the temperature deviation values for the current, previous, and two time ago samples, respectively. PID parameters. The center region PID parameter setting is: ; the edge region PID parameter setting is: . The parameter values are determined by thermal system characteristic analysis. In the control process, the main controller monitors the temperature deviation rate of change , and when , the KD value is temporarily increased by 50%, enhancing the system's ability to suppress temperature mutations. The calculated power adjustment amount is superimposed with the preset power value in the sub-stage smooth power control sequence data to obtain the adjusted power value . In addition, the main controller pre-reads the starting power value of the next preheating stage , and when the distance from the stage conversion time is less than 15 seconds, a smooth transition function is introduced to adjust the current power value: , generating dynamic preheating adjustment data. When the gradient preheating trigger signal is false, the main controller executes the instant heating control logic. First, extract the target lens safety temperature threshold from the potential fogging state snapshot data , then read the current lens surface measured temperature data to obtain the center region temperature and the edge region temperature . Calculate the target temperature rise value: (center region), (edge region). Since instant heating requires fast response, the main controller sets a full power heating threshold , and when the target temperature rise value exceeds this threshold, full power heating is executed, otherwise the power is proportionally allocated. The required instant heating temperature rise for the center region is: ; the required instant heating temperature rise for the edge region is: . When the temperature difference between the two regions is , the area with lower temperature is given priority. At the same time, the main controller evaluates the urgency of the instant heating temperature rise requirement, calculates the dew point proximity index , where is the current environmental dew point temperature. When , it indicates that the surface temperature of the protective cover is close to the dew point temperature, the heating priority is increased, and the instant heating temperature rise requirement is increased accordingly . According to the required instant heating temperature rise data and determining the corresponding heating power level. The heating power is divided into five levels: level 0 (no heating, 0W), level 1 (slight heating, 2W in the center area and 1.5W in the edge area), level 2 (low heating, 5W in the center area and 3.5W in the edge area), level 3 (medium heating, 8W in the center area and 6W in the edge area), and level 4 (high heating, 12W in the center area and 9W in the edge area). The power level division is determined based on thermodynamic experimental data, and the corresponding temperature rise rates of each level are 0℃ / min, 0.5℃ / min, 1.2℃ / min, 2.0℃ / min, and 3.5℃ / min, respectively. The power level determination formula is: wherein represents the minimum integer not less than When the ambient temperature is lower than 0℃, considering the intensified heat dissipation, the calculated power level is increased by 1 level. The heating power calculation formula is: wherein and are the basic power value arrays corresponding to each level in the center area and the edge area, respectively. When the ambient temperature is lower than -10℃, in order to overcome strong heat dissipation, the actual heating power is increased by 15%. The calculated and are packaged as instant heating control parameters, including the center area heating power value, the edge area heating power value, the heating duration (set to 60 seconds), and the temperature check flag after heating.
[0033] Preferably, the water vapor condensation characterization analysis of the image frame data under the current heating state in step S4 includes: extracting the region of interest from the image frame data under the current heating state to obtain core monitoring area image data; performing edge detection and spatial frequency analysis on the core monitoring area image data to obtain image high-frequency component feature data; performing contrast evaluation on the core monitoring area image data to obtain image contrast data; performing signal-to-noise ratio calculation on the core monitoring area image data to obtain image signal-to-noise ratio data; performing image quality evaluation based on the image high-frequency component feature data, the image contrast data, and the image signal-to-noise ratio data to obtain real-time image quality data; performing water vapor condensation characterization analysis on the image frame data under the current heating state through the real-time image quality data to obtain slight fogging image characterization data.
[0034] In this embodiment of the invention, the current frame image is acquired from an image sensor via a data bus, with a resolution of 1920×1080 pixels and a color depth of 24 bits. After image acquisition, geometric region division is first performed, dividing the entire image into a central region (accounting for 60% of the total area) and an edge region (accounting for 40% of the total area). The region of interest extraction algorithm adopts an adaptive partitioning method: first, the image is divided into a 5×5 grid, and the variance of each grid is calculated. Where I(x, y) is the pixel grayscale value at that location For grid Average gray value, The number of pixels within the grid is given. Then, the top 9 grids with the highest variance are selected as the initial region of interest. To ensure the integrity of the monitoring area, adjacent high-variance grids are merged, with the merging condition being that the difference in the average grayscale value between grids is less than 15% of the total grayscale range. A rectangle fit is then performed on the merged region to obtain the final core monitoring area coordinates, which include the values of four vertices. To ensure the core monitoring area occupies 40%-70% of the total image area, pixel data of the core monitoring area is extracted from the original image to form the core monitoring area image data. Gradient vector method is applied to the core monitoring area image data for edge detection. First, the color image is converted to a grayscale image using the following formula: ,in The converted grayscale value. , The original image at points The values of the red, green, and blue channels are then calculated. The gradient is then calculated using the Sobel operator. ,in This represents the convolution operation. This is a grayscale image. Gradient magnitude. gradient direction Edge detection is performed using non-maximum suppression and a double thresholding method. The lower threshold is set to 40% of the higher threshold, and the higher threshold is set to 1.5 times the average gradient magnitude. After edge detection, spatial frequency analysis is performed on the image: first, a two-dimensional discrete Fourier transform (DFT) is applied to convert the image from the spatial domain to the frequency domain, and then the magnitude of each frequency component is calculated to obtain the spectrum. ,in and The image uses horizontal and vertical frequency coordinates. The energy proportions of the low-frequency region (0-0.1fmax), mid-frequency region (0.1fmax-0.4fmax), and high-frequency region (0.4fmax~max) are statistically analyzed, along with the spatial distribution characteristics of the high-frequency components, generating high-frequency component feature data for the image. A multi-scale local contrast analysis method is used to evaluate image sharpness. First, the global contrast ratio is calculated. ,in and These are the maximum and minimum grayscale values of the core monitoring area image, respectively. Then, the core monitoring area is divided into an 8×8 uniform grid, and for each sub-region... Calculate local contrast: ,in sub-region standard deviation This represents the average gray value of the sub-region. To evaluate image detail, a local contrast frequency distribution histogram is calculated. The contrast value range [0, 1] is divided into 10 equal intervals, and the number of pixels in each interval is counted. The entropy of the contrast distribution is then calculated. Used to evaluate the richness of contrast, among which This represents the probability that the contrast value falls within interval C. Additionally, the weighted average contrast is calculated. Weight The weight of the sub-region is determined based on its location, with the central region having a weight of 1.0 and the edge regions having a weight of 0.7. The contrast change rate is also calculated. The contrast of the current frame is compared with the average contrast of the previous 5 frames to evaluate the trend of contrast change over time. Finally, image contrast data including global contrast, local contrast distribution, contrast entropy, and rate of change are generated. An improved peak signal-to-noise ratio (PSNR) method is used to evaluate image signal quality. The basic calculation formula is: Where MAX is the maximum pixel value (255) and MSE is the mean squared error. Since there is no reference image, a variance-based estimation method is used: first, a 3×3 Gaussian filter (σ=0.5) is applied to the core monitoring area image to obtain the filtered image. The difference between the original image and the filtered image is used as the noise estimate. Calculate the noise variance. ,in Given the image width and height, then estimate the signal variance. , The average grayscale value of the original image is given. The signal-to-noise ratio is then derived. To improve the accuracy of the assessment, a structural similarity index is calculated. ,in These are the average values of the original image and the filtered image, respectively. These are the variances of the two entities, For covariance, , This is a constant term. The weighted signal-to-noise quality index is obtained by combining SSIM and SNR. This reflects the overall performance of image signal quality. Finally, image signal-to-noise ratio data including SNR, SSIM, and WSNQ is generated. A multi-dimensional image quality scoring system is constructed using the analytic hierarchy process (AHP). First, each indicator is standardized: wherein is the original index value, are the minimum and maximum values in the historical data, respectively, is the normalized value. The high-frequency energy proportion , the edge sharpness index is extracted from the image contrast data. The global contrast , the contrast entropy is extracted from the image signal-to-noise ratio data. The image quality score formula is constructed: wherein is the weight coefficient, which is determined by discrete selection test. To monitor the time-varying trend of image quality, the image quality change rate is calculated. Compared with the average quality score of the previous 30 frames, it is determined whether the image quality is in a downward trend. When there are 5 consecutive frames , the image quality is marked as a warning. The main controller combines the current value, value and alarm state into real-time image quality data. Based on the real-time image quality data, a water vapor condensation representation model is constructed to identify the slight fogging feature. First, the fogging influence feature vector is established, wherein represents the contrast drop rate, represents the sharpness drop rate, represents the high-frequency component drop rate, represents the low-frequency component rise rate, and each component is a normalized value. Then, the fogging representation function is calculated, wherein 3, is the weight coefficient. The water vapor condensation degree is divided into four levels: no fog , slight fogging , moderate fogging , and severe fogging . For the slight fogging state, the fogging area distribution is further analyzed: the local fogging index of the image sub-region is calculated to generate a fogging distribution heat map; the fogging area percentage and the fogging area concentration value are extracted. The smaller the value, the more dispersed the fogging. Finally, the slight fogging image representation data is generated, including the fogging representation value , the fogging degree level, the fogging area percentage , the fogging area concentration , and the fogging distribution heat map data.
[0035] Preferably, step S5 comprises the following steps: Step S51: Based on the image characterization data of slight fogging, conduct a preliminary assessment of the anti-fog effect and obtain the preliminary assessment index of the anti-fog effect; Step S52: When the initial evaluation index of the anti-fog effect is lower than the preset clarity benchmark value, it is determined that the current image clarity is unqualified. Step S53: Obtain the temperature value at the center of the protective cover and the temperature value at the edge of the protective cover based on the current image clarity failure signal; Step S54: Calculate the temperature difference requirements for the central heating zone and the edge heating zone based on the temperature values at the center and edge of the protective cover, respectively, to obtain the zoned heating temperature difference requirement data; Step S55: Calculate the real-time monitoring temperature difference based on the temperature value at the center of the protective cover and the temperature value at the edge of the protective cover, and generate the real-time monitoring temperature difference. Step S56: Dynamically adjust the PID control parameters based on the zone heating temperature difference requirement data and the real-time monitored temperature difference value to generate optimized PID control parameter configuration data; Step S57: Based on the optimized PID control parameter configuration data, re-execute the heating control and image effect acquisition to obtain the correlation data between the secondary control and the image effect; Step S58: Evaluate the effectiveness of defogging based on the correlation data between secondary control and image effect, and iteratively optimize the heating reference parameters to generate adaptive heating control reference data.
[0036] In this embodiment of the invention, slightly fogged image characterization data is received, and a preliminary evaluation of the anti-fogging effect is performed through a comprehensive scoring mechanism. The evaluation system first analyzes the fogging characterization values. Atomization level, percentage of atomized area and the concentration of the atomization area Four core indicators. The anti-fog performance score is calculated using a multi-dimensional weighted model: ,in This represents a preliminary assessment index of anti-fog effectiveness, ranging from 0 to 100, with higher values indicating better clarity. (For fogging characterization values...) For fog-free cases with a value below 0.15, assign the value directly. =95; for 0.15≤ For slight fogging conditions (<0.35), the above scoring formula should be applied; for For moderate to severe fogging conditions with a value ≥0.35, assign a value directly. The main controller stores the calculation results into the anti-fog effect evaluation data structure, and simultaneously records relevant information such as image acquisition timestamps, ambient temperature and humidity, and the surface temperature of the protective cover. The initial anti-fog effect evaluation index E is then compared with a preset clarity benchmark value. A comparison was made. The sharpness benchmark was determined using a pre-established subjective image quality evaluation database containing 1000 images under different environmental conditions and levels of fog. Each image was scored by a professional evaluation team, and a score-sharpness correspondence was established. Based on this database, the following criteria were determined: As a threshold, this threshold ensures that the image clarity meets the basic recognition requirements of the monitoring scene. When When this occurs, the main controller generates a signal indicating that the current image clarity is substandard. The system is configured with a multi-level judgment mechanism: when... When, it is marked as slightly non-compliant; when When, it is marked as moderately non-compliant; when When this occurs, it is marked as a serious non-compliance. The non-compliance signal includes three key fields: the degree of non-compliance indicator, the preliminary assessment index E value of the current anti-fog effect, and the difference between the index and the benchmark value. This determines the parameter adjustment range for subsequent zoned heating control. The main controller pushes the non-compliance signal to the control logic processing unit, triggering the subsequent temperature acquisition and heating adjustment process. Upon receiving the current image clarity non-compliance signal, a high-frequency temperature sampling program is immediately triggered, sending a data acquisition command to the surface temperature sensor. Temperature acquisition uses a 16-bit AD converter, increasing the sampling frequency to 4 times / second, four times higher than the ordinary monitoring mode, ensuring real-time temperature data. A multi-point acquisition mode is used during sampling: three temperature sensing points are evenly distributed at 120° in the central heating zone, and six temperature sensing points are evenly distributed at 60° in the edge heating zone. Five consecutive acquisitions are made for each sensing point, and the highest and lowest values are discarded before averaging. The temperature value TC in the central heating zone is calculated as the average of the three sensing points. The temperature value TE in the edge heating zone is calculated as the average of 6 sensing points. The main controller compares the acquired temperature value with the temperature value triggered by the previous failed signal. When the temperature difference between the two acquisitions exceeds 1.5℃, a third acquisition is triggered, and the median of the three results is taken to eliminate the influence of abnormal temperature fluctuations. The final result... and These values are used as the center temperature and edge temperature of the protective shield, respectively, for subsequent temperature difference calculations. Based on the center temperature of the protective shield... Temperature values at the edge of the protective cover Combined with the current environmental dew point temperature In addition to image data representing slight fogging, the required heating temperature difference for each zone is calculated. The calculation process first establishes the baseline values for the required temperature difference: , ,in The target lens's safe temperature threshold. Adjust the temperature difference requirement coefficient according to the degree of non-compliance. When slightly substandard When moderate non-compliance , serious unqualified . Further combine with atomization distribution heat map data to optimize partition temperature difference requirement: if the heat map shows that atomization is mainly concentrated in the central area, increase the central area temperature difference requirement coefficient by 0.2; if it is mainly concentrated in the edge area, increase the edge area temperature difference requirement coefficient by 0.2; if it is evenly distributed, maintain the original coefficient. Finally calculate the partition heating temperature difference requirement: , wherein and are the adjusted central area and edge area coefficients. Difference analysis is performed on the shield center temperature value and the shield edge temperature value to monitor the temperature distribution uniformity of the shield surface. Real-time monitoring temperature difference calculation uses the absolute temperature difference between the central area and the edge area: . At the same time, the temperature uniformity index of each area is calculated: the central area temperature standard deviation and the edge area temperature standard deviation , wherein is the temperature value of the three sensing points in the central area, is the temperature value of the six sensing points in the edge area. The main controller combines three indicators into a real-time monitoring temperature difference data structure. In addition, the main controller also maintains a temperature difference history record, stores the temperature difference data in the last 10 minutes, calculates the temperature difference trend , which represents the temperature difference change rate (℃ / min) in the last 5 minutes. When continues for more than 2 minutes, or , or , the system marks a temperature non-uniformity warning and notifies the subsequent PID control parameter adjustment program. According to the partition heating temperature difference requirement data and the real-time monitoring temperature difference, the PID control parameters are dynamically adjusted in real time. The adjustment process first sets the standard PID parameters for the central area and the edge area: (center area); (edge area). Parameter scaling is performed according to the temperature difference requirement size: when the temperature difference requirement exceeds 5℃, the value of increases by 25%, accelerating the system response; when the temperature difference requirement is less than 2℃, the value of increases by 20%, enhancing the system stability. According to the real-time monitoring temperature difference data, adjust the balance between areas: when , the value of in the lower temperature area increases by 15%, and the value of in the higher temperature area decreases by 10%; when or exceeds the threshold, the value of in the corresponding area decreases by 30%, avoiding temperature overshoot. For the temperature difference change trend When its absolute value is greater than 0.3℃ / min, increase A value of 30% enhances the system's ability to suppress rapid temperature changes. The main controller combines the adjusted parameters into optimized PID control parameter configuration data, including both central and peripheral regions. Values, and control cycle setpoints (Set to 2 seconds) and maximum output limit (15W for the central area, 12W for the edge area). Based on the optimized PID control parameter configuration data, the heating power of the central and edge areas is recalculated. The heating control is implemented using an incremental PID algorithm. ,in For the first Power adjustment amount for each sample. These are the current, previous, and two years ago temperature deviation values, respectively. The control cycle strictly follows... Execution is performed, and the power adjustment amounts for the central and peripheral regions are calculated separately within each cycle. and , with the current power value and The superposition yields a new power command: and Output power is strictly limited to Within the specified range, the main controller converts the calculated power command into a heating drive command via duty cycle modulation. This command is then transmitted to the power drive module via the SPI bus at a rate of 1 Mbps. After adjusting the heating power, the main controller continues to monitor the temperature change of the protective cover. When the temperature approaches the target value (difference less than 1°C) and stabilizes for 15 seconds, it triggers the image sensor to capture a new image frame and records the current heating power value, protective cover temperature value, environmental parameters, and other data, forming the data linking secondary control and image effect. The water vapor condensation characterization analysis process is repeated to obtain the atomization characterization value M' and the percentage of atomized area after secondary control. And other indicators. Calculate the defogging effectiveness indicators: This represents the percentage improvement in atomization. Additionally, the heating efficiency index is calculated. ,in and These are the anti-fog effect evaluation indices before and after the second adjustment. and The heating power values of the central region and the edge region. The main controller maintains a deep learning-based defogging effect prediction model, which inputs environmental temperature and humidity, shield temperature, heating power and other parameters, and outputs expected defogging effect. By comparing the difference between the actual defogging effect and the model prediction result, the model parameters are continuously updated to improve the prediction accuracy. At the same time, the main controller establishes a heating reference parameter library to record the optimal heating parameter configuration under different environmental conditions, including PID control parameters, temperature safety margin, power distribution ratio, etc. Based on the current defogging effectiveness evaluation results, the parameter records under the corresponding environmental conditions are updated, and if the current defogging efficiency is higher than the historical record, the new reference parameters are replaced. All optimization results are integrated to form adaptive heating control reference data for the next heating control decision optimization under similar conditions.
[0037] Preferably, the application also provides a heating anti-fog camera temperature control system for executing the heating anti-fog camera temperature control method as described above, which comprises: A dew point risk assessment module is configured to obtain camera operation state data, collect multi-source environmental temperature and humidity according to the camera operation state data, calculate the temperature difference between the shield surface and the air dew point, generate shield surface dew point temperature difference data, and perform fogging risk assessment according to the shield surface dew point temperature difference data to generate potential fogging state snapshot data. A preheating strategy control module is configured to construct a gradient preheating control strategy based on the potential fogging state snapshot data. A gradient preheating execution module is configured to perform gradient preheating trigger judgment according to the potential fogging state snapshot data, generate a gradient preheating trigger signal, perform dynamic preheating control based on the gradient preheating trigger signal through the gradient preheating control strategy, and package heating driving instructions to generate heating driving instruction data. An image state monitoring module is configured to perform heating control according to the heating driving instruction data, and simultaneously capture image frame data in the current heating state in real time using an image sensor; perform water vapor condensation characterization analysis according to the image frame data in the current heating state to obtain slight fogging image characterization data. An adaptive parameter optimization module is configured to perform partition heating dynamic regulation and control through the slight fogging image characterization data, then re-perform heating control and image effect acquisition to obtain secondary regulation and image effect correlation data, and perform heating reference parameter iterative optimization according to the secondary regulation and image effect correlation data to generate adaptive heating control reference data.
[0038] Preferably, the application also provides a heating anti-fog camera, which comprises: The camera body is provided with a lens module and an image sensor; a transparent protective cover is arranged in front of the camera body; a heating control unit is arranged around or attached to the transparent protective cover and is used for heating the transparent protective cover; the heating control unit comprises a center heating area for heating the center area of the transparent protective cover and an edge heating area for heating the edge area of the transparent protective cover; a cover surface temperature sensor is arranged on or near the surface of the transparent protective cover and is used for detecting the surface temperature of the transparent protective cover; the cover surface temperature sensor comprises a center temperature sensing point and an edge temperature sensing point correspondingly; an environment temperature sensor is arranged outside the transparent protective cover and is used for detecting the ambient temperature of the heated anti-fog camera; an environment humidity sensor is arranged outside the transparent protective cover and is used for detecting the ambient humidity of the heated anti-fog camera; and a main controller is electrically connected with the image sensor, the heating control unit, the cover surface temperature sensor, the environment temperature sensor and the environment humidity sensor through a data bus; wherein the main controller is configured to execute the above-mentioned temperature control system of the heated anti-fog camera.
[0039] Therefore, embodiments should be considered in all respects as illustrative and not restrictive, the scope of the application being defined by the appended claims rather than the description given above, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
[0040] The above description is merely that of a specific implementation of the present application, which enables those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for temperature control of a heated anti-fog camera, characterized in that, For use in heated anti-fog cameras, the following steps are included: Step S1: Acquire camera operation status data; collect multi-source environmental temperature and humidity data based on camera operation status data, calculate the temperature difference between the protective cover surface and the air dew point, and generate protective cover surface dew point temperature difference data; conduct fogging risk assessment based on protective cover surface dew point temperature difference data, and generate potential fogging status snapshot data. Step S2: Construct a gradient preheating control strategy based on snapshot data of potential fogging conditions; Step S3: Based on the potential fogging state snapshot data, determine the gradient preheating trigger and generate a gradient preheating trigger signal; based on the gradient preheating trigger signal, perform dynamic preheating control through a gradient preheating control strategy, and encapsulate the heating drive command to generate heating drive command data. Step S4: Perform heating control according to the heating drive command data, and simultaneously use the image sensor to capture image frame data under the current heating state in real time; perform water vapor condensation characterization analysis based on the image frame data under the current heating state to obtain image characterization data of slight fogging; Step S5: Perform dynamic adjustment of zoned heating using the image characterization data of slight fogging, and then re-execute heating control and image effect acquisition to obtain secondary adjustment and image effect correlation data; perform iterative optimization of heating benchmark parameters based on the secondary adjustment and image effect correlation data to generate adaptive heating control benchmark data.
2. The temperature control method for a heated anti-fog camera according to claim 1, characterized in that, In step S1, multi-source environmental temperature and humidity data are collected based on the camera's operational status data, and the temperature difference between the protective cover surface and the air dew point is calculated, including: The system periodically reads the measured values from the ambient temperature sensor, ambient humidity sensor, and canopy temperature sensor based on the camera's operational status data to obtain the raw multi-source sensor data. The raw multi-source sensor data is digitally filtered and preprocessed to obtain ambient temperature data, ambient humidity data, and protective cover surface temperature data. Calculate the current ambient dew point temperature based on ambient temperature and humidity data, and generate the current ambient dew point temperature data. The temperature difference between the surface of the protective cover and the air dew point is calculated by using the current ambient dew point temperature data to obtain the dew point temperature difference data of the protective cover surface.
3. The temperature control method for a heated anti-fog camera according to claim 2, characterized in that, Step S1, which assesses the risk of fogging based on the dew point temperature difference data on the surface of the protective cover, includes: The environmental temperature and humidity change rate analysis is performed to obtain environmental temperature and humidity change state data. The environmental temperature and humidity change state data includes rapid temperature change state and rapid humidity change state. When the temperature change rate exceeds ±0.8℃ / min, it is marked as a rapid temperature change state; when the humidity change rate exceeds ±3%RH / min, it is marked as a rapid humidity change state. Time series analysis was performed on the environmental temperature and humidity change data, and the dew point change trend was predicted based on the dew point temperature difference data on the surface of the protective cover, thus obtaining the predicted dew point change trend data. Fog risk level assessment is conducted based on predicted dew point change trend data, and fog risk level assessment data is generated. By using fogging risk level assessment data to identify fogging time nodes in the predicted dew point change trend data, fogging time nodes are generated. Set the dynamic lens safety temperature threshold based on fogging risk level assessment data; Real-time fogging risk snapshot processing is performed based on the target lens's safe temperature threshold, fogging time point, and fogging risk level assessment data to generate potential fogging state snapshot data.
4. The temperature control method for a heated anti-fog camera according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: Obtain real-time surface temperature data of the protective cover; Step S22: Use the real-time protective cover surface temperature data as the starting temperature for gradient preheating, and use the target lens safety temperature threshold in the potential fogging state snapshot data as the target temperature data for the preheating endpoint. Step S23: Calculate the total temperature difference based on the starting temperature and target temperature of the gradient preheating, and calculate the gradient expected average heating rate based on the atomization time nodes in the potential fogging state snapshot data to obtain the time characteristic data of the preheating process. Step S24: Based on the starting temperature, target temperature at the end of the preheating process, and time characteristic data of the preheating process, perform time-temperature target point sequence processing to generate gradient heating curve data; Step S25: Set the staged heating path data based on the gradient heating curve data; Step S26: Process the heating power control sequence based on the gradient heating curve data, and construct a gradient preheating control strategy based on the staged preheating monitoring parameters.
5. The temperature control method for a heated anti-fog camera according to claim 4, characterized in that, The phased heating path data, based on the gradient heating curve data, includes: The data is divided into at least three preheating sub-stages based on the gradient heating curve data. Each preheating sub-stage corresponds to an intermediate target temperature node data and sub-stage duration data. Collect temperature values every 10 seconds from the gradient temperature rise curve data, and calculate the temperature rise rate between two adjacent temperature values; when the temperature rise rate of three consecutive sampling points is greater than 2.5℃ / min, it is determined as the temperature rise rate peak area; select the maximum temperature rise rate in the temperature rise rate peak area, multiply its corresponding power value by a safety factor of 1.2 to obtain the maximum instantaneous peak power of temperature rise, which must not exceed 85% of the equipment's rated power; A preset basic heating power upper limit is set for the intermediate target temperature node data of each preheating sub-stage. This upper limit increases with each stage but is lower than the peak power of the maximum temperature rise instantaneous moment, thus obtaining the power constraint data for each sub-stage. Within each preheating sub-stage, using the power constraint data of each sub-stage as the upper limit, a smooth power increase curve is constructed using a preset ramp function to generate smooth power control sequence data for the sub-stage. The intermediate target temperature node data, sub-stage duration data, and sub-stage smooth power control sequence data of all sub-stages are combined to form the staged heating path data. Among them, a power smooth transition of 10-15 seconds is carried out at the transition point between each preheating sub-stage.
6. The temperature control method for a heated anti-fog camera according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Adjust the sampling frequency of the ambient temperature sensor and the ambient humidity sensor using the fog risk level assessment data in the potential fogging state snapshot data, and obtain high-frequency ambient temperature and humidity data. Step S32: Use a preset gradient preheating start threshold to determine the gradient preheating trigger for high-frequency environmental temperature and humidity data, and generate a gradient preheating trigger signal. Step S33: When the gradient preheating trigger signal is true, start gradient preheating and perform dynamic preheating adjustment based on the gradient preheating control strategy to generate dynamic preheating adjustment data. Step S34: When the gradient preheating trigger signal is false, gradient preheating is not started, and real-time heating control parameter processing is performed to generate real-time heating control parameters. Step S35: Obtain the current stage drive voltage data; Step S36: Calculate the target driving current value based on the current stage driving voltage data, dynamic preheating adjustment data, and real-time heating control parameters to generate target heating current data; Step S37: Modulate the target heating current data with duty cycle and encapsulate the heating drive command to generate heating drive command data.
7. The temperature control method for a heated anti-fog camera according to claim 1, characterized in that, Step S4, which involves performing water vapor condensation characterization analysis based on image frame data under the current heating state, includes: Based on the image frame data under the current heating state, the region of interest is extracted to obtain the image data of the core monitoring area; Edge detection and spatial frequency analysis are performed on the image data of the core monitoring area to obtain high-frequency component feature data of the image. The contrast of the image data in the core monitoring area is evaluated to obtain image contrast data. The signal-to-noise ratio (SNR) of the image data in the core monitoring area is calculated to obtain the image SNR data; Real-time image quality data is obtained by evaluating image quality based on high-frequency component feature data, image contrast data, and image signal-to-noise ratio data. By analyzing the water vapor condensation characterization of image frame data under the current heating state using real-time image quality data, image characterization data of slight fogging is obtained.
8. The temperature control method for a heated anti-fog camera according to claim 1, characterized in that, Step S5 includes the following steps: Step S51: Based on the image characterization data of slight fogging, conduct a preliminary assessment of the anti-fog effect and obtain the preliminary assessment index of the anti-fog effect; Step S52: When the initial evaluation index of the anti-fog effect is lower than the preset clarity benchmark value, it is determined that the current image clarity is unqualified. Step S53: Obtain the temperature value at the center of the protective cover and the temperature value at the edge of the protective cover based on the current image clarity failure signal; Step S54: Calculate the temperature difference requirements for the central heating zone and the edge heating zone based on the temperature values at the center and edge of the protective cover, respectively, to obtain the zoned heating temperature difference requirement data; Step S55: Calculate the real-time monitoring temperature difference based on the temperature value at the center of the protective cover and the temperature value at the edge of the protective cover, and generate the real-time monitoring temperature difference. Step S56: Dynamically adjust the PID control parameters based on the zone heating temperature difference requirement data and the real-time monitored temperature difference value to generate optimized PID control parameter configuration data; Step S57: Based on the optimized PID control parameter configuration data, re-execute the heating control and image effect acquisition to obtain the correlation data between the secondary control and the image effect; Step S58: Evaluate the effectiveness of defogging based on the data related to secondary control and image effect, and iteratively optimize the heating reference parameters to generate adaptive heating control reference data.
9. A temperature control system for a heated anti-fog camera, characterized in that, For performing the temperature control method of the heated anti-fog camera as described in claim 1, the temperature control system of the heated anti-fog camera includes: The dew point risk assessment module is used to acquire camera operation status data; collect multi-source environmental temperature and humidity data based on camera operation status data, calculate the temperature difference between the protective cover surface and the air dew point, and generate protective cover surface dew point temperature difference data; and conduct fogging risk assessment based on protective cover surface dew point temperature difference data to generate potential fogging state snapshot data. The preheating strategy control module is used to construct a gradient preheating control strategy based on snapshot data of potential fogging conditions. The gradient preheating execution module is used to determine the gradient preheating trigger based on the snapshot data of the potential fogging state, and generate a gradient preheating trigger signal; based on the gradient preheating trigger signal, it performs dynamic preheating control through the gradient preheating control strategy, and encapsulates the heating drive command to generate heating drive command data. The image status monitoring module is used to control heating according to the heating drive command data, and simultaneously use the image sensor to capture image frame data in real time under the current heating state; based on the image frame data under the current heating state, water vapor condensation characterization analysis is performed to obtain image characterization data of slight fogging; The adaptive parameter optimization module is used to dynamically adjust the heating in different zones using image representation data of slight fogging, and then re-execute the heating control and image effect acquisition to obtain secondary adjustment and image effect correlation data; based on the secondary adjustment and image effect correlation data, the heating baseline parameters are iteratively optimized to generate adaptive heating control baseline data.
10. A heated anti-fog camera, characterized in that, Heated anti-fog cameras include: The camera body is equipped with a lens module and an image sensor; A transparent protective cover is placed in front of the camera body; A heating control unit is disposed around or attached to the transparent protective cover for heating the transparent protective cover. The heating control unit includes a central heating area for heating the central region of the transparent protective cover and an edge heating area for heating the edge region of the transparent protective cover. A surface temperature sensor is disposed on or near the surface of the transparent protective cover to detect the surface temperature of the transparent protective cover. The surface temperature sensor includes a center temperature sensing point and an edge temperature sensing point. An ambient temperature sensor, located outside the transparent protective cover, is used to detect the ambient temperature around the heated anti-fog camera. An ambient humidity sensor, mounted on the outside of a transparent protective cover, is used to detect the ambient humidity around the heated anti-fog camera. The system includes a main controller, which is electrically connected to the image sensor, heating control unit, mask temperature sensor, ambient temperature sensor, and ambient humidity sensor via a data bus. The main controller is configured to execute the temperature control system for the heated anti-fog camera.
Citation Information
Patent Citations
Anti-icing camera heating strategy software implementation scheme
CN111381620A
Camera module, camera heating demisting method and storage medium
CN117177043A
Camera processing method and system based on optical energy storage intelligent mobile sentry
CN118540559A
Anti-fogging control method and system for icing monitoring camera
CN118695063A
Temperature gradient control method, device, equipment and medium for color glazed glass tempering heating section
CN119396226A
Cited By
SF6 micro-water density four-in-one remote monitoring device and method
CN121857869A
