Camera lens temperature compensation method, device and equipment and storage medium

By combining the heating module of the camera case and the thermally conductive silicone film, the heater is dynamically controlled to transfer heat to the lens, solving the problem that lens temperature affects image quality, realizing a constant temperature state in a low temperature environment, ensuring the accuracy of license plate recognition.

CN120416633APending Publication Date: 2025-08-01BEIJING SIGNALWAY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510508888.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The camera lens is affected by temperature in extreme weather, resulting in a decrease in image quality and affecting the accuracy of license plate recognition. The existing insulation method has poor effect and complicated lens structure.

Method used

By tightly buckle the heating module and the thermally conductive silicone sheet in the camera housing, the heating threshold is calculated based on the CPU temperature and ambient temperature, the heater is controlled to transfer heat to the lens, and the lens is kept constant temperature.

Benefits of technology

Without changing the lens structure, improve the lens insulation effect, ensure image quality, and improve the accuracy of license plate recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416633A_ABST
    Figure CN120416633A_ABST
Patent Text Reader

Abstract

The invention relates to a camera lens temperature compensation method and device, equipment and a storage medium. The method comprises the following steps: acquiring a first CPU temperature of a camera and an environment temperature; a CPU heating threshold value matched with the environment temperature is selected, and the first CPU temperature is compared with the CPU heating threshold value; if the first CPU temperature is smaller than the CPU heating threshold value, a heating instruction is sent to a heating module tightly buckled on a shell of the camera; a heat-conducting silica gel sheet is arranged between the heating module and the shell of the camera; and controlling at least one heater of the heating module to execute heating work according to the heating instruction, so that the heating module transmits heat generated by heating to a CPU (Central Processing Unit) of the camera through a heat conduction silica gel sheet in the heating process, and transmits the heat of the CPU to a lens of the camera through a heat conduction device of the camera in the temperature rise process of the CPU. By adopting the method, the heat preservation effect of the lens can be improved under the condition that the lens structure is not changed and the focusing difficulty of the lens is not increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera technology, and in particular to a camera lens temperature compensation method, device, equipment and storage medium. Background Art

[0002] License plate recognition cameras are typically installed outdoors to capture real-time video and perform license plate recognition. Considering that camera lenses are easily affected by temperature, in cold winter weather, the image quality captured by the camera will deteriorate, which in turn affects the accuracy of license plate recognition.

[0003] Traditionally, thermal insulation materials have been used to protect cameras and lenses. However, this method has poor thermal insulation effects in extreme weather conditions. In addition, the lens can be heated using a PI heating film. However, this method complicates the lens structure and increases the difficulty of focusing the lens. Summary of the Invention

[0004] Based on this, it is necessary to provide a camera lens temperature compensation method, device, equipment and storage medium to address the above technical problems, which can improve the thermal insulation effect of the lens without changing the lens structure and increasing the difficulty of lens focusing.

[0005] In a first aspect, the present application provides a method for compensating camera lens temperature, the method comprising:

[0006] Obtaining a first CPU temperature and an ambient temperature of the camera;

[0007] selecting a CPU heating threshold that matches the ambient temperature, and comparing the first CPU temperature with the CPU heating threshold;

[0008] If the temperature of the first CPU is lower than the CPU heating threshold, a heating instruction is sent to a heating module fastened to the housing of the camera; a heat-conducting silicone sheet is provided between the heating module and the housing of the camera;

[0009] The heating instruction controls at least one heater of the heating module to perform a heating operation, so that during the heating process, the heating module transfers the heat generated by the heating to the CPU of the camera through the thermally conductive silicone sheet, and during the CPU heating process, the heat of the CPU is transferred to the lens of the camera through the thermal conductive device of the camera.

[0010] In one embodiment, the heating module includes a main control unit and a plurality of independent heaters; and sending a heating instruction to the heating module fastened to the housing of the camera includes:

[0011] Send a heating instruction to the main control unit in the heating module tightly fastened to the housing of the camera;

[0012] The controlling, by the heating instruction, at least one heater of the heating module to perform a heating operation includes:

[0013] Controlling, by the heating instruction, the main control unit of the heating module to schedule at least one heater among a plurality of heaters to perform a heating operation.

[0014] In one embodiment, a predicted lens temperature of the lens is calculated according to the first CPU temperature, the module temperature of the heating module, a first heat transfer coefficient, and a second heat transfer coefficient; the first heat transfer coefficient is the heat transfer coefficient of the heat of the CPU transferring to the lens, and the second heat transfer coefficient is the heat transfer coefficient of the heat of the heating module transferring to the CPU;

[0015] If the predicted lens temperature is less than the target lens temperature of the lens, then execute the step of sending a heating instruction to the main control unit in the heating module tightly fastened to the housing of the camera.

[0016] In one embodiment, after the controlling, by the heating instruction, at least one heater of the heating module to perform a heating operation, the method further includes:

[0017] Collect a second CPU temperature of the CPU;

[0018] Compare the magnitude of the second CPU temperature with a target CPU temperature; the target CPU temperature is calculated based on the first heat transfer coefficient and the target lens temperature;

[0019] If the second CPU temperature is greater than the target CPU temperature, then control the main control unit of the heating module to turn off some of the heaters in a working state, so that the heat obtained by heating offsets the heat loss of the lens, and the lens is in a constant temperature state.

