A mechanical focusing-free, full-automatic, high-precision and portable lens diopter measuring device
By using a lens refractive power measurement device without mechanical focusing, utilizing a liquid lens and voltage sequence control imaging system, and combining a refractive power mapping model for temperature and hysteresis compensation, the limitations of existing equipment in terms of limited lifespan and poor portability are solved, achieving high-precision and portable lens refractive power measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SIGMA SQUARES (BEIJING) TECH CO LTD
- Filing Date
- 2026-01-27
- Publication Date
- 2026-08-04
AI Technical Summary
Existing lens refractive power measurement equipment suffers from problems such as limited system lifespan due to mechanical moving parts, repeatability affected by operator experience, measurement speed limited by mechanical inertia, and difficulty in achieving portability and rapid mass production.
By employing a non-mechanical focusing method, a liquid lens and the lens under test are placed coaxially. The target image is acquired using a voltage sequence controlled imaging system. Temperature and hysteresis compensation are performed using a refractive power mapping model to achieve fully automatic and high-precision lens refractive power measurement.
It achieves high-precision measurement with millisecond-level response, long lifespan, good stability, small size, low cost, and fully digital measurement process, which facilitates storage and remote transmission. It also has the potential to be extended to astigmatism and intelligent cloud management.
Smart Images

