Method and device for optimizing linearity of ifto camera, and electronic device
By adjusting the duty cycle of the emitted light waveform from the image sensor of the iToF camera and the delay unit to simulate the real distance, the optimal duty cycle is found for nonlinear calibration, which solves the problems of high calibration cost and high dynamic power consumption of iToF cameras, and achieves higher measurement linearity and calibration accuracy.
Patent Information
- Application Number
- CN202211291852.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-10-20
AI Technical Summary
Existing iToF cameras have high calibration costs, high system dynamic power consumption, and nonlinear errors in measurement, which affect measurement accuracy.
By adjusting the duty cycle of the light waveform emitted by the image sensor of the iToF camera and combining it with a delay unit to simulate the real distance, the optimal duty cycle is found for nonlinear calibration, thereby optimizing the measurement linearity.
It reduces the calibration cost of iToF cameras, improves the linearity of measurements, reduces the dynamic power consumption of the system, and improves calibration accuracy.
Smart Images

Figure CN115601446B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of ToF ranging technology, and particularly relates to a linearity optimization method and device of an iToF camera and an electronic device. BACKGROUND
[0002] Binocular ranging, structured light and Time-of-Flight (ToF) are three major 3D imaging technologies today. ToF has gradually been applied in gesture recognition, 3D modeling, unmanned driving and machine vision due to its simple principle, simple and stable structure, long measurement distance and other advantages. The working principle of ToF technology is as follows: an external light source (VCSEL or LED, etc.) is used to emit continuous modulated emitted light, the emitted light is reflected after irradiating the surface of the object to be measured, the reflected light is captured by the image sensor of the iToF camera, and the depth / distance of the object from the camera is obtained by calculating the time difference or phase difference between the emitted light and the reflected light. The method of calculating the distance by the time difference is called Pulsed ToF, and the method of calculating the distance by the phase difference is called Continuous-Wave ToF.
[0003] Indirect Time-of-Flight (iToF) refers to indirectly measuring the time of flight of light by measuring the phase shift. As shown in Figure 1 , the iToF camera controls the light emitting module 12 to actively emit a modulated light signal through the modulation module 11; the emitted light is emitted to the surface of the target object 19 to be measured, and the reflected light signal formed after being reflected by the target object 19 is sampled by the photosensitive pixel array unit 13 of the image sensor; and then the distance of the target object is calculated according to the phase shift of the emitted light and the reflected light. The light emitting module 12, such as VCSEL, infrared emitter (IR emitter) or LED, etc., is usually driven by a modulated square wave generated by the sensor, but as the modulation frequency increases, the light waveform gradually approaches a sine wave, and the high-order harmonics in the square wave will bring periodic errors to the measurement, as shown in Figure 2 . Due to the existence of aliasing harmonics in the related waveform, there is a wiggling error in the measurement process, as shown in Figure 3 .
[0004] The non-linear error look-up table is established directly through calibration, which can correct the swing error in principle; however, the calibration cost is increased due to the need for multiple distance measurements and multiple measurements for each measurement to remove random noise well. The non-linear error caused by multiple harmonics can be compensated by multiple measurements (more than four phases); however, since the iToF camera is usually globally exposed, if a depth map is obtained by multiple measurements, it is equivalent to stretching a depth map in time, which will cause smearing for some moving objects; in addition, the increase in the measurement data required for a depth map also increases the load of the system, resulting in an increase in the dynamic power consumption of the system.
[0005] Therefore, how to reduce the calibration cost of the iToF camera and improve the linearity of measurement is a technical problem to be solved at present. SUMMARY
[0006] The present application aims to provide an iToF camera linearity optimization method and device and electronic equipment, which are used to solve the problems of high calibration cost and high dynamic power consumption of the existing iToF camera, so as to save the calibration cost of the iToF camera while quickly selecting a suitable duty cycle and improving the linearity of measurement.
[0007] To achieve the above-mentioned purpose, the present application provides an iToF camera linearity optimization method, which comprises the following steps: adjusting the duty cycle of the emitted light waveform through the image sensor of the iToF camera; adjusting the delay value at a preset step under the current duty cycle, and obtaining the corresponding virtual real phase and the target measurement phase of the corresponding virtual real distance after adjusting the delay value each time; after completing the delay value adjustment of the preset period, obtaining the linearity parameter of the current duty cycle according to all the obtained virtual real phases and the corresponding target measurement phases; when the current duty cycle is less than a preset threshold, obtaining the duty cycle corresponding to the optimal value in all the linearity parameters as the optimal duty cycle; and taking the optimal duty cycle as the setting parameter of the image sensor, completing the non-linear calibration of the iToF camera and realizing the linearity optimization of the iToF camera.
[0008] In some embodiments, the method further comprises: selecting a plurality of image sensors and obtaining the optimal duty cycle of each image sensor; obtaining a target duty cycle according to all the optimal duty cycles, wherein the target duty cycle is the median or average of all the optimal duty cycles; and backfilling the target duty cycle into the settings of all the image sensors.
[0009] To achieve the above object, the application further provides a linearity optimization device of an iToF camera, comprising: an adjusting module, configured to adjust a duty cycle of an emitted light waveform by an image sensor; a first obtaining module, configured to adjust a delay value at a preset step length under a current duty cycle, and obtain a corresponding virtual real phase and a target measurement phase corresponding to a virtual real distance after each adjustment of the delay value; a second obtaining module, configured to obtain a linearity parameter of the current duty cycle according to all the virtual real phases and the corresponding target measurement phases after completing delay value adjustment of a preset period; a third obtaining module, configured to obtain a duty cycle corresponding to an optimal value in all the linearity parameters as an optimal duty cycle when the current duty cycle is less than a preset threshold; and an optimization module, configured to take the optimal duty cycle as a setting parameter of the image sensor, complete nonlinear calibration of the iToF camera, and realize linearity optimization of the iToF camera.
[0010] In some embodiments, the second obtaining module is further configured to obtain an absolute value of a difference between the virtual real phase and the target measurement phase after each adjustment of the delay value, and obtain a sum value of all the absolute values in the preset period, taking the sum value as the linearity parameter of the current duty cycle; and the third obtaining module is further configured to obtain a minimum value in the sum values corresponding to all the duty cycles as the optimal value.
[0011] To achieve the above object, the application further provides an electronic device, comprising a memory, a processor, and a computer executable program stored in the memory and executable on the processor, wherein the processor executes the computer executable program to implement the steps of the linearity optimization method of the iToF camera.
[0012] The linearity optimization method and device of the iToF camera provided by the application can suppress aliasing harmonic components to improve the linearity of the image sensor measurement, reduce the nonlinearity of the system, save the calibration time of the wiggling correction required when calculating the phase, and save the calibration cost. Furthermore, the delay unit is used to add delay to simulate real distance movement, and the optimal duty cycle is found by constraint adjustment, so as to maximize the reduction of nonlinearity and better improve the linearity of the image sensor measurement. By randomly selecting several modules in the same batch of image sensor modules to simultaneously perform optimal duty cycle optimization, the optimal solution is determined according to the median or average value of the optimal duty cycles of all the image sensor modules, and is filled back into the settings of all the image sensor modules in the batch, so as to complete the nonlinear calibration of all the image sensor modules in the batch, which is beneficial to improve the calibration accuracy and save the calibration time of the same batch of image sensor modules. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, on the premise of not creating labor, can also obtain other drawings according to these drawings.
[0014] Figure 1 is the schematic diagram of iToF imaging principle;
[0015] Figure 2 is the periodic error caused by high harmonic;
[0016] Figure 3 is the swing error existing in the measurement process;
[0017] Figure 4 is the step schematic diagram of the linearity optimization method of iToF camera provided by an embodiment of the present application;
[0018] Figure 5 is the phase distribution diagram under different duty cycles provided by an embodiment of the present application;
[0019] Figure 6 is the schematic diagram of the deviation between modulation and demodulation;
[0020] Figure 7 is the schematic diagram of simulating a virtual calibration board through a delay circuit;
[0021] Figure 8 is the flow chart of the linearity optimization method of iToF camera provided by an embodiment of the present application;
[0022] Figure 9 is the structure block diagram of the linearity optimization device of iToF camera provided by an embodiment of the present application. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creating labor are within the scope of protection of the present application.
[0024] An embodiment of the present application provides a linearity optimization method of iToF camera.
[0025] Please refer to Figures 4 to 7 , wherein, Figure 4 is the step schematic diagram of the linearity optimization method of iToF camera provided by an embodiment of the present application, Figure 5 is the phase distribution diagram under different duty cycles provided by an embodiment of the present application,Figure 6 schematic diagram of deviation between modulation and demodulation, Figure 7 schematic diagram of simulating virtual calibration board through delay circuit.
[0026] As Figure 4 shown, the linearity optimization method of the iToF camera in the embodiment includes the following steps: S1, adjusting the duty cycle of the emitted light waveform through the image sensor of the iToF camera; S2, adjusting the delay value at a preset step under the current duty cycle, and obtaining the corresponding virtual real phase and the target measurement phase corresponding to the virtual real distance after each adjustment of the delay value; S3, after completing the delay value adjustment of the preset period, obtaining the linearity parameters of the current duty cycle according to all the virtual real phases and the corresponding target measurement phases; S4, when the current duty cycle is less than a preset threshold, obtaining the duty cycle corresponding to the optimal value in all the linearity parameters as the optimal duty cycle; and S5, taking the optimal duty cycle as the setting parameter of the image sensor, completing the non-linear calibration of the iToF camera and realizing the linearity optimization of the iToF camera.
[0027] Regarding step S1, the duty cycle of the emitted light waveform is adjusted through the image sensor of the iToF camera. Specifically, the light emitting module is usually driven by the square wave generated by the image sensor of the iToF camera, and the high-order harmonic in the square wave is also the main factor causing measurement nonlinearity. The nonlinearity shows periodic changes (as shown in Figure 2 With the increase of the modulation frequency, the light waveform gradually approaches a sine wave, and the linearity of the light waveform affecting the calculation of the phase. Therefore, by adjusting the duty cycle of the light waveform through the image sensor, the aliasing harmonic component can be suppressed to improve the linearity of the image sensor measurement, reduce the nonlinearity of the system, save the calibration time needed for wiggling correction when calculating the phase, and save the calibration cost. Further, by adding delay through the delay unit to simulate the movement of the real distance, and by adjusting the constraint to find the optimal duty cycle, the nonlinearity is maximized to better improve the linearity of the image sensor measurement.
[0028] The modulation waveform approaches a sine wave, and the phase can be calculated according to the sine wave using the following calculation formula:
[0029] phase=arctan(I / Q);
[0030] Wherein, I=(Q3-Q4), Q=(Q1-Q2); Q1 is the measured phase when the phase delay is 0°, Q2 is the measured phase when the phase delay is 90°, Q3 is the measured phase when the phase delay is 180°, and Q4 is the measured phase when the phase delay is 270°. I and Q are orthogonal vectors, which ideally distribute on a circle. The linearity of the calculated phase is affected by the light waveform, therefore, by adjusting the duty cycle of the light waveform through the image sensor, the nonlinearity of the system can be reduced. By adjusting the duty cycle, as the duty cycle decreases, I and Q tend to be closer to a circle, as shown in Figure 5 .
[0031] According to the phase to obtain the depth, the following calculation formula can be used:
[0032] d=c*(phase / (2*f*phase_max))+d_max*n;
[0033] Wherein, c is the speed of light, phase is the measured phase, phase_max is a phase period (for example, 2π), f is the modulation frequency of the emitted light, d_max=(c / 2)*(1 / f), n is a preset frame number and n∈[0, 1……].
[0034] Regarding step S2, the delay value is adjusted at a preset step under the current duty cycle, and the virtual real phase corresponding to the virtual real distance and the target measured phase are obtained after adjusting the delay value each time. Specifically, the preset step can be any one of π / 4, π / 8, π / 16. In order to improve the calibration accuracy, the preset step can also be a smaller value; the delay value adjustment step can be set according to the comprehensive consideration of calibration accuracy and calibration time.
[0035] Due to reasons such as circuit and manufacturing process, there is a certain fixed deviation (skew) in the ideal modulation and demodulation, as shown in Figure 6 . By adding a delay unit in the modulation or demodulation path, setting a certain delay parameter can repair these fixed deviations. Therefore, by setting the delay value to simulate the real distance, i.e. to generate a virtual real distance, as shown in Figure 7 , the virtual real phase corresponding to the virtual real distance and the target measured phase can be obtained.
[0036] In some embodiments, step S2, which involves obtaining the virtual real phase and target measurement phase corresponding to the corresponding virtual real distance after each adjustment of the delay value, further includes: 1) adding a delay unit to the modulation or demodulation path and simulating the real distance by setting a delay value; 2) forming a current virtual real distance after each adjustment of the delay value, wherein the current virtual real distance corresponds to a virtual real phase; and 3) obtaining a preset frame depth image and performing a temporal averaging of the measurement phases of the pixel center points of all the depth images to obtain the corresponding average measurement phase, which is used as the target measurement phase corresponding to the current virtual real distance.
[0037] The measured phase of each pixel in the depth image acquired by the image sensor contains a certain amount of random noise. Since the transfer function of each pixel is consistent, it converges to a fixed value after a preset number of time-domain averages. Therefore, random noise is removed by performing a time-domain average of the measured phases of the center points of all pixels in the depth image. The number of frames of the depth image to be captured for time-domain averaging can be set according to the calibration accuracy requirements.
[0038] For example, after capturing m frames of depth images using the image sensor, and performing a temporal average of the measured phases of the pixel center points in the m frames of depth images, the random noise converges to a fixed value (e.g., 0). Specifically, the obtained average measured phase satisfies the following formula:
[0039] phase i =phase+ε m ;
[0040] Among them, phase i Let ε be the phase of the i-th measurement at the pixel center, where phase is the theoretical measurement value of that pixel after removing random noise. m ε is the fixed value to which the random noise converges after m time-domain averaging. Preferably, based on the normal distribution of the noise, ε m =0.
[0041] Regarding step S3, after adjusting the delay value for the preset period, the linear parameter of the current duty cycle is obtained based on all the acquired virtual real phases and the corresponding target measurement phases. Specifically, the preset period is 2π (i.e., one complete period). Under the current duty cycle, by adjusting the delay value, the virtual real phase of one complete period and the corresponding target measurement phase are obtained, thus acquiring the linear parameter of the current duty cycle.
[0042] In some embodiments, the step of obtaining the linear parameter of the current duty cycle according to the obtained all virtual real phases and the corresponding target measurement phases further comprises: 1) obtaining the absolute value of the difference between the virtual real phase and the target measurement phase after each adjustment of the delay value; and 2) obtaining the sum of all the absolute values of the difference in the preset period, and taking the sum as the linear parameter of the current duty cycle.
[0043] After the adjustment of the delay value for the preset period at the current duty cycle, a group of measurement phases measure_avg[i] and virtual real phases real[i] under the virtual real distance are obtained. The linear parameter duty_cycle of the current duty cycle can be obtained by the following formula:
[0044] duty_cycle = sum(abs(measure_avg[i] - real[i])).
[0045] Regarding step S4, when the current duty cycle is less than the preset threshold, the duty cycle corresponding to the optimal value in all linear parameters is obtained as the optimal duty cycle. Specifically, the system has a preset duty cycle threshold, that is, the minimum duty cycle that the system can set. By obtaining all linear parameters before adjustment to the preset threshold and constraining the optimal solution, the optimal duty cycle of the system can be obtained.
[0046] In some embodiments, the constraint condition for obtaining the optimal duty cycle is the sum of the absolute values of the difference between the virtual real phase and the target measurement phase at each duty cycle. Specifically, the optimal solution of the duty cycle can be obtained by the following formula:
[0047] duty-cycle 最优 = arg_min(sum(abs(measure_avg[i] - real[i])).
[0048] That is, when the absolute value of the deviation between the target measurement phase and the virtual real phase at a certain duty cycle is the smallest, the duty cycle is the optimal duty cycle.
[0049] Regarding step S5, taking the optimal duty cycle as the setting parameter of the image sensor, the nonlinearity calibration of the iToF camera is completed, and the linearity optimization of the iToF camera is realized. Specifically, after obtaining the optimal duty cycle, the duty cycle parameter of the image sensor is set to the optimal duty cycle, which can maximize the reduction of nonlinearity and improve the linearity of the image sensor measurement. The embodiment replaces the traditional wiggling calibration by adjusting the duty cycle of the emitted light waveform, saving the calibration time of wiggling correction when calculating the phase.
[0050] In some embodiments, the method further comprises: 1) selecting a plurality of image sensors, and obtaining an optimal duty cycle for each of the image sensors; 2) obtaining a target duty cycle according to all of the optimal duty cycles, wherein the target duty cycle is a median or average of all of the optimal duty cycles; and 3) backfilling the target duty cycle into settings of all of the image sensors. Specifically, considering that a single image sensor module is affected by random error factors, a plurality of image sensor modules are selected to simultaneously perform duty cycle optimization searching, an optimal solution is determined according to a median or average of optimal duty cycles of all of the image sensor modules, nonlinear calibration is completed, and calibration accuracy is improved.
[0051] In combination with the above embodiment, the step of selecting a plurality of image sensors further comprises: randomly selecting a plurality of image sensors from the same batch of image sensors; and the step of backfilling the target duty cycle into settings of all of the image sensors further comprises: backfilling the target duty cycle into settings of all of the image sensors of the batch. Specifically, a plurality of image sensor modules of the same batch are randomly selected to simultaneously perform duty cycle optimization searching, an optimal solution is determined according to a median or average of optimal duty cycles of all of the image sensor modules, and backfilling into settings of all of the image sensor modules of the batch, thereby completing nonlinear calibration of all of the image sensor modules of the batch, and saving calibration time of the image sensor modules of the batch.
[0052] The following is a detailed description of the method for optimizing linearity of the iToF camera. Figure 8 The following is a detailed description of the method for optimizing linearity of the iToF camera.
[0053] As can be seen from the above, this application reduces system nonlinearity and suppresses aliasing harmonic components by adjusting the duty cycle of the light waveform through the image sensor, thereby improving the linearity of the image sensor measurement. This reduces system nonlinearity and saves calibration time and costs associated with wiggling correction during phase calculation. Furthermore, by adding delay units to simulate real distance movement and finding the optimal duty cycle through constraint adjustment, the nonlinearity is minimized, further improving the linearity of the image sensor measurement. By randomly selecting several modules from the same batch of image sensor modules and simultaneously performing duty cycle optimization, the optimal solution is determined based on the median or average of the optimal duty cycles of all image sensor modules. This solution is then backfilled into the settings of all image sensor modules in that batch, completing the nonlinearity calibration of all image sensor modules in that batch. This improves calibration accuracy and saves calibration time for the same batch of image sensor modules.
[0054] Based on the same inventive concept, this application also provides a linearity optimization device for an iToF camera. The provided iToF camera linearity optimization device can employ, for example... Figure 4 The linearity optimization method shown completes the linearity optimization of the iToF camera.
[0055] Please see Figure 9 This is a structural block diagram of an iToF camera linearity optimization device provided in an embodiment of this application. Figure 9 As shown, the linearity optimization device for the iToF camera includes: an adjustment module 101, a first acquisition module 102, a second acquisition module 103, a third acquisition module 104, and an optimization module 105.
[0056] Specifically, the adjustment module 101 is used to adjust the duty cycle of the emitted light waveform through the image sensor. The first acquisition module 102 is used to adjust the delay value with a preset step size at the current duty cycle, and acquire the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase after each adjustment of the delay value. The second acquisition module 103 is used to acquire the linear parameters of the current duty cycle based on all acquired virtual real phases and the corresponding target measurement phases after completing the delay value adjustment for the preset cycle. The third acquisition module 104 is used to acquire the duty cycle corresponding to the optimal value among all linear parameters as the optimal duty cycle when the current duty cycle is less than a preset threshold. The optimization module 105 is used to use the optimal duty cycle as the setting parameter of the image sensor to complete the nonlinear calibration of the iToF camera and realize the linearity optimization of the iToF camera.
[0057] In some embodiments, the second acquisition module 103 is further configured to calculate the absolute value of the difference between the virtual real phase and the target measured phase obtained after each adjustment of the delay value, and to calculate the sum of all the absolute values of the difference within the preset period, using the sum as a linear parameter of the current duty cycle. Correspondingly, the third acquisition module 104 is further configured to obtain the minimum value among the sums corresponding to all duty cycles as the optimal value.
[0058] Based on the same inventive concept, this application also provides an electronic device, including a memory, a processor, and a computer-executable program stored in the memory and executable on the processor; when the processor executes the computer-executable program, it implements as follows: Figure 4 The steps of the linearity optimization method for the iToF camera are shown.
[0059] Within the scope of this application, embodiments can be described and illustrated based on modules that perform one or more of the described functions. These modules (also referred to herein as units, etc.) can be physically implemented by analog and / or digital circuitry, such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, hardwired circuits, etc., and can optionally be driven by firmware and / or software. The circuitry can be implemented, for example, in one or more semiconductor chips. The circuitry constituting a module can be implemented by dedicated hardware, or by a processor (e.g., one or more programmed microprocessors and associated circuitry), or by a combination of dedicated hardware performing some functions of the module and a processor performing other functions of the module. Without departing from the scope of this application, each module of an embodiment can be physically divided into two or more interactive and discrete modules. Similarly, without departing from the scope of this application, the modules of an embodiment can be physically combined into more complex modules.
[0060] Generally, terms can be understood at least partially from their usage in context. For example, the term "one or more" as used herein depends at least in part on the context and can be used to describe a feature, structure, or characteristic in a singular sense, or in a plural sense to describe a combination of features, structures, or characteristics. Additionally, the term "based on" can be understood not necessarily to express an exclusive set of factors, but rather, alternatively, also depends at least in part on the context, allowing for the presence of other factors that are not necessarily explicitly described.
[0061] It should be noted that the terms "comprising" and "having," and their variations, used in this application are intended to cover non-exclusive inclusion. The terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence, unless explicitly indicated by the context. It should be understood that such data can be used interchangeably where appropriate. Furthermore, the embodiments and features described in these embodiments can be combined with each other unless otherwise specified. In addition, descriptions of well-known components and technologies have been omitted in the above description to avoid unnecessarily obscuring the concepts of this application. In the various embodiments described above, each embodiment focuses on its differences from other embodiments; similar or identical parts between embodiments can be referred to mutually.
[0062] The above description is only a preferred embodiment of this application. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for optimizing the linearity of an iToF camera, characterized in that, Includes the following steps: The duty cycle of the emitted light waveform is adjusted using the image sensor of the iToF camera; The delay value is adjusted with a preset step size under the current duty cycle, and the virtual real phase and target measurement phase corresponding to the corresponding virtual real distance are obtained after each adjustment of the delay value; After adjusting the delay value for the preset period, the linear parameter of the current duty cycle is obtained based on all the acquired virtual real phases and the corresponding target measurement phases. When the current duty cycle is less than a preset threshold, the duty cycle corresponding to the optimal value among all linear parameters is obtained as the optimal duty cycle; as well as Using the optimal duty cycle as the setting parameter of the image sensor, the nonlinear calibration of the iToF camera is completed, and the linearity optimization of the iToF camera is achieved.
2. The linearity optimization method for an iToF camera according to claim 1, characterized in that, The preset step size is any one of π / 4, π / 8, or π / 16; the preset period is 2π.
3. The linearity optimization method for an iToF camera according to claim 1, characterized in that, The step of obtaining the virtual real phase and target measurement phase corresponding to the corresponding virtual real distance after each adjustment of the delay value further includes: Add a delay unit to the modulation or demodulation path and simulate the real distance by setting the delay value; After each adjustment of the delay value, a current virtual-to-real distance is generated, where the current virtual-to-real distance corresponds to a virtual-to-real phase; and A preset frame depth image is acquired, and the measured phase of the pixel center point of all the depth images is averaged in the time domain to obtain the corresponding average measured phase, which is used as the target measured phase corresponding to the current virtual real distance.
4. The linearity optimization method for an iToF camera according to claim 1, characterized in that, The step of obtaining the linear parameter of the current duty cycle based on all acquired virtual real phases and the corresponding target measurement phase further includes: Calculate the absolute value of the difference between the virtual true phase and the target measured phase after each adjustment of the delay value; and Calculate the sum of the absolute values of all the differences within the preset period, and use the sum as a linear parameter of the current duty cycle.
5. The linearity optimization method for an iToF camera according to claim 4, characterized in that, The step of obtaining the duty cycle corresponding to the optimal value among all linear parameters as the optimal duty cycle further includes: The minimum value among the sums of all duty cycles is taken as the optimal value.
6. The linearity optimization method for an iToF camera according to claim 1, characterized in that, The method further includes: Select multiple image sensors and obtain the optimal duty cycle for each image sensor; A target duty cycle is obtained based on all the optimal duty cycles, wherein the target duty cycle is the median or average of all the optimal duty cycles; and The target duty cycle is then backfilled into the settings of all the image sensors.
7. The linearity optimization method for an iToF camera according to claim 6, characterized in that, The step of selecting multiple image sensors further includes: randomly selecting multiple image sensors from the same batch of image sensors; The step of backfilling the target duty cycle into the settings of all the image sensors further includes: backfilling the target duty cycle into the settings of all the image sensors in the batch.
8. A linearity optimization device for an iToF camera, characterized in that, include: An adjustment module is used to adjust the duty cycle of the emitted light waveform via an image sensor; The first acquisition module is used to adjust the delay value with a preset step size under the current duty cycle, and to acquire the virtual real phase and target measurement phase corresponding to the corresponding virtual real distance after each adjustment of the delay value; The second acquisition module is used to acquire the linear parameters of the current duty cycle based on all the acquired virtual real phases and the corresponding target measurement phases after the delay value adjustment of the preset period is completed. The third acquisition module is used to acquire the duty cycle corresponding to the optimal value among all linear parameters as the optimal duty cycle when the current duty cycle is less than a preset threshold. as well as The optimization module is used to complete the nonlinear calibration of the iToF camera and optimize the linearity of the iToF camera by using the optimal duty cycle as the setting parameter of the image sensor.
9. The apparatus according to claim 8, characterized in that, The second acquisition module is further used to calculate the absolute value of the difference between the virtual real phase and the target measured phase after each adjustment of the delay value, and to calculate the sum of all the absolute values of the difference within the preset period, using the sum as a linear parameter of the current duty cycle; The third acquisition module is further used to obtain the minimum value among the sums of all duty cycles as the optimal value.
10. An electronic device comprising a memory, a processor, and a computer-executable program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer-executable program, it implements the steps of the linearity optimization method for the iToF camera as described in any one of claims 1 to 7.
Citation Information
Patent Citations
TOF camera and measurement method thereof
CN109870704A
Contrast calibration method, device and equipment
CN113156408A