[0020] In one embodiment, before obtaining the first CPU temperature and the ambient temperature of the camera, the method further includes:

[0021] Obtain test ambient temperatures in different temperature ranges and CPU usage parameters of the camera;

[0022] Based on each of the test ambient temperatures, the CPU usage parameters, and a temperature correction coefficient, calculate a CPU heating threshold at each of the test ambient temperatures;

[0023] Configure the CPU heating thresholds at each of the test ambient temperatures as parameters in the camera;

[0024] The selection of the CPU heating threshold matching the ambient temperature includes:

[0025] Selecting, from the parameters configured in the camera, a CPU heating threshold matching the ambient temperature.

[0026] In one embodiment, after controlling, by the heating instruction, at least one heater of the heating module to perform a heating operation, the method further includes:

[0027] If it is monitored that the ambient temperature changes, determining a CPU temperature change value after the ambient temperature changes;

[0028] Comparing the size between the CPU temperature change value and a temperature adjustment threshold;

[0029] If the CPU temperature change value is greater than or equal to the temperature adjustment threshold, controlling a main control unit of the heating module to turn off some of the heaters in a working state, so that the heat obtained by heating offsets the heat loss of the lens, and the lens is in a constant temperature state.

[0030] In a second aspect, the present application further provides a lens temperature compensation device for a camera, and the device includes:

[0031] An acquisition module, configured to acquire a first CPU temperature and an ambient temperature of the camera;

[0032] A comparison module, configured to select a CPU heating threshold matching the ambient temperature and compare the size between the first CPU temperature and the CPU heating threshold;

[0033] A control module, configured to, if the first CPU temperature is less than the CPU heating threshold, send a heating instruction to a heating module fastened to an outer shell of the camera; a heat conductive silica gel sheet is provided between the heating module and the outer shell of the camera; controlling, by the heating instruction, at least one heater of the heating module to perform a heating operation, so that, during the heating process of the heating module, the heat generated by heating is transmitted to the CPU of the camera through the heat conductive silica gel sheet, and during the temperature rise process of the CPU, the heat of the CPU is transmitted to the lens of the camera through a heat conduction device of the camera.

[0034] In one embodiment, the heating module includes a main control unit and a plurality of independent heaters;

[0035] The control module is further configured to send a heating instruction to the main control unit in the heating module fastened to the outer shell of the camera; controlling, by the heating instruction, the main control unit of the heating module to schedule at least one of the plurality of heaters to perform a heating operation.

[0036] In one embodiment, the device further comprises:

[0037] A first calculation module, configured to calculate a predicted lens temperature of the lens according to the first CPU temperature, the module temperature of the heating module, a first heat transfer coefficient, and a second heat transfer coefficient; the first heat transfer coefficient is the heat transfer coefficient from the CPU to the lens, and the second heat transfer coefficient is the heat transfer coefficient from the heating module to the CPU;

[0038] The control module is further configured to, if the predicted lens temperature is less than the target lens temperature of the lens, send a heating instruction to the main control unit in the heating module fastened to the housing of the camera.

[0039] In one embodiment, the device further comprises:

[0040] An acquisition module, configured to acquire a second CPU temperature of the CPU;

[0041] A comparison module, configured to compare the second CPU temperature with a target CPU temperature; the target CPU temperature is calculated based on the first heat transfer coefficient and the target lens temperature;

[0042] The control module is further configured to, if the second CPU temperature is greater than the target CPU temperature, control the main control unit of the heating module to turn off some of the heaters in the working state, so that the heat generated by heating offsets the heat loss of the lens, and the lens is in a constant temperature state.

[0043] In one embodiment, the device further comprises:

[0044] The acquisition module is further configured to acquire the test environment temperature in different temperature ranges and the CPU usage parameters of the camera;

[0045] A second calculation module, configured to calculate a CPU heating threshold at each of the test environment temperatures based on each of the test environment temperatures, the CPU usage parameters, and a temperature correction coefficient;

[0046] A configuration module, configured to configure the CPU heating threshold at each of the test environment temperatures as a parameter in the camera;

[0047] The comparison module is further configured to select a CPU heating threshold that matches the environment temperature from the parameters configured in the camera.

[0048] In one embodiment, the device further comprises:

[0049] A determination module, configured to determine the CPU temperature change value after the environmental temperature changes if it is detected that the environmental temperature changes;

[0050] A third comparison module, configured to compare the magnitude between the CPU temperature change value and a temperature adjustment threshold;

[0051] The control module is further configured to, if the CPU temperature change value is greater than or equal to the temperature adjustment threshold, control the main control unit of the heating module to turn off some of the heaters in the working state, so that the heat generated by heating offsets the heat loss of the lens, and the lens is in a constant temperature state.

[0052] In a third aspect, the present application further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the lens temperature compensation method of the camera are implemented.

[0053] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the lens temperature compensation method of the camera are implemented.

[0054] In a fifth aspect, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the lens temperature compensation method of the camera are implemented.

