CN115469320A - Laser ranging method, device and medium - Google Patents
Laser ranging method, device and medium Download PDFInfo
- Publication number
- CN115469320A CN115469320A CN202211116928.7A CN202211116928A CN115469320A CN 115469320 A CN115469320 A CN 115469320A CN 202211116928 A CN202211116928 A CN 202211116928A CN 115469320 A CN115469320 A CN 115469320A
- Authority
- CN
- China
- Prior art keywords
- data
- photons
- acquisition
- target object
- laser
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 230000000875 corresponding effect Effects 0.000 claims description 44
- 238000004590 computer program Methods 0.000 claims description 14
- 230000002596 correlated effect Effects 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 abstract description 7
- 238000005259 measurement Methods 0.000 description 20
- 238000012545 processing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012937 correction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000002310 reflectometry Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/02—Systems using the reflection of electromagnetic waves other than radio waves
- G01S17/06—Systems determining position data of a target
- G01S17/08—Systems determining position data of a target for measuring distance only
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S7/00—Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
- G01S7/48—Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
- G01S7/481—Constructional features, e.g. arrangements of optical elements
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Electromagnetism (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Optical Radar Systems And Details Thereof (AREA)
Abstract
Description
技术领域technical field
本申请涉及光学领域,特别是涉及一种激光测距的方法、装置及介质。The present application relates to the field of optics, in particular to a method, device and medium for laser ranging.
背景技术Background technique
为了对较远的物体或者位于复杂环境中的物体进行测距,通常采用激光对物体进行测距。如,采用包含垂直腔面发射激光器(Vertical Cavity Surface Emitting Laser,VCSEL)、单光子雪崩二极管(Single Photon Avalanche Diode,SPAD)和时数转换器(Time-to-Digital Converter,TDC)构成飞行时间模组。In order to measure the distance of a distant object or an object located in a complex environment, a laser is usually used to measure the distance of the object. For example, a time-of-flight model composed of a vertical cavity surface emitting laser (Vertical Cavity Surface Emitting Laser, VCSEL), a single photon avalanche diode (Single Photon Avalanche Diode, SPAD) and a time-to-digital converter (TDC) Group.
在测距的过程中,VCSEL发射激光脉冲,SPAD接收从物体反射回来的脉冲,TDC记录SPAD接收到光子和VCSEL发射激光的时间差,将SPAD接收到的光子数量最多的时刻认为是模组到物体间的飞行时间,进而根据光速与飞行时间计算出模组与物体间的距离。由于近端串扰(包含模组内部光环串扰和模组外部光环境串扰)等原因,导致近端光子数量会偏大,当近端串扰形成的波峰高于物体反射回的光子形成的波峰时,如果单纯使用光子数量最多的波峰来计算距离,会得到一个错误的距离,使得测量的物体的距离不准确。During the ranging process, the VCSEL emits laser pulses, and the SPAD receives the pulses reflected from the object. The TDC records the time difference between the photons received by the SPAD and the laser emitted by the VCSEL, and the moment when the maximum number of photons received by the SPAD is considered as the moment from the module to the object. The time of flight between them, and then calculate the distance between the module and the object according to the speed of light and the time of flight. Due to reasons such as near-end crosstalk (including module internal light ring crosstalk and module external light environment crosstalk), the number of near-end photons will be too large. When the peak formed by the near-end crosstalk is higher than the peak formed by the photons reflected back by the object, If you simply use the peak with the largest number of photons to calculate the distance, you will get a wrong distance, making the measured distance of the object inaccurate.
由此可见,如何提高激光测距的准确性是本领域人员亟需解决的技术问题。It can be seen that how to improve the accuracy of laser ranging is a technical problem urgently needed to be solved by those skilled in the art.
发明内容Contents of the invention
本申请的目的是提供一种激光测距的方法、装置及介质,用于对激光测距误差进行校正,从而提高激光测距的准确性。The purpose of this application is to provide a method, device and medium for laser distance measurement, which are used to correct laser distance measurement errors, thereby improving the accuracy of laser distance measurement.
为解决上述技术问题,本申请提供一种激光测距的方法,包括:In order to solve the above technical problems, this application provides a method for laser ranging, including:
自激光发射器发射激光脉冲开始,获取采集时长内的第一校准数据;其中,所述第一校准数据为在不存在目标物体的情况下,单光子雪崩二极管在所述采集时长内的各采集周期采集的光子的数量;所述采集周期小于所述采集时长;Since the laser transmitter emits laser pulses, the first calibration data within the acquisition period is obtained; wherein, the first calibration data is each acquisition of the single photon avalanche diode within the acquisition period in the absence of a target object The number of photons collected periodically; the collection period is shorter than the collection duration;
自所述激光发射器发射激光脉冲开始,获取所述采集时长内的实际数据;其中,所述实际数据为在存在所述目标物体的情况下,所述单光子雪崩二极管在所述采集时长内的各所述采集周期采集的光子的数量;Since the laser transmitter emits laser pulses, the actual data within the acquisition time period is acquired; wherein the actual data is the single photon avalanche diode in the acquisition time period under the condition that the target object exists The number of photons collected in each of the collection periods;
获取各所述采集周期内的所述实际数据与对应的所述第一校准数据的第一差值,并将所述第一差值作为校准后的数据;Acquiring a first difference between the actual data and the corresponding first calibration data in each of the collection periods, and using the first difference as calibrated data;
根据所述校准后的数据确定飞行时间模组与所述目标物体之间的距离。The distance between the time-of-flight module and the target object is determined according to the calibrated data.
优选地,所述获取采集时长内的第一校准数据包括:Preferably, said acquiring the first calibration data within the collection time includes:
自所述激光发射器发射激光脉冲开始,获取预设时长内的所述第一校准数据;其中,所述预设时长小于所述采集时长,且所述采集周期小于所述预设时长。Acquiring the first calibration data within a preset time period since the laser emitter emits a laser pulse; wherein the preset time period is shorter than the collection time period, and the collection period is shorter than the preset time period.
优选地,所述实际数据包含所述预设时长内的第一实际数据以及剩余时长内的第二实际数据,所述剩余时长为所述采集时长内除所述预设时长外的时长;所述根据所述校准后的数据确定飞行时间模组与所述目标物体之间的距离包括:Preferably, the actual data includes the first actual data within the preset duration and the second actual data within the remaining duration, and the remaining duration is a duration within the collection duration other than the preset duration; The determination of the distance between the time-of-flight module and the target object according to the calibrated data includes:
获取各所述采集周期内的所述第一实际数据与对应地所述第一校准数据的第二差值,并将所述第二差值作为所述预设时长内的第一校准后的数据;Acquiring a second difference between the first actual data and the corresponding first calibration data in each of the collection periods, and using the second difference as the first calibrated value within the preset time length data;
从所述第一校准后的数据与所述第二实际数据中选取光子数量最多时对应的第一时刻;Selecting the first moment corresponding to the maximum number of photons from the first calibrated data and the second actual data;
获取光速与所述第一时刻的第一乘积结果;Obtain the first product result of the speed of light and the first moment;
将所述第一乘积结果的一半作为所述飞行时间模组与所述目标物体之间的距离。Half of the first product result is used as the distance between the time-of-flight module and the target object.
优选地,所述预设时长根据所述单光子雪崩二极管与所述激光脉冲穿过的镜头之间的距离确定,且所述预设时长与所述单光子雪崩二极管到所述镜头的距离呈正相关。Preferably, the preset duration is determined according to the distance between the single photon avalanche diode and the lens through which the laser pulse passes, and the preset duration is positive to the distance between the single photon avalanche diode and the lens relevant.
优选地,在所述获取所述采集时长内的实际数据之后,所述方法还包括:Preferably, after the acquisition of the actual data within the collection period, the method further includes:
根据所述实际数据确定光子数量最多时对应的第二时刻;determining the second moment corresponding to when the number of photons is the largest according to the actual data;
判断所述第二时刻是否在所述剩余时长内;judging whether the second moment is within the remaining duration;
若是,则获取各所述采集周期内的所述第一实际数据与对应的所述第一校准数据的第一比值;If so, acquiring a first ratio between the first actual data and the corresponding first calibration data in each of the collection periods;
获取各所述第一比值与对应的所述第一校准数据的乘积,并将各所述乘积作为第二校准数据;Obtain the product of each of the first ratios and the corresponding first calibration data, and use each of the products as the second calibration data;
获取各所述采集周期内的所述第一实际数据与对应地所述第二校准数据的第三差值,并将所述第三差值作为所述预设时长内的第二校准后的数据;Acquiring a third difference between the first actual data and the corresponding second calibration data in each of the collection periods, and using the third difference as the second calibrated value within the preset time length data;
从所述第二校准后的数据与所述第二实际数据中选取光子数量最多时对应的第三时刻;Selecting a third moment corresponding to the maximum number of photons from the second calibrated data and the second actual data;
在所述第二时刻与所述第三时刻为同一时刻的情况下,获取所述光速与所述第二时刻或所述第三时刻的第二乘积结果;If the second moment and the third moment are the same moment, obtain a second product result of the speed of light and the second moment or the third moment;
将所述第二乘积结果的一半作为所述飞行时间模组与所述目标物体之间的距离。Half of the second product result is used as the distance between the time-of-flight module and the target object.
优选地,在确定出所述第二时刻在所述剩余时长内之后,所述获取各所述采集周期内的所述第一实际数据与对应的所述第一校准数据的第一比值之前,所述方法还包括:Preferably, after it is determined that the second moment is within the remaining duration, before acquiring the first ratio between the first actual data and the corresponding first calibration data in each of the collection periods, The method also includes:
从所述第一实际数据中获取第一最大的光子数量以及从所述第一校准数据中获取第二最大的光子数量;obtaining a first maximum number of photons from said first actual data and a second maximum number of photons from said first calibration data;
获取所述第一最大的光子数量与所述第二最大的光子数量的第二比值;obtaining a second ratio of the first maximum number of photons to the second maximum number of photons;
若所述第二比值大于或等于阈值,则进入所述获取各所述采集周期内的所述第一实际数据与对应的所述第一校准数据的第一比值的步骤。If the second ratio is greater than or equal to the threshold, enter the step of acquiring the first ratio between the first actual data and the corresponding first calibration data in each of the collection periods.
优选地,所述方法还包括:Preferably, the method also includes:
在所述激光发射器发射激光脉冲碰到所述目标物体的情况下,输出用于表征碰到所述目标物体的提示信息和/或记录碰到所述目标物体对应的时刻。When the laser pulse emitted by the laser emitter collides with the target object, output prompt information representing the colliding with the target object and/or record the corresponding moment of colliding with the target object.
为了解决上述技术问题,本申请还提供一种激光测距的装置,包括:In order to solve the above technical problems, the present application also provides a laser ranging device, including:
第一获取模块,用于自激光发射器发射激光脉冲开始,获取采集时长内的第一校准数据;其中,所述第一校准数据为在不存在目标物体的情况下,单光子雪崩二极管在所述采集时长内的各采集周期采集的光子的数量;所述采集周期小于所述采集时长;The first acquisition module is used to acquire the first calibration data within the acquisition time period since the laser transmitter emits the laser pulse; wherein, the first calibration data is the single photon avalanche diode in the absence of the target object. The number of photons collected in each collection period within the collection period; the collection period is less than the collection period;
第二获取模块,用于自所述激光发射器发射激光脉冲开始,获取所述采集时长内的实际数据;其中,所述实际数据为在存在所述目标物体的情况下,所述单光子雪崩二极管在所述采集时长内的各所述采集周期采集的光子的数量;The second acquisition module is configured to acquire the actual data within the acquisition duration since the laser transmitter emits the laser pulse; wherein the actual data is the single photon avalanche in the presence of the target object the number of photons collected by the diode in each of the collection periods within the collection period;
第三获取模块,用于获取各所述采集周期内的所述实际数据与对应的所述第一校准数据的第一差值,并将所述第一差值作为校准后的数据;A third acquiring module, configured to acquire a first difference between the actual data and the corresponding first calibration data in each of the acquisition periods, and use the first difference as calibrated data;
确定模块,用于根据所述校准后的数据确定飞行时间模组与所述目标物体之间的距离。A determining module, configured to determine the distance between the time-of-flight module and the target object according to the calibrated data.
为了解决上述技术问题,本申请还提供一种激光测距的装置,包括:In order to solve the above technical problems, the present application also provides a laser ranging device, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行所述计算机程序时实现上述的激光测距的方法的步骤。The processor is configured to realize the steps of the above-mentioned laser ranging method when executing the computer program.
为了解决上述技术问题,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述的激光测距的方法的步骤。In order to solve the above-mentioned technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned laser ranging method are realized .
本申请所提供的激光测距的方法,包括:自激光发射器发射激光脉冲开始,获取采集时长内的第一校准数据;其中,第一校准数据为在不存在目标物体的情况下,单光子雪崩二极管在采集时长内的各采集周期采集的光子的数量;采集周期小于采集时长;自激光发射器发射激光脉冲开始,获取采集时长内的实际数据;其中,实际数据为在存在目标物体的情况下,单光子雪崩二极管在采集时长内的各周期采集的光子的数量;获取各采集周期内的实际数据与对应的第一校准数据的第一差值,并将第一差值作为校准后的数据;根据校准后的数据确定飞行时间模组与目标物体之间的距离。该方法中,用实际数据减去校准数据,使得近端光子的数量小于单光子雪崩二极管在检测到目标物体返回的光子的数量,尽可能地避免因近端串扰导致检测到的光子的数量高于目标物体返回的光子的数量,进而导致在进行距离计算时造成的误判的情况的发生,提高激光测距的准确性。The laser ranging method provided by the present application includes: starting from the laser transmitter emitting laser pulses, obtaining the first calibration data within the acquisition time; wherein, the first calibration data is a single photon in the absence of a target object The number of photons collected by the avalanche diode in each acquisition period within the acquisition period; the acquisition period is less than the acquisition period; since the laser transmitter emits laser pulses, the actual data within the acquisition period is obtained; where the actual data is in the presence of the target object Next, the number of photons collected by the single photon avalanche diode in each period of the acquisition period; the first difference between the actual data in each acquisition period and the corresponding first calibration data is obtained, and the first difference is used as the calibrated Data; determine the distance between the time-of-flight module and the target object based on the calibrated data. In this method, the calibration data is subtracted from the actual data, so that the number of near-end photons is less than the number of photons returned by the single-photon avalanche diode when detecting the target object, and the number of detected photons caused by near-end crosstalk is avoided as much as possible. The number of photons returned by the target object will lead to misjudgment during distance calculation and improve the accuracy of laser ranging.
此外,本申请还提供一种激光测距的装置以及计算机可读存储介质,与上述提到的激光测距的方法具有相同或相对应的技术特征,效果同上。In addition, the present application also provides a laser ranging device and a computer-readable storage medium, which have the same or corresponding technical features as the above-mentioned laser ranging method, and the effect is the same as above.
附图说明Description of drawings
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present application more clearly, the following will briefly introduce the accompanying drawings used in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. As far as people are concerned, other drawings can also be obtained based on these drawings on the premise of not paying creative work.
图1为本申请实施例提供的一种飞行时间模组测距的示意图;Fig. 1 is a schematic diagram of a time-of-flight module ranging provided by an embodiment of the present application;
图2为本申请实施例提供的一种近端串扰噪声强度小于被测物体的信号强度时的dToF直接测量飞行时间直方图;Fig. 2 is a dToF direct measurement time-of-flight histogram when the near-end crosstalk noise intensity is less than the signal intensity of the measured object provided by the embodiment of the present application;
图3为本申请实施例提供的一种近端串扰噪声强度超过被测物体的信号强度时的dToF直接测量飞行时间直方图;Fig. 3 is a dToF direct measurement time-of-flight histogram when the near-end crosstalk noise strength exceeds the signal strength of the measured object provided by the embodiment of the present application;
图4为本申请实施例提供的一种激光测距的方法的流程图;FIG. 4 is a flow chart of a laser ranging method provided in an embodiment of the present application;
图5为本申请实施例一种校正后的dToF直接测量飞行时间直方图;FIG. 5 is a corrected dToF direct measurement time-of-flight histogram according to an embodiment of the present application;
图6为本申请的一实施例提供的一种激光测距的装置的结构图;FIG. 6 is a structural diagram of a laser ranging device provided by an embodiment of the present application;
图7为本申请另一实施例提供的激光测距的装置的结构图。FIG. 7 is a structural diagram of a laser ranging device provided in another embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of this application.
本申请的核心是提供一种激光测距的方法、装置及介质,用于对激光测距误差进行校正,从而提高激光测距的准确性。The core of the present application is to provide a method, device and medium for laser distance measurement, which are used to correct laser distance measurement errors, thereby improving the accuracy of laser distance measurement.
为了对较远的物体或者位于复杂环境中的物体进行测距,通常采用激光对物体进行测距。图1为本申请实施例提供的一种飞行时间模组测距的示意图。在测距时测量的是飞行时间模组与物体6之间的距离。飞行时间模组具体包括激光发射器1、单光子雪崩二极管2、时数转换器3、镜头4和挡板5。SPAD只要接收到一个光子,就能产生电流信号。In order to measure the distance of a distant object or an object located in a complex environment, a laser is usually used to measure the distance of the object. FIG. 1 is a schematic diagram of a time-of-flight module ranging provided by an embodiment of the present application. What is measured during ranging is the distance between the time-of-flight module and the object 6 . The time-of-flight module specifically includes a laser transmitter 1 , a single-photon avalanche diode 2 , a time-to-digital converter 3 , a
使用飞行时间模组测距的原理如下:The principle of distance measurement using the time-of-flight module is as follows:
1、VCSEL发射激光脉冲,SPAD接收从物体反射回来的脉冲。1. The VCSEL emits laser pulses, and the SPAD receives the pulses reflected from the object.
2、TDC能够记录SPAD接收到光子和VCSEL发射激光的时间差。2. The TDC can record the time difference between the photon received by the SPAD and the laser emitted by the VCSEL.
3、根据SPAD在不同时间段内接收到的光子数量,统计出直方图,图2为本申请实施例提供的一种近端串扰噪声强度小于被测物体的信号强度时的dToF直接测量飞行时间直方图。如图2所示,自VCSEL发光时开始统计,每隔1ps统计SPAD接收到的光子数量,绘制成直方图。3. According to the number of photons received by the SPAD in different time periods, the histogram is calculated. Figure 2 is a dToF direct measurement time-of-flight when the near-end crosstalk noise intensity is less than the signal intensity of the measured object provided by the embodiment of the present application. histogram. As shown in Figure 2, statistics are started when the VCSEL emits light, and the number of photons received by the SPAD is counted every 1ps, and drawn as a histogram.
4、VCSEL发出的光子大多数在碰到被检测的物体时返回,因此认为直方图中接收到光子数最多的时间段t认为是光子在模组到物体间的飞行时间。4. Most of the photons emitted by the VCSEL return when they hit the object to be detected. Therefore, the time period t with the largest number of photons received in the histogram is considered to be the flight time of photons between the module and the object.
5、根据光速c计算出模组和物体间的距离d为公式(1):5. Calculate the distance d between the module and the object according to the speed of light c as formula (1):
d=c*t/2 (1)d=c*t/2 (1)
6、在测距过程中,由于近端串扰等原因,近端光子数量会偏大。6. During the ranging process, due to near-end crosstalk and other reasons, the number of near-end photons will be too large.
7、由于光子在传播过程(VCSEL->物体->SPAD)中的损耗,远端光子数量会偏小。7. Due to the loss of photons in the propagation process (VCSEL->object->SPAD), the number of far-end photons will be relatively small.
8、图3为本申请实施例提供的一种近端串扰噪声强度超过被测物体的信号强度时的dToF直接测量飞行时间直方图。如图3所示,1ps时的波峰是SPAD检测到近端串扰产生的大量光子;150ps时的波峰是SPAD检测到被测物体返回的大量光子。当近端串扰形成的波峰高于物体反射回的光子形成的波峰时,如果单纯使用Counts数最大的波峰来计算距离,会得到一个错误的距离:8. FIG. 3 is a dToF direct measurement time-of-flight histogram when the near-end crosstalk noise intensity exceeds the signal intensity of the object under test provided by the embodiment of the present application. As shown in Figure 3, the peak at 1ps is a large number of photons generated by the near-end crosstalk detected by the SPAD; the peak at 150ps is a large number of photons returned by the object detected by the SPAD. When the peak formed by the near-end crosstalk is higher than the peak formed by the photons reflected back by the object, if you simply use the peak with the largest number of counts to calculate the distance, you will get an incorrect distance:
8.1当t=1ps时,d=c*t/2=3*108(m/s)*1*10-12(s)/2=0.15mm(错误)。8.1 When t=1ps, d=c*t/2=3*108(m/s)*1*10-12(s)/2=0.15mm (error).
8.2当t=150ps时,d=c*t/2=3*108(m/s)*150*10-12(s)/2=22.5mm(正确)。8.2 When t=150ps, d=c*t/2=3*108(m/s)*150*10-12(s)/2=22.5mm (correct).
实际中,产生近端串扰的原因有很多,可能来自模组内部串扰产生的噪声、模组外面装有镜头时,镜头有一定程度的反光使得镜头反射回的光子和模组内的串扰叠加成为噪声等。飞行时间测距装置的一个关键技术问题,就是如何确定光的飞行时间。目前常用的方法是通过TDC记录SPAD检测到光子的时间,其中接收到光子数量最多的时间,认为是光在模组和被测物体间的飞行时间t,当确认了光在模组和被测物体间的飞行时间t时,可以使用公式(1)求出模组和被测物体的距离。如上文中的描述,存在近端串扰时SPAD接收到的串扰光子数最多时,得到的时间t并不是光在模组和被测物体间的飞行时间,此时计算出的距离也是错误的,导致激光测距时的准确性降低。In practice, there are many reasons for near-end crosstalk. It may come from the noise generated by the internal crosstalk of the module. When the lens is installed outside the module, the lens has a certain degree of reflection, so that the photons reflected by the lens and the crosstalk in the module are superimposed to become noise etc. A key technical problem of the time-of-flight ranging device is how to determine the flight time of light. At present, the commonly used method is to record the time when the SPAD detects photons through TDC, and the time when the number of photons is received is the largest, which is considered to be the flight time t of light between the module and the measured object. When the flight time between objects is t, the distance between the module and the measured object can be obtained by using the formula (1). As described above, when there is near-end crosstalk and the number of crosstalk photons received by the SPAD is the largest, the obtained time t is not the flight time of light between the module and the measured object, and the calculated distance at this time is also wrong, resulting in Reduced accuracy when measuring laser distances.
由此可见,为了提高测距的准确性,需要对激光测距误差进行校准。本申请中通过在出厂前对激光测距进行校准,采用的是实际数据减去校准数据使近端光子的数量小于SPAD在检测到目标物体返回的光子的数量,从而获得正确的飞行时间,进而根据飞行时间得到较准确的模组与物体之间的距离;此外,可能会存在实际使用时的环境与出厂校准的环境光强度等因素不同,导致校准数据不能完全有效地抵消近端串扰等噪声,因此,本申请除了在出厂前对测距进行校准,还在实际使用时对测距再次进行校准,进一步地提高测距的准确性。It can be seen that in order to improve the accuracy of ranging, it is necessary to calibrate the laser ranging error. In this application, the laser ranging is calibrated before leaving the factory, and the actual data is used to subtract the calibration data so that the number of near-end photons is less than the number of photons returned by the SPAD when it detects the target object, thereby obtaining the correct flight time. A more accurate distance between the module and the object can be obtained according to the time of flight; in addition, there may be factors such as the actual use environment and the factory-calibrated ambient light intensity, which may cause the calibration data to be unable to completely and effectively offset noise such as near-end crosstalk Therefore, in addition to calibrating the distance measurement before leaving the factory, the present application also calibrates the distance measurement again during actual use, so as to further improve the accuracy of the distance measurement.
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。图4为本申请实施例提供的一种激光测距的方法的流程图,如图4所示,该方法包括:In order to enable those skilled in the art to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the drawings and specific implementation methods. Fig. 4 is a flow chart of a method for laser ranging provided in the embodiment of the present application. As shown in Fig. 4, the method includes:
S10:自VCSEL发射激光脉冲开始,获取采集时长内的第一校准数据;其中,第一校准数据为在不存在目标物体的情况下,SPAD在采集时长内的各采集周期采集的光子的数量;采集周期小于采集时长。S10: starting from the VCSEL emitting laser pulses, acquiring the first calibration data within the acquisition duration; wherein, the first calibration data is the number of photons collected by the SPAD in each acquisition period within the acquisition duration when no target object exists; The acquisition period is less than the acquisition duration.
由于是要尽可能地减少近端串扰造成的测距误差,因此采集的光子数量需要从VCSEL开始发射激光脉冲开始,获取SPAD接收到的光子数量。首先获取校准数据。出厂前对测距装置做校准,在模组和镜头等部件组装完毕时进行校准,将出厂校准后得到的校准数据称为第一校准数据。第一校准数据描述的是SPAD在各采集周期采集的光子的数量,对于各采集周期的值不作限定,优选的各采集周期采用相同的时长。为了获取第一校准数据方式,将模组朝向空旷区域,此时没有目标物体(需要进行测距的物体即为目标物体),尽可能地保证返回的光子数不是目标物体返回的光子,即获取因近端串扰在各采集周期获得的光子数。本实施例中自VCSEL发射激光脉冲开始,获取采集时长内的第一校准数据。对于采集时长的值不作限定,采集时长的最大值通常是根据模组的性能进行确定。为了能够对目标物体进行测距,至少要保证激光脉冲能够碰到目标物体并且模组能够接收到碰到目标物体后返回的光子。Since the ranging error caused by the near-end crosstalk is to be reduced as much as possible, the number of photons collected needs to be obtained from the start of the laser pulse emitted by the VCSEL to obtain the number of photons received by the SPAD. Get the calibration data first. The distance measuring device is calibrated before leaving the factory, and the calibration is performed when the components such as the module and the lens are assembled, and the calibration data obtained after the factory calibration is called the first calibration data. The first calibration data describes the number of photons collected by the SPAD in each acquisition period, and there is no limitation on the value of each acquisition period, preferably, each acquisition period adopts the same duration. In order to obtain the first calibration data mode, point the module towards an open area, and there is no target object at this time (the object that needs to be measured is the target object), and try to ensure that the number of photons returned is not the photons returned by the target object, that is, to obtain The number of photons acquired at each acquisition cycle due to near-end crosstalk. In this embodiment, the first calibration data within the acquisition time period is obtained from the VCSEL emitting the laser pulse. There is no limit to the value of the collection time, and the maximum value of the collection time is usually determined according to the performance of the module. In order to be able to measure the distance of the target object, at least ensure that the laser pulse can hit the target object and the module can receive the photons returned after hitting the target object.
S11:自VCSEL发射激光脉冲开始,获取采集时长内的实际数据;其中,实际数据为在存在目标物体的情况下,SPAD在采集时长内的各采集周期采集的光子的数量。S11: Acquire the actual data within the acquisition period since the VCSEL emits the laser pulse; where the actual data is the number of photons collected by the SPAD in each acquisition period within the acquisition period when the target object exists.
上述步骤中获取到了第一校准数据。为了对实际数据进行校准,必然要获取实际数据。实际数据是在存在目标物体的情况下,SPAD在各采集周期采集的光子的数量,同样地,对于各采集周期的值不作限定,优选的各采集周期采用相同的时长。为了使根据第一校准数据对实际数据进行校准的过程更加快速、方便,选取获取实际数据时的各采集周期与获取第一校准数据的各采集周期相同。The first calibration data is obtained in the above steps. In order to calibrate against actual data, it is necessary to acquire actual data. The actual data is the number of photons collected by the SPAD in each acquisition period when there is a target object. Similarly, there is no limitation on the value of each acquisition period, and preferably each acquisition period adopts the same duration. In order to make the process of calibrating the actual data according to the first calibration data faster and more convenient, each acquisition period when acquiring the actual data is selected to be the same as each acquisition period for acquiring the first calibration data.
S12:获取各采集周期内的实际数据与第一校准数据的第一差值,并将第一差值作为校准后的数据。S12: Obtain a first difference between the actual data and the first calibration data in each acquisition period, and use the first difference as calibrated data.
S13:根据校准后的数据确定飞行时间模组与目标物体之间的距离。S13: Determine the distance between the time-of-flight module and the target object according to the calibrated data.
在获取到第一校准数据以及实际数据之后,分别获取各采集周期的实际数据与第一校准数据的第一差值,第一差值即为根据第一校准数据对实际数据校准得到的校准后的数据。在根据校准后的数据确定飞行时间模组与目标物体之间的距离时,选取校准后的数据中光子数量最多时对应的时间,将这个时间作为飞行时间,从而根据公式(1)计算出飞行时间模组与目标物体之间的距离,完成激光测距误差校正,得到较准确的激光测距结果。After the first calibration data and the actual data are obtained, the first difference between the actual data and the first calibration data of each acquisition cycle is respectively obtained, and the first difference is the calibrated value obtained by calibrating the actual data according to the first calibration data. The data. When determining the distance between the time-of-flight module and the target object according to the calibrated data, select the time corresponding to the maximum number of photons in the calibrated data, and use this time as the flight time, so as to calculate the flight time according to the formula (1). The distance between the time module and the target object is completed, and the laser ranging error correction is completed to obtain more accurate laser ranging results.
本实施例所提供的激光测距的方法,包括:自VCSEL发射激光脉冲开始,获取采集时长内的第一校准数据;其中,第一校准数据为在不存在目标物体的情况下,SPAD在采集时长内的各采集周期采集的光子的数量;采集周期小于采集时长;自VCSEL发射激光脉冲开始,获取采集时长内的实际数据;其中,实际数据为在存在目标物体的情况下,SPAD在采集时长内的各周期采集的光子的数量;获取各采集周期内的实际数据与对应的第一校准数据的第一差值,并将第一差值作为校准后的数据;根据校准后的数据确定飞行时间模组与目标物体之间的距离。该方法中,用实际数据减去校准数据,使得近端光子的数量小于SPAD在检测到目标物体返回的光子的数量,尽可能地避免因近端串扰导致检测到的光子的数量高于目标物体返回的光子的数量,进而导致在进行距离计算时造成的误判的情况的发生,提高激光测距的准确性。The method for laser ranging provided in this embodiment includes: starting from the VCSEL to emit laser pulses, and obtaining the first calibration data within the acquisition time; wherein, the first calibration data is when there is no target object, the SPAD is collecting The number of photons collected in each acquisition period within the duration; the acquisition period is less than the acquisition duration; since the VCSEL emits laser pulses, the actual data within the acquisition duration is obtained; where the actual data is the SPAD during the acquisition duration when there is a target object The number of photons collected in each period in each acquisition period; obtain the first difference between the actual data in each acquisition period and the corresponding first calibration data, and use the first difference as the calibrated data; determine the flight according to the calibrated data The distance between the time module and the target object. In this method, the calibration data is subtracted from the actual data, so that the number of near-end photons is less than the number of photons returned by the SPAD when the target object is detected, and the number of detected photons is higher than the target object due to near-end crosstalk as much as possible. The number of returned photons will lead to the occurrence of misjudgment during distance calculation, improving the accuracy of laser ranging.
实际中,由于光子在传播过程中,远端光子数量会逐渐减少,并且,本申请解决的是近端串扰造成的光子数量高于目标物体返回的光子数量,因此,为了能够较快速地得到第一校准数据,优选的实施方式是,获取采集时长内的第一校准数据包括:In practice, the number of far-end photons will gradually decrease during the propagation of photons, and this application solves the problem that the number of photons caused by near-end crosstalk is higher than the number of photons returned by the target object. Therefore, in order to obtain the first One calibration data, in a preferred embodiment, obtaining the first calibration data within the collection time includes:
自VCSEL发射激光脉冲开始,获取预设时长内的第一校准数据;其中,预设时长小于采集时长,且采集周期小于预设时长。The first calibration data within a preset time period is acquired since the VCSEL emits a laser pulse; wherein, the preset time period is shorter than the collection time period, and the collection period is shorter than the preset time period.
预设时长根据SPAD与激光脉冲穿过的镜头之间的距离确定,且预设时长与SPAD到镜头的距离呈正相关。对于预设时长的值不作限定,预设时长不需要设置很大,例如设为以光子在SPAD到镜头之间来回飞行五次的时长即可。The preset duration is determined according to the distance between the SPAD and the lens through which the laser pulse passes, and the preset duration is positively correlated with the distance from the SPAD to the lens. There is no limitation on the value of the preset duration, and the preset duration does not need to be set to be very large, for example, it may be set as the duration that photons fly back and forth between the SPAD and the lens five times.
本实施例所提供的自发射激光脉冲开始,仅获取预设时长内的光子数量作为第一校准数据,由于光子在传播过程中,远端的光子数量会逐渐减少,因此若采集超过预设时长的光子数量则没有太大的意义;此外,相比于获取整个采集时长的光子的数量,由于预设时长小于采集时长,因此采集预设时长的光子的数量更快速,并且在获取实际数据与第一校准数据的差值能够减少计算量,提高对测距校准的效率。The self-emission laser pulse provided in this embodiment only acquires the number of photons within the preset time length as the first calibration data. Since the number of photons at the far end will gradually decrease during the propagation of photons, if the collection exceeds the preset time length In addition, compared with the number of photons acquired for the entire acquisition time, since the preset time is shorter than the acquisition time, the number of photons collected for the preset time is faster, and the actual data and The difference of the first calibration data can reduce the amount of calculation and improve the efficiency of distance measurement calibration.
在上述实施例的采集预设时长内的光子的数量作为第一校准数据的基础上,为了对目标物体进行测距,优选的实施方式是,实际数据包含预设时长内的第一实际数据以及剩余时长内的第二实际数据,剩余时长为采集时长内除预设时长外的时长;根据校准后的数据确定飞行时间模组与目标物体之间的距离包括:On the basis of collecting the number of photons within the preset time length in the above embodiment as the first calibration data, in order to measure the distance of the target object, the preferred implementation mode is that the actual data includes the first actual data within the preset time length and The second actual data within the remaining duration, the remaining duration is the duration of the acquisition duration except the preset duration; determining the distance between the time-of-flight module and the target object according to the calibrated data includes:
获取各采集周期内的第一实际数据与对应地第一校准数据的第二差值,并将第二差值作为预设时长内的第一校准后的数据;Acquiring a second difference between the first actual data and the corresponding first calibration data in each acquisition cycle, and using the second difference as the first calibrated data within a preset time length;
从第一校准后的数据与第二实际数据中选取光子数量最多时对应的第一时刻;Selecting the first moment corresponding to the maximum number of photons from the first calibrated data and the second actual data;
获取光速与第一时刻的第一乘积结果;Obtain the result of the first product of the speed of light and the first moment;
将第一乘积结果的一半作为飞行时间模组与目标物体之间的距离。Take half of the result of the first product as the distance between the time-of-flight module and the target object.
以预设时长为100ps,对图3的近端串扰导致的测距误差进行校正,图3中采集周期为1ps,采集时长为400ps。具体的校正过程如下:The ranging error caused by the near-end crosstalk in Figure 3 is corrected with the preset time length of 100 ps. In Figure 3, the acquisition period is 1 ps and the acquisition time is 400 ps. The specific calibration process is as follows:
1、出厂前对测距装置做校准,在模组和镜头等部件组装完毕时进行校准1. Calibrate the distance measuring device before leaving the factory, and calibrate when the components such as the module and the lens are assembled
2、校准步骤:2. Calibration steps:
2.1、将模组朝向空旷区域(此时没有被测物体)。2.1. Turn the module towards an open area (there is no object to be measured at this time).
2.2、记录前100ps的数据,一共100个数据,这里用C1至C100表示。2.2. Record the data of the first 100ps, a total of 100 data, represented by C1 to C100 here.
2.3、C1至C100作为第一校准数据(可以理解为出厂校准数据),记录在只读存储器(Read only Memory,ROM)中。2.3. C1 to C100 are recorded in a read only memory (ROM) as the first calibration data (which can be understood as factory calibration data).
2.4、出厂后,测距装置用于测距时,从ROM中读取校准数据。2.4. After leaving the factory, when the distance measuring device is used for distance measurement, it reads the calibration data from the ROM.
2.5、实际使用时采集的前100ps的第一实际数据X1...X100减去第一校准数据C1...C100得到100ps内的第一校准后的数据Y,即Y=X–C,然后用Y数据来计算距离。2.5. Subtract the first calibration data C1...C100 from the first actual data X1...X100 collected in the first 100 ps during actual use to obtain the first calibrated data Y within 100 ps, that is, Y=X–C, and then Use the Y data to calculate the distance.
2.6、Y数据(100ps以内),和100ps至400ps内的X数据要拼在一起,计算距离,拼接后的数据直方图如图5所示,图5为本申请实施例一种校正后的dToF直接测量飞行时间直方图。2.6. The Y data (within 100 ps) and the X data within 100 ps to 400 ps must be stitched together to calculate the distance. The histogram of the spliced data is shown in Figure 5, and Figure 5 is a corrected dToF of the embodiment of the present application Direct measurement of time-of-flight histograms.
2.7、减去第一校准数据的目的是:尽可能实现,让Y的最大值远小于被测物体的波峰值。2.7. The purpose of subtracting the first calibration data is to make the maximum value of Y much smaller than the peak value of the measured object as far as possible.
2.8、如果Y有些值减到负数,当0处理;2.8. If some values of Y are reduced to negative numbers, treat them as 0;
3、结合图5,校正后,前100ps的信号明显减弱,这时使用Counts数最大的波峰(t=150ps)来计算距离,会得到一个正确的距离:3. Combined with Figure 5, after correction, the signal in the first 100ps is obviously weakened. At this time, use the peak with the largest Counts (t=150ps) to calculate the distance, and a correct distance will be obtained:
当t=150ps时,d=c*t/2=3*108(m/s)*150*10-12(s)/2=22.5mm。When t=150ps, d=c*t/2=3*108(m/s)*150*10-12(s)/2=22.5mm.
本实施例所提供的根据出厂前预设时长的第一校准数据实现了对实际数据的校准,提高了激光测距的准确性。The first calibration data provided in this embodiment according to the preset duration before leaving the factory realizes the calibration of actual data and improves the accuracy of laser ranging.
上文中是在出厂前对激光测距进行校准,但是在实际使用时使用环境和出厂校准的环境光强度等因素不同,上文中得到的第一校准数据不能完全有效地抵消近端串扰等噪声,并且镜头上可能存在指纹、油污等,导致镜头的反光率发生变化,原有的第一校准数据不再适用。因此,为了解决不同环境光(包括油污)等干扰因素,需要在实际使用时对第一校准数据进行再次校准。在进行再次校准时,优选的实施方式是,在获取采集时长内的实际数据之后,激光测距的方法还包括:In the above, the laser ranging is calibrated before leaving the factory, but the actual use environment is different from the factory-calibrated ambient light intensity and other factors. The first calibration data obtained above cannot completely and effectively offset noise such as near-end crosstalk. In addition, there may be fingerprints, oil stains, etc. on the lens, resulting in changes in the reflectivity of the lens, and the original first calibration data is no longer applicable. Therefore, in order to solve interference factors such as different ambient lights (including oil pollution), it is necessary to recalibrate the first calibration data during actual use. When recalibrating, a preferred implementation is that, after acquiring the actual data within the acquisition period, the method for laser ranging also includes:
根据实际数据确定光子数量最多时对应的第二时刻;Determining the second moment corresponding to when the number of photons is the largest according to the actual data;
判断第二时刻是否在剩余时长内;Determine whether the second moment is within the remaining duration;
若是,则获取各采集周期内的第一实际数据与对应的第一校准数据的第一比值;If yes, then acquire the first ratio of the first actual data and the corresponding first calibration data in each acquisition cycle;
获取各第一比值与对应的第一校准数据的乘积,并将各乘积作为第二校准数据;Obtain the product of each first ratio and the corresponding first calibration data, and use each product as the second calibration data;
获取各采集周期内的第一实际数据与对应地第二校准数据的第三差值,并将第三差值作为预设时长内的第二校准后的数据;Acquiring a third difference between the first actual data and the corresponding second calibration data in each collection period, and using the third difference as the second calibrated data within the preset time length;
从第二校准后的数据与第二实际数据中选取光子数量最多时对应的第三时刻;Selecting the third moment corresponding to the maximum number of photons from the second calibrated data and the second actual data;
在第二时刻与第三时刻为同一时刻的情况下,获取光速与第二时刻或第三时刻的第二乘积结果;In the case that the second moment and the third moment are the same moment, obtain the second product result of the speed of light and the second moment or the third moment;
将第二乘积结果的一半作为飞行时间模组与目标物体之间的距离。Take half of the result of the second product as the distance between the time-of-flight module and the target object.
当环境光特别强,或模组发生碰撞导致结构轻微改变,造成串扰信号增强,实际数据X可能会很大,出厂时无法预测到,所以需要自动调整校准参数。具体地,根据实际数据确定光子数量最多时对应的第二时刻;如果第二时刻是否在剩余时长内,表示被测物体离测距装置较远,这时认为预设时长内采集到的光子不是被测物体返回的,而是近端串扰、玻璃镜头、油污、环境光等干扰因素产生的光子,是噪声。如图5中的波峰出现在100ps以外时,认为100ps内采集到的光子不是被测物体返回的,而是噪声返回的,才计算第二校准数据W1至W100。When the ambient light is particularly strong, or the structure of the module is slightly changed due to a collision, the crosstalk signal is enhanced, and the actual data X may be very large, which cannot be predicted at the factory, so the calibration parameters need to be adjusted automatically. Specifically, the second moment corresponding to the maximum number of photons is determined according to the actual data; if the second moment is within the remaining duration, it means that the measured object is far away from the distance measuring device, and it is considered that the photons collected within the preset duration are not What is returned by the measured object is the photons generated by interference factors such as near-end crosstalk, glass lens, oil pollution, and ambient light, which is noise. As shown in Figure 5, when the peak appears outside 100 ps, it is considered that the photons collected within 100 ps are not returned by the measured object, but returned by noise, and then the second calibration data W1 to W100 are calculated.
计算第一比值R的过程如公式(2)所示:The process of calculating the first ratio R is shown in formula (2):
Ri=Xi/Ci (2)Ri=Xi/Ci (2)
根据第一比值R计算第二校准数据W的过程如公式(3)所示:The process of calculating the second calibration data W according to the first ratio R is shown in formula (3):
Wi=Ci*Ri (3)Wi=Ci*Ri (3)
根据预设时长的第二校准数据W和第一实际数据计算出第二校准后的数据Y’,计算过程如公式(4)所示:Calculate the second calibrated data Y' according to the second calibration data W of the preset duration and the first actual data, and the calculation process is shown in formula (4):
Yi’=Xi-Wi (4)Yi'=Xi-Wi (4)
以预设时长为100ps为例,通过公式(2)计算出R1至R100,通过公式(3)计算出第二校准数据W1至W100,通过公式(4)计算出Y1’至Y100’;从Y1’至Y100’和X101至X400中选取光子数量最多时对应的第三时刻,在第三时刻与之前的第二时刻为同一时刻的情况下,将第二时刻或第三时刻代入公式(1)计算出飞行时间模组与目标物体之间的距离,完成激光测距误差校正,得到较准确的激光测距结果。Taking the preset time length of 100ps as an example, calculate R1 to R100 through formula (2), calculate the second calibration data W1 to W100 through formula (3), and calculate Y1' to Y100' through formula (4); from Y1 From 'to Y100' and X101 to X400, select the third moment corresponding to the time when the number of photons is the largest, and when the third moment is the same as the previous second moment, substitute the second moment or the third moment into the formula (1) Calculate the distance between the time-of-flight module and the target object, complete the laser ranging error correction, and obtain more accurate laser ranging results.
本实施例所提供的方法中,在出厂前校准的基础上,在实际使用时进行再次校准,使得尽可能地减少环境光(包括油污)等对测距精确度的影响。In the method provided in this embodiment, on the basis of calibration before leaving the factory, calibration is performed again during actual use, so as to minimize the impact of ambient light (including oil pollution) on the ranging accuracy.
上述实施例是对预设时长内的第一校准数据进行再次校准,实际中,为了提高激光测距的效率,优选的实施方式是,在确定出第二时刻在剩余时长内之后,获取各采集周期内的第一实际数据与对应的第一校准数据的第一比值之前,激光测距的方法还包括:The above-mentioned embodiment is to recalibrate the first calibration data within the preset time length. In practice, in order to improve the efficiency of laser ranging, the preferred implementation mode is to obtain each collected data after it is determined that the second moment is within the remaining time length. Before the first ratio of the first actual data in the period to the corresponding first calibration data, the method for laser ranging further includes:
从第一实际数据中获取第一最大的光子数量以及从第一校准数据中获取第二最大的光子数量;obtaining a first maximum number of photons from the first actual data and a second maximum number of photons from the first calibration data;
获取第一最大的光子数量与第二最大的光子数量的第二比值;obtaining a second ratio of the first largest number of photons to the second largest number of photons;
若第二比值大于或等于阈值,则进入获取各采集周期内的第一实际数据与对应的第一校准数据的第一比值的步骤。If the second ratio is greater than or equal to the threshold, enter the step of obtaining the first ratio of the first actual data and the corresponding first calibration data in each acquisition period.
在第一实际数据X1至X100中,记录最大的Counts数N1,在第一校准数据C1至C100中最大值作为N2,当N1与N2的比值大于或等于阈值,即说明使用时的环境与出厂前的校准光环境存在较大的差异,故而需要对第一校准数据进行再次校准得到第二校准数据。通常阈值选择1.2,即第二比值大于或等于1.2才进行第二次校准。In the first actual data X1 to X100, record the maximum number of Counts N1, and in the first calibration data C1 to C100, the maximum value is taken as N2. When the ratio of N1 to N2 is greater than or equal to the threshold value, it means that the environment during use is different from the factory There is a large difference in the previous calibration light environment, so the first calibration data needs to be calibrated again to obtain the second calibration data. Usually, the threshold value is 1.2, that is, the second calibration is performed only when the second ratio is greater than or equal to 1.2.
本实施例所提供的在第二比值大于或等于阈值的情况下,才进行第二次校准,相比于在使用时直接进行第二次校准的方式,如使用时的光环境与出厂前的校准光环境相差不大,说明第一校准数据可以使用,若对第一校准数据再次校准,则会导致测距的效率降低。In this embodiment, the second calibration is performed only when the second ratio is greater than or equal to the threshold value. Compared with the method of directly performing the second calibration during use, such as the light environment during use is different from that before leaving the factory. The calibration light environment is not much different, which means that the first calibration data can be used. If the first calibration data is recalibrated, the efficiency of distance measurement will be reduced.
在实施中,为了方便用户了解到发射的激光脉冲是否碰到目标物体以及方便找到飞行时间,优选的实施方式是,激光测距的方法还包括:In implementation, in order to facilitate the user to know whether the emitted laser pulse hits the target object and to find the time of flight, the preferred embodiment is that the method of laser ranging also includes:
在VCSEL发射激光脉冲碰到目标物体的情况下,输出用于表征碰到目标物体的提示信息和/或记录碰到目标物体对应的时刻。When the VCSEL emits a laser pulse that collides with the target object, it outputs prompt information for representing the colliding with the target object and/or records the corresponding moment of colliding with the target object.
对于提示信息的方式、提示信息的内容等不作限定,只要能够提示用户发射的激光脉冲碰到目标物体即可。除了输出提示信息,还可以记录记录碰到目标物体的时刻,根据实际的记录的时刻可以估算出飞行时间模组与目标物体之间的距离,可以将估算出的距离与通过本申请计算出的距离进行比较,以分析本申请测距的准确性。There are no limitations on the manner and content of the prompt information, as long as the user can be prompted that the emitted laser pulse hits the target object. In addition to outputting prompt information, it is also possible to record the time when the target object is encountered. According to the actual recorded time, the distance between the time-of-flight module and the target object can be estimated, and the estimated distance can be compared with the one calculated by this application. The distance is compared to analyze the accuracy of the distance measurement of this application.
在上述实施例中,对于激光测距的方法进行了详细描述,本申请还提供激光测距的装置对应的实施例。需要说明的是,本申请从两个角度对装置部分的实施例进行描述,一种是基于功能模块的角度,另一种是基于硬件的角度。In the foregoing embodiments, the laser ranging method is described in detail, and the present application also provides corresponding embodiments of the laser ranging device. It should be noted that this application describes the embodiments of the device part from two perspectives, one is based on the perspective of functional modules, and the other is based on the perspective of hardware.
图6为本申请的一实施例提供的一种激光测距的装置的结构图。本实施例基于功能模块的角度,包括:FIG. 6 is a structural diagram of a laser ranging device provided by an embodiment of the present application. This embodiment is based on the perspective of functional modules, including:
第一获取模块10,用于自VCSEL发射激光脉冲开始,获取采集时长内的第一校准数据;其中,第一校准数据为在不存在目标物体的情况下,SPAD在采集时长内的各采集周期采集的光子的数量;采集周期小于采集时长;The
第二获取模块11,用于自VCSEL发射激光脉冲开始,获取采集时长内的实际数据;其中,实际数据为在存在目标物体的情况下,SPAD在采集时长内的各采集周期采集的光子的数量;The
第三获取模块12,用于获取各采集周期内的实际数据与对应的第一校准数据的第一差值,并将第一差值作为校准后的数据;The
确定模块13,用于根据校准后的数据确定飞行时间模组与目标物体之间的距离。The determining
由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。Since the embodiment of the device part corresponds to the embodiment of the method part, please refer to the description of the embodiment of the method part for the embodiment of the device part, and details will not be repeated here.
本实施例所提供的激光测距的装置中,自VCSEL发射激光脉冲开始,通过第一获取模块获取采集时长内的第一校准数据;其中,第一校准数据为在不存在目标物体的情况下,SPAD在采集时长内的各采集周期采集的光子的数量;采集周期小于采集时长;自VCSEL发射激光脉冲开始,通过第二获取模块获取采集时长内的实际数据;其中,实际数据为在存在目标物体的情况下,SPAD在采集时长内的各采集周期采集的光子的数量;通过第三获取模块获取各采集周期内的实际数据与对应的第一校准数据的第一差值,并将第一差值作为校准后的数据;通过确定模块根据校准后的数据确定飞行时间模组与目标物体之间的距离。该装置中,用实际数据减去校准数据,使得近端光子的数量小于SPAD在检测到目标物体返回的光子的数量,尽可能地避免因近端串扰导致检测到的光子的数量高于目标物体返回的光子的数量,进而导致在进行距离计算时造成的误判的情况的发生,提高激光测距的准确性。In the laser ranging device provided in this embodiment, since the VCSEL emits a laser pulse, the first calibration data within the acquisition time period is acquired by the first acquisition module; wherein, the first calibration data is when there is no target object , the number of photons collected by the SPAD in each acquisition period within the acquisition period; the acquisition period is less than the acquisition period; since the VCSEL emits laser pulses, the actual data in the acquisition period is acquired by the second acquisition module; wherein, the actual data is the existing target In the case of an object, the quantity of photons collected by the SPAD in each acquisition period within the acquisition duration; the first difference between the actual data in each acquisition period and the corresponding first calibration data is obtained by the third acquisition module, and the first The difference is used as calibrated data; the distance between the time-of-flight module and the target object is determined by the determining module according to the calibrated data. In this device, the calibration data is subtracted from the actual data, so that the number of near-end photons is less than the number of photons returned by the SPAD when the target object is detected, and the number of detected photons is higher than the target object due to near-end crosstalk as much as possible. The number of returned photons will lead to the occurrence of misjudgment during distance calculation, improving the accuracy of laser ranging.
图7为本申请另一实施例提供的激光测距的装置的结构图。本实施例基于硬件角度,如图7所示,激光测距的装置包括:FIG. 7 is a structural diagram of a laser ranging device provided in another embodiment of the present application. This embodiment is based on the hardware perspective, as shown in Figure 7, the device for laser ranging includes:
存储器20,用于存储计算机程序;
处理器21,用于执行计算机程序时实现如上述实施例中所提到的激光测距的方法的步骤。The processor 21 is configured to implement the steps of the laser ranging method mentioned in the above embodiment when executing the computer program.
本实施例提供的激光测距的装置可以包括但不限于智能手机、平板电脑、笔记本电脑或台式电脑等。The laser ranging device provided in this embodiment may include, but not limited to, a smart phone, a tablet computer, a notebook computer or a desktop computer, and the like.
其中,处理器21可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器21可以采用数字信号处理器(Digital Signal Processor,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器21也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称中央处理器(CentralProcessing Unit,CPU);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器21可以集成有图形处理器(Graphics Processing Unit,GPU),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器21还可以包括人工智能(Artificial Intelligence,AI)处理器,该AI处理器用于处理有关机器学习的计算操作。Wherein, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. Processor 21 can adopt at least one hardware form in Digital Signal Processor (Digital Signal Processor, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), Programmable Logic Array (Programmable LogicArray, PLA) accomplish. The processor 21 may also include a main processor and a coprocessor, the main processor is a processor for processing data in the wake-up state, and is also called a central processing unit (Central Processing Unit, CPU); Low-power processor for processing data in standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (Graphics Processing Unit, GPU), and the GPU is used for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, and the AI processor is used to process calculation operations related to machine learning.
存储器20可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器20还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器20至少用于存储以下计算机程序201,其中,该计算机程序被处理器21加载并执行之后,能够实现前述任一实施例公开的激光测距的方法的相关步骤。另外,存储器20所存储的资源还可以包括操作系统202和数据203等,存储方式可以是短暂存储或者永久存储。其中,操作系统202可以包括Windows、Unix、Linux等。数据203可以包括但不限于上述所提到的激光测距的方法所涉及到的数据等。
在一些实施例中,激光测距的装置还可包括有显示屏22、输入输出接口23、通信接口24、电源25以及通信总线26。In some embodiments, the laser ranging device may further include a display screen 22 , an input and output interface 23 , a communication interface 24 , a power supply 25 and a communication bus 26 .
本领域技术人员可以理解,图7中示出的结构并不构成对激光测距的装置的限定,可以包括比图示更多或更少的组件。Those skilled in the art can understand that the structure shown in FIG. 7 does not constitute a limitation on the laser distance measuring device, and may include more or less components than those shown in the illustration.
本申请实施例提供的激光测距的装置,包括存储器和处理器,处理器在执行存储器存储的程序时,能够实现如下方法:激光测距的方法,效果同上。The laser ranging device provided in the embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, the following method can be implemented: the laser ranging method has the same effect as above.
最后,本申请还提供一种计算机可读存储介质对应的实施例。计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述方法实施例中记载的步骤。Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps described in the foregoing method embodiments are implemented.
可以理解的是,如果上述实施例中的方法以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。It can be understood that if the methods in the above embodiments are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , executing all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .
本申请提供的计算机可读存储介质包括上述提到的激光测距的方法,效果同上。The computer-readable storage medium provided by the present application includes the above-mentioned laser ranging method, and the effect is the same as above.
以上对本申请所提供的一种激光测距的方法、装置及介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。A laser distance measuring method, device and medium provided in the present application have been introduced in detail above. Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related part, please refer to the description of the method part. It should be pointed out that those skilled in the art can make some improvements and modifications to the application without departing from the principles of the application, and these improvements and modifications also fall within the protection scope of the claims of the application.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or order between the operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211116928.7A CN115469320B (en) | 2022-09-14 | Laser ranging method, device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211116928.7A CN115469320B (en) | 2022-09-14 | Laser ranging method, device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115469320A true CN115469320A (en) | 2022-12-13 |
CN115469320B CN115469320B (en) | 2025-02-21 |
Family
ID=
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115754979A (en) * | 2023-01-05 | 2023-03-07 | 北京亮道智能汽车技术有限公司 | Laser radar control method and device, control chip and laser radar |
CN115876750A (en) * | 2023-02-14 | 2023-03-31 | 合肥金星智控科技股份有限公司 | LIBS detection system and spectrum quality online calibration method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200225333A1 (en) * | 2019-01-16 | 2020-07-16 | Ibeo Automotive Systems GmbH | Method and device for optical distance measurement |
CN112711010A (en) * | 2021-01-26 | 2021-04-27 | 上海思岚科技有限公司 | Laser ranging signal processing device, laser ranging equipment and corresponding method thereof |
CN113885033A (en) * | 2021-09-24 | 2022-01-04 | 上海灵昉科技有限公司 | Distance measuring method and device based on photon flight time |
CN114637019A (en) * | 2022-05-18 | 2022-06-17 | 杭州宇称电子技术有限公司 | Time segmentation self-adaptive counting quantization based ambient light resisting method |
CN115038989A (en) * | 2020-11-25 | 2022-09-09 | 深圳市速腾聚创科技有限公司 | Distance measuring method and apparatus, electronic device, and storage medium |
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200225333A1 (en) * | 2019-01-16 | 2020-07-16 | Ibeo Automotive Systems GmbH | Method and device for optical distance measurement |
CN115038989A (en) * | 2020-11-25 | 2022-09-09 | 深圳市速腾聚创科技有限公司 | Distance measuring method and apparatus, electronic device, and storage medium |
CN112711010A (en) * | 2021-01-26 | 2021-04-27 | 上海思岚科技有限公司 | Laser ranging signal processing device, laser ranging equipment and corresponding method thereof |
CN113885033A (en) * | 2021-09-24 | 2022-01-04 | 上海灵昉科技有限公司 | Distance measuring method and device based on photon flight time |
CN114637019A (en) * | 2022-05-18 | 2022-06-17 | 杭州宇称电子技术有限公司 | Time segmentation self-adaptive counting quantization based ambient light resisting method |
Non-Patent Citations (1)
Title |
---|
张弛 等: "基于单光子激光雷达远距离海上测距的实现", 《科学技术与工程》, vol. 20, no. 14, 31 December 2020 (2020-12-31), pages 5645 - 5649 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115754979A (en) * | 2023-01-05 | 2023-03-07 | 北京亮道智能汽车技术有限公司 | Laser radar control method and device, control chip and laser radar |
CN115754979B (en) * | 2023-01-05 | 2023-05-23 | 北京亮道智能汽车技术有限公司 | Laser radar control method and device, control chip and laser radar |
CN115876750A (en) * | 2023-02-14 | 2023-03-31 | 合肥金星智控科技股份有限公司 | LIBS detection system and spectrum quality online calibration method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109239724A (en) | Method for measuring the equipment of distance and for measuring the distance | |
CN112255636A (en) | Distance measuring method, system and equipment | |
JP2006322834A (en) | Distance measuring device and distance measuring method | |
US20230341529A1 (en) | Target detection method, lidar and storage medium | |
WO2022052606A1 (en) | Electronic device, control method for electronic device, and computer-readable storage medium | |
JP5218513B2 (en) | Displacement sensor | |
WO2022242348A1 (en) | Dtof depth image acquisition method and apparatus, electronic device, and medium | |
JPWO2021026241A5 (en) | ||
CN116804764B (en) | Laser radar ranging method and related equipment thereof | |
CN113631956B (en) | Flight time to distance calculator | |
CN111684304B (en) | Distance flight time module | |
CN112255635B (en) | Distance measurement method, system and equipment | |
CN115469320A (en) | Laser ranging method, device and medium | |
CN110095780B (en) | Anti-interference method and device based on TOF camera module | |
CN115469320B (en) | Laser ranging method, device and medium | |
CN113341427B (en) | Distance measurement method, device, electronic device and storage medium | |
CN117538884A (en) | A laser ranging method and system based on error compensation | |
CN113433563B (en) | Distance measuring method and distance measuring device | |
CN113296104B (en) | Efficient measurement method of SPAD type laser radar | |
CN116794669A (en) | Laser ranging method, device, controller and laser ranging sensor | |
JP7486843B2 (en) | Apparatus and method for generating test data for testing distance determination in optical time-of-flight measurements - Patents.com | |
JP2001074827A (en) | Range finder | |
CN109060313B (en) | Detection method and detection system of laser projector | |
CN116148812A (en) | Method, device and storage medium for improving laser ranging capability of radar system | |
CN112558097A (en) | Electronic device, control method of electronic device, and computer-readable storage medium |
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 | ||
GR01 | Patent grant |