Method, device, equipment and program product for controlling defogging of vehicle window based on machine vision
By using machine vision to identify the degree of fogging on car windows and automatically control the vehicle's air conditioning and heating devices, the problem of distraction and misjudgment caused by manual operation in existing technologies has been solved. This achieves a precise and automatic defogging effect on car windows, improving driving safety and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GAC HONDA AUTOMOBILE CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-07-03
AI Technical Summary
Existing automotive defogging systems rely on manual operation by the driver, which poses risks of distraction and misjudgment. They cannot accurately identify fog on the windows, and their imaging performance is poor, especially in low-light conditions, leading to safety hazards.
A machine vision-based window defogging control method is adopted. High-definition cameras and temperature and humidity sensors are used to acquire data inside and outside the vehicle. A CNN-LSTM hybrid neural network is used to identify the degree of fogging on the windows and automatically control the vehicle's air conditioning and heating devices to defog.
It achieves accurate window fogging detection and automated defogging control under full illumination conditions, improving the efficiency and timeliness of window defogging, and enhancing driving safety and user experience.
Smart Images

Figure CN122323939A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle control technology, and in particular to a method, apparatus, equipment and program product for controlling window defogging based on machine vision. Background Technology
[0002] When a car is in motion, fogging easily forms on the windows when there are temperature and humidity differences between the inside and outside of the vehicle, obstructing the driver's vision and seriously affecting driving safety. Current car defrosting functions mostly rely on manual activation by the driver. This involves the driver observing the fogging on the windows and manually switching the air conditioning control panel to defrost mode, while also manually activating the front and rear windshield defrosters. However, this manual defrosting and defrosting control method has significant drawbacks: Firstly, it requires the driver to distract themselves from observing the fogging and operating the air conditioning and defrosting switches, increasing driving risk, especially at high speeds or in complex road conditions, where even a brief lapse in attention can lead to traffic accidents. Secondly, manual operation is delayed; by the time the driver notices the fog and completes the operation, the fog may have already severely impaired visibility, and it's impossible to accurately judge the timing, intensity, and activation of the defrosting wires. This can easily lead to incomplete defrosting, excessive defrosting wasting energy, or excessive temperature differences causing the glass to crack due to improper defrosting activation.
[0003] Existing technologies include some automatic defogging solutions, most of which rely on temperature and humidity sensors to detect the temperature and humidity difference between the inside and outside of the vehicle to determine whether fogging has occurred. However, these solutions cannot directly detect the actual fogging state of the windows and are easily affected by environmental interference, leading to misjudgments (e.g., the temperature and humidity difference meets the conditions for fogging in rainy weather, but the windows are not actually fogged). Furthermore, they cannot fully cover the detection of all windows on the front and rear sides, resulting in blind spots. At the same time, most existing solutions do not achieve coordinated automatic control of heating wires and air conditioning defogging, and do not consider the imaging effect under low-light conditions (nighttime, tunnels, etc.). In low-light environments, the camera image is blurry and cannot accurately identify fog on the windows, causing the nighttime defogging function to fail, posing a serious safety hazard.
[0004] In summary, there is an urgent need for a solution that can comprehensively and accurately detect the degree of fogging on vehicle windows under full illumination conditions and achieve automated defogging control. Summary of the Invention
[0005] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.
[0006] Therefore, one objective of this invention is to provide a machine vision-based method for controlling window defogging. This method identifies the current degree of window fogging based on the current window image and the temporal changes in the temperature difference and humidity difference between the inside and outside of the vehicle. This improves the comprehensiveness and accuracy of window fogging detection. The method automatically controls window defogging based on the current degree of fogging, eliminating the need for manual operation by the driver. This improves the efficiency and timeliness of window defogging, thereby enhancing vehicle safety and the user's driving experience.
[0007] Another objective of this invention is to provide a vehicle window defogging control device based on machine vision.
[0008] To achieve the above-mentioned technical objectives, the technical solutions adopted in the embodiments of the present invention include: On one hand, embodiments of the present invention provide a machine vision-based method for controlling window defogging, comprising the following steps: Acquire the current window image and first temperature and humidity time series data inside the target vehicle, and acquire the current light intensity and second temperature and humidity time series data outside the target vehicle; The current vehicle window image is enhanced based on the current light intensity to obtain the target vehicle window image; Based on the first temperature and humidity time series data and the second temperature and humidity time series data, determine the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle; The target window image, the time-series data of the temperature difference between the inside and outside of the vehicle, and the time-series data of the humidity difference between the inside and outside of the vehicle are input into a pre-trained window fogging degree recognition model to obtain the current window fogging degree. The windows of the target vehicle are defogged according to the current degree of fogging.
[0009] Furthermore, in one embodiment of the present invention, the step of enhancing the current vehicle window image based on the current illumination intensity to obtain the target vehicle window image specifically includes: The current driving scenario is determined based on the current light intensity. When the current driving scene is a strong light scene, the current window image is subjected to highlight compression to obtain the image to be enhanced; When the current driving scene is a low-light scene, adjust the brightness and contrast of the current window image to obtain the image to be enhanced; Adaptive histogram equalization and multi-scale Retinex enhancement are performed on the image to be enhanced to obtain the target vehicle window image.
[0010] Furthermore, in one embodiment of the present invention, the target vehicle is equipped with a camera device and a supplementary lighting device, and the window defogging control method further includes the following steps: When the current light intensity is lower than a preset first threshold, the ISO parameters and exposure time of the camera device are adjusted, and the fill light device is controlled to provide fill light to the window area captured by the camera device.
[0011] Furthermore, in one embodiment of the present invention, the window fogging degree recognition model is trained through the following steps: Obtain test vehicle window image samples, time series samples of temperature difference between inside and outside the vehicle, and time series samples of humidity difference between inside and outside the vehicle, and determine the corresponding fogging degree labels through manual annotation; The window image samples, the time series samples of the temperature difference between the inside and outside of the vehicle, and the time series samples of the humidity difference between the inside and outside of the vehicle are input into a pre-constructed CNN-LSTM hybrid neural network to obtain the predicted degree of fogging. The loss value is determined based on the predicted fog intensity and the fog intensity label; The parameters of the CNN-LSTM hybrid neural network are updated using the backpropagation algorithm based on the loss value to obtain the trained window fogging degree recognition model; The CNN-LSTM hybrid neural network includes an input layer, a CNN branch, an LSTM branch, a feature fusion layer, and a fully connected layer.
[0012] Furthermore, in one embodiment of the present invention, the step of inputting the window image samples, the time-series samples of the temperature difference between the inside and outside of the vehicle, and the time-series samples of the humidity difference between the inside and outside of the vehicle into a pre-constructed CNN-LSTM hybrid neural network to obtain a predicted degree of fogging specifically includes: The car window image sample is input into the CNN branch for local feature extraction to obtain the fog layer distribution features; The time series samples of the temperature difference between the inside and outside of the vehicle and the humidity difference between the inside and outside of the vehicle are input into the LSTM branch to extract time series features and obtain fogging trend features. The feature fusion layer performs feature fusion on the fog layer distribution features and the fog formation trend features based on the self-attention mechanism to obtain spatiotemporal fusion features; The spatiotemporal fusion features are mapped to the predicted degree of fogging through the fully connected layer.
[0013] Furthermore, in one embodiment of the present invention, the step of defogging the windows of the target vehicle according to the current degree of window fogging specifically includes: When the current fogging level of the car window is light fogging, start the external circulation mode of the vehicle's air conditioning and adjust the airflow direction of the air conditioning vents. When the current fogging level of the vehicle window is moderate, activate the defogging mode of the vehicle's air conditioning system and adjust the air outlet direction, air speed, and air temperature of the air conditioning system. When the current fogging level of the vehicle window is severe fogging, the defogging mode of the vehicle's air conditioning is activated, the air outlet direction, air speed, and air temperature of the vehicle's air conditioning are adjusted, and the vehicle window is heated by the heating device installed on the vehicle window.
[0014] Furthermore, in one embodiment of the present invention, after defogging the windows of the target vehicle according to the current degree of window fogging, the method further includes the following steps: Continuously monitor the degree of fogging on the windows of the target vehicle; If the fogging level of the target vehicle's windows does not decrease within a preset time, a warning will be issued to the driver of the target vehicle.
[0015] On the other hand, embodiments of the present invention provide a machine vision-based vehicle window defogging control device, comprising: The data acquisition module is used to acquire the current window image and the first temperature and humidity time series data inside the target vehicle, and to acquire the current light intensity and the second temperature and humidity time series data outside the target vehicle. The image enhancement module is used to enhance the current window image based on the current light intensity to obtain the target window image; The temperature and humidity difference calculation module is used to determine the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle based on the first temperature and humidity time series data and the second temperature and humidity time series data. The fogging degree recognition module is used to input the target window image, the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle into the pre-trained window fogging degree recognition model to obtain the current fogging degree of the window. The defogging module is used to defog the windows of the target vehicle according to the current degree of fogging.
[0016] On the other hand, embodiments of the present invention provide an electronic device, including: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the above-described machine vision-based window defogging control method.
[0017] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing a processor-executable computer program that, when executed by a processor, implements the aforementioned machine vision-based vehicle window defogging control method.
[0018] On the other hand, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the aforementioned machine vision-based vehicle window defogging control method.
[0019] The advantages and beneficial effects of the present invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention: This invention acquires the current window image and first temperature and humidity time-series data inside the target vehicle, and acquires the current light intensity and second temperature and humidity time-series data outside the target vehicle. Image enhancement is performed on the current window image based on the current light intensity to obtain the target window image. Time-series data on the temperature difference and humidity difference between the inside and outside of the vehicle are determined based on the first and second temperature and humidity time-series data. The target window image, the temperature difference time-series data, and the humidity difference time-series data are input into a pre-trained window fogging degree recognition model to obtain the current window fogging degree. Defogging is then performed on the target vehicle's windows based on the current window image and the time-series changes in the temperature and humidity differences between the inside and outside of the vehicle. This invention improves the comprehensiveness and accuracy of window fogging detection by recognizing the current window fogging degree based on the current window image and the time-series changes in the temperature and humidity differences between the inside and outside of the vehicle. Automated defogging control of the windows based on the current window fogging degree eliminates the need for manual operation by the driver, improving the efficiency and timeliness of window defogging, thereby enhancing vehicle safety and the user's driving experience. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments of the present invention are described below. It should be understood that the drawings described below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating the steps of a machine vision-based vehicle window defogging control method provided in an embodiment of the present invention; Figure 2 A structural block diagram of a vehicle window defogging control device based on machine vision provided in an embodiment of the present invention; Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of this invention; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this invention as detailed in the appended claims.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0024] The machine vision-based vehicle window defogging control method provided in this invention can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application that implements the machine vision-based vehicle window defogging control method, but is not limited to the above forms.
[0025] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0026] It should be noted that in various specific embodiments of the present invention, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user parking space location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of the present invention require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to a confirmation page. Only after obtaining the user's separate permission or consent is the necessary user-related data for the normal operation of the embodiments of the present invention acquired.
[0027] Reference Figure 1 This invention provides a machine vision-based method for controlling window defogging, specifically including the following steps: S101. Obtain the current window image and first temperature and humidity time series data inside the target vehicle, and obtain the current light intensity and second temperature and humidity time series data outside the target vehicle. S102. Enhance the current window image based on the current light intensity to obtain the target window image; S103. Determine the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle based on the first temperature and humidity time series data and the second temperature and humidity time series data. S104. Input the target window image, the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle into the pre-trained window fogging degree recognition model to obtain the current window fogging degree. S105. Defog the windows of the target vehicle according to the current degree of fogging.
[0028] This invention identifies the degree of fogging of the current car window based on the current image of the car window and the temporal changes in the temperature difference and humidity difference between the inside and outside of the car. This improves the comprehensiveness and accuracy of car window fogging detection. The invention also automatically controls the defogging of the car window according to the current degree of fogging, eliminating the need for manual operation by the driver. This improves the efficiency and timeliness of car window defogging, thereby enhancing vehicle driving safety and the user's driving experience.
[0029] This invention employs a high-definition camera installed inside the vehicle to capture images of the current windows; simultaneously, temperature and humidity sensors are positioned on the center console or under the front seats to collect real-time temperature and humidity data (including temperature and relative humidity values) inside the vehicle; a light intensity sensor is installed at a suitable location on the front bumper or roof to capture the current light intensity outside the vehicle, while the vehicle's built-in outdoor temperature and humidity sensor simultaneously collects secondary temperature and humidity data from outside the vehicle. All data is transmitted in real-time to the vehicle control unit (ECU) via the vehicle's CAN bus or a dedicated data transmission channel.
[0030] Specifically, this embodiment of the invention employs a 360° surround-view high-definition camera, which is composed of four independent high-definition cameras integrated together. The lenses of the four independent high-definition cameras are respectively oriented towards the windshield, rear windshield, left side window, and right side window of the vehicle, and are integrated and installed on an integrated bracket in the middle area of the vehicle interior. Each independent high-definition camera has a resolution of no less than 1080P, has an adaptive exposure function, and has a built-in high-sensitivity image sensor to adapt to low-light environments. The lens focal length has been adapted and adjusted to ensure that the field of view can completely cover the entire area of the corresponding window glass without any blind spots. The four independent high-definition cameras achieve synchronous data transmission through an integrated data interface, ensuring the real-time performance and consistency of image acquisition.
[0031] As a further optional implementation, image enhancement is performed on the current window image based on the current light intensity to obtain a target window image, specifically including: S1021. Determine the current driving scenario based on the current light intensity; S1022. When the current driving scene is a strong light scene, perform highlight compression on the current window image to obtain the image to be enhanced. S1023. When the current driving scene is a low-light scene, adjust the brightness and contrast of the current window image to obtain the image to be enhanced; S1024. Perform adaptive histogram equalization and multi-scale Retinex enhancement on the image to be enhanced to obtain the target car window image.
[0032] Specifically, the original car window images captured may be affected by differences in light inside and outside the vehicle, as well as limitations in the camera's parameters, resulting in unclear images. Therefore, targeted optimization is required: First, the current driving scene is determined based on the current light intensity. In the case of strong direct sunlight, highlight compression is applied to the image to avoid overexposure of the window area. In the case of low-light scenes such as nighttime or tunnels, the brightness and contrast of the image are automatically improved to restore window details. Then, image algorithms such as adaptive histogram equalization and multi-scale Retinex enhancement are used to correct color deviations in the image, making the features of the window glass, such as its outline and surface condition, more prominent, ultimately generating a target window image suitable for model recognition.
[0033] Additionally, the temperature value from the first temperature and humidity data inside the vehicle is subtracted from the temperature value from the second temperature and humidity data outside the vehicle to obtain a specific temperature difference. A positive number indicates that the temperature inside the vehicle is higher than the temperature outside, while a negative number indicates the opposite. The relative humidity value inside the vehicle is subtracted from the relative humidity value outside the vehicle to obtain the humidity difference. The larger the difference, the higher the water vapor content in the air inside the vehicle compared to the outside, and the higher the risk of fogging. The calculation results, along with the processed target window image, are then fed into the subsequent recognition model.
[0034] As a further optional implementation, the target vehicle is equipped with a camera device and a supplementary lighting device, and the window defogging control method further includes the following steps: When the current light intensity is lower than the preset first threshold, adjust the ISO parameters and exposure time of the camera device, and control the supplementary lighting device to provide supplementary lighting to the window area captured by the camera device.
[0035] Specifically, in order to identify the degree of fogging of car windows under low light conditions, this embodiment of the invention compares the current light intensity with a preset first threshold. When the current light intensity is lower than the first threshold, it indicates that the ambient light is extremely dark. At this time, the ISO parameter of the camera is automatically increased, the exposure time is adjusted, and the window area is illuminated by a supplementary lighting device.
[0036] Specifically, the supplementary lighting device of this invention consists of four independent low-power LED supplementary lights. The four LED supplementary lights are respectively integrated next to the four independent high-definition cameras of the 360° surround view high-definition camera module. The supplementary lighting direction is consistent with the shooting direction of the corresponding camera, and the supplementary lighting angle is adjusted to ensure that the supplementary light only covers the corresponding window glass area and does not produce glare that interferes with the driver's vision. The supplementary lighting is activated under low light conditions, and the supplementary lighting brightness is adaptively adjusted according to the light intensity.
[0037] In some optional embodiments, the 360° surround view high-definition camera module is integrated and installed on an integrated bracket in the middle area above the center console or in the middle area behind the rearview mirror. The integrated bracket can be finely adjusted in angle according to the interior structure of different models to ensure that the lenses of the four independent high-definition cameras and their matching LED fill lights are unobstructed. The lens orientations of the four independent high-definition cameras are precisely calibrated: the camera lens facing the windshield is set at a downward angle of 5° to 10°, the camera lens facing the rear window is set at an upward angle of 5° to 10°, and the camera lenses facing the left and right side windows are set at a horizontal outward angle of 3° to 8°. The corresponding LED fill lights are arranged coaxially with the camera lenses, and the fill light angle is reduced by 2° to 3° compared to the camera shooting angle to avoid the fill light overflowing into the driver's field of vision.
[0038] As an optional implementation, the window fogging degree recognition model is trained through the following steps: S201. Obtain window image samples, time-series samples of temperature difference between inside and outside the vehicle, and time-series samples of humidity difference between inside and outside the vehicle from the test vehicle, and determine the corresponding fogging degree labels through manual annotation. S202. Input the window image samples, the time series samples of temperature difference between the inside and outside of the vehicle, and the time series samples of humidity difference between the inside and outside of the vehicle into the pre-constructed CNN-LSTM hybrid neural network to obtain the predicted degree of fogging. S203. Determine the loss value based on the predicted fog intensity and the fog intensity label; S204. Update the parameters of the CNN-LSTM hybrid neural network based on the loss value using the backpropagation algorithm to obtain the trained window fogging degree recognition model; The CNN-LSTM hybrid neural network includes an input layer, a CNN branch, an LSTM branch, a feature fusion layer, and a fully connected layer.
[0039] Specifically, the system acquires window image samples, time-series samples of temperature difference between the inside and outside of the vehicle, and time-series samples of humidity difference between the inside and outside of the vehicle, and manually labels the corresponding fogging levels. These samples are then input into a pre-built CNN-LSTM hybrid neural network to obtain a predicted fogging level. A loss value is determined based on the predicted fogging level and the fogging level label. The parameters of the CNN-LSTM hybrid neural network are updated using the backpropagation algorithm based on the loss value, completing one iteration of training. Training stops when the number of iterations reaches a preset threshold or the loss value falls below the preset threshold, resulting in a well-trained window fogging level recognition model.
[0040] As a further optional implementation, the window image samples, the time-series samples of the temperature difference between the inside and outside of the vehicle, and the time-series samples of the humidity difference between the inside and outside of the vehicle are input into a pre-constructed CNN-LSTM hybrid neural network to obtain a predicted degree of fogging, which specifically includes: S2021. Input the car window image samples into the CNN branch to extract local features and obtain the fog layer distribution features; S2022. Input the time series samples of temperature difference between inside and outside the vehicle and humidity difference between inside and outside the vehicle into the LSTM branch to extract time series features and obtain fogging trend features. S2023. The feature fusion layer performs feature fusion on fog layer distribution features and fog formation trend features based on self-attention mechanism to obtain spatiotemporal fusion features; S2024. The spatiotemporal fusion features are mapped to the predicted degree of fogging through a fully connected layer.
[0041] Specifically, the fog distribution features are obtained by extracting local features from the car window image samples through the CNN branch; the fog trend features are obtained by extracting time-series samples of temperature difference and humidity difference between the inside and outside of the car through the LSTM branch; the fog distribution features and fog trend features are obtained based on the changing trends of temperature and humidity differences; the fog distribution features and fog trend features are fused by the feature fusion layer based on the self-attention mechanism to obtain the spatiotemporal fusion features; finally, the spatiotemporal fusion features are mapped to the predicted fog level through the fully connected layer, which can be divided into four levels: "no fog", "light fog", "moderate fog" and "severe fog".
[0042] As a further optional implementation, the windows of the target vehicle are defogging according to the current degree of window fogging, specifically including: S1051. When the current fogging level of the car window is light fogging, start the external circulation mode of the vehicle's air conditioning and adjust the airflow direction of the air conditioning vents. S1052. When the current fogging level of the car window is moderate, start the defogging mode of the vehicle's air conditioning and adjust the air outlet direction, air speed and air temperature of the air conditioning. S1053. When the current fogging level of the vehicle window is severe fogging, activate the defogging mode of the vehicle's air conditioning, adjust the air outlet direction, air speed, and air temperature of the air conditioning, and heat the window through the heating device installed on the window of the target vehicle.
[0043] Specifically, the target window image, the time-series data of the temperature difference between the inside and outside of the vehicle, and the time-series data of the humidity difference between the inside and outside of the vehicle obtained in the aforementioned steps are input into a pre-trained window fogging degree recognition model. Based on the fogging state output by the model, the system will automatically match the corresponding defogging strategy and precisely control the relevant hardware of the vehicle to perform defogging: 1) No-fog state: Maintain the original operating status of the vehicle's air conditioning, windows, and other equipment, without triggering additional defogging operations; 2) Mild fogging: First turn on the air conditioner in external circulation mode to introduce dry air from outside the car to reduce the humidity inside the car; at the same time, fine-tune the air conditioner airflow direction to gently blow the airflow towards the car window glass to quickly dissipate the initial fog layer. 3) Moderate fogging: Turn on the air conditioner's defogging mode, increase the blower speed, and set the air conditioner's outlet temperature to a suitable defogging range (generally 25-30℃). At the same time, use the A / C cooling function to quickly reduce the humidity inside the vehicle.
[0044] 4) Severe fogging: In addition to the medium defogging operation, the air conditioning fan speed will be automatically increased to the highest level, and the window heating and exterior rearview mirror heating functions will be turned on simultaneously. The heating devices set on the windows of the target vehicle will be used to heat the windows to ensure clear front and rear visibility. If conditions permit, the window gaps will be opened briefly for ventilation to accelerate the air circulation inside and outside the vehicle.
[0045] As a further optional implementation, after defogging the windows of the target vehicle according to the current degree of window fogging, the following steps are also included: S106. Continuously monitor the degree of fogging on the windows of the target vehicle; S107. If the fogging level of the target vehicle's windows does not decrease within a preset time, issue a warning to the driver of the target vehicle.
[0046] Specifically, during the defogging process, the system continuously collects various data and adjusts the defogging strategy in real time until the model recognizes that the fogging of the car windows has been cleared, and then gradually returns to the normal operating mode. If the fogging of the target vehicle's windows does not decrease within a preset time (such as 5 minutes), for example, if it remains in a moderate fogging state, a warning is issued to the driver to avoid the safety hazards of driving the vehicle with the windows fogged up for a long time.
[0047] The method steps of the embodiments of the present invention have been described above. It can be understood that the embodiments of the present invention identify the current degree of fogging of the vehicle window based on the current window image and the temporal changes in the temperature difference and humidity difference between the inside and outside of the vehicle, improving the comprehensiveness and accuracy of window fogging detection. Automated defogging control is performed on the window according to the current degree of fogging, eliminating the need for manual operation by the driver, thus improving the efficiency and timeliness of window defogging, thereby enhancing vehicle driving safety and the user's driving experience.
[0048] Reference Figure 2 This invention provides a machine vision-based vehicle window defogging control device, comprising: The data acquisition module is used to acquire the current window image and the first temperature and humidity time series data inside the target vehicle, and to acquire the current light intensity and the second temperature and humidity time series data outside the target vehicle. The image enhancement module is used to enhance the current window image based on the current light intensity to obtain the target window image; The temperature and humidity difference calculation module is used to determine the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle based on the first temperature and humidity time series data and the second temperature and humidity time series data. The fogging degree recognition module is used to input the target window image, the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle into the pre-trained window fogging degree recognition model to obtain the current fogging degree of the window. The defogger module is used to defog the windows of a target vehicle based on the current degree of fogging.
[0049] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0050] Reference Figure 3 This invention provides an electronic device, comprising: At least one processor; At least one memory for storing at least one program; When the above-mentioned at least one program is executed by the above-mentioned at least one processor, the above-mentioned at least one processor implements the above-mentioned machine vision-based window defogging control method.
[0051] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0052] This invention also provides a computer-readable storage medium storing a processor-executable computer program that, when executed by a processor, implements the aforementioned machine vision-based vehicle window defogging control method.
[0053] This invention provides a computer-readable storage medium that can execute a machine vision-based vehicle window defogging control method provided in the method embodiment of this invention. It can execute any combination of the implementation steps of the method embodiment and has the corresponding functions and beneficial effects of the method.
[0054] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned machine vision-based vehicle window defogging control method.
[0055] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0056] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0057] The embodiments described in this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.
[0058] The terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0059] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the aforementioned blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0060] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the aforementioned functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0061] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0062] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0063] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the aforementioned program can be printed, because the aforementioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0064] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0065] In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments" indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0066] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0067] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A method for controlling defogging of a vehicle window based on machine vision, the method comprising: Includes the following steps: Acquire the current window image and first temperature and humidity time series data inside the target vehicle, and acquire the current light intensity and second temperature and humidity time series data outside the target vehicle; The current vehicle window image is enhanced based on the current light intensity to obtain the target vehicle window image; Based on the first temperature and humidity time series data and the second temperature and humidity time series data, determine the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle; The target window image, the time-series data of the temperature difference between the inside and outside of the vehicle, and the time-series data of the humidity difference between the inside and outside of the vehicle are input into a pre-trained window fogging degree recognition model to obtain the current window fogging degree. The windows of the target vehicle are defogged according to the current degree of fogging.
2. The machine vision-based vehicle window defogging control method according to claim 1, characterized in that, The step of enhancing the current vehicle window image based on the current illumination intensity to obtain the target vehicle window image specifically includes: The current driving scenario is determined based on the current light intensity. When the current driving scene is a strong light scene, the current window image is subjected to highlight compression to obtain the image to be enhanced; When the current driving scene is a low-light scene, adjust the brightness and contrast of the current window image to obtain the image to be enhanced; Adaptive histogram equalization and multi-scale Retinex enhancement are performed on the image to be enhanced to obtain the target vehicle window image.
3. The machine vision-based window defogging control method according to claim 1, characterized in that, The target vehicle is equipped with a camera device and a supplementary lighting device. The window defogging control method further includes the following steps: When the current light intensity is lower than a preset first threshold, the ISO parameters and exposure time of the camera device are adjusted, and the fill light device is controlled to provide fill light to the window area captured by the camera device.
4. The machine vision-based vehicle window defogging control method according to claim 1, characterized in that, The car window fogging degree recognition model is trained through the following steps: Obtain test vehicle window image samples, time series samples of temperature difference between inside and outside the vehicle, and time series samples of humidity difference between inside and outside the vehicle, and determine the corresponding fogging degree labels through manual annotation; The window image samples, the time series samples of the temperature difference between the inside and outside of the vehicle, and the time series samples of the humidity difference between the inside and outside of the vehicle are input into a pre-constructed CNN-LSTM hybrid neural network to obtain the predicted degree of fogging. The loss value is determined based on the predicted fog intensity and the fog intensity label; The parameters of the CNN-LSTM hybrid neural network are updated using the backpropagation algorithm based on the loss value to obtain the trained window fogging degree recognition model; The CNN-LSTM hybrid neural network includes an input layer, a CNN branch, an LSTM branch, a feature fusion layer, and a fully connected layer.
5. The machine vision-based window defogging control method according to claim 4, characterized in that, The step of inputting the window image samples, the time-series samples of the temperature difference between the inside and outside of the vehicle, and the time-series samples of the humidity difference between the inside and outside of the vehicle into a pre-constructed CNN-LSTM hybrid neural network to obtain a predicted degree of fogging specifically includes: The car window image sample is input into the CNN branch for local feature extraction to obtain the fog layer distribution features; The time series samples of the temperature difference between the inside and outside of the vehicle and the humidity difference between the inside and outside of the vehicle are input into the LSTM branch to extract time series features and obtain fogging trend features. The feature fusion layer performs feature fusion on the fog layer distribution features and the fog formation trend features based on the self-attention mechanism to obtain spatiotemporal fusion features; The spatiotemporal fusion features are mapped to the predicted degree of fogging through the fully connected layer.
6. The machine vision-based vehicle window defogging control method according to claim 1, characterized in that, The step of defogging the windows of the target vehicle based on the current degree of window fogging specifically includes: When the current fogging level of the car window is light fogging, start the external circulation mode of the vehicle's air conditioning and adjust the airflow direction of the air conditioning vents. When the current fogging level of the vehicle window is moderate, activate the defogging mode of the vehicle's air conditioning system and adjust the air outlet direction, air speed, and air temperature of the air conditioning system. When the current fogging level of the vehicle window is severe fogging, the defogging mode of the vehicle's air conditioning is activated, the air outlet direction, air speed, and air temperature of the vehicle's air conditioning are adjusted, and the vehicle window is heated by the heating device installed on the vehicle window.
7. A machine vision-based method for controlling window defogging according to any one of claims 1 to 6, characterized in that, After defogging the windows of the target vehicle according to the current degree of fogging, the method further includes the following steps: Continuously monitor the degree of fogging on the windows of the target vehicle; If the fogging level of the target vehicle's windows does not decrease within a preset time, a warning will be issued to the driver of the target vehicle.
8. A machine vision-based vehicle window defogging control device, characterized in that, include: The data acquisition module is used to acquire the current window image and the first temperature and humidity time series data inside the target vehicle, and to acquire the current light intensity and the second temperature and humidity time series data outside the target vehicle. The image enhancement module is used to enhance the current window image based on the current light intensity to obtain the target window image; The temperature and humidity difference calculation module is used to determine the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle based on the first temperature and humidity time series data and the second temperature and humidity time series data. The fogging degree recognition module is used to input the target window image, the time series data of the temperature difference between the inside and outside of the vehicle and the time series data of the humidity difference between the inside and outside of the vehicle into the pre-trained window fogging degree recognition model to obtain the current fogging degree of the window. The defogging module is used to defog the windows of the target vehicle according to the current degree of fogging.
9. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a machine vision-based window defogging control method as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements a machine vision-based window defogging control method as described in any one of claims 1 to 7.