Figure CN121829994B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical measurement, specifically a fully automatic, high-precision, and portable lens diopter measuring device that does not require mechanical focusing. Background Technology
[0002] Diopters (D) are a unit of measurement for the refractive power of a lens or eye. They are defined as the refractive power of parallel light rays passing through a refractive medium to form a focal length of 1 meter, and are equal to the reciprocal of the focal length (meters). As a core parameter in eyeglass fitting and vision correction, the accuracy of diopters directly affects the effectiveness of eyeglasses, influencing the wearer's visual comfort and eye health.
[0003] As a device for measuring refractive power, focimeters on the market are currently mainly divided into three categories:
[0004] The first type is the projection-type focimeter, which relies on manual adjustment of mechanical knobs to move the lens assembly, with the sharpness determined subjectively by the human eye. This type of device has low measurement efficiency, and the results are greatly affected by the operator's experience, making it difficult to guarantee the consistency and objectivity of the measurements.
[0005] The second type is the computer-controlled autofocimeter, which uses principles such as Hartmann's and automatically focuses through a built-in mechanical moving device. This type of equipment suffers from problems such as mechanical wear, large size, and high cost. Furthermore, the mechanical moving parts result in a limited system lifespan, repeatability is affected by operator experience, and measurement speed is limited by mechanical inertia.
[0006] The third type is the focimeter based on moiré fringes, which has high measurement accuracy but is complex, sensitive to environmental vibrations, and expensive. For example, the liquid lens and rapid focusing method involved in patent CN117389000B can improve measurement efficiency, but the system is complex and difficult to implement on a large scale.
[0007] Existing technologies generally have mechanical moving parts, which leads to limited system life, repeatability affected by operator experience, measurement speed limited by mechanical inertia, difficulty in achieving true portability and rapid mass production, and the degree of automation and objectivity need to be improved. Summary of the Invention
[0008] In view of this, the purpose of this application is to provide a fully automatic, high-precision, and portable lens diopter measuring device without mechanical focusing, so as to solve the problems in the prior art.
[0009] To achieve the above objectives, this application adopts the following technical solution:
[0010] This application discloses a fully automatic, high-precision, and portable lens diopter measuring device without mechanical focusing, comprising:
[0011] An acquisition module is used to perform image acquisition based on a pre-constructed voltage sequence control of a pre-initialized imaging system to obtain a target image sequence. The voltage sequence control includes control signals corresponding to multiple voltage values, and the target image sequence includes target images corresponding to multiple voltage control signals. The imaging system includes a coaxial liquid lens and a lens under test, and the focal length of the liquid lens is determined based on the control signals.
[0012] The analysis module is used to extract the sharpness of multiple target images in the target image sequence, and perform peak analysis based on the sharpness of multiple target images to obtain the optimal voltage value corresponding to the peak sharpness.
[0013] The diopter calculation module is used to obtain the current temperature, perform hysteresis judgment on the optimal voltage value, and obtain the hysteresis judgment result; and perform diopter calculation based on the pre-constructed diopter mapping model, the current temperature, the hysteresis judgment result and the optimal voltage value to obtain the temperature-compensated and hysteresis-compensated diopter, wherein the diopter mapping model characterizes the mapping relationship between diopter and voltage value under different temperatures and hysteresis compensation scenarios.
[0014] In one embodiment of this application, the imaging system includes a light source, a light homogenizing device, an umbrella-shaped target, a small aperture aperture, a lens under test, a liquid lens, an imaging lens, a junction box, and an image sensor arranged sequentially along the optical path. The initialization method of the imaging system includes:
[0015] The imaging system was subjected to lens placement detection and environmental stability detection.
[0016] Once the lens is in place and the environment is stable, the initialization of the imaging system is completed.
[0017] In one embodiment of this application, lens placement detection of the imaging system includes:
[0018] Acquire test images captured by the imaging system;
[0019] Contour features are extracted from the test image, and the test image is matched with a pre-constructed empty background image to obtain the matching degree, wherein the matching is a difference operation or a normalized cross-correlation matching;
[0020] When the matching degree is greater than a preset matching degree threshold, and the contour feature contains a preset graphic and the clarity is greater than a preset clarity threshold, it is determined that the lens is placed in place; otherwise, a prompt message is output to the user to place the lens, and the system returns to the test image acquired by the imaging system until the lens is placed in place.
[0021] In one embodiment of this application, environmental stability detection of the imaging system includes:
[0022] Acquire multiple test images from the imaging system and collect temperature values at multiple sampling time points;
[0023] The average brightness value is extracted from the multi-frame test images, and the brightness difference between the average brightness values of any two adjacent test images is calculated; as well as the temperature change rate based on the temperature values at any two adjacent sampling time points;
[0024] When multiple brightness difference values are all less than or equal to a preset brightness difference value threshold, and multiple temperature change rates are all less than or equal to a preset change rate threshold, the environment is determined to be stable.
[0025] In one embodiment of this application, extracting the sharpness of multiple target images in the target image sequence includes: calculating the gradient sharpness of each target image in the target image sequence. Multi-scale Laplacian operator clarity and image entropy clarity ;
[0026] For the gradient sharpness The clarity of the multi-scale Laplacian operator and the image entropy sharpness Weighted summation is performed to obtain the sharpness of the target image. Among them, clarity The mathematical expression is:
[0027]
[0028] In the formula, Represents the image index. Indicates the first weight. Indicates the second weight. This indicates the third weight.
[0029] In one embodiment of this application, peak analysis is performed based on the sharpness of multiple target images to obtain the optimal voltage value corresponding to the peak sharpness, including:
[0030] Clarity based on multiple target images and voltage value Construct data points to obtain a data sequence; assess the sharpness of the data sequence. A sliding window-based smoothing process is performed to obtain a smooth curve; the first-order difference of the smooth curve is calculated to obtain a first-order difference curve; zero-crossing points are extracted from the first-order difference curve to obtain candidate local peak points; and points satisfying the following conditions are selected. The candidate local peak points are used as local peak points, where, The average sharpness in the data sequence, It is a positive integer. The standard deviation of sharpness in the data sequence;
[0031] From the local peak points, select the priority peak point with the highest sharpness, and determine whether there are candidate peak points whose sharpness difference is less than or equal to a preset difference threshold. If not, use the priority peak point as the coarsely selected peak point. If so, calculate the curvature of the priority peak point and the candidate peak points, and select the peak point with the largest curvature as the coarsely selected peak point. ;
[0032] The coarsely selected peak points Construct a fine scan window for the benchmark ,in, Indicates the extended width;
[0033] In the fine scan window The system performs sampling to obtain multiple sampling voltage values, and controls the imaging system to acquire a fine-sampled target image sequence based on the multiple sampling voltage values; and extracts the sharpness of each frame in the fine-sampled target image sequence to obtain a fine-sampled sharpness sequence;
[0034] Extract the peak point with the highest sharpness in the fine-sampled sharpness sequence, and perform a hill-climbing algorithm based on the peak point in the fine-sampled sharpness sequence to obtain the local optimum;
[0035] Parabolic fitting is performed based on the local optimum and the nearest sampling points on both sides of the local optimum, and the vertex and the optimal voltage value corresponding to the vertex are extracted from the obtained parabola.
[0036] In one embodiment of this application, hysteresis determination is performed on the optimal voltage value to obtain a hysteresis determination result, including:
[0037] Based on the optimal voltage value, boost scanning and buck scanning are performed respectively to obtain image sequences of boost scanning and buck scanning;
[0038] Extract the first peak voltage corresponding to the image with the highest resolution from the boost scan image sequence, and extract the second peak voltage corresponding to the image with the highest resolution from the buck scan image sequence;
[0039] Calculate the difference between the first peak voltage and the second peak voltage. The difference Compare with a preset voltage difference threshold;
[0040] The difference When the voltage difference exceeds the threshold, a hysteresis effect is determined, and the weighted average of the first peak voltage and the second peak voltage is calculated to obtain the updated optimal voltage value, which is then output.
[0041] The difference If the voltage difference is less than or equal to the voltage difference threshold, it is determined that there is no hysteresis effect, and the optimal voltage value is output.
[0042] In one embodiment of this application, refractive power is calculated based on a pre-constructed refractive power mapping model, the current temperature, the hysteresis judgment result, and the optimal voltage value to obtain temperature-compensated and hysteresis-compensated refractive power, including:
[0043] Based on the current temperature and reference temperature For the optimal voltage value Compensation is performed to obtain the compensated voltage value. The mathematical expression for the compensation voltage value is as follows:
[0044]
[0045] In the formula, This represents the temperature compensation coefficient in the diopter mapping model;
[0046] The direction of the optimal voltage value is determined, and a target fitting parameter is selected from the refractive power mapping model based on the direction of the optimal voltage value. The refractive power is then calculated based on the compensation voltage value and the target fitting parameter. The diopter The mathematical expression is:
[0047]
[0048]
[0049] In the formula, and All represent system constants. Indicates the diopter of the liquid lens. For model fitting parameters, These are the parameters for model fitting.
[0050] In one embodiment of this application, the method for constructing the refractive power mapping model includes:
[0051] A multi-diopter standard lens is installed into the imaging system; the imaging system containing the standard lens is controlled by a pre-built voltage sequence to perform image acquisition and obtain a target image sequence sample.
[0052] Extract the optimal voltage value sample corresponding to the peak sharpness from the target image sequence sample, and construct a data sample based on the optimal voltage value sample, temperature value, voltage scanning direction and timestamp;
[0053] A sample set is constructed based on data samples from multiple standard lenses, and outlier removal and data completion are performed on the sample set to obtain a standard sample set.
[0054] The standard sample set is divided into a positive direction sample subset and a negative direction sample subset based on the voltage scanning direction. The parameter model of the imaging system is then fitted using the least squares method based on the positive direction sample subset and the negative direction sample subset, respectively, to obtain the positive direction fitting parameters and the negative direction fitting parameters. The mathematical expression of the parameter model is as follows:
[0055]
[0056] In the formula, Indicates the refractive power of a standard lens. Indicates the diopter of the liquid lens;
[0057] Based on the aforementioned parameter model, the diopter of the liquid lens and the theoretical driving voltage value corresponding to the diopter of the liquid lens are calculated. ;
[0058] Calculate the theoretical driving voltage value The difference between the actual voltage value and the actual voltage value is used to obtain a voltage difference sample. It calculates the difference between the actual temperature value and the reference temperature value to obtain a temperature difference sample. ;
[0059] A linear fitting model is constructed for voltage difference and temperature difference, wherein the mathematical expression of the linear fitting model is:
[0060]
[0061] Based on the voltage difference sample and the temperature difference sample The linear fitting model is fitted to obtain the temperature compensation coefficient. ;
[0062] Based on the parameter model, positive direction fitting parameters, negative direction fitting parameters, linear fitting model, and temperature compensation coefficient of the imaging system. Construct a diopter mapping model.
[0063] In one embodiment of this application, it further includes:
[0064] The verification module is used for:
[0065] The ratio of sharpness to background noise level corresponding to the optimal voltage value is calculated to obtain the peak intensity ratio; the root mean square error of the parabola fitting is calculated to obtain the fitting residual; and the shape similarity on both sides of the parabola is calculated to obtain the curve symmetry.
[0066] The quality evaluation score is obtained by weighted summation of the peak intensity ratio, the fitting residual, and the curve symmetry.
[0067] The peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score are compared with the corresponding reference ranges. If the peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score all match the corresponding reference ranges, the measurement quality is deemed qualified. Otherwise, the measurement returns to the acquisition module to remeasure the refractive power of the lens under test until the measurement quality is qualified or the number of repetitions exceeds a preset threshold.
[0068] The beneficial effects of this application are as follows: This application provides a fully automatic, high-precision, and portable lens refractive power measurement device without mechanical focusing. In this application, the lens under test and a liquid lens are placed coaxially in an imaging system to form an imaging system capable of voltage-adjustable total refractive power. Then, based on the image sequence acquired by the imaging system, the optimal voltage value corresponding to the image with the highest sharpness is found. Finally, the optimal voltage value is substituted into a pre-constructed refractive power mapping model to perform a fusion mapping of temperature compensation and hysteresis compensation to obtain the refractive power of the lens under test. The liquid lens used in this application has a millisecond-level response, and when combined with a high frame rate camera, a single measurement can be completed within seconds. It has no moving mechanical parts, no wear, long lifespan, and good stability. Based on an embedded system, it is small in size, highly integrated, and has a lower manufacturing cost than traditional autofocimeters. The measurement process and results are fully digital, facilitating storage, traceability, remote transmission, and further analysis. Furthermore, the systematic approach of using liquid lens electronic focusing and multi-index fusion sharpness evaluation solves the pain points of traditional focimeters, such as mechanical complexity, slow speed, reliance on manual accuracy, and lack of portability. This results in a highly repeatable diopter measurement platform that can be mass-produced quickly and has the potential to expand astigmatism and intelligent cloud management. Attached Figure Description
[0069] The present application will be further described below with reference to the accompanying drawings and embodiments:
[0070] Figure 1 This is an application scenario diagram of a fully automatic, high-precision, and portable lens diopter measurement device that is mechanically focused but not mechanically adjusted, according to one embodiment of this application.
[0071] Figure 2 This is an optical path diagram of an imaging system according to an embodiment of this application;
[0072] Figure 3This is a structural diagram of a fully automatic, high-precision, and portable lens diopter measuring device shown in one embodiment of this application;
[0073] Figure 4 This is a flowchart of a lens refractive power measurement method in one embodiment of this application;
[0074] Figure 5 This is a schematic diagram of the system calibration process in one embodiment of this application;
[0075] Figure 6 This is a schematic diagram illustrating the specific implementation process in one embodiment of this application. Detailed Implementation
[0076] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0077] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the layers related to this application and are not drawn according to the actual number, shape and size of the layers in the actual implementation. In the actual implementation, the form, number and proportion of each layer can be arbitrarily changed, and the layer layout may also be more complex.
[0078] Numerous details are explored in the following description to provide a more thorough explanation of embodiments of this application; however, it will be apparent to those skilled in the art that embodiments of this application may be practiced without these specific details.
[0079] Figure 1 This is an illustration of an application scenario for a fully automatic, high-precision, and portable lens diopter measurement device that requires no mechanical focusing, as shown in one embodiment of this application. Figure 1 As shown, the imaging system of this application includes an illumination subsystem 100, a sample optical path subsystem 200, an imaging subsystem 300, and an image processing and display subsystem 400.
[0080] The lighting subsystem 100 offers two selectable lighting modes:
[0081] Mode A (High-Contrast Static Target Projection): Employs a constant-current driven narrow-band LED light source 101 (selectable center wavelength approximately 530nm) → homogenizing / diffusion device 102 → high-resolution target 103 → reticle 104. This mode features a narrow spectral width, stable light intensity, and simple structure, making it suitable for general refractive power measurement.
[0082] Mode B (Laser + DOE Dynamic Structured Light): This mode uses a monochromatic laser → a diffractive optical element (DOE) to generate a high-contrast structured light pattern → a projection screen to form an equivalent target. This mode is used in low-light, high-contrast applications or when enhanced directional frequency response is required (extending astigmatism measurement). The two modes are achieved by replacing components or switching optical paths without affecting subsequent optical paths.
[0083] The sample optical path subsystem 200 includes a sample tray 201 and a sample to be tested 202; the imaging subsystem 300 includes a liquid lens 301, a rear imaging lens 302, a junction box 303, and a CMOS image sensor 304; the image processing and display subsystem 400 includes an embedded processor 401 and a display 402, which together constitute a compact optical and control collaborative system for realizing fully automatic measurement of lens diopter.
[0084] The light source module 101 emits 530nm green monochromatic light, which enters the light homogenizer 102 to provide uniform illumination, ensuring that the reticle 104 and the high-resolution target 103 obtain high-quality optical patterns. This pattern is refracted by the sample under test 202 (placed in the sample tray 201), which integrates a 4.5mm small aperture diaphragm to limit the beam and reduce positioning errors, while the low contact force design protects the soft contact lens.
[0085] The liquid lens 301 dynamically adjusts its focal length via voltage control to compensate for the refractive power of the sample 202 under test, ensuring that the target pattern is clearly imaged onto the fixed image plane of the CMOS image sensor 304 through the rear imaging lens 302 and the adapter ring 303. The CMOS image sensor 304 captures a high-resolution image and transmits it to the embedded processor 401, which analyzes the image using a multi-index sharpness algorithm, controls the voltage of the liquid lens 301, and calculates the refractive power parameters. The final result is presented through the display 402 and output via the storage / communication interface, completing the closed-loop process of measurement, display, and data management.
[0086] Figure 2 Here is an optical path diagram of an imaging system in one embodiment of this application. Please refer to... Figure 2 To understand. Figure 2 The core optical principles and calculation model of this system for refractive power measurement are explained. Based on the theory of thin lens combinations, the system achieves accurate and rapid refractive power measurement by analyzing the optical characteristics of the lens under test and the liquid lens combination.
[0087] The imaging optical path of the system can be modeled as a variable focal length system consisting of two thin lenses, followed by an imaging module with a fixed image plane.
[0088] Fixed conjugate substrate: The object plane (reticle target) and image plane (CMOS sensor) of the system are positioned at fixed positions, forming a fixed object-image conjugate relationship. The rear imaging lens, as part of this fixed imaging module, ensures clear imaging of the target in the reference state.
[0089] When the target is clearly imaged, the following conditions must be met:
[0090]
[0091] In the formula, This indicates the object distance from the reticle to the lens being measured (a fixed value determined by the optical path design). Indicates the image distance (the fixed distance from the liquid lens to the CMOS sensor). This represents the total refractive power of the lens under test and the liquid lens.
[0092] Dual-lens combination: The lens being tested inserted into the optical path (refractive power) ) and liquid lenses used for focusing compensation (diopter) These are considered as two independent thin lenses, with their optical centers separated by a fixed distance determined by the mechanical structure. .
[0093] Clear imaging conditions: When the system is in sharp focus, the total equivalent refractive power of the tested lens and the liquid lens combination is [value missing]. The diopter compensation must precisely compensate for the defocus caused by inserting the lens under test, restoring the entire system to a fixed object-image conjugate state. The diopter compensation required for this fixed object-image relationship is defined as the geometric constant of the system. .
[0094] According to the thin lens combination formula, the total combined focal length is... The relationship between the focal power and spacing of a single lens is as follows:
[0095]
[0096] The conditions for a clear image are:
[0097]
[0098] Combining equations (1) and (2), we obtain the core equation upon which the system measurement is based:
[0099]
[0100] In the formula, The desired refractive power of the lens being tested is... This refers to the real-time refractive power of the liquid lens at the point of sharp image. and These are constants determined through system calibration.
[0101] [Electro-optical properties model of liquid lens]
[0102] diopter of liquid lens Its drive control signal (such as the corresponding digital voltage value) Within the effective range, the relationship is linear:
[0103]
[0104] In the formula, For proportional parameters, is a constant term, representing parameters obtained through calibration. This model implicitly includes the optical power of the rear fixed lens group.
[0105] In practical applications, the driving value needs to be adjusted. Temperature and hysteresis compensation can be performed; compensation can be achieved through... value or The values are used for calculation. The complete characteristic model can be represented as:
[0106] in, Indicates temperature. Indicates the voltage scanning direction (e.g., rising or falling direction), function The specific form is determined by the calibration.
[0107] [Refractive power calculation link]
[0108] For an unknown lens, its refractive power Calculated via the following link:
[0109] Focusing and Measurement: Adjust the liquid lens voltage and find the drive value that makes the target image sharpest using the sharpness evaluation function. (Corresponding to the diopter of liquid lens) ).
[0110] Parameter acquisition: Read the system constants from the calibration parameters. and .
[0111] Solving the formula, , , Substituting into the calculation formula derived from the core equation (Equation 3), the refractive power of the measured lens can be directly solved:
[0112] Error Propagation Analysis
[0113] Overall error of measurement results It mainly consists of the following parts:
[0114] Focusing error. Caused by peak sharpness positioning deviation. cause, .
[0115] Calibration parameter error. (This refers to the parameter's error.) calibration residuals ( The combined effects propagate to the results through equation (5). Its contribution is particularly significant in high refractive power measurements.
[0116] and These are the residuals introduced by temperature and imperfect hysteresis compensation, respectively.
[0117] System constants Errors introduced by long-term drift are suppressed by periodically calibrating using a reference lens.
[0118] Through precise calibration, optimized focusing algorithms, and environmental compensation, the system measurement error (RMS) can be controlled within ≤0.02D.
[0119] Figure 3 This is a structural diagram of a fully automatic, high-precision, and portable lens diopter measuring device shown in one embodiment of this application. Figure 3 As shown, this embodiment of a fully automatic, high-precision, and portable lens diopter measuring device without mechanical focusing includes:
[0120] An acquisition module is used to perform image acquisition based on a pre-constructed voltage sequence control of a pre-initialized imaging system to obtain a target image sequence. The voltage sequence control includes control signals corresponding to multiple voltage values, and the target image sequence includes target images corresponding to multiple voltage control signals. The imaging system includes a coaxial liquid lens and a lens under test, and the focal length of the liquid lens is determined based on the control signals.
[0121] The analysis module is used to extract the sharpness of multiple target images in the target image sequence, and perform peak analysis based on the sharpness of multiple target images to obtain the optimal voltage value corresponding to the peak sharpness.
[0122] The diopter calculation module is used to obtain the current temperature, perform hysteresis judgment on the optimal voltage value, and obtain the hysteresis judgment result; and perform diopter calculation based on the pre-constructed diopter mapping model, the current temperature, the hysteresis judgment result and the optimal voltage value to obtain the temperature-compensated and hysteresis-compensated diopter, wherein the diopter mapping model characterizes the mapping relationship between diopter and voltage value under different temperatures and hysteresis compensation scenarios;
[0123] The verification module is used to calculate the ratio of sharpness to background noise level corresponding to the optimal voltage value to obtain the peak intensity ratio; calculate the root mean square error of the parabola fitting to obtain the fitting residual; and calculate the shape similarity on both sides of the parabola to obtain the curve symmetry; perform a weighted summation of the peak intensity ratio, the fitting residual, and the curve symmetry to obtain a quality evaluation score; compare the peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score with the corresponding reference ranges respectively, and determine that the measurement quality is qualified when the peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score all match the corresponding reference ranges; otherwise, return to the acquisition module to remeasure the refractive power of the lens under test until the measurement quality is qualified or the number of repetitions exceeds a preset threshold.
[0124] The system obtains the peak sharpness (specifying mixed sharpness evaluation parameters) of multiple zoom shots by placing the lens and focusing, and obtains the V corresponding to the current refractive power, thereby obtaining the SPH corresponding to the current lens.
[0125] Figure 4 This is a flowchart of a lens refractive power measurement method in one embodiment of this application. This embodiment will... Figure 4 The process is divided into six stages: preparation, coarse scanning, peak localization, fine scanning and optimization, diopter calculation, and quality closed-loop management. Details are as follows:
[0126] (1) System initialization: Load system running configuration, including light source parameters, voltage scanning stepping strategy, sharpness algorithm fusion weights, various judgment threshold tables, and the currently effective calibration model version CalVer. Initialize the data cache queue and log recording module. Check and confirm that the self-test status of all key hardware units (light source driver, CMOS image sensor, temperature probe, liquid lens voltage DAC) is normal.
[0127] (2) Lens placement test
[0128] (2-1) Acquire test images from the imaging system;
[0129] (2-2) Extract contour features from the test image and match the test image with a pre-constructed empty background image to obtain the matching degree, wherein the matching is a difference operation or a normalized cross-correlation matching;
[0130] (2-3) When the matching degree is greater than the preset matching degree threshold, and the contour feature contains a preset graphic and the clarity is greater than the preset clarity threshold, it is determined that the lens is placed in place; otherwise, a prompt message is output to prompt the user to place the lens, and the system returns to the test image acquired by the imaging system until the lens is placed in place.
[0131] During the placement detection process described above, image processing is used to determine whether the lens under test has been correctly placed. The system acquires a frame of the current field of view image and performs differential calculations or normalized cross-correlation matching with a pre-stored "empty" background template. If the matching degree is higher than a preset threshold and a clear ring-shaped edge contour is detected, the lens is determined to be in place. If abnormally large bright areas appear in the differential image or the matching fails, it may correspond to a severely tilted lens, surface contamination, or the lens not being placed at all. In this case, the system will prompt the user to "replace the lens".
[0132] (3) Environmental stability assessment
[0133] (3-1) Acquire multiple test images collected by the imaging system and collect temperature values at multiple sampling time points;
[0134] (3-2) Extract the average brightness value from the multi-frame test images and calculate the brightness difference value between the average brightness values of any two adjacent test images; and the temperature change rate based on the temperature values at any two adjacent sampling time points;
[0135] (3-3) When multiple brightness difference values are all less than or equal to the preset brightness difference value threshold, and multiple temperature change rates are all less than or equal to the preset change rate threshold, the environment is determined to be stable.
[0136] The purpose of the above process is to prevent sudden changes in ambient light or internal thermal disturbances from affecting the measurement, and the system enters a short monitoring period. Three to five frames of images are continuously acquired, and the difference in the average brightness of adjacent frames is calculated. Simultaneously, data is read from the temperature sensor, and the rate of temperature change between adjacent sampling points is calculated. When the brightness difference remains less than ΔLmax (e.g., 3%) and the rate of temperature change remains below 0.2°C / s, the environment is considered stable, and scanning can begin. This step aims to ensure the baseline stability of the subsequent sharpness evaluation function F(V) and avoid the introduction of noise or spurious peaks due to environmental fluctuations.
[0137] (4) Coarse scan start
[0138] During the initialization process described above, if the lens is in place and the environment is uncertain, a coarse scan initiation process is initiated. This involves setting the scan range [Vmin, Vmax] of the liquid lens drive voltage and a large step value ΔVcoarse (e.g., 2V). Starting from Vmin, the voltage is gradually increased in steps. After each new voltage is set, a fixed "stabilization-exposure" time window (typically 15ms) is waited to ensure that the liquid lens deformation stabilizes and the CMOS image is fully exposed. Scanning yields image sequences driven at different voltages (corresponding to different total refractive powers).
[0139] (5) Frame-by-frame acquisition and sharpness calculation
[0140] At each voltage point A target image frame is acquired. A sharpness fusion algorithm (such as Tenengrad gradient, multi-scale Laplacian operator, weighted sum of image entropy, or a single parameter value) is used to calculate the sharpness evaluation value of that frame. The process of sharpness evaluation includes:
[0141] (5-1) Calculate the gradient sharpness of each target image in the target image sequence. Multi-scale Laplacian operator clarity and image entropy clarity ;
[0142] (5-2) Regarding the gradient sharpness The clarity of the multi-scale Laplacian operator and the image entropy sharpness Weighted summation is performed to obtain the sharpness of the target image. Among them, clarity The mathematical expression is:
[0143]
[0144] In the formula, Represents the image index. Indicates the first weight. Indicates the second weight. This indicates the third weight.
[0145] Record the tuple of the data point while obtaining the clarity. , ,direction, ).in, "Temperature" refers to the temperature at the time of sampling; "Direction" refers to the direction of voltage change during this scan (UP or DOWN), used for subsequent hysteresis compensation. This is equivalent to constructing a sharpness response curve on a two-dimensional plane (V,F).
[0146] (6) Peak candidate detection
[0147] (6-1) Clarity based on multiple target images and voltage value Construct data points to obtain a data sequence;
[0148] (6-2) Clarity in the data sequence Perform sliding smoothing based on a sliding window to obtain a smooth curve;
[0149] The data sequence (V, F) obtained from the coarse scan is preprocessed. First, a moving average or median filter is applied to the F-value sequence using a sliding window containing at least 5 data points to smooth out random noise.
[0150] (6-3) Calculate the first-order difference of the smooth curve to obtain the first-order difference curve; extract the zero-crossing points from the first-order difference curve to obtain candidate local peak points;
[0151] Calculate the first-order difference (approximate derivative) of the smoothed sequence. By detecting the zero-crossing points where the difference value changes from positive to negative, the positions of all local maxima (candidate peaks) can be located.
[0152] (6-4) will satisfy The candidate local peak points are used as local peak points, where, The average sharpness in the data sequence, It is a positive integer. The standard deviation of sharpness in the data sequence;
[0153] Furthermore, those peak heights were removed. Less than the overall average Plus Double standard deviation Weak or spurious peaks. If no qualified candidate peaks are found throughout the entire scan range, the system will attempt a reverse scan or report an error (E02).
[0154] (7) Determine the center of the coarse peak
[0155] (7-1) Select the priority peak point with the highest clarity from the local peak points, and determine whether there are candidate peak points whose clarity difference is less than or equal to a preset difference threshold.
[0156] (7-2) If not, use the preferred peak point as the coarsely selected peak point. ;
[0157] (7-3) If so, calculate the curvature of the priority peak point and the candidate peak points, and take the peak point with the largest curvature as the coarsely selected peak point. ;
[0158] Among all candidate peaks, the one usually selected is... The highest value is taken as the main peak. However, in some cases, due to noise or target characteristics, the sharpness curve may exhibit a double-peak or "shoulder peak" phenomenon, meaning there are multiple peaks. Similar values Candidate peaks. Directly taking the maximum value at this point might be unstable. Therefore, the strategy is: if the difference between the F-values of the highest and second-highest peaks is less than a threshold... If the peak with the greater curvature (sharper curve) or the one located in the middle is selected first, the corresponding voltage value is recorded as the center of the coarse peak. This is not simply taking the top N maximum values, but rather introducing second-order information to make more robust decisions in the specific case where "peak values are similar".
[0159] Detailed scanning and optimization phase
[0160] (8) Calculate the fine scan window
[0161] The coarsely selected peak points Construct a fine scan window for the benchmark ,in, This indicates the expansion width; specifically, based on the coarse peak center Vc, it expands to the left and right by a width Δ (e.g., 3-5V) to form a fine scanning window. Ensure the window does not exceed the allowable voltage range. .like Near the boundary, the window will expand asymmetrically, mainly inwards.
[0162] (9) Initialize fine scan cache
[0163] Clear the temporary data cache during the coarse scan phase and pre-allocate memory space for fine sampling data to reduce the dynamic memory allocation overhead in the real-time system and ensure timing determinism.
[0164] (10) Fine scan execution
[0165] In the fine scan window The system performs sampling to obtain multiple sampling voltage values, and controls the imaging system to acquire a fine-sampled target image sequence based on the multiple sampling voltage values; and extracts the sharpness of each frame in the fine-sampled target image sequence to obtain a fine-sampled sharpness sequence;
[0166] Specifically, within the fine scan window determined in (8), with smaller steps... High-density voltage sampling is performed at each voltage point (e.g., 0.1V). Repeat the acquisition and sharpness calculation process of (5) to obtain fine details within the window. , Data sequence. For the calculated... Anomaly detection is performed on the values. If the difference between the median of a certain point and the median of the adjacent points exceeds 3 times the local standard deviation, it is marked as a jitter point, and a second sampling can be performed at that point to correct it.
[0167] (11) Hill Climbing Algorithm
[0168] Extract the peak point with the highest sharpness in the fine-sampled sharpness sequence, and perform a hill-climbing algorithm based on the peak point in the fine-sampled sharpness sequence to obtain the local optimum;
[0169] Hill climbing is a local optimization method. (The last sentence appears to be incomplete and possibly contains errors. It doesn't translate directly.) Using the point with the highest value as the center, compare it with its left and right adjacent points. Value. If any adjacent points on either side If the value is higher, the center point is moved to that higher point, and the comparison continues. This process is repeated iteratively until the center point corresponds to a higher value. The value is highest in its immediate neighborhood, or the number of steps moves reaches the minimum threshold, thus ensuring that the local optimum within the window is located.
[0170] (12) Parabolic Fitting Refinement
[0171] Parabolic fitting is performed based on the local optimum and the nearest sampling points on both sides of the local optimum, and the vertex and the optimal voltage value corresponding to the vertex are extracted from the obtained parabola.
[0172] Find the local optimum and its two nearest valid data points to the left and right, and fit a quadratic parabola using these three points. Calculate the vertex coordinates of this parabola; its x-coordinate, V_best_candidate, is the best voltage estimate refined using sub-pixel interpolation. If the fitted vertex exceeds the range covered by these three points, discard the fitting result and directly use the voltage corresponding to the highest F-value point in the discrete data.
[0173] (13) Hysteresis two-way verification
[0174] (13-1) Based on the optimal voltage value, perform boost scanning and buck scanning respectively to obtain the image sequence of boost scanning and the image sequence of buck scanning;
[0175] (13-2) Extract the first peak voltage corresponding to the maximum resolution image from the boost scan image sequence, and extract the second peak voltage corresponding to the maximum resolution image from the buck scan image sequence;
[0176] (13-3) Calculate the difference between the first peak voltage and the second peak voltage. The difference Compare with a preset voltage difference threshold;
[0177] (13-4) In the difference When the voltage difference exceeds the threshold, a hysteresis effect is determined, and the weighted average of the first peak voltage and the second peak voltage is calculated to obtain the updated optimal voltage value, which is then output. ;
[0178] (13-5) In the difference If the voltage difference is less than or equal to the voltage difference threshold, it is determined that there is no hysteresis effect, and the optimal voltage value is output. .
[0179] In the above process, due to the physical characteristics of the liquid lens (electrowetting or thin-film deformation), its refractive power exhibits a hysteresis effect in response to voltage. That is, the actual focal length at the same voltage point may differ between rising from low to high voltage and falling from high to low voltage. To assess and compensate for this effect, a small-amplitude boost and deboost scan are performed near V_best_candidate. The peak voltages obtained from these two scans are compared. If the difference |ΔV| is greater than a preset threshold (e.g., 0.2V), the hysteresis effect is significant and compensation is required. The compensation strategy could be to take the weighted average of the peak values from the two directions as the final value. Alternatively, different calibration parameters can be called depending on the direction.
[0180] (14) Refractive power calculation stage
[0181] (14-1) Data Input: The input for the refractive power calculation stage is the optimal voltage. Corresponding digital quantity, current temperature and scanning direction ;
[0182] (14-2) Model loading: Call the corresponding complete calibration parameter set according to CalVer, including: linear coefficients and Lens spacing System geometric constants And temperature-hysteresis compensation parameters.
[0183] The specific calculation process is as follows:
[0184] (14-3) Based on the current temperature and reference temperature For the optimal voltage value Compensation is performed to obtain the compensated voltage value. The mathematical expression for the compensation voltage value is as follows:
[0185]
[0186] In the formula, This represents the temperature compensation coefficient in the diopter mapping model;
[0187] (14-4) Determine the direction of the optimal voltage value, and select a target fitting parameter from the diopter mapping model based on the direction of the optimal voltage value. Calculate the diopter based on the compensation voltage value and the target fitting parameter. The diopter The mathematical expression is:
[0188]
[0189]
[0190] In the formula, and All represent system constants. Indicates the diopter of the liquid lens. For model fitting parameters, These are the parameters for model fitting.
[0191] Furthermore, if the system generates based on periodic quality control data Real-time drift correction Then perform the final calculation:
[0192] Final output This is the original spherical power.
[0193] (15) Aggregation of quality indicators
[0194] (15-1) Calculate the ratio of sharpness to background noise level corresponding to the optimal voltage value to obtain the peak intensity ratio; calculate the root mean square error when fitting the parabola to obtain the fitting residual; and calculate the shape similarity on both sides of the parabola to obtain the curve symmetry.
[0195] (15-2) The peak intensity ratio, the fitting residual, and the curve symmetry are weighted and summed to obtain the quality evaluation score;
[0196] Specifically, the reliability of this measurement was comprehensively evaluated, and multiple quality indicators were calculated:
[0197] Peak intensity ratio: optimal point sharpness The ratio to the background noise level.
[0198] Fitting residual: The root mean square error (RMSE) of parabola fitting reflects the local smoothness of the curve.
[0199] Curve symmetry: The similarity in shape between the sharpness curves on both sides of the peak.
[0200] Overall score: The above indicators are weighted and combined to generate a total quality score Qscore from 0 to 100.
[0201] (15-3) The peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score are compared with the corresponding reference ranges respectively. When the peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score all match the corresponding reference ranges, the measurement quality is deemed qualified. Otherwise, the measurement is returned to the acquisition module to remeasure the refractive power of the lens under test until the measurement quality is qualified or the number of repetitions exceeds the preset threshold.
[0202] Compare the Qscore and each sub-indicator with the preset thresholds. If all are met (e.g., Qscore ≥ 80), the measurement is considered successful and the process continues. Otherwise, it is considered a low-quality measurement. The system allows a limited number of retries (Nmax, default 2-3 times). During a retrieval, you can jump back to (10) to rescan with a denser step size, or jump back to (11) to perform hill climbing optimization from a different starting point.
[0203] (16) Output and storage
[0204] After the judgment is passed, the system officially confirms the measurement result. The final determined refractive error (as SPH_corr) is then recorded. Data such as temperature T, clarity curve segment F_curve, calibration version CalVer, timestamp, and quality flags are packaged into structured records (such as JSON), output to the display interface, and stored in non-volatile memory.
[0205] (17) Return to standby mode
[0206] Release all temporary memory and cache used by this measurement. Restore key statistics from this measurement (such as peak width, etc.). The value is updated to the long-term health monitoring module for trend analysis. The system then returns to low-power standby mode, awaiting the next measurement command.
[0207] Figure 5 This is a schematic diagram of the system calibration process in one embodiment of this application, as shown below. Figure 5 As shown, in one embodiment of this application, the method for constructing the refractive power mapping model includes:
[0208] S510, Install a standard lens with multiple diopters into the imaging system; control the imaging system including the standard lens to perform image acquisition based on a pre - constructed voltage sequence, and obtain a target image sequence sample;
[0209] Specifically, select a set of standard lenses that cover the target range (example {-20, -15, -10, -5, 0, +5, +10, +15, +20} D), record the nominal value, batch number, and manufacturing error (if any). Construct an imaging system based on the standard lenses with the above specifications, and then perform the initialization of the following process:
[0210] Environmental pre - heating and stabilization: After the light source, liquid lens, and processor are powered on, wait for the temperature to stabilize (change rate < 0.2°C / min), and record the reference temperature T0.
[0211] Confirmation of lens surface cleaning: Use an air blower or cleaning sheet to remove dust and fingerprints to avoid scattering affecting the F - curve.
[0212] After the initialization is completed, directly perform image acquisition as described above to obtain a target image sequence sample.
[0213] S520, Extract the best voltage value sample corresponding to the peak sharpness from the target image sequence sample, and construct a data sample based on the best voltage value sample, temperature value, voltage scan direction, and timestamp;
[0214] Perform a complete measurement process on the first standard lens ≥ n times (n ≥ 3) to obtain its Vbest sample set. Denote it as ( , , direction, timestamp)
[0215] S530, Construct a sample set based on the data samples of multiple standard lenses, and perform outlier removal and data complementation on the sample set to obtain a standard sample set;
[0216] Specifically, use or the IQR method to remove outlier Vbest points. If the remaining valid samples after removal < n_min, trigger re - measurement.
[0217] At the same time, calculate the representative value (average value) and standard deviation of Vbest for this lens. If the standard deviation is greater than the threshold (example 0.15V corresponding to > 0.01D), check the placement / light source / algorithm noise and re - measure.
[0218] Finally, obtain the data set D by traversing all standard lenses.
[0219] S540, based on the voltage scanning direction, the standard sample set is divided into a positive direction sample subset and a negative direction sample subset, and the parameter model of the imaging system is fitted using the least squares method based on the positive direction sample subset and the negative direction sample subset respectively, to obtain the positive direction fitting parameters and the negative direction fitting parameters, wherein the mathematical expression of the parameter model is:
[0220]
[0221] In the formula, Indicates the refractive power of a standard lens. Indicates the diopter of the liquid lens;
[0222] The loss function for localization during the least squares fitting process is:
[0223]
[0224] Substitute the above samples into the parametric model, and use the least squares method to reduce the loss. Minimize to obtain the fitted parameters.
[0225] In addition, the fitting residuals were calculated, and the variation of the residuals with other factors was analyzed. The changing trend. If the residuals show a significant systematic or regional deviation (rather than a random distribution), it may indicate that:
[0226] (1) Segmentation is required: different {k,b} parameter sets are used in different V intervals (corresponding to different working states of the liquid lens), and and Remain unchanged.
[0227] (2) There is a problem with the original data: the placement of the corresponding standard lens or the quality of the data needs to be checked.
[0228] S550, based on the parameter model, reverse-engineer the diopter of the liquid lens and the theoretical driving voltage value corresponding to the diopter of the liquid lens. ;
[0229] S560, Calculate the theoretical driving voltage value The difference between the actual voltage value and the actual voltage value is used to obtain a voltage difference sample. It calculates the difference between the actual temperature value and the reference temperature value to obtain a temperature difference sample. ;
[0230] S570, construct a linear fitting model of voltage difference and temperature difference, wherein the mathematical expression of the linear fitting model is:
[0231]
[0232] S580, based on the voltage difference sample and the temperature difference sample The linear fitting model is fitted to obtain the temperature compensation coefficient. ;
[0233] Steps S550-S580 constitute the temperature coefficient fitting process. This process determines the temperature compensation coefficient by comparing theoretical references with measured data: First, based on the calibrated physical model, the theoretical driving voltage that a standard lens with a known refractive power should have at the reference temperature is calculated; then, the deviation between the actual measured voltage and the theoretical voltage is compared, and this deviation is correlated with the corresponding temperature change; finally, the influence coefficient of temperature change on the driving voltage is obtained through linear regression analysis. This allows for the unified conversion of measured values at different temperatures to equivalent values at the reference temperature, ensuring the system's measurement accuracy and stability across the entire temperature range.
[0234] S590, based on the parameter model of the imaging system, the positive direction fitting parameters, the negative direction fitting parameters, the linear fitting model, and the temperature compensation coefficient. Construct a diopter mapping model.
[0235] In addition, after building the model, post-processing is required, including:
[0236] Cross-validation: Use either one-lens-left-lens or K-fold validation (K = number of lenses) to calculate the average error, maximum error, and RMSE; determine whether the accuracy index is met.
[0237] Additional data supplement (optional): If the error in a certain local interval still exceeds the standard, introduce intermediate diopter lenses (e.g., ±7D, +12D) to supplement the data and repeat C9~C13.
[0238] Model encapsulation and versioning: forming CalVer = timestamp + hash {k,b,d,K_sys, temperature coefficient k_T, hysteresis parameter (Δk,Δb or segmentation parameter), segmentation node (if any)}.
[0239] Write to device and verify: Write CalVer and parameters to non-volatile storage, and read back to verify hash consistency; old version archives can be rolled back.
[0240] Calibration report generation: Outputs residual curves, fitted curves, temperature fitted distribution, hysteresis difference curves, outlier list and statistical indicators, providing a basis for quality traceability and subsequent recalibration.
[0241] Figure 6 This is a schematic diagram of a specific implementation process in one embodiment of this application, such as... Figure 6 As shown, in one embodiment of this application, the sorting process includes:
[0242] Initialization: Load configuration and perform hardware self-test.
[0243] Measurement: Perform the process described above to obtain... .
[0244] calculate:
[0245]
[0246] Compensation: Temperature compensation; hysteresis bidirectional averaging; PID fine-tuning voltage error <0.15V.
[0247] Quality assessment:
[0248]
[0249] The weight sequence is {0.3, 0.25, 0.2, 0.15, 0.1}.
[0250] in Peak signal-to-noise ratio: The degree of significance of the sharpness peak relative to the background noise.
[0251] Root mean square error of fit: evaluates the smoothness and fit of the sharpness curve in the local shape near the peak;
[0252] Repeatability standard deviation: In a rapid, continuous measurement mode, the degree of dispersion of evaluation results.
[0253] Curve symmetry: Evaluates the shape consistency of the curves on both sides of the sharpness peak, and is used to identify interference such as stray light and aberrations.
[0254] Temperature stability score: Evaluates the stability of the temperature field throughout the measurement process.
[0255] Threshold: .like If successful, then proceed; otherwise, retry ≤ 3 times.
[0256] Output: JSON / struct {SPH,Vbest,T,Qscore,Flags,CalVer}, displayed / stored.
[0257] Monitoring: Track Vbest drift. If it is >0.02D, trigger self-calibration (no-load fine scan updates the tiny offsets of core parameters (such as K_sys and b)).
[0258] This process forms a closed loop, supporting extended astigmatism (angular gradient analysis). Example: +5D lens measures 5.00D ± 0.0058D; temperature compensation reduces the +0.08D error to +0.01D.
[0259] The distinctive feature of this application is:
[0260] (1) Based on a liquid lens + fully electronic focusing diopter measurement architecture without mechanical movement.
[0261] (2) Optical design combination of small aperture telecentric structure to reduce the propagation of lens placement error.
[0262] (3) A rapid clarity evaluation method and its parameter system based on multi-index weighted fusion.
[0263] (4) A mixed search strategy of coarse scanning + fine scanning + hill climbing / parabolic fitting is used to achieve high-precision positioning in <5s.
[0264] (5) A bidirectional independent mapping and micro-reverse verification compensation method for nonlinearity and hysteresis of liquid lens.
[0265] (6) Incorporate temperature compensation into the online self-calibration mechanism of the voltage-refractive power joint calibration model.
[0266] (7) Portable hardware integration and control process.
[0267] This application discloses a fully automatic, high-precision, and portable lens refractive power measurement device without mechanical focusing. In this device, the lens under test and a liquid lens are coaxially placed in an imaging system, forming an imaging system capable of voltage-adjustable total refractive power. Then, based on the image sequence acquired by the imaging system, the optimal voltage value corresponding to the image with the highest sharpness is found. Finally, the optimal voltage value is substituted into a pre-constructed refractive power mapping model to perform a fusion mapping of temperature compensation and hysteresis compensation, obtaining the refractive power of the lens under test. The liquid lens used in this application has a millisecond-level response, and when combined with a high frame rate camera, a single measurement can be completed within seconds. It has no moving mechanical parts, no wear, long lifespan, and good stability. Based on an embedded system, it is compact, highly integrated, and has a lower manufacturing cost than traditional autofocimeters. The measurement process and results are fully digital, facilitating storage, traceability, remote transmission, and further analysis. Furthermore, the systematic approach of using liquid lens electronic focusing and multi-index fusion sharpness evaluation solves the pain points of traditional focimeters, such as mechanical complexity, slow speed, reliance on manual accuracy, and lack of portability. This results in a highly repeatable diopter measurement platform that can be mass-produced quickly and has the potential to expand astigmatism and intelligent cloud management.
[0268] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0269] The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory so that the terminal performs any of the methods in this embodiment.
[0270] As will be understood by those skilled in the art, the computer-readable storage medium described in this embodiment allows for the implementation of all or part of the steps in the above method embodiments by computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0271] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication between them. The memory is used to store computer programs, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer programs, so that the electronic terminal performs the steps of the above method.
[0272] In this embodiment, the memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.
[0273] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0274] In the above embodiments, although the present application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. The embodiments of the present application are intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims.
[0275] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A fully automatic, high-precision, and portable lens diopter measuring device without mechanical focusing, characterized in that, include: An acquisition module is used to perform image acquisition based on a pre-built voltage sequence control of a pre-initialized imaging system to obtain a target image sequence. The voltage sequence control includes control signals corresponding to multiple voltage values, and the target image sequence includes target images corresponding to multiple voltage control signals. The imaging system includes a coaxial liquid lens and a lens under test, and the focal length of the liquid lens is determined based on the control signals. The analysis module is used to extract the sharpness of multiple target images in the target image sequence, and perform peak analysis based on the sharpness of multiple target images to obtain the optimal voltage value corresponding to the peak sharpness. The diopter calculation module is used to obtain the current temperature, perform hysteresis judgment on the optimal voltage value, and obtain the hysteresis judgment result; and perform diopter calculation based on the pre-constructed diopter mapping model, the current temperature, the hysteresis judgment result and the optimal voltage value to obtain the temperature-compensated and hysteresis-compensated diopter, wherein the diopter mapping model characterizes the mapping relationship between diopter and voltage value under different temperatures and hysteresis compensation scenarios.
2. The lens diopter measuring device according to claim 1, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... The imaging system includes a light source, a light homogenizing device, an umbrella-shaped target, a small-aperture aperture, a lens under test, a liquid lens, an imaging lens, a junction box, and an image sensor arranged sequentially along the optical path. The initialization method of the imaging system includes: The imaging system was subjected to lens placement detection and environmental stability detection. Once the lens is in place and the environment is stable, the initialization of the imaging system is completed.
3. The lens diopter measuring device according to claim 2, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... Performing lens placement detection on the imaging system includes: Acquire test images captured by the imaging system; Contour features are extracted from the test image, and the test image is matched with a pre-constructed empty background image to obtain the matching degree, wherein the matching is a difference operation or a normalized cross-correlation matching; When the matching degree is greater than a preset matching degree threshold, and the contour feature contains a preset graphic and the clarity is greater than a preset clarity threshold, it is determined that the lens is placed in place; otherwise, a prompt message is output to the user to place the lens, and the system returns to the test image acquired by the imaging system until the lens is placed in place.
4. The lens diopter measuring device according to claim 2, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... Environmental stability testing of the imaging system includes: Acquire multiple test images from the imaging system and collect temperature values at multiple sampling time points; The average brightness value is extracted from the multi-frame test images, and the brightness difference between the average brightness values of any two adjacent test images is calculated; as well as the temperature change rate based on the temperature values at any two adjacent sampling time points; When multiple brightness difference values are all less than or equal to a preset brightness difference value threshold, and multiple temperature change rates are all less than or equal to a preset change rate threshold, the environment is determined to be stable.
5. The lens diopter measuring device according to claim 1, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... Extracting the sharpness of multiple target images from the target image sequence includes: calculating the gradient sharpness of each target image in the target image sequence. Multi-scale Laplacian operator clarity and image entropy clarity ; For the gradient sharpness The clarity of the multi-scale Laplacian operator and the image entropy sharpness Weighted summation is performed to obtain the sharpness of the target image. Among them, clarity The mathematical expression is: In the formula, Represents the image index. Indicates the first weight. Indicates the second weight. This indicates the third weight.
6. The lens diopter measuring device according to claim 1, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... Peak analysis was performed based on the sharpness of multiple target images to obtain the optimal voltage value corresponding to the peak sharpness, including: Clarity based on multiple target images and voltage value Construct data points to obtain a data sequence; assess the sharpness of the data sequence. A sliding window-based smoothing process is performed to obtain a smooth curve; the first-order difference of the smooth curve is calculated to obtain a first-order difference curve; zero-crossing points are extracted from the first-order difference curve to obtain candidate local peak points; and points satisfying the following conditions are selected. The candidate local peak points are used as local peak points, where, The average sharpness in the data sequence, It is a positive integer. The standard deviation of sharpness in the data sequence; From the local peak points, select the priority peak point with the highest sharpness, and determine whether there are candidate peak points whose sharpness difference is less than or equal to a preset difference threshold. If not, use the priority peak point as the coarsely selected peak point. If so, calculate the curvature of the priority peak point and the candidate peak points, and select the peak point with the largest curvature as the coarsely selected peak point. ; The coarsely selected peak points Construct a fine scan window for the benchmark ,in, Indicates the extended width; In the fine scan window The system performs sampling to obtain multiple sampling voltage values, and controls the imaging system to acquire a fine-sampled target image sequence based on the multiple sampling voltage values; and extracts the sharpness of each frame in the fine-sampled target image sequence to obtain a fine-sampled sharpness sequence; Extract the peak point with the highest sharpness in the fine-sampled sharpness sequence, and perform a hill-climbing algorithm based on the peak point in the fine-sampled sharpness sequence to obtain the local optimum; Parabolic fitting is performed based on the local optimum and the nearest sampling points on both sides of the local optimum, and the vertex and the optimal voltage value corresponding to the vertex are extracted from the obtained parabola.
7. The lens diopter measuring device according to claim 1, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... Hysteresis is determined for the optimal voltage value, and the hysteresis determination result is obtained, including: Based on the optimal voltage value, boost scanning and buck scanning are performed respectively to obtain image sequences of boost scanning and buck scanning; Extract the first peak voltage corresponding to the image with the highest resolution from the boost scan image sequence, and extract the second peak voltage corresponding to the image with the highest resolution from the buck scan image sequence; Calculate the difference between the first peak voltage and the second peak voltage. The difference Compare with a preset voltage difference threshold; The difference When the voltage difference exceeds the threshold, a hysteresis effect is determined, and the weighted average of the first peak voltage and the second peak voltage is calculated to obtain the updated optimal voltage value, which is then output. The difference If the voltage difference is less than or equal to the voltage difference threshold, it is determined that there is no hysteresis effect, and the optimal voltage value is output.
8. The lens diopter measuring device according to claim 7, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... Based on a pre-built refractive power mapping model, the current temperature, hysteresis judgment results, and optimal voltage value, refractive power is calculated to obtain temperature-compensated and hysteresis-compensated refractive powers, including: Based on the current temperature and reference temperature For the optimal voltage value Compensation is performed to obtain the compensated voltage value. The mathematical expression for the compensation voltage value is as follows: In the formula, This represents the temperature compensation coefficient in the diopter mapping model; The direction of the optimal voltage value is determined, and a target fitting parameter is selected from the refractive power mapping model based on the direction of the optimal voltage value. The refractive power is then calculated based on the compensation voltage value and the target fitting parameter. The diopter The mathematical expression is: In the formula, and All represent system constants. Indicates the diopter of the liquid lens. For model fitting parameters, These are the parameters for model fitting.
9. The lens diopter measuring device according to claim 1, which is non-mechanically focused, fully automatic, high-precision, and portable, is characterized in that... The method for constructing the refractive power mapping model includes: A multi-diopter standard lens is installed into the imaging system; the imaging system containing the standard lens is controlled by a pre-built voltage sequence to perform image acquisition and obtain a target image sequence sample. Extract the optimal voltage value sample corresponding to the peak sharpness from the target image sequence sample, and construct a data sample based on the optimal voltage value sample, temperature value, voltage scanning direction and timestamp; A sample set is constructed based on data samples from multiple standard lenses, and outlier removal and data completion are performed on the sample set to obtain a standard sample set. The standard sample set is divided into a positive direction sample subset and a negative direction sample subset based on the voltage scanning direction. The parameter model of the imaging system is then fitted using the least squares method based on the positive direction sample subset and the negative direction sample subset, respectively, to obtain the positive direction fitting parameters and the negative direction fitting parameters. The mathematical expression of the parameter model is as follows: In the formula, Indicates the refractive power of a standard lens. Indicates the diopter of the liquid lens; Based on the aforementioned parameter model, the diopter of the liquid lens and the theoretical driving voltage value corresponding to the diopter of the liquid lens are calculated. ; Calculate the theoretical driving voltage value The difference between the actual voltage value and the actual voltage value is used to obtain a voltage difference sample. It calculates the difference between the actual temperature value and the reference temperature value to obtain a temperature difference sample. ; A linear fitting model is constructed for voltage difference and temperature difference, wherein the mathematical expression of the linear fitting model is: Based on the voltage difference sample and the temperature difference sample The linear fitting model is fitted to obtain the temperature compensation coefficient. ; Based on the parameter model, positive direction fitting parameters, negative direction fitting parameters, linear fitting model, and temperature compensation coefficient of the imaging system. Construct a diopter mapping model.
10. A fully automatic, high-precision, portable lens diopter measuring device without mechanical focusing according to claim 6, characterized in that, Also includes: The verification module is used for: The ratio of sharpness to background noise level corresponding to the optimal voltage value is calculated to obtain the peak intensity ratio; the root mean square error of the parabola fitting is calculated to obtain the fitting residual; and the shape similarity on both sides of the parabola is calculated to obtain the curve symmetry. The quality evaluation score is obtained by weighted summation of the peak intensity ratio, the fitting residual, and the curve symmetry. The peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score are compared with the corresponding reference ranges. If the peak intensity ratio, the fitting residual, the curve symmetry, and the quality evaluation score all match the corresponding reference ranges, the measurement quality is deemed qualified. Otherwise, the measurement returns to the acquisition module to remeasure the refractive power of the lens under test until the measurement quality is qualified or the number of repetitions exceeds a preset threshold.