[0055] For the above-mentioned lens temperature compensation method, device, computer device, storage medium and computer program product of the camera, the first CPU temperature and the environmental temperature of the camera are obtained; a CPU heating threshold matching the environmental temperature is selected, and the magnitude between the first CPU temperature and the CPU heating threshold is compared; if the first CPU temperature is less than the CPU heating threshold, a heating instruction is sent to a heating module tightly fastened to the outer shell of the camera; a heat-conducting silica gel sheet is provided between the heating module and the outer shell of the camera; at least one heater of the heating module is controlled to perform a heating operation through the heating instruction, so that during the heating process of the heating module, the heat generated by heating is transmitted to the CPU of the camera through the heat-conducting silica gel sheet, and during the CPU temperature rise process, the heat of the CPU is transmitted to the lens of the camera through the heat-conducting device of the camera. Therefore, only by sleeving a heating module on the outer shell of the camera, without changing the structure of the lens and without increasing the difficulty of lens focusing, the lens can be heated in a low-temperature environment to ensure the temperature of the lens, and thus the image effect can be effectively ensured without affecting the accuracy of license plate recognition. Description of the Drawings

[0056] Figure 1Application environment diagram of the lens temperature compensation method for a camera in an embodiment;

[0057] Figure 2 Schematic flowchart of the lens temperature compensation method for a camera in an embodiment;

[0058] Figure 3 Product schematic diagram of the heating module in an embodiment;

[0059] Figure 4 Schematic diagram of the camera after fastening the heating module in an embodiment;

[0060] Figure 5 Schematic flowchart of the lens temperature compensation method for a camera in another embodiment;

[0061] Figure 6 Structural block diagram of the lens temperature compensation device for a camera in an embodiment;

[0062] Figure 7 Structural block diagram of the lens temperature compensation device for a camera in another embodiment;

[0063] Figure 8 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0064] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application 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 only used to explain the present application and are not used to limit the present application.

[0065] It should be noted that in the following descriptions, the terms "first and second" only distinguish similar objects and do not represent a specific order for the objects. Understandably, "first and second" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0066] The lens temperature compensation method for a camera provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, when it is cold and it is necessary to determine whether temperature compensation is required for the lens, the camera 102 can first obtain its own first CPU temperature and the ambient temperature; select a CPU heating threshold that matches the ambient temperature, and compare the magnitude between the first CPU temperature and the CPU heating threshold; if the first CPU temperature is less than the CPU heating threshold, send a heating instruction to the heating module tightly fastened to the outer shell of the camera 102; there is a thermal conductive silica gel sheet between the heating module and the outer shell of the camera 102; control at least one heater of the heating module to perform heating work through the heating instruction, so that during the heating process of the heating module, the heat generated by heating is transferred to the CPU of the camera 102 through the thermal conductive silica gel sheet, and during the CPU temperature rise process, the heat of the CPU is transferred to the lens of the camera 102 through the heat conduction device of the camera 102, so that the temperature of the lens can be in a constant temperature state (such as between 15 and 20 degrees Celsius). Therefore, the image quality obtained when the camera 102 captures the vehicle 104 is high, which is beneficial to accurately identifying the license plate information of the vehicle 104.

[0067] In addition, the camera 102 can identify the license plate information of the vehicle, and during the process of identifying the license plate information, the fill light 106 can be turned on according to the brightness of the light or approaching evening, so that a sufficiently bright vehicle image can be obtained when collecting the vehicle image. For the fill light 106 and the camera 102, they can be installed on the traffic gantry, and the angle with the horizontal plane is within the target range. When the fill light 106 in this target range fills light, it can avoid dazzling the driver with light, such as the angle with the horizontal plane is 40 degrees to 45 degrees.

[0068] The vehicle 104 can be various types of vehicles, such as household cars, trucks, professional vehicles, and vehicles of other models (such as passenger cars), etc.

[0069] In one embodiment, as Figure 2 shown, a method for compensating the temperature of the lens of a camera is provided. This method can be executed by Figure 1 the server or the terminal in Figure 1 or by the server and the terminal in cooperation. Taking the execution of this method by the camera in

[0070] S202, obtain the first CPU temperature and the ambient temperature of the camera.

[0071] Among them, the first CPU temperature can be the current temperature of the CPU in the camera. The ambient temperature can be the temperature in the current environment.

[0072] The camera may include a lens, a power module, a CPU, and other components. Among them, the lens is installed at the front end of the camera for optical imaging; the power module is used to supply power to the camera and the heating module; the CPU is used for temperature monitoring and logic control. In addition, the camera may further include a high-computing-power NPU (Neural Processing Unit), or the NPU and the CPU are two of the units in the AI processor, and the AI processor adopts a SOC architecture of CPU + NPU + GPU. That is to say, the camera of the present application may deploy a CPU alone in the camera, or may deploy an AI processor adopting a SOC architecture of CPU + NPU + GPU.

[0073] It should be noted that if the camera deploys an AI processor adopting a SOC architecture of CPU + NPU + GPU, the CPU temperature involved in the present application may be the AI processor temperature.

[0074] In the present application, the housing of the camera tightly holds a heating module, and the heating module is as shown in Figure 3 Figures (a) and (b). The whole after tightly holding the heating module can be called the temperature drift compensation device of the camera lens, as shown in Figure 4 Figures (a) and (b); in addition, a heat-conducting silica gel sheet is provided between the heating module and the housing of the camera. On the one hand, it can prevent the heat generated by the heating module from directly acting on the housing of the camera and causing local overheating problems. On the other hand, it can evenly transfer the heat generated by the heating module to the housing of the camera, and transfer the heat to the CPU of the camera through the housing.

