Nothing Special   »   [go: up one dir, main page]

CN115601446A - Linearity optimization method, device and electronic equipment of iToF camera - Google Patents

Linearity optimization method, device and electronic equipment of iToF camera Download PDF

Info

Publication number
CN115601446A
CN115601446A CN202211291852.1A CN202211291852A CN115601446A CN 115601446 A CN115601446 A CN 115601446A CN 202211291852 A CN202211291852 A CN 202211291852A CN 115601446 A CN115601446 A CN 115601446A
Authority
CN
China
Prior art keywords
duty cycle
optimal
value
phase
virtual real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211291852.1A
Other languages
Chinese (zh)
Inventor
王昆
胡涛
张东升
朱颖佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xingchen Technology Co ltd
Original Assignee
Fujian Jiemu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Jiemu Technology Co ltd filed Critical Fujian Jiemu Technology Co ltd
Priority to CN202211291852.1A priority Critical patent/CN115601446A/en
Publication of CN115601446A publication Critical patent/CN115601446A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20216Image averaging

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Measurement Of Optical Distance (AREA)

Abstract

The application relates to a linearity optimization method and device for an iToF camera. The method comprises the following steps: adjusting, by the image sensor, a duty cycle of the emitted light waveform; adjusting a delay value at a preset step length under the current duty ratio, and acquiring a virtual real phase and a target measurement phase corresponding to a corresponding virtual real distance after adjusting the delay value each time; after the delay value of the preset period is adjusted, acquiring linear parameters of the current duty ratio according to all the acquired virtual real phases and the corresponding target measurement phases; when the current duty ratio is smaller than a preset threshold value, acquiring the duty ratio corresponding to the optimal value in all the linear parameters as the optimal duty ratio; and taking the optimal duty ratio as a setting parameter of the image sensor to finish the nonlinear calibration of the iToF camera and realize the linearity optimization of the iToF camera. The method and the device can reduce the nonlinearity of the system, save the calibration cost and improve the linearity of the image sensor measurement.

Description

iToF相机的线性度优化方法及装置、电子设备Linearity optimization method, device and electronic equipment of iToF camera

技术领域technical field

本申请涉及ToF测距技术领域,尤其涉及一种iToF相机的线性度优化方法及装置、电子设备。The present application relates to the technical field of ToF distance measurement, in particular to a linearity optimization method, device, and electronic equipment of an iToF camera.

背景技术Background technique

双目测距、结构光与飞行时间(Time-of-Flight,简称ToF)是当今三大主流3D成像技术,其中,ToF由于其原理简单、结构简单稳定、测量距离远等优势,已逐渐应用于手势识别、3D建模、无人驾驶及机器视觉等领域。ToF技术的工作原理是:利用外部光源(VCSEL或LED等)发射连续调制的发射光,发射光照射到待测物体表面后反射回来,反射光被iToF相机的图像传感器(sensor)捕获,通过计算发射光与反射光时间差或相位差得到物体距离相机的深度/距离。其中,通过时间差计算距离的方法称为脉冲法(Pulsed ToF),通过相位差计算距离的方法称为连续波法(Continuous-Wave ToF)。Binocular ranging, structured light and Time-of-Flight (ToF) are the three mainstream 3D imaging technologies today. Among them, ToF has been gradually applied due to its simple principle, simple and stable structure, and long measurement distance. In the fields of gesture recognition, 3D modeling, unmanned driving and machine vision. The working principle of ToF technology is: using an external light source (VCSEL or LED, etc.) The time difference or phase difference between the emitted light and reflected light is used to obtain the depth/distance of the object from the camera. Among them, the method of calculating the distance by the time difference is called the pulsed method (Pulsed ToF), and the method of calculating the distance by the phase difference is called the continuous-wave method (Continuous-Wave ToF).

间接飞行时间(indirect Time-of-Flight,简称iToF)是指通过测量相位偏移来间接测量光的飞行时间。如图1所示,iToF相机通过调制模块(modulation)11控制发光模块12主动发射可调制的光信号;发射光发射到待测目标物19表面,经目标物19反射后形成的反射光信号被图像传感器的感光像素阵列单元13采样;进而根据发射光和反射光的相移(Phase shift)来计算目标物的距离。发光模块12,例如VCSEL、红外发射器(IR emitter)或LED等,通常由传感器产生可调制的方波来驱动,但由于随着调制频率的提高,光波形也渐渐趋近于弦波,方波中的高次谐波会给测量带来周期性误差,如图2所示。由于相关波形存在混叠谐波导致在测量过程存在摆动误差(wiggling error),如图3所示。Indirect Time-of-Flight (iToF for short) refers to the indirect measurement of the time-of-flight of light by measuring the phase shift. As shown in FIG. 1 , the iToF camera controls the light emitting module 12 to actively emit a modulated light signal through a modulation module (modulation) 11; The photosensitive pixel array unit 13 of the image sensor samples; and then calculates the distance of the target object according to the phase shift (Phase shift) of the emitted light and 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 since the light waveform gradually approaches a sine wave with the increase of the modulation frequency, the square wave High-order harmonics in the wave will bring periodic errors to the measurement, as shown in Figure 2. There is a wiggling error in the measurement process due to the presence of aliased harmonics in the relevant waveform, as shown in FIG. 3 .

直接通过标定建立非线性误差查找表,从原理上可以较好的校正摆动误差;但由于需要多个距离的测量且每个测量需要多次平均才能很好的去除随机噪声,会带来标定成本的增加。通过多次测量(大于四相位)的方式可以补偿由于多次谐波造成的非线性误差;但由于iToF相机通常是全局曝光,若通过多次测量得到一张深度图,相当于将一张深度图从时间上进行拉长,这对于一些运动的物体会造成拖影的产生;另外由于一张深度图所需测量数据的增加,也加大了系统的负载,导致系统的动态功耗增加。Establishing a nonlinear error lookup table directly through calibration can better correct the swing error in principle; however, since multiple distance measurements are required and each measurement requires multiple averages to remove random noise well, it will bring calibration costs increase. The non-linear error caused by multiple harmonics can be compensated by multiple measurements (greater than four phases); but since iToF cameras are usually global exposure, if a depth map is obtained through multiple measurements, it is equivalent to a depth map The map is elongated in time, which will cause smears for some moving objects; in addition, due to the increase in the measurement data required for a depth map, the load on the system is also increased, resulting in an increase in the dynamic power consumption of the system.

