Tlens adaptive control method and system
By obtaining distance and temperature information during the non-exposure period of the camera, using machine learning models to predict the dynamic effect time, and starting TLens in advance to complete focus, solving the problem of focus delay and excessive energy consumption in complex scenarios, improving imaging quality and reducing the power consumption of the entire machine.
Patent Information
- Application Number
- CN202510382985.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the dynamic response time of liquid lenses (TLens) is affected by factors such as ambient temperature and target distance, resulting in focus delay or excessive energy consumption in complex scenarios, and the historical data optimization control logic is not fully utilized, making it difficult to achieve dynamic adaptive adjustment.
By obtaining the distance and temperature information between the TLens and the object to be measured during the non-exposure period of the camera, using the pre-trained machine learning model to predict the dynamic effect time, start TLens in advance and adjust the focus to complete the focus, ensuring that the exposure period of the camera is synchronized with the working time of the TLens, and reducing unnecessary energy consumption.
The synchronization of TLens' focus and camera in complex scenarios is achieved, the imaging quality and decoding success rate is improved, and the power consumption of the entire machine is reduced.
Smart Images

Figure CN120264151A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of liquid lens control, and particularly to a Tlens adaptive control method and system. Background Art
[0002] The liquid lens (TLens) realizes fast zooming by adjusting the liquid curvature through voltage, but its dynamic response time is affected by factors such as ambient temperature and target distance. In the prior art, Tlens usually adopts an activation strategy based on image sharpness, resulting in out-of-sync exposure with the camera, and thus focus delay or excessive energy consumption in complex scenarios. For example, in a high-temperature environment, the activation time of TLens may be prolonged. If not compensated in advance, it will lead to incomplete focusing within the exposure period, affecting the imaging quality. In addition, traditional methods do not fully utilize historical data to optimize the control logic, making it difficult to achieve dynamic adaptive adjustment. Therefore, there is an urgent need for an adaptive control scheme that can combine real-time environmental parameters with machine learning prediction. Summary of the Invention
[0003] The present invention provides a Tlens adaptive control method and system to solve the problem that in the prior art, Tlens often adopts a fixed-time activation strategy, resulting in focus delay or excessive energy consumption in complex scenarios.
[0004] On the one hand, the present invention provides a Tlens adaptive control method, including:
[0005] When the exposure period of the camera ends, TLens synchronously enters the sleep state;
[0006] During the non-exposure period of the camera, obtain the distance information between TLens and the object to be measured;
[0007] Based on the distance information, predict the dynamic activation time required for TLens to start from the sleep state to complete focusing through a pre-trained machine learning model;
[0008] Start TLens in advance according to the dynamic activation time and adjust the focal length to complete focusing;
[0009] When focusing is completed, the camera synchronously enters the next exposure period.
[0010] According to the Tlens adaptive control method provided by the present invention, when the barcode is successfully read or the exposure time reaches the preset threshold, the exposure period of the camera ends.
[0011] According to the Tlens adaptive control method provided by the present invention, the sum of the exposure period and the non-exposure period of the camera is the frame time of the camera.
[0012] According to a Tlens adaptive control method provided by the present invention, when predicting the dynamic activation time, it includes:
[0013] Obtain the temperature information of the TLens;
[0014] Compensate the dynamic activation time according to the temperature information.
[0015] According to a Tlens adaptive control method provided by the present invention, the pre-trained machine learning model is trained based on historical data, and the historical data includes TLens focusing time samples at different distances and different temperatures.
[0016] On the other hand, the present invention also provides a Tlens adaptive control system, including:
[0017] A distance detection module, configured to obtain the distance information between the TLens and the object to be measured during the non-exposure period of the camera;
[0018] A time prediction module, configured to predict the dynamic activation time required for the TLens to start from the sleep state to complete focusing based on the distance information through a pre-trained machine learning model;
[0019] A control module, configured to start the TLens in advance according to the dynamic activation time, and adjust the focal length to complete focusing; and control the camera to enter the exposure period when focusing is completed, and control the TLens to enter the sleep state when the exposure period ends.
[0020] According to a Tlens adaptive control system provided by the present invention, the control module is further configured to control the end of the exposure period of the camera when the barcode is successfully read or the exposure time reaches a preset threshold.
[0021] According to a Tlens adaptive control system provided by the present invention, the sum of the exposure period and the non-exposure period of the camera is the frame time of the camera.
[0022] According to a Tlens adaptive control system provided by the present invention, it further includes:
[0023] A temperature detection module, configured to obtain the temperature information of the TLens;
[0024] A compensation module, configured to compensate the dynamic activation time according to the temperature information.
[0025] According to a Tlens adaptive control system provided by the present invention, the pre-trained machine learning model is trained based on historical data, and the historical data includes TLens focusing time samples at different distances and different temperatures.
[0026] The Tlens adaptive control method and system provided by the present invention are applied to the field of barcode scanning devices. By dynamically adjusting the durations of the exposure period and the non-exposure period within the fixed frame time of the camera, that is: when the barcode scanning device successfully decodes or the exposure duration of the camera reaches a preset threshold, the camera ends the exposure period, and at the same time, the Tlens synchronously enters the sleep state; during the non-exposure period, the dynamic effective time of the Tlens is predicted based on the distance, so as to start the Tlens in advance. When the Tlens finishes focusing, it just synchronously enters the next exposure period with the camera. By strictly synchronizing the normal working duration of the Tlens with the exposure period of the camera, on the premise of ensuring clear image quality, the working duration of the Tlens is effectively reduced. At the same time, the clear image helps to improve the decoding success rate, further reducing the exposure period duration of the camera. During the non-exposure period, the Tlens also has a period of sleep time. Under the interaction of each other, the power consumption of the whole machine is further reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0028] Figure 1 is a schematic flowchart of the Tlens adaptive control method provided by the present invention;
[0029] Figure 2 is an electrical block diagram of the Tlens adaptive control system provided by the present invention;
[0030] Figure 3 is a timing diagram of the camera and the Tlens;
[0031] Figure 4 is a relationship diagram between distance, temperature and dynamic effective time. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.
[0033] The following will be combined with Figures 1-4Describe a Tlens adaptive control method and system of the present invention. The method and system are applied to a barcode scanning device with a Tlens, and the barcode scanning device can perform barcode scanning and decoding.
[0034] On the one hand, the present invention provides a Tlens adaptive control method, including:
[0035] When the exposure cycle of the camera ends, the TLens synchronously enters the sleep state;
[0036] During the non-exposure cycle of the camera, obtain the distance information between the TLens and the object to be measured;
[0037] Based on the distance information, predict the dynamic activation time required for the TLens to start from the sleep state to complete focusing through a pre-trained machine learning model;
[0038] Start the TLens in advance according to the dynamic activation time and adjust the focal length to complete focusing;
[0039] When the focusing is completed, the camera synchronously enters the next exposure cycle.
[0040] In this embodiment, when the barcode is successfully read or the exposure time reaches the preset threshold, the exposure cycle of the camera ends.
[0041] The sum of the exposure cycle and the non-exposure cycle of the camera is the frame time of the camera; the frame time refers to the time required for the camera to complete a full imaging cycle, usually including the non-exposure cycle and the exposure cycle. Specifically, the frame time is the time interval from the start of one imaging operation to the start of the next imaging operation of the camera, and the length of the frame time directly affects the imaging speed and frame rate of the camera. In a traditional camera imaging system, the allocation of the frame time is usually fixed, that is, the lengths of the non-exposure cycle and the exposure cycle are preset in advance. However, this fixed allocation method has the following problems: The TLens starts to focus only after the exposure cycle of the camera starts, which may lead to too long focusing time and affect the imaging quality; during the entire frame time, the TLens may always be in the working state, resulting in unnecessary increase in energy consumption.
[0042] Such as Figure 3As shown in the figure, within the fixed frame time of the camera, the invention dynamically adjusts the durations of the exposure period and the non-exposure period. For example, the frame time is T, the exposure period is T1, and the non-exposure period is T2. So, T = T1 + T2. Among them, T is fixed and unchanged. Therefore, a conventional camera on the market can be used. However, T1 and T2 can be dynamically adjusted as long as the sum of the two remains unchanged. The two show a relationship of one increasing while the other decreasing. But the exposure period T1 will be preset with a threshold. Exceeding this threshold represents decoding failure, and the exposure period can end and enter the non-exposure period. Within the fixed frame time of the camera, TLens synchronizes with the exposure period of the camera and works normally. The normal working duration of TLens is t1. So, t1 = T1. When the camera ends the exposure, TLens enters the sleep state. At this time, the system will detect the distance information between TLens and the object to be measured and predict the dynamic activation time t3 required for TLens to start from the sleep state and complete focusing. Therefore, before the end of the non-exposure period and the start of the next exposure period, TLens needs to be started in advance to complete the focusing work so that within the next exposure period, TLens can synchronize with the exposure period of the camera and work normally. During the non-exposure period, the sleep time of TLens is t2. During the t2 time period, the system will calculate the dynamic activation time t3, and then TLens will start from the sleep state and complete focusing within the t3 time period. So, T2 = t2 + t3. Among them, the frame time T is known, the exposure period T1 will be obtained when the exposure ends, and then the remaining non-exposure period T2 can be calculated. t3 is predicted through the distance information, and then the sleep time t2 can be calculated.
[0043] By starting TLens in advance to complete focusing within the t3 time period, it can make the normal working time of TLens strictly synchronized with the exposure period of the camera, avoid the problem of image blurring caused by focusing delay, improve the imaging quality. High-quality images can reduce the decoding time of the system, thereby reducing the exposure period duration of the camera and at the same time reducing the normal working time of TLens, and then increasing the sleep duration of TLens. Under the synergistic effect, the power consumption of the whole machine can be minimized.
[0044] When predicting the dynamic activation time, it includes:
[0045] Obtain the temperature information of TLens;
[0046] Compensate the dynamic activation time according to the temperature information.
[0047] The pre-trained machine learning model is trained based on historical data, and the historical data includes TLens focusing time samples at different distances and different temperatures.
[0048] Figure 4The relationship between distance, temperature, and the dynamic activation time is given. From the figure, we can roughly conclude that the farther the distance, the greater the dynamic activation time. At the same distance, the higher the temperature, the greater the dynamic activation time, that is, the more values need to be compensated. The above distance and temperature will be set within a reasonable range according to the actual working environment (non-extreme environment). Within this reasonable range, a large number of TLens focusing time samples are collected through a large number of operations, and then the time samples are put into a machine learning model for training, so as to quickly predict a reasonable dynamic activation time in the working state.
[0049] The Tlens adaptive control system provided by the present invention will be described below. The Tlens adaptive control system described below can be mutually corresponding and referred to the Tlens adaptive control method described above.
[0050] On the other hand, the present invention also provides a Tlens adaptive control system, including:
[0051] A distance detection module, configured to obtain the distance information between the TLens and the object to be measured during the non-exposure period of the camera; the distance detection module can be a laser rangefinder or an ultrasonic sensor; it can be understood that a barcode is attached to the object to be measured;
[0052] A time prediction module, configured to predict the dynamic activation time required for the TLens to start from the sleep state to complete focusing based on the distance information through a pre-trained machine learning model;
[0053] A control module, configured to start the TLens in advance according to the dynamic activation time and adjust the focal length to complete focusing; and control the camera to enter the exposure period when the focusing is completed, and control the TLens to enter the sleep state when the exposure period ends.
[0054] In this embodiment, the control module is further configured to control the end of the exposure period of the camera when the barcode is successfully read or the exposure time reaches a preset threshold.
[0055] In this embodiment, further, the sum of the exposure period and the non-exposure period of the camera is the frame time of the camera.
[0056] The Tlens adaptive control system provided by the present invention further includes:
[0057] A temperature detection module, configured to obtain the temperature information of the TLens;
[0058] A compensation module, configured to compensate the dynamic activation time according to the temperature information.
[0059] In this embodiment, the pre-trained machine learning model is trained based on historical data, and the historical data includes TLens focusing time samples at different distances and different temperatures.
[0060] The working principle of the Tlens adaptive control system is substantially the same as the Tlens adaptive control method mentioned above, and will not be elaborated here.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Tlens adaptive control method, characterized in that, Including: When the exposure cycle of the camera ends, TLens synchronously enters the sleep state; During the non-exposure cycle of the camera, obtain the distance information between TLens and the object to be measured; Based on the distance information, predict the dynamic activation time required for TLens to start from the sleep state and complete focusing through a pre-trained machine learning model; Start TLens in advance according to the dynamic activation time and adjust the focal length to complete focusing; When focusing is completed, the camera synchronously enters the next exposure cycle.
2. The Tlens adaptive control method according to claim 1, wherein When the barcode is successfully read or the exposure time reaches the preset threshold, the exposure cycle of the camera ends.
3. The Tlens adaptive control method according to claim 2, wherein The sum of the exposure cycle and the non-exposure cycle of the camera is the frame time of the camera.
4. The Tlens adaptive control method according to claim 1, wherein When predicting the dynamic activation time, including: Obtain the temperature information of TLens; Compensate the dynamic activation time according to the temperature information.
5. The Tlens adaptive control method according to claim 4, wherein The pre-trained machine learning model is trained based on historical data, and the historical data includes TLens focusing time samples at different distances and different temperatures.
6. A Tlens adaptive control system, characterized in that, Including: A distance detection module for obtaining the distance information between TLens and the object to be measured during the non-exposure cycle of the camera; A time prediction module for predicting the dynamic activation time required for TLens to start from the sleep state and complete focusing through a pre-trained machine learning model based on the distance information; A control module for starting TLens in advance according to the dynamic activation time, adjusting the focal length to complete focusing; and controlling the camera to enter the exposure cycle when focusing is completed, and controlling TLens to enter the sleep state when the exposure cycle ends.
7. The Tlens adaptive control system according to claim 6, characterized in that, The control module is further configured to control the exposure cycle of the camera to end when the barcode is successfully read or the exposure time reaches the preset threshold.
8. The Tlens adaptive control system according to claim 7, wherein The sum of the exposure cycle and the non-exposure cycle of the camera is the frame time of the camera.
9. The Tlens adaptive control system according to claim 6, wherein, Further including: A temperature detection module for obtaining the temperature information of TLens; A compensation module for compensating the dynamic activation time according to the temperature information.
10. The Tlens adaptive control system according to claim 9, wherein, The pre-trained machine learning model is trained based on historical data, and the historical data includes TLens focusing time samples at different distances and different temperatures.