[0075] The camera is connected to the heating module through an RS485 serial control line, and is used to transmit control instructions (such as heating instructions and stop heating instructions) to the heating module, so as to control whether the heating module performs heating work.

[0076] In one embodiment, the camera may collect the first CPU temperature and the ambient temperature through a temperature sensor; in addition, for the ambient temperature, the camera may also collect a weather report through a network and obtain the ambient temperature near the location where the camera is located from the weather report.

[0077] In one embodiment, before S202, the camera may also obtain the test ambient temperature and the CPU usage parameters of the camera within different temperature ranges; based on each test ambient temperature, CPU usage parameter, and temperature correction coefficient, calculate the CPU heating threshold at each test ambient temperature; configure the CPU heating threshold at each test ambient temperature as a parameter in the camera.

[0078] Among them, the test environment temperature can be a preset environment temperature for detecting the CPU heating threshold. An environment temperature is selected as the test environment temperature within different temperature ranges. In addition, two or more environment temperatures can also be selected as the test environment temperature.

[0079] The CPU usage parameter can be a parameter obtained based on the CPU usage rate. For example, if the CPU usage rate is 55%, then the CPU usage parameter is 55. The temperature correction coefficient can be a coefficient used to correct the temperature.

[0080] As an example, the environment temperature can be deduced from the CPU temperature of the camera. The environment temperature deduction formula is: T2 = T1 - K2*U1, where T2 is the test environment temperature, T1 is the CPU temperature of the camera, K2 is the temperature correction coefficient, which can be determined through experiments and is used to reflect the power consumption and heat dissipation efficiency of the CPU, and U1 is the CPU usage rate of the camera. According to this formula, without additionally adding a temperature sensor, the corresponding CPU temperature when the heating module needs to work at different test environment temperatures can be deduced inversely, and then the CPU heating threshold A of the camera can be determined by using the CPU temperature of the camera and the CPU usage parameter of the camera, so as to dynamically control the working state of the heating module in a low-temperature environment.

[0081] For example, when the test environment temperature T2 is minus 10 degrees, the CPU usage parameter U1 of the camera = 55, and the temperature correction coefficient K2 = 0.82, the CPU heating threshold A of the camera can be calculated as 35 degrees and then configured in the camera as a parameter; similarly, when the test environment temperature T2 is minus 20 degrees, the CPU usage parameter U1 of the camera = 55, and the temperature correction coefficient K2 = 0.82, the CPU heating threshold A of the camera can be calculated as 25 degrees and then configured in the camera as a parameter; and so on for other test environment temperatures, which will not be elaborated here.

[0082] S204, select a CPU heating threshold that matches the environment temperature, and compare the magnitude between the first CPU temperature and the CPU heating threshold.

[0083] Among them, the CPU heating threshold can be a temperature threshold used to measure whether the CPU needs to be heated, and this CPU heating threshold is configured in the camera as a parameter. It should be noted that different temperature ranges correspond to different CPU heating thresholds, and each environment temperature within the same temperature range corresponds to the same CPU heating threshold.

[0084] In one embodiment, the camera can select a CPU heating threshold that matches the ambient temperature from the parameters configured in the camera; in addition, it can also first determine the temperature range in which the ambient temperature falls, and select a CPU heating threshold that matches the temperature range from the parameters configured in the camera.

[0085] S206, if the first CPU temperature is less than the CPU heating threshold, send a heating instruction to the heating module fastened to the camera housing; a thermal conductive silica gel sheet is provided between the heating module and the camera housing.

[0086] Among them, the CPU heating threshold can be a conditional value used to determine whether to turn on the heating module for heating.

[0087] In one embodiment, the heating module includes a main control unit and a plurality of independent heaters. Therefore, when sending a heating instruction, the camera can send a heating instruction to the main control unit in the heating module fastened to the camera housing.

[0088] Among them, the number of heaters in the heating module can be 4, and each heater is a PTC heater with a power of 10W - 20W, which is used to generate heat for temperature compensation of the lens; in addition, the main control unit is used to schedule and control the working states of the 4 PTC heaters, such as partial working or simultaneous working.

[0089] When judging whether to turn on the heating module for heating, the lens temperature can also be combined for comprehensive judgment. In one embodiment, the camera can calculate the predicted lens temperature of the lens according to the first CPU temperature, the module temperature of the heating module, the first conduction coefficient, and the second conduction coefficient; the first conduction coefficient is the conduction coefficient of the heat of the CPU transferred to the lens, and the second conduction coefficient is the conduction coefficient of the heat generated by the heating module transferred to the CPU; if the predicted lens temperature is less than the target lens temperature of the lens, send a heating instruction to the main control unit in the heating module fastened to the camera housing.

[0090] For example, the lens temperature (i.e., the predicted lens temperature) is calculated using the lens temperature calculation formula, and the lens temperature calculation formula is as follows:

[0091]

[0092]

[0093] Among them, T represents the predicted lens temperature, represents the temperature of the heating module, represents the first CPU temperature, which can usually be collected by a temperature sensor or calculated by the above formula; is the first conduction coefficient, is the second conduction coefficient, is the third conduction coefficient, which is the heat conduction coefficient from the heating module to the camera lens. t is the temperature during the heat generation of the camera CPU during operation. It should be noted that , and can be determined through experiments by measuring the proportional relationship between the CPU temperature corresponding to the heating module operation and the lens temperature corresponding to the CPU temperature, as well as the proportional relationship between the temperature of the heating module and the lens temperature corresponding to the heating module temperature.