因此,如何降低iToF相机的标定成本、提高测量的线性度,是当前亟待解决的技术问题。Therefore, how to reduce the calibration cost of iToF cameras and improve the linearity of measurement is an urgent technical problem to be solved.

发明内容Contents of the invention

本申请的目的在于提供一种iToF相机的线性度优化方法及装置、电子设备,用于解决现有的iToF相机标定成本较高、系统的动态功耗较高的问题,以在节省iToF相机标定成本的同时,快速选择合适的占空比、提高测量的线性度。The purpose of this application is to provide a linearity optimization method, device, and electronic equipment for an iToF camera, which are used to solve the problems of high calibration cost and high dynamic power consumption of the system in the existing iToF camera, so as to save iToF camera calibration. At the same time of reducing the cost, quickly select the appropriate duty cycle and improve the linearity of the measurement.

为实现上述目的,本申请提供了一种iToF相机的线性度优化方法,包括如下步骤:通过iToF相机的图像传感器调节发射光波形的占空比;在当前占空比下以预设步长调节延时值,并在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位;在完成预设周期的延时值调整后,根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数;在当前占空比小于预设阈值时,获取所有线性参数中的最优值对应的占空比作为最优占空比;以及以所述最优占空比作为所述图像传感器的设置参数,完成iToF相机的非线性标定、实现iToF相机的线性度优化。In order to achieve the above purpose, the present application provides a method for optimizing the linearity of an iToF camera, including the following steps: adjusting the duty cycle of the emitted light waveform through the image sensor of the iToF camera; Delay value, and after each adjustment of the delay value, obtain the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase; after completing the delay value adjustment of the preset cycle, according to all obtained virtual real phases The target measurement phase obtains the linear parameter of the current duty cycle; when the current duty cycle is less than the preset threshold value, obtains the duty cycle corresponding to the optimal value of all linear parameters as the optimal duty cycle; and uses the maximum The optimal duty cycle is used as a setting parameter of the image sensor to complete the nonlinear calibration of the iToF camera and realize the linearity optimization of the iToF camera.

在一些实施例中,所述方法进一步包括:选取多个图像传感器,并获取每一所述图像传感器的最优占空比;根据所有所述最优占空比获取目标占空比,其中,所述目标占空比为所有所述最优占空比的中值或平均值;以及将所述目标占空比回填到所有所述图像传感器的设定中。In some embodiments, the method further includes: selecting a plurality of image sensors, and obtaining an optimal duty cycle of each of the image sensors; obtaining a target duty cycle according to all the optimal duty cycles, wherein, The target duty cycle is a median or average value of all the optimal duty cycles; and backfilling the target duty cycle into settings of all the image sensors.

为实现上述目的,本申请还提供了一种iToF相机的线性度优化装置,包括:调节模块,用于通过图像传感器调节发射光波形的占空比;第一获取模块,用于在当前占空比下以预设步长调节延时值,并在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位;第二获取模块,用于在完成预设周期的延时值调整后,根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数;第三获取模块,用于在当前占空比小于预设阈值时,获取所有线性参数中的最优值对应的占空比作为最优占空比;以及优化模块,用于以所述最优占空比作为所述图像传感器的设置参数,完成iToF相机的非线性标定、实现iToF相机的线性度优化。In order to achieve the above object, the present application also provides a linearity optimization device for an iToF camera, including: an adjustment module, used to adjust the duty cycle of the emitted light waveform through the image sensor; a first acquisition module, used for the current duty cycle Next, adjust the delay value with the preset step length, and obtain 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 is used to complete the delay of the preset period After the time value is adjusted, obtain the linear parameters of the current duty cycle according to all obtained virtual real phases and corresponding target measurement phases; the third obtaining module is used to obtain all linear parameters when the current duty cycle is less than the preset threshold The duty ratio corresponding to the optimal value in is used as the optimal duty ratio; and an optimization module is used to use the optimal duty ratio as the setting parameter of the image sensor to complete the nonlinear calibration of the iToF camera and realize the iToF Camera linearity optimization.

在一些实施例中,所述第二获取模块进一步用于求取每次调整延时值后获取的虚拟真实相位与目标测量相位的差值绝对值,以及求取所述预设周期内所有所述差值绝对值的和值,以所述和值作为当前占空比的线性参数;所述第三获取模块进一步用于获取所有占空比对应的和值中的最小值作为所述最优值。In some embodiments, the second acquiring module is further used 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 calculate all the phases within the preset period The sum of the absolute values of the differences, using the sum as the linear parameter of the current duty ratio; the third acquisition module is further used to obtain the minimum value of the sums corresponding to all duty ratios as the optimal value.

为实现上述目的,本申请还提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可执行程序,所述处理器执行所述计算机可执行程序时实现如本申请所述的iToF相机的线性度优化方法的步骤。To achieve the above object, the present application also provides an electronic device, including a memory, a processor, and a computer-executable program stored on the memory and operable on the processor, and the processor executes the computer program. The steps of implementing the linearity optimization method of the iToF camera as described in this application can be implemented when the program is executable.

本申请提供的iToF相机的线性度优化方法及装置,本申请通过图像传感器调节光波形的占空比,可以抑制混叠谐波分量以提高图像传感器测量的线性度,降低系统的非线性,节省了在计算相位的时候需要wiggling校正的标定时间,节省标定成本。进而通过延时单元添加延时以模拟真实距离移动,并通过约束调节寻找最优占空比,以最大化降低非线性度,更好的提高图像传感器测量的线性度。通过在同一批次图像传感器模组随机选取几个模组同时进行占空比最优化查找,根据所有图像传感器模组的最优占空比的中值或平均值确定最优解,回填到该批次的所有图像传感器模组的设定中,即可完成该批次的所有图像传感器模组的非线性标定,有利于提高标定准确度,且节省了同批次图像传感器模组的标定时间。The linearity optimization method and device of the iToF camera provided by this application, the application adjusts the duty cycle of the optical waveform through the image sensor, which can suppress the aliasing harmonic component to improve the linearity of the image sensor measurement, reduce the nonlinearity of the system, and save Reduce the calibration time required for wiggling correction when calculating the phase, saving calibration costs. Furthermore, the delay is added by the delay unit to simulate the real distance movement, and the optimal duty cycle is found through constraint adjustment to minimize the nonlinearity and improve the linearity of the image sensor measurement. Randomly select several modules in the same batch of image sensor modules to perform duty cycle optimization search at the same time, determine the optimal solution according to the median or average value of the optimal duty cycle of all image sensor modules, and backfill to this In the setting of all image sensor modules in a batch, the nonlinear calibration of all image sensor modules in the batch can be completed, which is conducive to improving the calibration accuracy and saving the calibration time of the same batch of image sensor modules .

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍。显而易见地,下面描述中的附图仅是本申请的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings that need to be used in the description of the embodiments. Apparently, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative efforts.

图1为iToF成像原理示意图;Figure 1 is a schematic diagram of the iToF imaging principle;

图2为高次谐波造成的周期性误差;Figure 2 shows the periodic error caused by high-order harmonics;

图3为测量过程存在的摆动误差;Fig. 3 is the swing error existing in the measurement process;

图4为本申请一实施例提供的iToF相机的线性度优化方法步骤示意图;Fig. 4 is a schematic diagram of the steps of the linearity optimization method of the iToF camera provided by an embodiment of the present application;

图5为本申请一实施例提供的不同占空比下相位分布图;FIG. 5 is a phase distribution diagram under different duty ratios provided by an embodiment of the present application;

图6为调制和解调之间的偏差示意图;Figure 6 is a schematic diagram of the deviation between modulation and demodulation;

图7为通过延时电路模拟虚拟标定板的示意图;7 is a schematic diagram of simulating a virtual calibration board by a delay circuit;

图8为本申请一实施例提供的iToF相机的线性度优化方法流程图;FIG. 8 is a flowchart of a linearity optimization method for an iToF camera provided by an embodiment of the present application;

图9为本申请一实施例提供的iToF相机的线性度优化装置的结构框图。FIG. 9 is a structural block diagram of an iToF camera linearity optimization device provided by an embodiment of the present application.

具体实施方式detailed description

下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.

本申请一实施例提供了一种iToF相机的线性度优化方法。An embodiment of the present application provides a linearity optimization method for an iToF camera.

请一并参阅图4~图7,其中,图4为本申请一实施例提供的iToF相机的线性度优化方法步骤示意图,图5为本申请一实施例提供的不同占空比下相位分布图,图6为调制和解调之间的偏差示意图,图7为通过延时电路模拟虚拟标定板的示意图。Please refer to Figures 4 to 7 together, where Figure 4 is a schematic diagram of the steps of an iToF camera linearity optimization method provided by an embodiment of the present application, and Figure 5 is a phase distribution diagram under different duty ratios provided by an embodiment of the present application , FIG. 6 is a schematic diagram of the deviation between modulation and demodulation, and FIG. 7 is a schematic diagram of simulating a virtual calibration board through a delay circuit.

如图4所示,本实施例所述iToF相机的线性度优化方法,包括如下步骤:S1、通过iToF相机的图像传感器调节发射光波形的占空比;S2、在当前占空比下以预设步长调节延时值,并在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位;S3、在完成预设周期的延时值调整后,根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数;S4、在当前占空比小于预设阈值时,获取所有线性参数中的最优值对应的占空比作为最优占空比;以及S5、以所述最优占空比作为所述图像传感器的设置参数,完成iToF相机的非线性标定、实现iToF相机的线性度优化。As shown in Figure 4, the linearity optimization method of the iToF camera described in this embodiment includes the following steps: S1, adjust the duty cycle of the emitted light waveform through the image sensor of the iToF camera; Set the step length to adjust the delay value, and obtain the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase after each adjustment of the delay value; S3. After completing the delay value adjustment of the preset cycle, according to all acquired The virtual real phase and the corresponding target measurement phase obtain the linear parameter of the current duty cycle; S4. When the current duty cycle is less than the preset threshold, obtain the duty cycle corresponding to the optimal value of all linear parameters as the optimal duty cycle Duty ratio; and S5, using the optimal duty ratio as a setting parameter of the image sensor to complete the nonlinear calibration of the iToF camera and realize the linearity optimization of the iToF camera.

关于步骤S1、通过iToF相机的图像传感器调节发射光波形的占空比。具体来说,发光模块通常是由iToF相机的图像传感器产生方波来驱动的,方波中的高次谐波也是造成测量非线性的主要因素,非线性呈现周期性变化(如图2所示)。随着调制频率的提高光波形也渐渐趋近于弦波,光波形影响计算相位的线性度。因此,通过图像传感器调节光波形的占空比(duty cycle),可以抑制混叠谐波分量以提高图像传感器测量的线性度,降低系统的非线性,节省了在计算相位的时候需要wiggling校正的标定时间,节省标定成本。进而通过延时单元添加延时以模拟真实距离移动,并通过约束调节寻找最优占空比,以最大化降低非线性度,更好的提高图像传感器测量的线性度。Regarding step S1, the duty cycle of the emitted light waveform is adjusted by the image sensor of the iToF camera. Specifically, the light-emitting module is usually driven by a square wave generated by the image sensor of the iToF camera. The high-order harmonics in the square wave are also the main factor causing the nonlinearity of the measurement. The nonlinearity presents periodic changes (as shown in Figure 2 ). As the modulation frequency increases, the optical waveform gradually approaches a sine wave, and the optical waveform affects the linearity of the calculated phase. Therefore, by adjusting the duty cycle of the optical waveform through the image sensor, the aliased harmonic components can be suppressed to improve the linearity of the image sensor measurement, reduce the nonlinearity of the system, and save the need for wiggling correction when calculating the phase. Calibration time saves calibration cost. Furthermore, the delay is added by the delay unit to simulate the real distance movement, and the optimal duty cycle is found through constraint adjustment to minimize the nonlinearity and improve the linearity of the image sensor measurement.

调制波形趋近于弦波,根据弦波计算相位可以采用下述计算公式:The modulation waveform is close to a sine wave, and the following calculation formula can be used to calculate the phase according to the sine wave:

phase=arctan(I/Q);phase = arctan(I/Q);