[0094] S208. Control at least one heater of the heating module to perform heating work through a heating instruction, so that during the heating process of the heating module, the heat generated by heating is transferred to the CPU of the camera through the thermal conductive silicone sheet, and during the CPU temperature rise process, the heat of the CPU is transferred to the camera lens through the thermal conduction device of the camera.

[0095] Among them, part of the heat generated by the heating module is transferred to the CPU of the camera through the thermal conductive silicone sheet, and the other part is transferred to the camera lens through the thermal conductive silicone sheet.

[0096] In one embodiment, the camera collects the second CPU temperature of the CPU; compares the magnitude of the second CPU temperature with the target CPU temperature; the target CPU temperature is calculated based on the first conduction coefficient and the target lens temperature; if the second CPU temperature is greater than the target CPU temperature, the main control unit of the heating module is controlled to turn off some of the heaters in the working state, so that the heat obtained by heating offsets the heat loss of the lens, making the lens in a constant temperature state.

[0097] Among them, turning off some of the heaters in the working state means turning off some of the heaters in the working state, so that the lens is in a constant temperature state. In addition, the camera can also be in a constant temperature state.

[0098] As an example, the heating control logic of the camera is as follows: when the CPU temperature of the camera is lower than the heating threshold (A), the heating module is started; according to the target lens temperature (T) and the heat conduction coefficient (K1), the required CPU temperature (T1, i.e., the target CPU temperature) is calculated; the camera sends a heating instruction through the RS485 serial port to schedule the PTC heater of the heating module to work. For example, when the current ambient temperature is -20 degrees Celsius, the target lens temperature T = 15 degrees Celsius, and the heat conduction coefficient K1 = 0.26, it can be obtained that the CPU temperature T1 of the camera to be heated is greater than 58 degrees Celsius. At this time, the camera sends a heating instruction through the private protocol to control the 4 PTC heaters of the heating module to work simultaneously for rapid heating, shortening the heating time. The heat generated by the heating module is thermally conducted to the CPU of the camera and the front-end lens. When the CPU temperature of the camera reaches 58 degrees Celsius, the camera sends a control instruction to the heating module to schedule the 4 PTC heaters to work individually in a round-robin manner. At this time, the heat generated by a single designed PTC heater just offsets the heat loss of the camera and the lens, so as to ensure that the camera and the lens are in a constant temperature state.

[0099] In the above embodiment, the first CPU temperature and the ambient temperature of the camera are obtained; a CPU heating threshold matching the ambient temperature is selected, and the magnitude between the first CPU temperature and the CPU heating threshold is compared; if the first CPU temperature is less than the CPU heating threshold, a heating instruction is sent to the heating module tightly fastened to the outer shell of the camera; a thermal conductive silica gel sheet is provided between the heating module and the outer shell of the camera; at least one heater of the heating module is controlled to perform heating work through the heating instruction, so that during the heating process of the heating module, the heat generated by heating is transferred to the CPU of the camera through the thermal conductive silica gel sheet, and during the CPU temperature rise process, the heat of the CPU is transferred to the lens of the camera through the thermal conduction device of the camera, so that only one heating module needs to be sleeved on the outer shell of the camera, and without changing the structure of the lens and without increasing the difficulty of lens focusing, the lens can be heated in a low-temperature environment to ensure the temperature of the lens, and thus the image effect can be effectively ensured without affecting the accuracy of license plate recognition.

[0100] In one embodiment, after S208, if it is detected that the ambient temperature changes, the camera can also determine the CPU temperature change value after the ambient temperature changes; compare the magnitude between the CPU temperature change value and the temperature adjustment threshold; if the CPU temperature change value is greater than or equal to the temperature adjustment threshold, the main control unit of the heating module is controlled to turn off some heaters in the working state, so that the heat obtained by heating offsets the heat loss of the lens, making the lens in a constant temperature state.

[0101] Among them, the CPU temperature change value can be the temperature difference by which the CPU temperature rises after the ambient temperature changes. For example, the CPU temperature after the ambient temperature change is subtracted from the CPU temperature before the ambient temperature change to obtain the CPU temperature change value.

[0102] As an example, when the external ambient temperature changes, the CPU temperature of the camera will also change accordingly. At this time, the camera can monitor the change in the CPU temperature. When the CPU temperature change value is greater than or equal to the temperature adjustment threshold, the camera sends a corresponding control instruction to dynamically turn on or off one or more PTC heaters of the heating module. For example: when the ambient temperature changes from -10 degrees Celsius to -3 degrees Celsius, the CPU temperature of the camera also rises from 58 degrees Celsius to 64 degrees Celsius. After monitoring that the CPU temperature change value is greater than 5 degrees, the camera sends a control instruction to the heating module, so that the PTC heaters to be turned off can be dynamically adjusted, reducing the heat output, maintaining the lens temperature constant, and ensuring clear images.

[0103] By means of the camera dynamically controlling the heating module, the lens can be heated in a timely manner according to the change of the external temperature, so that the lens is in a constant temperature state, thereby eliminating the lens temperature drift effect caused by temperature changes, and further resulting in lens defocus and image blurring, enabling the lens to return to the normal focus point, ensuring clear images of the camera, and stable and reliable recognition effects.