其中,I=(Q3-Q4)、Q=(Q1-Q2);Q1为相位延时(phase delay)为0°时的测量相位,Q2为相位延时为90°时的测量相位,Q3为相位延时为180°时的测量相位,Q4为相位延时为270°时的测量相位。I和Q为正交向量,理想情况下I和Q分布在一个圆上。光波形影响计算相位的线性度,因此,通过图像传感器调节光波形的占空比,可以降低系统的非线性。通过调节占空比,随着占空比的减少,I和Q分布更趋近一个圆,如图5所示。Among them, I=(Q 3 -Q 4 ), Q=(Q 1 -Q 2 ); Q 1 is the measured phase when the phase delay (phase delay) is 0°, and Q 2 is when the phase delay is 90° Q 3 is the measured phase when the phase delay is 180°, and Q 4 is the measured phase when the phase delay is 270°. I and Q are orthogonal vectors, and ideally I and Q are distributed on a circle. The optical waveform affects the linearity of the calculated phase. Therefore, adjusting the duty cycle of the optical waveform through the image sensor can reduce the nonlinearity of the system. By adjusting the duty cycle, as the duty cycle decreases, the I and Q distributions are closer to a circle, as shown in Figure 5.

根据相位获取深度可以采用以下计算公式:The following calculation formula can be used to obtain the depth according to the phase:

d=c*(phase/(2*f*phase_max))+d_max*n;d=c*(phase/(2*f*phase_max))+d_max*n;

其中,c为光速,phase为测量相位,phase_max为一个相位周期(例如2π),f为发射光的调制频率,d_max=(c/2)*(1/f),n为预设帧数且n∈[0,1……]。Among them, c is the speed of light, phase is the measurement 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 the preset number of frames and n ∈ [0, 1...].

关于步骤S2、在当前占空比下以预设步长调节延时值,并在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位。具体来说,所述预设步长可以为π/4、π/8、π/16的任意其中之一。为提高标定精度,预设步长也可以为更小值;可以根据标定精度与标定时间的综合考量来设定延时值调整步长。Regarding step S2, the delay value is adjusted with a preset step under the current duty cycle, and the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase are obtained after each adjustment of the delay value. Specifically, the preset step size may be any one of π/4, π/8, and π/16. In order to improve the calibration accuracy, the preset step size 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.

由于电路以及制造工艺等原因,理想情况下调制和解调存在一定固定偏差(skew),如图6所示。通过在调制或解调路径添加延时单元,设定一定延时参数可以修补这些固定偏差。于是,通过设置延时值来模拟真实距离,即产生虚拟真实距离,如图7所示。进而可以获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位。Due to reasons such as circuits and manufacturing processes, ideally there is a certain fixed skew (skew) in modulation and demodulation, as shown in FIG. 6 . These fixed deviations can be repaired by adding a delay unit in the modulation or demodulation path and setting a certain delay parameter. Therefore, the real distance is simulated by setting the delay value, that is, a virtual real distance is generated, as shown in FIG. 7 . Furthermore, the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase can be acquired.

在一些实施例中,步骤S2所述的在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位的步骤进一步包括:1)在调制或解调路径添加延时单元,并通过设置延时值以模拟真实距离;2)在每次调整延时值后形成一当前虚拟真实距离,其中,当前虚拟真实距离对应一虚拟真实相位;以及3)获取预设帧深度图像、并对所有所述深度图像的像素中心点的测量相位进行时域平均获取相应的平均测量相位,以作为当前虚拟真实距离对应的目标测量相位。In some embodiments, the step of obtaining the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase after each adjustment of the delay value in step S2 further includes: 1) Adding a delay unit to the modulation or demodulation path , and simulate the real distance by setting the delay value; 2) form 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) acquire the preset frame depth image , and performing a time-domain average on the measurement phases of the pixel center points of all the depth images to obtain a corresponding average measurement phase as the target measurement phase corresponding to the current virtual real distance.

对图像传感器获取的深度图像中每个像素点的测量相位包含一定的随机噪声,由于每个像素点的传递函数是一致的,满足经过预设次数的时域平均收敛到一个固定值。因此,通过对所有所述深度图像的像素中心点的测量相位进行时域平均,以去除随机噪声。其中,可以根据标定精度需求设定所需抓取的深度图像的帧数进行时域平均。The measurement 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, the time-domain average that satisfies the preset number of times converges to a fixed value. Therefore, the random noise is removed by performing time-domain averaging on the measured phases of the pixel center points of all the depth images. Among them, the number of frames of the depth image to be captured can be set according to the calibration accuracy requirements for temporal averaging.

例如,通过所述图像传感器抓取m帧深度图像,对m帧深度图像的像素中心点的测量相位进行时域平均后,随机噪声收敛到一个固定值(例如0)。具体的,所获取的平均测量相位满足以下公式:For example, m frames of depth images are captured by the image sensor, and the random noise converges to a fixed value (for example, 0) after the time-domain average is performed on the measured phases of the pixel center points of the m frames of depth images. Specifically, the obtained average measurement phase satisfies the following formula:

phase i=phase+εmphase i = phase+ε m ;

其中,phase i为像素中心点的第i次测量相位,phase为该像素点去除随机噪声后的理论测量值,εm为m次时域平均后所述随机噪声收敛到的固定值。优选地,基于噪声的正态分布形态,εm=0。Among them, phase i is the i-th measured phase of the pixel center point, phase is the theoretical measurement value of the pixel point after the random noise is removed, and ε m is the fixed value to which the random noise converges after m times of time-domain averaging. Preferably, based on the normal distribution form of noise, ε m =0.

关于步骤S3、在完成预设周期的延时值调整后,根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数。具体来说,所述预设周期为2π(即一个完整周期)。在当前占空比下,通过调节延时值,获取一个完整周期的虚拟真实相位与对应的目标测量相位,即可获取当前占空比的线性参数。Regarding step S3, after the delay value adjustment of the preset period is completed, the linear parameter of the current duty cycle is obtained according to all obtained virtual real phases and corresponding target measurement phases. Specifically, the preset period is 2π (that is, a complete period). Under the current duty cycle, the linear parameter of the current duty cycle can be obtained by adjusting the delay value to obtain the virtual real phase of a complete cycle and the corresponding target measurement phase.

在一些实施例中,步骤S3所述的根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数的步骤进一步包括:1)求取每次调整延时值后获取的虚拟真实相位与目标测量相位的差值绝对值;以及2)求取所述预设周期内所有所述差值绝对值的和值,以所述和值作为当前占空比的线性参数。In some embodiments, the step of obtaining the linear parameter of the current duty cycle according to all obtained virtual real phases and corresponding target measurement phases described in step S3 further includes: 1) obtaining The absolute value of the difference between the virtual real phase and the target measured phase; and 2) calculating the sum of all the absolute values of the differences within the preset period, and using the sum as a linear parameter of the current duty cycle.

在当前占空比下完成预设周期的延时值调整后,获得一组测量相位measure_avg[i]与虚拟真实距离下的虚拟真实相位real[i]。通过以下公式即可获取当前占空比的线性参数duty_cycle:After the delay value adjustment of the preset period is completed under the current duty cycle, a set of measured phase measure_avg[i] and the virtual real phase 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:

duty_cycle=sum(abs(measure_avg[i]-real[i]))。duty_cycle = sum(abs(measure_avg[i]-real[i])).

关于步骤S4、在当前占空比小于预设阈值时,获取所有线性参数中的最优值对应的占空比作为最优占空比。具体来说,系统预设有占空比阈值,也即系统可设定的最小占空比。通过获取在调整至预设阈值前的所有线性参数,并约束最优解,可以获取系统的最优占空比。Regarding step S4, when the current duty cycle is smaller than the preset threshold, the duty cycle corresponding to the optimal value among all the linear parameters is obtained as the optimal duty cycle. Specifically, the system presets a duty ratio threshold, that is, a minimum duty ratio that can be set by the system. By obtaining all the linear parameters before adjusting to the preset threshold and constraining the optimal solution, the optimal duty cycle of the system can be obtained.

在一些实施例中,获取最优占空比的约束条件为每一占空比下虚拟真实相位与目标测量相位的差值绝对值的和值。具体的,可以通过以下公式获取占空比的最优解:In some embodiments, the constraint condition for obtaining the optimal duty cycle is the sum of the absolute values of the differences between the virtual real phase and the target measured phase at each duty cycle. Specifically, the optimal solution of the duty cycle can be obtained by the following formula:

duty-cycle最优=arg_min(sum(abs(measure_avg[i]-real[i])))。duty-cycle optimal = arg_min(sum(abs(measure_avg[i]-real[i]))).

即,当某一占空比下目标测量相位和虚拟真实相位之间偏差绝对值最小,该占空比即为最优占空比。That is, when the absolute value of the deviation between the target measurement phase and the virtual real phase is the smallest under a certain duty cycle, the duty cycle is the optimal duty cycle.

关于步骤S5、以所述最优占空比作为所述图像传感器的设置参数,完成iToF相机的非线性标定、实现iToF相机的线性度优化。具体来说,在获取最优占空比之后,将图像传感器的占空比参数设置为该最优占空比,可以最大化降低非线性度,提高图像传感器测量的线性度。本实施例以调节发射光波形的占空比替代传统的wiggling标定,节省了在计算相位的时候需要wiggling校正的标定时间。Regarding step S5, the optimal duty cycle is used 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. Specifically, after obtaining the optimal duty cycle, setting the duty cycle parameter of the image sensor to the optimal duty cycle can minimize the nonlinearity and improve the linearity of the image sensor measurement. In this embodiment, the traditional wiggling calibration is replaced by adjusting the duty cycle of the emitted light waveform, which saves the calibration time required for wiggling correction when calculating the phase.

在一些实施例中,所述方法进一步包括:1)选取多个图像传感器,并获取每一所述图像传感器的最优占空比;2)根据所有所述最优占空比获取目标占空比,其中,所述目标占空比为所有所述最优占空比的中值或平均值;以及3)将所述目标占空比回填到所有所述图像传感器的设定中。具体来说,考虑单颗图像传感器模组存在随机误差因素的影响,因此,选取多个图像传感器模组同时进行占空比最优化查找,根据所有图像传感器模组的最优占空比的中值或平均值确定最优解,完成非线性标定,有利于提高标定准确度。In some embodiments, the method further includes: 1) selecting a plurality of image sensors, and obtaining the optimal duty cycle of each of the image sensors; 2) obtaining the target duty cycle according to all the optimal duty cycles , wherein the target duty cycle is the median or average value of all the optimal duty cycles; and 3) backfilling the target duty cycle into the settings of all the image sensors. Specifically, considering the influence of random error factors in a single image sensor module, multiple image sensor modules are selected to search for duty cycle optimization at the same time, and according to the optimal duty ratio of all image sensor modules Value or average value to determine the optimal solution to complete the nonlinear calibration, which is conducive to improving the calibration accuracy.

接上述实施例,所述的选取多个图像传感器的步骤进一步包括:从同一批次的图像传感器中随机选取多个图像传感器;所述的将所述目标占空比回填到所有所述图像传感器的设定中的步骤进一步包括:将所述目标占空比回填到该批次的所有图像传感器的设定中。具体来说,在同一批次图像传感器模组随机选取几个模组同时进行占空比最优化查找,根据所有图像传感器模组的最优占空比的中值或平均值确定最优解,回填到该批次的所有图像传感器模组的设定中,即可完成该批次的所有图像传感器模组的非线性标定,节省了同批次图像传感器模组的标定时间。Following the above embodiment, the step of selecting a plurality of image sensors further includes: randomly selecting a plurality of image sensors from the same batch of image sensors; and backfilling the target duty cycle to all the image sensors The step of setting further includes: backfilling the target duty cycle into the settings of all image sensors of the batch. Specifically, in the same batch of image sensor modules, several modules are randomly selected for duty cycle optimization search at the same time, and the optimal solution is determined according to the median or average value of the optimal duty cycle of all image sensor modules, Backfilling in the settings of all the image sensor modules of the batch can complete the non-linear calibration of all the image sensor modules of the batch, saving the calibration time of the image sensor modules of the same batch.