[0104] In one embodiment, during the process of performing lens temperature compensation, the camera can also obtain vehicle images and scaled low-resolution images collected during the vehicle's driving; the vehicle images are collected with the fill light on, and the fill light is installed on the traffic gantry and the angle with the horizontal plane is within the target range to avoid dazzling the driver with light; the vehicle positioning thread is used to position the vehicle in the low-resolution image to obtain the vehicle position; the license plate positioning thread is used to perform license plate positioning on the vehicle image based on the vehicle position to obtain the license plate position; the license plate character recognition thread is used to locate the license plate area in the vehicle image based on the license plate position and perform character recognition on the license plate area to obtain the character recognition result; the license plate color recognition thread is used to perform color recognition on the license plate area to obtain the color recognition result; and the vehicle license plate information is determined according to the character recognition result and the color recognition result.

[0105] In one embodiment, the step of obtaining the vehicle images and scaled low-resolution images collected during the vehicle's driving may specifically include: the camera obtains a road environment image and performs light detection on the road environment image to obtain the brightness; when the brightness is lower than the preset brightness, during the process of collecting images of the driving vehicle, the fill light is controlled to turn on for filling light to obtain the vehicle image; and the copy of the vehicle image is scaled to obtain the low-resolution image.

[0106] In one embodiment, the camera uses an image preprocessing thread to convert the vehicle position into the position of the vehicle in the vehicle image, crops the vehicle image based on the position of the vehicle in the vehicle image, and performs scaling and normalization processing on the cropped vehicle image to obtain a preprocessed image; therefore, the step of performing license plate positioning on the vehicle image based on the vehicle position by the license plate positioning thread to obtain the license plate position may specifically include: using the license plate positioning thread to perform license plate positioning on the preprocessed image to obtain the license plate position.

[0107] In one embodiment, when the number of vehicles in the low-resolution image is multiple, the camera uses a vehicle positioning thread to position the multiple vehicles in the low-resolution image to obtain candidate vehicle positions; from the candidate vehicle positions, the vehicle position that is located in the lane corresponding to the camera and is at the bottom of the low-resolution image is selected.

[0108] In one embodiment, before the camera determines the license plate information of the vehicle based on the character recognition result and the color recognition result, if the number of acquired vehicle images is multiple, then from the character recognition results and color recognition results of the multiple vehicle images, the character with the highest character appearance frequency and the color with the highest color appearance frequency at each character position are selected for combination to obtain a first combination result; therefore, the step of determining the license plate information of the vehicle based on the character recognition result and the color recognition result may specifically include: determining the license plate information of the vehicle according to the first combination result.

[0109] In one embodiment, if the character with the highest character appearance frequency does not meet the specification requirements, then from the character recognition results and color recognition results of the multiple vehicle images, the character with the second highest character appearance frequency and the color with the highest color appearance frequency at each character position are selected for combination to obtain a second combination result; determining the license plate information of the vehicle based on the character recognition result and the color recognition result includes: determining the license plate information of the vehicle according to the second combination result.

[0110] In the above embodiments, vehicle images and scaled low-resolution images collected during vehicle driving are obtained. The low-resolution images can be used to quickly locate the vehicle and obtain the vehicle position. Based on the vehicle position, license plate positioning is performed on the vehicle images to obtain the license plate position. Based on the license plate position, the license plate area in the vehicle images is located, and character recognition is performed on the license plate area to obtain the character recognition result. Color recognition is performed on the license plate area to obtain the color recognition result. The license plate information of the vehicle is determined according to the character recognition result and the color recognition result, so that the license plate information of the vehicle can be accurately recognized. In addition, when performing vehicle positioning, license plate positioning, character recognition, and color recognition, corresponding threads are used to execute respectively, which can help to speed up the recognition speed of the license plate information. Moreover, the license plate information recognition method is used for a camera with an embedded NPU, and the NPU can provide high computing power support for the camera. Therefore, in the face of a vehicle traveling at high speed, the camera can quickly recognize the license plate information of the vehicle. Finally, the fill light is installed on the traffic gantry and the angle with the horizontal plane is within the target range to avoid dazzling the driver with light. Therefore, when collecting vehicle images, the fill light is turned on, and there will be no safety risk to the driver's traffic.

[0111] To understand the solution of the present application more clearly, here in combination with Figure 5 the solution of the present application is briefly described as a whole as follows:

[0112] The camera obtains the CPU temperature and judges whether the CPU temperature is lower than the CPU heating threshold. If not, it continues to judge whether the CPU temperature is greater than the target CPU temperature. If so, the target CPU temperature is calculated. In addition, a control instruction is sent to the heating module to control the heating module to perform heating work. In addition, during the heating process, the temperature of the CPU will gradually increase. It is further judged whether the CPU temperature during the heating process is greater than the target CPU temperature. If not, the heating module continues to perform heating work. If so, the working state of the heating module is adjusted (such as turning off one or more heaters) to keep the lens in a constant temperature state. In addition, the camera will also detect the change in the ambient temperature. Before and after the change in the ambient temperature, it is judged whether the change value of the CPU temperature is greater than or equal to the adjustment threshold. If not, the heating state of the heating module remains unchanged. If so, a control instruction will be sent to the heating module to control the heating module to turn on or off some heaters.