以下结合图8对本申请iToF相机的线性度优化方法的流程做进一步解释说明。本实施例具体的流程为:1)同一批次模组选取n个图像传感器模组;2)调节占空比;3)以π/4为步长调节延时值;4)抓取m帧深度图像,对所有所述深度图像的像素中心点的测量相位进行时域平均获取相应的平均测量相位,以作为当前虚拟真实距离对应的目标测量相位,即获取当前延时值下中心点对应的测量相位;5)获取不同延时值下中心点对应的测量相位,即获取数组measure_avg[i];6)根据延时值对应的虚拟真实距离获取虚拟真实相位,即获取real[i];7)判断当前延时值是否小于或等于预设周期(例如2π),即判断delay<=2π;若delay<=2π则返回继续进行延时值增加以及后续操作,若delay>2π则当前占空比下的延时值调整完成;8)以Sum(abs(measure_avg[i])-real[i]))作为约束条件,所有占空比下的最小占空比即为所求。The flow of the linearity optimization method for the iToF camera of the present application will be further explained below in conjunction with FIG. 8 . The specific process of this embodiment is: 1) select n image sensor modules from the same batch of modules; 2) adjust the duty cycle; 3) adjust the delay value in steps of π/4; 4) capture m frames For the depth image, time-domain average is performed on 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, that is, to obtain the current delay value corresponding to the center point Measure the phase; 5) Obtain the measurement phase corresponding to the center point under different delay values, that is, obtain the array measure_avg[i]; 6) Obtain the virtual real phase according to the virtual real distance corresponding to the delay value, that is, obtain real[i]; 7 ) to determine whether the current delay value is less than or equal to the preset period (for example, 2π), that is, to determine delay<=2π; if delay<=2π, return to continue the delay value increase and subsequent operations; if delay>2π, the current duty cycle The adjustment of the delay value under the ratio is completed; 8) With Sum(abs(measure_avg[i])-real[i])) as the constraint condition, the minimum duty ratio under all duty ratios is the desired one.

根据以上内容可以看出,本申请通过图像传感器调节光波形的占空比,可以降低系统的非线性,可以抑制混叠谐波分量以提高图像传感器测量的线性度,降低系统的非线性,节省了在计算相位的时候需要wiggling校正的标定时间,节省标定成本。进而通过延时单元添加延时以模拟真实距离移动,并通过约束调节寻找最优占空比,以最大化降低非线性度,更好的提高图像传感器测量的线性度。通过在同一批次图像传感器模组随机选取几个模组同时进行占空比最优化查找,根据所有图像传感器模组的最优占空比的中值或平均值确定最优解,回填到该批次的所有图像传感器模组的设定中,即可完成该批次的所有图像传感器模组的非线性标定,有利于提高标定准确度,且节省了同批次图像传感器模组的标定时间。According to the above content, it can be seen that the present application adjusts the duty cycle of the optical waveform through the image sensor, which can reduce the nonlinearity of the system, suppress the aliasing harmonic components to improve the linearity of the image sensor measurement, reduce the nonlinearity of the system, and save Reduce the calibration time required for wiggling correction when calculating the phase, saving calibration costs. Furthermore, the delay is added by the delay unit to simulate the real distance movement, and the optimal duty cycle is found through constraint adjustment to minimize the nonlinearity and improve the linearity of the image sensor measurement. Randomly select several modules in the same batch of image sensor modules to perform duty cycle optimization search at the same time, determine the optimal solution according to the median or average value of the optimal duty cycle of all image sensor modules, and backfill to this In the setting of all image sensor modules in a batch, the nonlinear calibration of all image sensor modules in the batch can be completed, which is conducive to improving the calibration accuracy and saving the calibration time of the same batch of image sensor modules .

基于同一发明构思,本申请还提供了一种iToF相机的线性度优化装置。所提供的iToF相机的线性度优化装置可以采用如图4所示的iToF相机的线性度优化方法完成对iToF相机的线性度优化。Based on the same inventive concept, the present application also provides an iToF camera linearity optimization device. The linearity optimization device of the iToF camera provided can use the linearity optimization method of the iToF camera as shown in FIG. 4 to complete the linearity optimization of the iToF camera.

请参阅图9,其为本申请一实施例提供的iToF相机的线性度优化装置的结构框图。如图9所示,所述iToF相机的线性度优化装置包括:调节模块101、第一获取模块102、第二获取模块103、第三获取模块104以及优化模块105。Please refer to FIG. 9 , which is a structural block diagram of an iToF camera linearity optimization device provided by an embodiment of the present application. As shown in FIG. 9 , the linearity optimization device of 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 .

具体来说,所述调节模块101用于通过图像传感器调节发射光波形的占空比(dutycycle)。所述第一获取模块102用于在当前占空比下以预设步长调节延时值,并在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位。所述第二获取模块103用于在完成预设周期的延时值调整后,根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数。所述第三获取模块104用于在当前占空比小于预设阈值时,获取所有线性参数中的最优值对应的占空比作为最优占空比。所述优化模块105用于以所述最优占空比作为所述图像传感器的设置参数,完成iToF相机的非线性标定、实现iToF相机的线性度优化。Specifically, the adjustment module 101 is used to adjust the duty cycle of the emitted light waveform through the image sensor. The first acquiring module 102 is used to adjust the delay value with a preset step under the current duty cycle, and acquire the virtual real phase and the target measurement phase corresponding to the corresponding virtual real distance after each delay value adjustment. The second acquisition module 103 is configured to acquire the linear parameter of the current duty cycle according to all acquired virtual real phases and corresponding target measurement phases after the delay value adjustment of the preset period is completed. The third obtaining module 104 is configured to obtain a duty cycle corresponding to an optimal value among all linear parameters as an optimal duty cycle when the current duty cycle is smaller 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.

在一些实施例中,所述第二获取模块103进一步用于求取每次调整延时值后获取的虚拟真实相位与目标测量相位的差值绝对值,以及求取所述预设周期内所有所述差值绝对值的和值,以所述和值作为当前占空比的线性参数。相应的,所述第三获取模块104进一步用于获取所有占空比对应的和值中的最小值作为所述最优值。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 acquired after each delay value adjustment, and calculate all phases within the preset period. The sum of the absolute values of the differences is used as the linear parameter of the current duty cycle. Correspondingly, the third obtaining module 104 is further configured to obtain a minimum value among sum values corresponding to all duty ratios as the optimal value.

基于同一发明构思,本申请还提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可执行程序;所述处理器执行所述计算机可执行程序时实现如图4所示的iToF相机的线性度优化方法的步骤。Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer-executable program stored on the memory and operable on the processor; the processor executes the computer The steps of realizing the linearity optimization method of the iToF camera as shown in FIG. 4 when the executable program is executed.

在本申请构思的领域中是可以根据执行所描述的一个或多个功能的模块来描述和说明实施例。这些模块(本文也可以称为单元等)可以由模拟和/或数字电路物理地实现,例如逻辑门、集成电路、微处理器、微控制器、存储器电路、无源电子元件、有源电子元件、光学组件、硬连线电路等,并且可以可选地由固件和/或软件来驱动。电路例如可以在一个或更多个半导体芯片中实施。构成模块的电路可以由专用硬件实现,或者由处理器(例如,一个或更多个编程的微处理器和相关电路)实现,或者由执行模块的一些功能的专用硬件和执行模块的其它功能的处理器的组合来实现。在不脱离本申请构思的范围的情况下,可以将实施例的每个模块物理地分成两个或更多个交互且分立的模块。同样地,在不脱离本申请构思的范围的情况下,可以将实施例的模块物理地组合成更复杂的模块。It is within the realm of the present application contemplation that embodiments may be described and illustrated in terms of means for performing one or more of the described functions. These modules (which may also be referred to herein as units, etc.) may be physically realized by analog and/or digital circuits, such as logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components , optical components, hardwired circuitry, etc., and may optionally be driven by firmware and/or software. Circuitry may be implemented, for example, in one or more semiconductor chips. The circuitry constituting a module may be implemented by dedicated hardware, or by a processor (e.g., one or more programmed microprocessors and associated circuits), or by dedicated hardware that performs some of the functions of the module and a computer that performs other functions of the module. combination of processors. Each module of an embodiment may be physically divided into two or more interacting and separate modules without departing from the scope of the inventive concept. Likewise, modules of the embodiments may be physically combined into more complex modules without departing from the scope of the inventive concept.

通常,可以至少部分地从上下文中的用法理解术语。例如,在本文中所使用的术语“一个或多个”至少部分取决于上下文,可以用于以单数意义描述特征、结构或特性,或可以用于以复数意义描述特征、结构或特征的组合。另外,术语“基于”可以被理解为不一定旨在表达一组排他性的因素,而是可以替代地,同样至少部分地取决于上下文,允许存在不一定明确描述的其它因素。In general, a term can be understood, at least in part, from its usage in context. For example, the term "one or more" as used herein may be used to describe a feature, structure or characteristic in the singular or may be used to describe a feature, structure or combination of features in the plural, depending at least in part on the context. In addition, the term "based on" may be understood as not necessarily intended to express an exclusive set of factors, but may instead, again depending at least in part on the context, allow for the presence of other factors not necessarily expressly described.

需要说明的是,本申请的文件中涉及的术语“包括”和“具有”以及它们的变形,意图在于覆盖不排他的包含。术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序,除非上下文有明确指示,应该理解这样使用的数据在适当情况下可以互换。另外,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。此外,在以上说明中,省略了对公知组件和技术的描述,以避免不必要地混淆本申请的概念。上述各个实施例中,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同/相似的部分互相参见即可。It should be noted that the terms "including" and "having" and their variants involved in the documents of 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 the context clearly dictates, and it should be understood that the data so used are interchangeable under appropriate circumstances . In addition, the embodiments in the present application and the features in the embodiments can be combined with each other under the condition of no conflict. Also, in the above description, descriptions of well-known components and techniques are omitted to avoid unnecessarily obscuring the concepts of the present application. In the above-mentioned various embodiments, each embodiment focuses on the difference from other embodiments, and the same/similar parts between the various embodiments can be referred to each other.

以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only the preferred implementation mode of the present application, and it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the application, some improvements and modifications can also be made, and these improvements and modifications should also be regarded as For the scope of protection of this application.

Claims (10)