[0113] Therefore, by adopting the solution of the present application, only a heating module needs to be added to the original camera, without the need to modify the lens structure, add additional temperature sensors, and increase the installation and debugging difficulty of the equipment and the lens. In addition, according to the change in the external temperature, the working state of the heating module can be accurately and dynamically controlled and scheduled, so that the camera and the front lens are in a constant temperature state, avoiding the heating module from working all the time and reducing unnecessary energy consumption.

[0114] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0115] Based on the same inventive concept, an embodiment of the present application further provides a lens temperature compensation device for a camera for implementing the lens temperature compensation method of the camera involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the lens temperature compensation device for the camera provided below can refer to the limitations on the lens temperature compensation method of the camera in the above text, and will not be repeated here.

[0116] In one embodiment, as Figure 6 shown, a lens temperature compensation device for a camera is provided, including: an acquisition module 602, a comparison module 604, and a control module 606, where:

[0117] The acquisition module 602 is configured to acquire the first CPU temperature and the ambient temperature of the camera;

[0118] The comparison module 604 is configured to select a CPU heating threshold that matches the ambient temperature and compare the magnitude between the first CPU temperature and the CPU heating threshold;

[0119] The control module 606 is configured to, if the first CPU temperature is less than the CPU heating threshold, send a heating instruction to a heating module that is tightly attached to the outer shell of the camera; a heat-conducting silica gel sheet is provided between the heating module and the outer shell of the camera; at least one heater of the heating module is controlled to perform a heating operation through the heating instruction, so that during the heating process of the heating module, the heat generated by the heating is transferred to the CPU of the camera through the heat-conducting silica gel sheet, and during the process of the CPU temperature rising, the heat of the CPU is transferred to the lens of the camera through the heat-conducting device of the camera.

[0120] In one of the embodiments, the heating module includes a main control unit and a plurality of independent heaters;

[0121] The control module 606 is further configured to send a heating instruction to the main control unit in the heating module fastened to the outer shell of the camera; and control the main control unit of the heating module to schedule at least one of multiple heaters to perform heating work through the heating instruction.

[0122] In one embodiment, as Figure 7 shown, the device further includes:

[0123] The first calculation module 608 is configured to calculate the predicted lens temperature of the lens according to the first CPU temperature, the module temperature of the heating module, the first conduction coefficient, and the second conduction coefficient; the first conduction coefficient is the conduction coefficient of the heat of the CPU transferred to the lens, and the second conduction coefficient is the conduction coefficient of the heat of the heating module transferred to the CPU;

[0124] The control module 606 is further configured to send a heating instruction to the main control unit in the heating module fastened to the outer shell of the camera if the predicted lens temperature is less than the target lens temperature of the lens.

[0125] In one embodiment, as Figure 7 shown, the device further includes:

[0126] The acquisition module 610 is configured to acquire the second CPU temperature of the CPU;

[0127] The comparison module 604 is configured to compare the second CPU temperature with the target CPU temperature; the target CPU temperature is calculated based on the first conduction coefficient and the target lens temperature;

[0128] The control module 606 is further configured to control the main control unit of the heating module to turn off some of the heaters in the working state if the second CPU temperature is greater than the target CPU temperature, so that the heat obtained by heating offsets the heat loss of the lens, and the lens is in a constant temperature state.

[0129] In one embodiment, as Figure 7 shown, the device further includes:

[0130] The acquisition module 602 is further configured to acquire the test environment temperature in different temperature ranges and the CPU usage parameters of the camera;

[0131] The second calculation module 612 is configured to calculate the CPU heating threshold at each test environment temperature based on each test environment temperature, the CPU usage parameters, and the temperature correction coefficient;

[0132] The configuration module 614 is configured to configure the CPU heating threshold at each test environment temperature as a parameter in the camera;

[0133] The comparison module 604 is further configured to select a CPU heating threshold that matches the ambient temperature from the parameters configured in the camera.

[0134] In one embodiment, as Figure 7 shown, the device further includes:

[0135] The determination module 616 is configured to determine the CPU temperature change value after the ambient temperature changes if it is detected that the ambient temperature has changed;

[0136] The third comparison module 604 is configured to compare the magnitude between the CPU temperature change value and the temperature adjustment threshold;

[0137] The control module 606 is further configured to, if the CPU temperature change value is greater than or equal to the temperature adjustment threshold, control the main control unit of the heating module to turn off some of the heaters in the working state, so that the heat generated by heating offsets the heat loss of the lens, making the lens in a constant temperature state.

[0138] In the above embodiment, the first CPU temperature and the ambient temperature of the camera are obtained; a CPU heating threshold that matches the ambient temperature is selected, and the magnitude between the first CPU temperature and the CPU heating threshold is compared; if the first CPU temperature is less than the CPU heating threshold, a heating instruction is sent to the heating module tightly fastened to the outer shell of the camera; a heat-conducting silica gel sheet is provided between the heating module and the outer shell of the camera; at least one heater of the heating module is controlled to perform a heating operation through the heating instruction, so that during the heating process of the heating module, the heat generated by heating is transferred to the CPU of the camera through the heat-conducting silica gel sheet, and during the process of the CPU heating up, the heat of the CPU is transferred to the lens of the camera through the heat-conducting device of the camera. Thus, only by sleeving a heating module on the outer shell of the camera, without changing the structure of the lens and without increasing the difficulty of lens focusing, the lens can be heated in a low-temperature environment to ensure the temperature of the lens, and further the image effect can be effectively ensured without affecting the accuracy rate of license plate recognition.

[0139] Each module in the above lens temperature compensation device of the camera can be implemented in whole or in part through software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of it, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above respective modules.

[0140] In one embodiment, a computer device is provided. The computer device can be a camera, and its internal structure diagram can be as Figure 8As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store image data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for compensating the lens temperature of a camera.

[0141] Those skilled in the art can understand that Figure 8 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout.

[0142] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps of the above-mentioned method for compensating the lens temperature of a camera are implemented.

[0143] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps of the above-mentioned method for compensating the lens temperature of a camera are implemented.

[0144] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps of the above-mentioned method for compensating the lens temperature of a camera are implemented.

[0145] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0146] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, and other data processing logics, etc., and are not limited thereto.

[0147] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0148] The above-described embodiments only represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application should be subject to the appended claims.

Claims

1. A method for compensating the temperature of a camera lens, characterized in that, The method includes: Obtaining the first CPU temperature and the ambient temperature of the camera; Selecting a CPU heating threshold that matches the ambient temperature, and comparing the magnitude between the first CPU temperature and the CPU heating threshold; If the first CPU temperature is less than the CPU heating threshold, sending a heating instruction to a heating module that is fastened to the outer shell of the camera; a thermal conductive silica gel sheet is provided between the heating module and the outer shell of the camera; Controlling at least one heater of the heating module to perform a heating operation through the heating instruction, so that during the heating process of the heating module, the heat generated by the heating is transferred to the CPU of the camera through the thermal conductive silica gel sheet, and during the temperature increase process of the CPU, the heat of the CPU is transferred to the lens of the camera through the thermal conduction device of the camera.

2. The method according to claim 1, characterized in that, The heating module includes a main control unit and a plurality of independent heaters; the sending a heating instruction to a heating module that is fastened to the outer shell of the camera includes: Sending a heating instruction to the main control unit in the heating module that is fastened to the outer shell of the camera; The controlling at least one heater of the heating module to perform a heating operation through the heating instruction includes: Controlling the main control unit of the heating module to schedule at least one heater among the plurality of heaters to perform a heating operation through the heating instruction.

3. The method according to claim 2, characterized in that, The method further includes: Calculating a predicted lens temperature of the lens according to the first CPU temperature, the module temperature of the heating module, a first conduction coefficient, and a second conduction coefficient; the first conduction coefficient is the conduction coefficient for the heat of the CPU to be transferred to the lens, and the second conduction coefficient is the conduction coefficient for the heat of the heating module to be transferred to the CPU; If the predicted lens temperature is less than the target lens temperature of the lens, performing the step of sending a heating instruction to the main control unit in the heating module that is fastened to the outer shell of the camera.

4. The method according to claim 3, characterized in that, After the controlling at least one heater of the heating module to perform a heating operation through the heating instruction, the method further includes: Collecting a second CPU temperature of the CPU; Comparing the magnitude between the second CPU temperature and a target CPU temperature; the target CPU temperature is calculated based on the first conduction coefficient and the target lens temperature; If the second CPU temperature is greater than the target CPU temperature, controlling the main control unit of the heating module to turn off some of the heaters in the working state, so that the heat obtained by heating offsets the heat loss of the lens, and the lens is in a constant temperature state.

5. The method according to any one of claims 1 to 4, characterized in that Before the obtaining the first CPU temperature and the ambient temperature of the camera, the method further includes: Obtaining the test ambient temperature and the CPU usage parameters of the camera within different temperature ranges; Calculating the CPU heating thresholds at each of the test ambient temperatures based on each of the test ambient temperatures, the CPU usage parameters, and a temperature correction coefficient; Configuring the CPU heating thresholds at each of the test ambient temperatures as parameters in the camera; The selecting a CPU heating threshold that matches the ambient temperature includes: Select a CPU heating threshold that matches the ambient temperature from the parameters configured in the camera.

6. The method according to any one of claims 1 to 4, characterized in that, After controlling at least one heater of the heating module to perform a heating operation through the heating instruction, the method further includes: If it is monitored that the ambient temperature changes, determine the CPU temperature change value after the ambient temperature changes; Compare the magnitude between the CPU temperature change value and the temperature adjustment threshold; If the CPU temperature change value is greater than or equal to the temperature adjustment threshold, control the main control unit of the heating module to turn off some of the heaters in the working state, so that the heat generated by heating offsets the heat loss of the lens, making the lens in a constant temperature state.

7. A lens temperature compensation device for a camera, characterized in that, The device includes: An acquisition module, configured to acquire the first CPU temperature and the ambient temperature of the camera; A comparison module, configured to select a CPU heating threshold that matches the ambient temperature and compare the magnitude between the first CPU temperature and the CPU heating threshold; A control module, configured to, if the first CPU temperature is less than the CPU heating threshold, send a heating instruction to a heating module fastened to the outer shell of the camera; a heat-conducting silica gel sheet is provided between the heating module and the outer shell of the camera; control at least one heater of the heating module to perform a heating operation through the heating instruction, so that during the heating process of the heating module, the heat generated by heating is transferred to the CPU of the camera through the heat-conducting silica gel sheet, and during the temperature rise process of the CPU, the heat of the CPU is transferred to the lens of the camera through the heat conduction device of the camera.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.