1.一种iToF相机的线性度优化方法,其特征在于,包括如下步骤:1. a linearity optimization method of an iToF camera, is characterized in that, comprises the steps: 通过iToF相机的图像传感器调节发射光波形的占空比;Adjust the duty cycle of the emitted light waveform through the image sensor of the iToF camera; 在当前占空比下以预设步长调节延时值,并在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位;Adjust the delay value with a preset step under the current duty cycle, and obtain the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase after each adjustment of the delay value; 在完成预设周期的延时值调整后,根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数;After the delay value adjustment of the preset period is completed, the linear parameter of the current duty cycle is obtained according to all obtained virtual real phases and corresponding target measurement phases; 在当前占空比小于预设阈值时,获取所有线性参数中的最优值对应的占空比作为最优占空比;以及When the current duty cycle is less than the preset threshold, obtain the duty cycle corresponding to the optimal value among all the linear parameters as the optimal duty cycle; and 以所述最优占空比作为所述图像传感器的设置参数,完成iToF相机的非线性标定、实现iToF相机的线性度优化。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 realized. 2.根据权利要求1所述的iToF相机的线性度优化方法,其特征在于,所述预设步长为π/4、π/8、π/16的任意其中之一;所述预设周期为2π。2. The linearity optimization method of an iToF camera according to claim 1, wherein the preset step size is any one of π/4, π/8, π/16; the preset period is 2π. 3.根据权利要求1所述的iToF相机的线性度优化方法,其特征在于,所述的在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位的步骤进一步包括:3. The linearity optimization method of an iToF camera according to claim 1, wherein the step of obtaining the virtual real phase corresponding to the corresponding virtual real distance and the target measurement phase after each adjustment of the delay value further comprises : 在调制或解调路径添加延时单元,并通过设置延时值以模拟真实距离;Add a delay unit in the modulation or demodulation path, and simulate the real distance by setting the delay value; 在每次调整延时值后形成一当前虚拟真实距离,其中,当前虚拟真实距离对应一虚拟真实相位;以及A current virtual real distance is formed after each delay value is adjusted, wherein the current virtual real distance corresponds to a virtual real phase; and 获取预设帧深度图像、并对所有所述深度图像的像素中心点的测量相位进行时域平均获取相应的平均测量相位,以作为当前虚拟真实距离对应的目标测量相位。Obtain a preset frame depth image, and perform time-domain averaging on the measurement phases of the pixel center points of all the depth images to obtain a corresponding average measurement phase, which is used as the target measurement phase corresponding to the current virtual real distance. 4.根据权利要求1所述的iToF相机的线性度优化方法,其特征在于,所述的根据获取的所有虚拟真实相位与对应的目标测量相位,获取当前占空比的线性参数的步骤进一步包括:4. The linearity optimization method of an iToF camera according to claim 1, wherein the step of obtaining the linear parameter of the current duty cycle further comprises : 求取每次调整延时值后获取的虚拟真实相位与目标测量相位的差值绝对值;以及Calculating the absolute value of the difference between the virtual real phase obtained after each delay value adjustment and the target measured phase; 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.根据权利要求4所述的iToF相机的线性度优化方法,其特征在于,所述的获取所有线性参数中的最优值对应的占空比作为最优占空比的步骤进一步包括:5. the linearity optimization method of iToF camera according to claim 4, is characterized in that, the described step of obtaining the duty cycle corresponding to the optimal value in all linear parameters as optimal duty cycle further comprises: 获取所有占空比对应的和值中的最小值作为所述最优值。A minimum value among sum values corresponding to all duty cycles is obtained as the optimal value. 6.根据权利要求1所述的iToF相机的线性度优化方法,其特征在于,所述方法进一步包括:6. the linearity optimization method of iToF camera according to claim 1, is characterized in that, described 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 a median or an average value of all the optimal duty cycles; and 将所述目标占空比回填到所有所述图像传感器的设定中。The target duty cycle is backfilled into settings for all of the image sensors. 7.根据权利要求6所述的iToF相机的线性度优化方法,其特征在于,7. the linearity optimization method of iToF camera according to claim 6, is characterized in that, 所述的选取多个图像传感器的步骤进一步包括:从同一批次的图像传感器中随机选取多个图像传感器;The step of selecting a plurality of image sensors further includes: randomly selecting a plurality of 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.一种iToF相机的线性度优化装置,其特征在于,包括:8. A linearity optimization device for an iToF camera, comprising: 调节模块,用于通过图像传感器调节发射光波形的占空比;An adjustment module, configured to adjust the duty cycle of the emitted light waveform through the image sensor; 第一获取模块,用于在当前占空比下以预设步长调节延时值,并在每次调整延时值后获取相应虚拟真实距离对应的虚拟真实相位以及目标测量相位;The first acquisition module is used to adjust the delay value with a preset step under the current duty cycle, and obtain 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 is used to acquire the linear parameter of the current duty cycle according to all acquired virtual real phases and 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 the linear parameters as the optimal duty cycle when the current duty cycle is less than the preset threshold; and 优化模块,用于以所述最优占空比作为所述图像传感器的设置参数,完成iToF相机的非线性标定、实现iToF相机的线性度优化。The optimization module 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. 9.根据权利要求8所述的装置,其特征在于,9. The device of claim 8, wherein: 所述第二获取模块进一步用于求取每次调整延时值后获取的虚拟真实相位与目标测量相位的差值绝对值,以及求取所述预设周期内所有所述差值绝对值的和值,以所述和值作为当前占空比的线性参数;The second acquisition module is further used to calculate the absolute value of the difference between the virtual real phase and the target measurement phase acquired after each delay value adjustment, and calculate the absolute value of all the differences within the preset period And value, with described and value as the linear parameter of current duty ratio; 所述第三获取模块进一步用于获取所有占空比对应的和值中的最小值作为所述最优值。The third acquiring module is further configured to acquire a minimum value among sum values corresponding to all duty ratios as the optimal value. 10.一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可执行程序,其特征在于,所述处理器执行所述计算机可执行程序时实现如权利要求1~7任一项所述的iToF相机的线性度优化方法的步骤。10. An electronic device, comprising a memory, a processor, and a computer-executable program stored on the memory and operable on the processor, wherein when the processor executes the computer-executable program The step of realizing the linearity optimization method of an iToF camera as described in any one of claims 1-7.
CN202211291852.1A 2022-10-20 2022-10-20 Linearity optimization method, device and electronic equipment of iToF camera Pending CN115601446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211291852.1A CN115601446A (en) 2022-10-20 2022-10-20 Linearity optimization method, device and electronic equipment of iToF camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211291852.1A CN115601446A (en) 2022-10-20 2022-10-20 Linearity optimization method, device and electronic equipment of iToF camera

Publications (1)

Publication Number Publication Date
CN115601446A true CN115601446A (en) 2023-01-13

Family

ID=84848678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211291852.1A Pending CN115601446A (en) 2022-10-20 2022-10-20 Linearity optimization method, device and electronic equipment of iToF camera

Country Status (1)

Country Link
CN (1) CN115601446A (en)

Similar Documents

Publication Publication Date Title
CN106911888B (en) A device
US10416296B2 (en) 3DI sensor depth calibration concept using difference frequency approach
EP3308193B1 (en) Time-of-flight (tof) system calibration
CN111045029B (en) Fused depth measuring device and measuring method
CN109903241A (en) A kind of the depth image calibration method and system of TOF camera system
US11454712B2 (en) Time-of-flight distance measuring system and calibration method
US20190178995A1 (en) Ranging device and method thereof
Hussmann et al. Real-time motion artifact suppression in tof camera systems
CN110187354B (en) Method, system and computer readable medium for simulating distances
WO2014208018A1 (en) Distance measuring system
WO2020247046A1 (en) Mixed active depth
US9453743B2 (en) Distance measuring apparatus
US11423572B2 (en) Built-in calibration of time-of-flight depth imaging systems
US20220075039A1 (en) Method for correcting nonlinear distance error of 3-dimensional distance measuring camera by using pulse phase shift
CN109756662A (en) Depth information correction method and depth information correction device based on DLL delay-locked loop
CN109697957A (en) Image pixel bearing calibration and system
CN115601446A (en) Linearity optimization method, device and electronic equipment of iToF camera
CN113030999B (en) Time-of-flight sensing system and image sensor for use therein
JP2020008483A (en) Imaging device and method for controlling imaging device
WO2023279619A1 (en) Itof ranging system, and method for shielding fuzzy distance value
CN114556048B (en) Ranging method, ranging apparatus, and computer-readable storage medium
CN115601443A (en) Calibration method and device for ToF depth camera and electronic equipment
CN115601442A (en) Calibration method and device for iToF camera and electronic equipment
CN115601445A (en) Method and device for acquiring real distance of ToF camera calibration board, and electronic equipment
US11961257B2 (en) Built-in calibration of time-of-flight depth imaging systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231114

Address after: Room 308 and Room 309, No. 268 Xiangke Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai, 201210

Applicant after: Shanghai Jieming Technology Co.,Ltd.

Address before: 351100 705-706, building a, Jiulong community, No. 999, lihuadong Avenue, Xialin street, Chengxiang District, Putian City, Fujian Province

Applicant before: Fujian Jiemu Technology Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20241113

Address after: No. 942, Tonglong 2nd Road, Torch High tech Zone (Xiang'an) Industrial Zone, Xiamen City, Fujian Province 361115, China 423-49

Applicant after: Xingchen Technology Co.,Ltd.

Country or region after: China

Address before: Room 308 and Room 309, No. 268 Xiangke Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai, 201210

Applicant before: Shanghai Jieming Technology Co.,Ltd.

Country or region before: China