Distance measurement method and electronic equipment
By controlling the photon storage mode and delay threshold, the problem of ranging for long-distance targets under strong ambient light is solved, and efficient and accurate ranging of long-distance targets in strong light environments is achieved, avoiding the increase of hardware costs.
Patent Information
- Application Number
- CN202011301737.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2040-11-19
AI Technical Summary
Under strong ambient light conditions, existing technologies have difficulty in effectively achieving ranging of long-distance targets, mainly due to the low probability of long-distance photon preservation caused by ambient light interference and the dead time of the photoelectric detection unit.
By obtaining the light intensity information of the ambient light and using the LIFO or FIFO mode or delay threshold to control the photon storage, the flight time of long-distance photons is saved first, preventing close-range photons from occupying memory space too early, and increasing the probability of saving long-distance photons.
Under strong ambient light conditions, the ranging performance of long-distance targets is improved, a more balanced dTOF histogram is generated, and the accuracy and efficiency of ranging are improved without increasing hardware costs.
Smart Images

Figure CN114518581B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to an electronic device for a distance measurement method. Background Art
[0002] With the advancement of technology, computer vision has been widely applied in daily life and across various industries, such as geographic mapping and imaging, remote sensing, autonomous vehicles, collaborative robotics, three-dimensional depth measurement, and consumer electronics. Radar is a key technology for implementing computer vision, including but not limited to lidar, millimeter-wave radar, and visible light radar. A 3D camera is an example of a radar system. This example system typically includes a laser transmitter, a receiver, a time-to-digital converter (TDC), and a control system.
[0003] 3D cameras can achieve ranging functions using direct time of flight (dTOF) technology. dTOF technology is a technology that uses the pulse flight time to measure distance. The following introduces the functions and applications of each device in the ranging system in conjunction with the ranging scenario. The laser transmitter generates a light pulse and transmits it into the environment. The light pulse is reflected by the target object in the environment and is received by the receiver. The receiver converts the received photons into electrical signals and provides them to the TDC. The TDC quantifies the delay of the returning photons based on the emission time of the reference pulse and then places it in a time grid of a given width. A direct time of flight (dTOF) histogram can be formed based on the data recorded in the time grid of the TDC. Under normal circumstances, the energy of the signal light pulse is concentrated and the waveform envelope is obvious. Therefore, the peak position in the dTOF histogram corresponds to the time of flight (TOF) of the signal light pulse. The distance of the target object can be calculated by TOF. See Figure 1 ,This figure shows a dTOF histogram in a weak ambient light scenario, where the signal light is obviously more prominent than the ambient light.
[0004] In practical applications, the detection of photons is usually interfered by two factors:
[0005] On the one hand, strong ambient light interferes with the detection of signal light. Figure 2 , This figure shows a dTOF histogram in a strong ambient light scene. The dotted box in the figure shows the signal light. Figure 2 It can be seen that the photon count of some ambient light exceeds the photon count of the signal light, making it difficult to identify the signal light simply by peak finding.
[0006] On the other hand, the photoelectric detection unit on the photoelectric sensor has a dead time. When the photoelectric detection unit successfully detects a photon, it will not be able to respond to subsequent photons within a fixed dead time. Figure 3 Before the dead time, the photodetection unit can detect photons normally, but photon detection is limited during the dead time. Furthermore, each photodetection unit is allocated memory space in the system memory. Once the ambient light is strong, the number of photons detected by the photodetection unit can easily reach the upper limit of its corresponding memory space, making it difficult to save the data of signal photons returned by distant targets to the corresponding memory space. As a result, the resulting histogram shows that the number of photons in the short-range interval is higher, while the number of photons in the long-range interval decreases as the flight time increases, hindering the detection of photons returning from distant distances in the scene.
[0007] Combined with the interference factors analyzed above, in the application field of dTOF technology, how to achieve long-distance target ranging that can withstand strong ambient light has become a technical problem that needs to be solved urgently in this field. Summary of the Invention
[0008] The present application provides a ranging method and electronic equipment to resist the interference of strong ambient light and achieve effective ranging of distant targets.
[0009] A first aspect of the present application provides a ranging method, the method comprising:
[0010] Periodically emit laser pulses toward the target object;
[0011] Acquiring light intensity information, where the light intensity information is used to represent the intensity of ambient light;
[0012] When the light intensity information satisfies a first condition, the probability of long-distance photon preservation is increased by performing a first preset operation; wherein the first condition includes that the light intensity of the ambient light exceeds a first light intensity threshold;
[0013] Generate a direct time-of-flight dTOF histogram based on the saved photons;
[0014] A peak search operation is performed according to the dTOF histogram to obtain the distance of the target object.
[0015] The ranging method provided in the first aspect of the present application controls the preservation of photons based on the intensity of the ambient light. When the ambient light intensity is strong, the probability of preserving long-distance photons is increased through a first preset operation, breaking the inherent implementation method of prioritizing the preservation of short-distance photons, thereby avoiding the problem that under strong ambient light conditions, the number of ambient light photons returned by short-range targets first accumulates to the storage limit of the memory space of the photoelectric detection unit, resulting in the inability to successfully preserve long-range photons. It can be seen that the ranging method provided in the first aspect can resist the interference of strong light environments during ranging, improve the probability of preserving photons returned by long-range targets, and then generate a dTOF histogram that is more balanced in the time dimension, thereby improving the ranging performance for long-range targets. In addition, when the ranging method of the first aspect is specifically implemented, the exposure time is short, the number of exposures is small, laser energy is not wasted, and the frame rate is high and the ranging time is short. In addition, the resistance effect to strong light environments is good, and no additional hardware cost is required.
[0016] In one possible implementation of the first aspect, light intensity information representing the intensity of the ambient light can be obtained based on prior information about the ambient light. The first light intensity threshold is a limit on the number of photons stored in the memory space allocated to a single photodetection unit. Acquiring the light intensity information may specifically include:
[0017] Turning off the laser emitter, detecting the ambient light of the scene where the target object is located, and obtaining the measured ambient light photon density of a single photoelectric detection unit;
[0018] Obtaining an expected value and a standard deviation of the number of photons detected by a single photodetection unit within a pulse period according to the measured ambient light photon density and the pulse period;
[0019] The maximum number of photons detected by a single photoelectric detection unit within a pulse period is obtained as the light intensity information according to the expected value, the preset coefficient and the standard deviation.
[0020] When the laser emitter is turned off, the ambient light prior information is obtained by obtaining the measured ambient light photon density of a single photodetection unit, and the maximum number of photons is obtained in the above manner. It can be understood that the stronger the ambient light intensity, the greater the maximum number of photons, and the weaker the ambient light intensity, the smaller the maximum number of photons. Therefore, the maximum number of photons can be used to characterize the intensity of the ambient light, and thus can be used as light intensity information to determine whether the first condition is met. This method can be used to select a specific photon storage mode, that is, to select FIFO mode or LIFO mode, through the light intensity information obtained in advance. Subsequent storage is performed according to the selected photon storage mode.
[0021] For example, when the light intensity information meets the first condition, it indicates that the ambient light intensity is too strong and the preservation of ambient light photons needs to be restricted. Therefore, the probability of long-distance photon preservation is increased by performing the first preset operation, which may specifically include:
[0022] The flight times of the photons detected by the photodetection unit are saved first in the memory space corresponding to that photodetection unit. In other words, the LIFO mode is selected to prioritize the flight times of distant photons, thus preventing the memory from reaching its storage limit prematurely due to the early saving of nearby photons. This increases the probability of saving distant photons and improves the detection performance of distant targets.
[0023] As mentioned above, when the light intensity information meets the first condition, it indicates that the ambient light intensity is too strong, and it is necessary to intervene by saving photons in LIFO mode to increase the probability of saving long-distance photons. In addition, when the light intensity information does not meet the first condition, the following operations can be further performed:
[0024] When the light intensity information meets the second condition, the flight time of each of the several photons detected later by the photoelectric detection unit is preferentially saved in the memory space corresponding to the photoelectric detection unit, or the flight time of each of the several photons detected first by the photoelectric detection unit is preferentially saved in the memory space corresponding to the photoelectric detection unit; the second condition includes that the light intensity of the ambient light does not exceed the second light intensity threshold; the second light intensity threshold is less than or equal to the first light intensity threshold.
[0025] When the light intensity information meets the second condition, it indicates that the photodetection unit is sufficient to store both ambient light photons and signal light photons. The number of ambient light photons does not interfere with or hinder the storage of signal light photons. Therefore, either LIFO or FIFO mode can be selected to store the photon flight time. To further reduce power consumption, FIFO mode can be preferred as the photon storage mode when the light intensity information meets the second condition.
[0026] Through the above scheme, a photon preservation mode is selected based on light intensity information, the first condition, and the second condition. This prioritizes storing the flight times of several photons detected later or earlier. This increases the probability of preserving long-range photons. Ultimately, even with a slight decrease in detection performance for close-range photons, detection requirements can still be met. Crucially, this method effectively improves long-range photon detection performance, facilitating accurate ranging of distant targets even in strong ambient light conditions.
[0027] In another possible implementation of the first aspect, a delay threshold for delaying photon preservation can be obtained based on prior information about ambient light. During actual photon detection and preservation, this delay threshold is used as a constraint to constrain the preservation of the photon's flight time. The following describes another implementation of the first preset operation to increase the probability of long-distance photon preservation, namely, the application of the delay threshold.
[0028] Obtaining a delay threshold for photon storage; the delay threshold is used to provide a delay for photon storage so that the difference between the arrival times of two photons whose flight times are continuously stored in the memory space corresponding to the photoelectric detection unit is greater than the dead time of the photoelectric detection unit; the arrival time of the photon is the time when the photoelectric detection unit detects the photon;
[0029] For the photons continuously detected by the photoelectric detection unit within the pulse period, determine whether the difference between the arrival time of the current photon and the previous photon whose flight time was successfully saved is greater than the delay threshold. If so, save the flight time of the current photon to the memory space corresponding to the photoelectric detection unit.
[0030] In this implementation of the first aspect, a delay threshold is used to thin out the stored photons in the temporal dimension. Under strong ambient light conditions, the constraints on the storage of ambient light photons are much stronger than those on the storage of signal light photons. This prevents the number of stored ambient light photons from prematurely reaching the upper limit of the storage space, thus preventing interference with the preservation of the flight time of long-distance signal light photons. This increases the probability of long-distance photon storage, improves detection performance of long-distance targets, and enables precise ranging of these targets.
[0031] In this implementation, since there is no distortion or the distortion is very small in the histogram, no additional filtering operation is required, thus saving hardware costs.
[0032] Optionally, obtaining a delay threshold for photon preservation based on prior information of ambient light may include:
[0033] Turning off the laser emitter, detecting the ambient light of the scene where the target object is located, and obtaining the measured ambient light photon density of a single photoelectric detection unit;
[0034] Obtaining an expected value and a standard deviation of the number of photons detected by a single photodetection unit within a pulse period based on the measured ambient light photon density and the pulse period; and obtaining a theoretical value of the photon density detected by a single photodetection unit within a pulse period based on the measured ambient light photon density and the dead time of the single photodetection unit;
[0035] Obtaining the maximum number of photons detected by a single photoelectric detection unit within a pulse period according to the expected value, the preset coefficient and the standard deviation;
[0036] The delay threshold is obtained according to the pulse period, the maximum value of the number of photons and the theoretical value of the photon density.
[0037] By deriving the delay threshold based on prior information about ambient light obtained when the laser transmitter is turned off, the set delay threshold can be more accurately tailored to the actual ambient light conditions. This allows for more precise and accurate constraints on photon preservation, preventing problems such as excessively long delay thresholds and strong constraints that could affect ranging. It also avoids problems such as excessively short delay thresholds and weak constraints that lead to a subtle improvement in the probability of long-distance photon preservation and suboptimal ranging performance.
[0038] In a possible implementation, the delay threshold can be obtained by the following formula:
[0039]
[0040] Among them, the N det It represents the maximum number of photons detected by a single photodetection unit. p represents the pulse period, the τ delay represents the time delay threshold, and λ represents the theoretical value of the photon density detected by a single photoelectric detection unit within a pulse period.
[0041] The aforementioned light intensity information can be obtained from data collected by the photoelectric detection unit used to detect photons during ranging, or from data collected by other sensors. For example, an RGB camera can be used to obtain ambient light illumination, and then light intensity information can be derived based on the ambient light illumination. When using a photoelectric detection unit to obtain light intensity information, no additional hardware is required, thus reducing the implementation cost of obtaining light intensity information. This makes interaction between devices and components more convenient.
[0042] When detecting photons, the photodetection unit can operate in free-trigger mode. Compared to active circuit quenching during the pulse period, free-trigger mode effectively reduces distortion at short flight times in the resulting histogram, thereby reducing interference with peak detection and improving ranging accuracy for distant targets.
[0043] In the ranging method provided in the first aspect, in some implementations, a histogram is directly formed based on the stored photons, and distortion may still exist in the histogram. In order to further improve the accuracy and precision of the ranging, after the direct time-of-flight dTOF histogram is generated, filtering may be performed based on the dTOF histogram to obtain a filtered dTOF histogram;
[0044] The step of finding a peak according to the dTOF histogram to obtain the distance of the target object specifically includes:
[0045] The peak is found according to the filtered dTOF histogram to obtain the direct flight time corresponding to the peak; and the distance of the target object is obtained according to the direct flight time corresponding to the peak and the speed of light.
[0046] By filtering the histogram, the accuracy and precision of peak finding are improved, thereby improving the accuracy and precision of target ranging. On the basis of increasing the probability of saving long-distance photons through the first preset operation, the detection performance of long-distance targets is further guaranteed.
[0047] In a second aspect of the present application, an electronic device is provided, which can achieve long-distance target ranging under strong ambient light conditions.
[0048] The electronic device includes: a laser emitter, a controller, a photoelectric sensor, a time-to-digital converter (TDC), and a memory; the photoelectric sensor includes a plurality of photoelectric detection units, each photoelectric detection unit having a corresponding memory space in the memory; the laser emitter, the TDC, and the memory are all connected to the controller; the photoelectric sensor is connected to the TDC;
[0049] The controller is used to control the laser emitter to periodically emit laser pulses toward the target object;
[0050] The photoelectric detection unit is used to detect photons; the photons come from the scene where the target object is located;
[0051] The TDC is used to record the flight time of photons detected by the photodetection unit; for the photodetection unit, the flight time of long-distance photons is greater than the flight time of short-distance photons;
[0052] The controller is further configured to obtain light intensity information; when the light intensity information satisfies a first condition, increase the probability of long-distance photon preservation by executing a first preset operation; generate a direct time-of-flight (dTOF) histogram based on the preserved photons; and perform a peak search operation based on the dTOF histogram to obtain the distance of the target object; the light intensity information is used to represent the intensity of ambient light, and the first condition includes the intensity of the ambient light exceeding a first light intensity threshold;
[0053] The memory is used to store the flight time of photons according to the control of the controller.
[0054] The electronic device provided in the second aspect of the present application controls the preservation of photons based on the intensity of the ambient light. When the ambient light intensity is strong, the probability of preserving long-distance photons is increased through a first preset operation, breaking the inherent implementation method of prioritizing the preservation of short-distance photons, thereby avoiding the problem that under strong ambient light conditions, the number of ambient light photons returned by short-range targets first accumulates to the storage limit of the memory space of the photoelectric detection unit, resulting in the inability to successfully preserve long-range photons. It can be seen that the ranging method provided in the first aspect can resist the interference of strong light environments during ranging, improve the probability of preserving photons returned by long-range targets, and then generate a dTOF histogram that is more balanced in the time dimension, thereby improving the ranging performance for long-range targets. And when the electronic device of the second aspect is specifically implemented, the exposure time is short, the number of exposures is small, laser energy is not wasted, and the frame rate is high and the ranging time is short. In addition, the resistance effect to strong light environments is good, and no additional hardware cost is required.
[0055] In a possible implementation of the second aspect, light intensity information representing the intensity of the ambient light can be obtained based on prior information about the ambient light. The first light intensity threshold is a limit value of the number of photons stored in the memory space allocated to a single photodetection unit;
[0056] The controller is specifically used to control the shutdown of the laser emitter, detect the ambient light of the scene where the target object is located through the photoelectric sensor, and obtain the measured ambient light photon density of a single photoelectric detection unit; obtain the expected value and standard deviation of the number of photons detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the pulse period; and obtain the maximum value of the number of photons detected by the single photoelectric detection unit within the pulse period as the light intensity information based on the expected value, the preset coefficient and the standard deviation.
[0057] When the laser emitter is turned off, the ambient light prior information is obtained by obtaining the measured ambient light photon density of a single photodetection unit, and the maximum number of photons is obtained in the above manner. It can be understood that the stronger the ambient light intensity, the greater the maximum number of photons, and the weaker the ambient light intensity, the smaller the maximum number of photons. Therefore, the maximum number of photons can be used to characterize the intensity of the ambient light, and thus can be used as light intensity information to determine whether the first condition is met. The electronic device can use the pre-acquired light intensity information to select a specific photon storage mode, that is, to select FIFO mode or LIFO mode. Subsequent storage is performed according to the selected photon storage mode.
[0058] For example, when the light intensity information meets the first condition, it indicates that the ambient light intensity is too strong and the storage of ambient light photons needs to be restricted. The controller is specifically configured to control the memory to preferentially store the flight times of the respective photons detected by the photodetection unit in the memory space corresponding to the photodetection unit.
[0059] The flight times of the photons detected by the photodetection unit are saved first in the memory space corresponding to that photodetection unit. In other words, the LIFO mode is selected to prioritize the flight times of distant photons, thus preventing the memory from reaching its storage limit prematurely due to the early saving of nearby photons. This increases the probability of saving distant photons and improves the detection performance of distant targets.
[0060] As mentioned above, when the light intensity information meets the first condition, it indicates that the ambient light intensity is too strong, and it is necessary to save the photons in LIFO mode for intervention to increase the probability of saving long-distance photons. In addition, when the light intensity information does not meet the first condition, the controller can also be used to preferentially save the flight time of several photons detected later by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit, or preferentially save the flight time of several photons detected earlier by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit when the light intensity information meets the second condition; the second condition includes that the ambient light intensity does not exceed the second light intensity threshold; the second light intensity threshold is less than or equal to the first light intensity threshold.
[0061] When the light intensity information meets the second condition, it indicates that the photodetection unit is sufficient to store both ambient light photons and signal light photons. The number of ambient light photons does not interfere with or hinder the storage of signal light photons. Therefore, either LIFO or FIFO mode can be selected to store the photon flight time. To further reduce power consumption, FIFO mode can be preferred as the photon storage mode when the light intensity information meets the second condition.
[0062] Through the above scheme, a photon storage mode is selected based on light intensity information, the first condition, and the second condition. This prioritizes storing the flight times of several photons detected later or earlier. This increases the probability of preserving long-range photons. Ultimately, even with a slight decrease in detection performance for close-range photons, detection requirements can still be met. Crucially, this electronic device effectively improves long-range photon detection performance, facilitating accurate ranging of distant targets even in strong ambient light conditions.
[0063] In another possible implementation of the second aspect, a delay threshold for delaying photon preservation can be obtained based on prior information about ambient light. During actual photon detection and preservation, this delay threshold is used as a constraint to constrain the preservation of the photon's flight time. The following describes another implementation of the controller performing the first preset operation to increase the probability of long-distance photon preservation, namely, the application of the delay threshold.
[0064] The controller is specifically used to obtain a delay threshold for photon preservation; for photons continuously detected by the photoelectric detection unit within a pulse period, it is determined whether the difference between the arrival time of the current photon and the previous photon whose flight time was successfully preserved is greater than the delay threshold; if so, the memory is controlled to save the flight time of the current photon to the memory space corresponding to the photoelectric detection unit; the delay threshold is used to provide a delay for the preservation of photons, so that the difference between the arrival times of two photons whose flight times are continuously preserved in the memory space corresponding to the photoelectric detection unit is greater than the dead time of the photoelectric detection unit; the arrival time of the photon is the moment when the photoelectric detection unit detects the photon.
[0065] In this implementation of the second aspect, a delay threshold is used to thin out the stored photons in the temporal dimension. Under strong ambient light conditions, the constraints on the storage of ambient light photons are much stronger than those on the storage of signal light photons. This prevents the number of stored ambient light photons from prematurely reaching the upper limit of the storage space, thus preventing interference with the preservation of the flight time of long-distance signal light photons. This increases the probability of long-distance photon storage, improves detection performance of long-distance targets, and enables precise ranging of these targets.
[0066] In this implementation, since there is no distortion or the distortion is very small in the histogram, no additional filtering operation is required, thus saving hardware costs.
[0067] Optionally, the controller is specifically used to control the shutdown of the laser emitter, detect the ambient light of the scene where the target object is located through the photoelectric sensor, and obtain the measured ambient light photon density of a single photoelectric detection unit; obtain the expected value and standard deviation of the number of photons detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the pulse period; and obtain the theoretical value of the photon density detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the dead time of the single photoelectric detection unit; obtain the maximum number of photons detected by the single photoelectric detection unit within the pulse period based on the expected value, the preset coefficient and the standard deviation; and obtain the delay threshold based on the pulse period, the maximum number of photons and the theoretical value of the photon density.
[0068] By deriving the delay threshold based on prior information about ambient light obtained when the laser transmitter is turned off, the set delay threshold can be more accurately tailored to the actual ambient light conditions. This allows for more precise and accurate constraints on photon preservation, preventing problems such as excessively long delay thresholds and strong constraints that could affect ranging. It also avoids problems such as excessively short delay thresholds and weak constraints that lead to a subtle improvement in the probability of long-distance photon preservation and suboptimal ranging performance.
[0069] Optionally, the delay threshold is obtained by the following formula:
[0070]
[0071] Among them, the N det It represents the maximum number of photons detected by a single photodetection unit. p represents the pulse period, the τ delay represents the time delay threshold, and λ represents the theoretical value of the photon density detected by a single photoelectric detection unit within a pulse period.
[0072] When detecting photons, the photodetection unit can operate in free-trigger mode. Compared to active circuit quenching during the pulse period, free-trigger mode effectively reduces distortion at short flight times in the resulting histogram, thereby reducing interference with peak detection and improving ranging accuracy for distant targets.
[0073] In the electronic device provided in the second aspect, in some implementations, a histogram is formed directly based on the stored photons, and distortion may still exist in the histogram. Therefore, the electronic device, the controller can also be used to filter according to the dTOF histogram to obtain a filtered dTOF histogram; and then specifically used to find the peak according to the filtered dTOF histogram to obtain the direct flight time corresponding to the peak; according to the direct flight time corresponding to the peak and the speed of light, the distance of the target object is obtained.
[0074] By filtering the histogram, the accuracy and precision of peak finding are improved, thereby improving the accuracy and precision of target ranging. On the basis of increasing the probability of saving long-distance photons through the first preset operation, the detection performance of long-distance targets is further guaranteed.
[0075] A third aspect of the present application provides a ranging method, comprising:
[0076] Periodically emit laser pulses toward the target object;
[0077] Controlling the TDC's time grid enable based on the pre-set gating probability within the pulse period for all time grids of the time-to-digital converter (TDC) to constrain photon detection and increase the probability of long-distance photon preservation;
[0078] Generate a direct time-of-flight dTOF histogram based on the saved photons;
[0079] A peak search operation is performed according to the dTOF histogram to obtain the distance of the target object.
[0080] The sum of the gating probabilities of all time grids of the TDC within the pulse period is 1; the gating probability of the i-th time grid among all the time grids within the pulse period is expressed as: the probability of taking the i-th time grid as the starting time grid for gating enablement within the pulse period and taking the n-th time grid as the ending time grid for gating enablement within the pulse period; the gating probability of the i-th time grid within the pulse period is greater than or equal to 0; n is the total number of all the time grids, n is an integer greater than 1, and i is any integer from 1 to n; the photon flight time corresponding to the i-th time grid is positively correlated with the value of i.
[0081] In a first optional implementation manner of the third aspect, setting a gating probability within a pulse period for all time grids of the TDC specifically includes:
[0082] A smaller gating probability is set for the time grid corresponding to the longer photon flight time, and a larger gating probability is set for the time grid corresponding to the shorter photon flight time.
[0083] In a second optional implementation manner of the third aspect, setting a gating probability within a pulse period for all time grids of the TDC specifically includes:
[0084] When the value of i is less than or equal to a preset delimiting value, a first portion of a gated expectation curve is obtained according to the time length of the time grid, i, the speed of light, and the energy of the laser pulse;
[0085] When the value of i is greater than the preset delimiting value, a second portion of the gated expectation curve is obtained according to the time length of the time grid, the preset delimiting value, the speed of light, and the energy of the laser pulse;
[0086] The gating probability of all time grids of the TDC within a pulse period is obtained according to the gating expectation curve.
[0087] In a second implementation of the third aspect, optionally, obtaining the gating probabilities of all time grids of the TDC within a pulse period according to the gating expectation curve specifically includes:
[0088] Subtract the value corresponding to the i-th time grid on the gating expectation curve from the value corresponding to the i-1-th time grid to obtain the gating probability of the i-th time grid within the pulse period.
[0089] In the third aspect of the present application, in order to address the problem that the detection energy of close-range targets is excessive and the detection energy of distant targets is too low, the energy of long-range and close-range is balanced by setting a gating probability for each bin, thereby improving the long-range measurement performance at the expense of some close-range measurement performance. Therefore, there is no need to increase the exposure time to ensure the detection of distant targets. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 This is a dTOF histogram in a low ambient light scenario;
[0091] Figure 2 This is a dTOF histogram under a strong ambient light scene;
[0092] Figure 3 A schematic diagram of the dead time of a photoelectric detection unit;
[0093] Figure 4 A schematic diagram of a scenario in which dTOF technology is used for ranging according to an embodiment of the present application;
[0094] Figure 5 A schematic diagram of signal attenuation with distance;
[0095] Figure 6 Schematic diagram of histogram distortion in a strong light environment;
[0096] Figure 7 Schematic diagram of the implementation method of opening the photoelectric detection units in different areas of the array and sharing the memory space;
[0097] Figure 8A A schematic diagram of a histogram formed when the photoelectric detection unit works within the opening window or the memory space stores the photon flight time within the time window;
[0098] Figure 8B Schematic diagram of the photon storage logic that is triggered by multiple photodetection units;
[0099] Figure 9A A flow chart of a distance measurement method provided in an embodiment of the present application;
[0100] Figure 9B This is a schematic diagram of the LIFO mode;
[0101] Figure 9C This is a schematic diagram of the FIFO mode;
[0102] Figure 10 A flow chart of a method for performing ranging by using a first method of increasing the probability of long-distance photon preservation by performing a first preset operation provided in an embodiment of the present application;
[0103] Figure 11A comparison chart of the echo energies of targets at different distances in the LIFO mode provided in an embodiment of the present application;
[0104] Figure 12 A comparison chart of the echo energies of targets at different distances in the FIFO mode provided in an embodiment of the present application;
[0105] Figure 13 A flow chart of a method for performing ranging using the second method of performing a first preset operation to increase the probability of long-distance photon preservation provided in an embodiment of the present application;
[0106] Figure 14 A schematic diagram of photon storage constrained by a delay threshold provided in an embodiment of the present application;
[0107] Figure 15 A comparison chart of histograms corresponding to different dead time periods in a strong ambient light scenario provided by an embodiment of the present application;
[0108] Figure 16 Schematic diagram of TDC bin gating;
[0109] Figure 17 A flow chart of a method for increasing the probability of long-distance photon preservation for ranging by using a gating method provided in an embodiment of the present application;
[0110] Figure 18 It is a schematic diagram of the relationship between echo energy and target distance;
[0111] Figure 19 A schematic diagram of a gate expectation curve provided in an embodiment of the present application;
[0112] Figure 20 A histogram of the active quenching operation of the photodetection unit at the beginning of each pulse cycle;
[0113] Figure 21 A histogram of the photoelectric detection unit configured in free trigger mode;
[0114] Figure 22 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0115] In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the following first introduces the scenario of applying dTOF technology for ranging.
[0116] Figure 4 A schematic diagram of a scenario in which dTOF technology is used for ranging is provided in an embodiment of the present application. Figure 4 As shown in FIG, the memory, TDC and laser transmitter 401 are all connected to the controller 404 .
[0117] The laser emitter 401 emits a laser pulse to the target object 402, which reflects the laser pulse. The reflected photons are detected by the photoelectric detection unit on the photoelectric sensor 403, converted into electrical signals and enter the TDC. The TDC starts timing when the laser emitter 401 emits a pulse, and the recorded arrival time of the returning photons is the time of flight. The memory can save the time of flight of the photons. The photon count value of the time of flight can be used to generate a dTOF histogram, and the dTOF histogram can be used for peak finding and ranging. Ultimately, the distance to the target object 402 is obtained. In practical applications, the measured distance to the target object 402 can be used to form a depth image of the target object in the scene.
[0118] The signal detected by the photoelectric sensor 403 decreases as the distance increases. Figure 5 , which is a schematic diagram of the signal attenuation with distance. Figure 5 As shown in the figure, the farther the target object is, the less signal is detected. Therefore, it is not conducive to measuring the distance of distant targets in a strong light environment. Figure 6 This figure illustrates the distortion of the histogram in a strong light environment. Currently, the following three solutions can be used to improve the detection capability of photons returning from distant targets.
[0119] In the first solution, by using a method of opening a planar array in different areas and sharing memory space at the receiving end, each photodetection unit can store more photons in each pulse cycle, avoiding the loss of long-distance signal light and histogram distortion. Assuming that each photodetection unit has a one-to-one correspondence with the memory space allocated to it, the memory space corresponding to each photodetection unit can store the flight time of S photons in a pulse cycle, where S is the number of photons stored. Figure 7 , This figure is a schematic diagram of the implementation method of opening the photoelectric detection units in different areas of the array and sharing the memory space. Figure 7 As shown, if the array is divided into 4 sub-blocks and exposed four times, and each sub-block in the array shares the memory space of all photodetection units during each exposure, then the memory space available to each photodetection unit in each pulse cycle can save the flight time of 4*S photons, and the number of saved photons is 4*S. It should be noted that the memory storage of photons referred to in the embodiments of the present application does not actually save the physical form of photons, but rather saves the number of photons actually detected and the flight time for subsequent formation of a dTOF histogram.
[0120] In the second approach, other distance sensors are used to obtain prior information about the distance of the target object. The photoelectric detection unit's activation window within the pulse cycle, or the time window for storing photons in the memory space, is then set based on the prior information about the distance of the target object. The photoelectric detection unit operates only within the activation window during the pulse cycle, which can reduce the number of ambient light photons detected, thereby ensuring that the memory space stores the flight time of all photons within the time window. Figure 8A , which is a schematic diagram of a histogram formed when the photoelectric detection unit works within the open window or the memory space stores the photon flight time within the time window.
[0121] In the third solution, a method is provided in which multiple photodetection units jointly trigger the photon preservation logic. Figure 8B The figure shows a schematic diagram of the photon storage logic triggered by multiple photodetection units. Only when multiple adjacent photodetection units detect a photon within the same time interval are the subsequent operations shown in the figure executed, saving the corresponding flight time of the photon to memory. Otherwise, the photon is discarded.
[0122] Of the three technical solutions described above, the first requires increasing the number of exposures in order to reuse memory space, resulting in a significant waste of laser energy, reducing the frame rate of the array, and significantly increasing the ranging time. The second requires the use of other distance sensors to obtain prior information about the distance of the target object, thereby increasing additional hardware costs. The third solution has limited effectiveness in strong ambient light scenarios, and the implementation method of multiple photoelectric detection units jointly triggering the photon storage logic also increases additional hardware costs.
[0123] Based on the above analysis, in order to improve the ability to detect photons returned from distant targets, the current solutions have problems such as wasting laser energy, low frame rate, long ranging time, insignificant effect under strong ambient light conditions, and high cost. Based on this, the present application provides a ranging method and electronic equipment. In the technical solution provided by the present application, laser pulses are periodically emitted to the target object; light intensity information is obtained, and the light intensity information is used to represent the intensity of the ambient light; when the light intensity information meets the first condition, the probability of saving long-distance photons is increased by executing a first preset operation; wherein the first condition includes the intensity of the ambient light exceeding a first intensity threshold; a direct time of flight dTOF histogram is generated based on the saved photons; a peak search operation is performed based on the dTOF histogram to obtain the distance of the target object. It can be seen that in the technical solution of the present application, the preservation of photons is controlled according to the intensity of the ambient light, and the probability of preserving long-distance photons is increased through the first preset operation when the ambient light intensity is strong, breaking the way of prioritizing the preservation of short-range photons in the time dimension, and avoiding the number of ambient light photons returned by short-range targets under strong ambient light conditions (the flight time of saving a photon is equivalent to the number of photons saved plus 1) first accumulating to the upper limit of the memory space storage of the photoelectric detection unit. The technical solution of the present application can resist the interference of strong light environment when measuring long-range targets, improve the probability of preserving photons returned by long-range targets, and thus achieve accurate measurement of the distance to long-range targets. And when the technical solution of the present application is measuring the distance for long-range targets, the exposure time is short and the number of times is small, so laser energy will not be wasted, the frame rate is high, and the ranging time is short. In addition, it has a good resistance effect to strong light environment and does not require additional hardware costs.
[0124] The following describes the distance measurement method provided by the technical solution of this application.
[0125] Method Example:
[0126] See also Figure 9A , which is a flow chart of a distance measurement method provided by an embodiment of the present application. Figure 9A As shown, the ranging method includes:
[0127] S901: Periodically emit laser pulses toward the target object.
[0128] In an embodiment of the present application, a laser emitter emits laser pulses to a target object in a scene at a preset pulse period. Different from ambient light, the laser pulses emitted by the laser emitter can also be called signal light pulses. Each pulse period generates a signal light pulse. By periodically emitting laser pulses, the photoelectric detection unit of the photoelectric sensor accumulates and detects sufficient signal light photons after multiple pulse periods. In an example implementation, the pulse period is set to 100ns. In actual applications, pulse periods of other time lengths can also be set according to requirements such as frame rate or imaging speed. The specific length of the pulse period is not limited here.
[0129] S902: Acquire light intensity information, where the light intensity information is used to represent the intensity of ambient light.
[0130] It should be noted that this step can be performed before or after S901 , for example, before each light pulse is emitted.
[0131] The ambient light in the scene is randomly distributed in time; while the signal light is emitted in a pulsed manner, so the signal light is relatively concentrated in time compared to the ambient light.
[0132] In practical applications, if photon detection is not constrained, the generated dTOF histogram may make it difficult to identify the signal light: the generated dTOF histogram usually shows that the number of photon detections is large at close distances (short flight time), while the number of photon detections is small at long distances (long flight time). If the target object happens to be located in the long-distance interval, it will seriously affect the detection of signal light photons, and thus affect the distance to the target object.
[0133] For example, if the ambient light in the scene is too strong at close range, the number of photons detected by the photodetection unit will reach the upper limit of the number of photons that the device can detect early, interfering with the detection of signal light photons reflected by distant target objects. As an example, the photodetection unit can be a single photon avalanche diode (SPAD) or an avalanche photon diode (APD). The specific type of the photodetection unit is not limited here.
[0134] In this step, light intensity information representing ambient light intensity is obtained to subsequently determine whether the ambient light intensity is excessive. As previously discussed, high ambient light intensity can hinder the preservation of signal light photons returning from long distances, impacting the detection of distant targets. Therefore, obtaining ambient light intensity information and the subsequent determination process determine whether the first preset operation is necessary to increase the probability of long-distance photon preservation.
[0135] This step can be implemented in a variety of ways. For example, the ambient light intensity information can be obtained by measuring the photoelectric detection unit of a photoelectric sensor installed in the scene. Furthermore, the ambient light intensity information can also be obtained using data measured by other sensors. For example, the color temperature sensor of an RGB camera obtains the ambient light illuminance. In this step, the ambient light intensity information is obtained by analyzing the ambient light illuminance. The implementation method for obtaining the light intensity information is not limited here.
[0136] It should also be noted that the specific form of the light intensity information in the embodiments of the present application is not limited. The light intensity information may be the numerical value of the ambient light photon density, or the numerical value of other parameters. For example, at least one of the maximum value, average value, or standard deviation of the number of ambient light photons detected by a photoelectric detection unit within a pulse period may be used as the light intensity information.
[0137] S903: Determine whether the light intensity information meets the first condition. If yes, execute S904.
[0138] This determination step measures whether the ambient light is excessively bright. Here, the first condition is that the ambient light intensity exceeds a first intensity threshold. In other words, when the ambient light intensity indicated by the light intensity information exceeds the first intensity threshold, the ambient light intensity is determined to be excessive. To accurately measure the distance to a distant target, the following S904 is performed to intervene in the preservation of photons.
[0139] In specific implementations, the first light intensity threshold can be set according to actual needs. For example, when the required ranging accuracy reaches s1, a lower first light intensity threshold is set; when the required ranging accuracy reaches s2, a higher first light intensity threshold is set. Here, the accuracy represented by s1 is higher than the accuracy represented by s2.
[0140] S904: Improving the probability of long-distance photon preservation by executing the first preset operation.
[0141] In the embodiment of the present application, step S904 includes multiple implementation methods.
[0142] In the same pulse cycle, the flight time is based on the emission time of the signal light pulse as the reference starting time. Therefore, whether it is a signal light photon or an ambient light photon, the flight time of the photon detected first is shorter than the flight time of the photon detected later. Therefore, in a possible implementation of this step, the flight time of each of the several photons detected later by the photoelectric detection unit is preferentially saved in the memory space corresponding to the photoelectric detection unit. This strategy of preferentially saving the photons detected later can increase the probability of saving long-distance photons. Although there may be distortion in the formed histogram, the detection performance of long-distance targets is preferentially guaranteed. This implementation method constrains photon detection by setting a photon storage mode, providing a logic for controlling photon storage based on distance for detecting the distance of the target object.
[0143] In another possible implementation of this step, a time delay threshold for photon storage can be obtained based on the ambient light prior information, and then the memory space corresponding to the photoelectric detection unit is constrained to save the photon flight time based on the time delay threshold. By constraining the photon storage in this way, the photon flight time stored in the memory space presents a more sparse and uniform distribution in the time dimension. In this way, the distortion in the histogram can be reduced, making the peak corresponding to the distant target easier to identify. This also ensures the detection performance of distant targets. This implementation uses the time delay threshold as a reference value for determining whether to save the photon flight time, and provides a logic for controlling the photon storage at time intervals for detecting the distance of the target object. In this implementation, there is no need to detect the prior information of the distance of the target object, thus saving hardware costs.
[0144] S905: Generate a direct time-of-flight (dTOF) histogram based on the stored photons.
[0145] Generating a dTOF histogram based on the stored photons is a relatively mature technology in this field, so the specific implementation process of this step will not be described here.
[0146] In this step, the probability of preserving long-distance photons is increased by executing the first preset operation, so that a dTOF histogram that is balanced in the time dimension can be generated. Equalization specifically involves balancing the comprehensive detection performance of long-distance and short-distance return photons, and improving the detection probability of long-distance signal light photons. For example, both short-distance and long-distance photons must be detected and a certain detection performance must be guaranteed, rather than only considering the detection of short-distance photons and sacrificing the performance of long-distance photon detection. In other words, equalization needs to consider the probability of detecting the target object at long and short distances (knowing that there is an object and the distance of the object by detecting the returned photons). It is not possible to have a situation where the detection rate at one distance (such as short distance) is too high (such as 98%) and the detection rate at the other distance (such as long distance) is too low (such as less than 50%). Through equalization, even if the detection rate at one distance may be reduced (such as the short-distance detection rate is reduced to 95%), the detection rates at both distances can meet the actual measurement needs.
[0147] S906: Perform a peak search operation according to the dTOF histogram to obtain the distance of the target object.
[0148] Even if the target object is far away from the photoelectric detection unit, and even if the ambient light intensity is strong, executing the above step S904 can reduce the difficulty of finding the signal light in the dTOF histogram, making it easier for the signal light to be reflected by the highest peak in the histogram. Peak finding in a histogram is a relatively mature technology in this field. Therefore, the implementation details of peak finding are not described here, and the implementation method of peak finding is not limited.
[0149] In the dTOF histogram, the ordinate represents counts and the abscissa represents flight time (sometimes also expressed as distance). When the abscissa represents flight time, the flight time corresponding to the peak value on the ordinate can be obtained by peak finding, that is, the flight time corresponding to the signal light photon. The distance to the target object is calculated as follows:
[0150]
[0151] In formula (1), Δt represents the flight time of the signal light photon, and c represents the speed of light. Formula (1) shows that the longer the flight time of the signal light photon, the farther the target object is; conversely, the shorter the flight time of the signal light photon, the closer the target object is. In other words, the distance to the target object is directly proportional to the flight time of the signal light photon.
[0152] The above is the distance measurement method provided by the embodiment of the present application. In this distance measurement method, laser pulses are periodically emitted to the target object; light intensity information is obtained, and the light intensity information is used to represent the intensity of the ambient light; when the light intensity information meets the first condition, the probability of saving long-distance photons is increased by performing a first preset operation; wherein the first condition includes that the intensity of the ambient light exceeds a first light intensity threshold; a direct time of flight dTOF histogram is generated based on the saved photons; a peak search operation is performed based on the dTOF histogram to obtain the distance of the target object. It can be seen that in the technical solution of the present application, the preservation of photons is controlled according to the intensity of the ambient light. When the ambient light intensity is strong, the probability of saving long-distance photons is increased by the first preset operation, breaking the way of prioritizing the preservation of short-distance photons in the time dimension, and avoiding the accumulation of the number of ambient light photons returned by the short-distance target to the storage limit of the memory space of the photoelectric detection unit under strong ambient light conditions. The technical solution of the present application can resist the interference of the strong light environment when measuring long-distance targets, improve the probability of saving the photons returned by the long-distance target, and then generate a balanced dTOF histogram to achieve accurate measurement of the distance of the long-distance target. Furthermore, when measuring the distance of a distant target, the present invention has a short exposure time and a small number of exposures, which does not waste laser energy, has a high frame rate, and shortens the distance measurement time. Furthermore, the invention has a good resistance to strong light environments and does not require additional hardware costs.
[0153] It should be noted that the method of using the dTOF histogram obtained according to the technical solution of the embodiment of this application to perform target ranging is not limited to depth imaging, but can also be applied to laser radar ranging and single-point ranging sensors of RGB cameras to achieve ranging. The specific application scenarios of this solution are not limited here.
[0154] See also Figure 10 , this figure is a flow chart of the first method provided by an embodiment of the present application for increasing the probability of long-distance photon preservation for ranging by executing a first preset operation.
[0155] In the first implementation, the probability of long-distance photon preservation can be improved according to the preservation mode within a pre-set pulse period.
[0156] S1001: Turn off the laser transmitter, detect the ambient light of the scene where the target object is located, and obtain the measured ambient light photon density of a single photoelectric detection unit.
[0157] When the laser emitter is turned off, it cannot emit signal light pulses to the target object. Therefore, the photoelectric detection unit can only detect the ambient light photons in the scene. In specific implementation, the prior information of the ambient light can be obtained through a very short exposure time. When the laser emitter is turned off, the photoelectric detection unit is allowed to collect ambient light photons t exposure1 second, forming a histogram. Calculate the average photon count in L consecutive undistorted time grids (bins) in the histogram. Where L is less than or equal to the total number of undistorted bins, and the total number of undistorted bins is less than or equal to the total number of TDC bins, n. The above average value is used as the measured ambient light photon density, expressed as follows:
[0158]
[0159] In formula (2), λ m represents the measured ambient light photon density of a single photodetection unit, [h1 h2 h3 … h n ] represent the count value corresponding to each bin in the histogram of length n, t exposure represents the exposure time, and L represents the number of undistorted bins applied when calculating the measured ambient light photon density.
[0160] S1002: Obtain the expected value and standard deviation of the number of photons detected by a single photoelectric detection unit within a pulse period according to the measured ambient light photon density and the pulse period.
[0161] Formulas (3) and (4) are the expressions for calculating the expected value and standard deviation of the number of photons detected by a single photodetection unit within a pulse period.
[0162] N thre =λ m *T p Formula (3)
[0163]
[0164] In formulas (3) and (4), N thre It represents the expected value of the number of photons detected by a single photodetection unit during the pulse period. In formula (3), T p Represents the pulse period. Since the arrival of photons satisfies the Poisson distribution, as shown in formula (4), according to the properties of the Poisson distribution, the standard deviation of the number of photons is is the expected value N thre The square root of .
[0165] S1003: Obtain the maximum number of photons detected by a single photoelectric detection unit within a pulse period as light intensity information according to the expected value, the preset coefficient and the standard deviation.
[0166] The maximum number of photons detected by a single photodetection unit N det Expressed as:
[0167]
[0168] In formula (5), β is a preset coefficient, and the value of β is between 1 and 3.
[0169] First, let's explain two different photon storage modes. The FIFO (First In, First Out) mode stores the flight times of photons that enter the cache first. The LIFO (Last In, First Out) mode stores the flight times of photons that enter the cache later first. The times of photons that enter the cache earlier or later correspond to the distances of the detected photons.
[0170] It is understandable that when N det Less than or equal to the limit N of the number of photons that can be stored in the memory space allocated to a single photodetection unit Mem (That is, the memory space can store at most N detected by the corresponding photoelectric detection unit Mem When the flight time of all photons detected by the photoelectric detection unit is 1, the flight time corresponding to all photons detected by the photoelectric detection unit can be saved in the memory space corresponding to the photoelectric detection unit, without the need to distinguish the distance of the photon source for additional constraints, that is, both FIFO mode and FILO mode are available. det Greater than N Mem , indicating that some photons must be additionally constrained, i.e., the flight times corresponding to some photons must be discarded to avoid data overflow in the memory space, i.e., the LIFO mode is selected. To determine the photon storage mode in different situations, the following step S1004 is specifically performed for comparison and judgment.
[0171] S1004: Determine whether the light intensity information meets the first condition. If yes, proceed to S1005; if not, proceed to S1006.
[0172] Light intensity information is used to represent the intensity of ambient light. In the above description, the maximum number of photons detected by a single photodetection unit during a pulse period is N fet As light intensity information. The first condition includes that the light intensity of the ambient light exceeds the first light intensity threshold. In this embodiment, the limit value N of the number of photons stored in the memory space allocated to a single photodetection unit is Mem As the first light intensity threshold. This step determines whether the light intensity information meets the first condition, specifically whether N det With N Mem That is, if N det >N Mem Then enter S1005.
[0173] S1005: Periodically emit laser pulses to the target object, and preferentially save the flight times of the respective photons detected by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit, and then proceed to S1008.
[0174] When determining the maximum number of photons N det The limit N on the number of photon events (photon events represent the associated data of photons recorded in the cache or memory, including the flight time of photons) that can be stored in the memory space allocated to a single photodetection unit Mem When using LIFO mode as the photon storage mode within the pulse cycle, the flight time corresponding to the photon returning from a distant distance is first moved from the cache into the memory (specifically, the memory space corresponding to the photoelectric detection unit that detected the photon). Because the echo signal of a close-range signal is strong, and the echo signal of a distant distance is relatively weak, the LIFO mode can prioritize the flight time of the photon corresponding to the echo of the distant target and save it in the memory. In LIFO mode, the appropriate sacrifice of the close-range echo will not weaken the ranging effect of the distant target object.
[0175] S1006: Determine whether the light intensity information meets the second condition. If yes, execute S1007.
[0176] Here, the second condition includes that the intensity of the ambient light does not exceed the second intensity threshold. The second intensity threshold can also be set according to actual needs. It should be noted that the second intensity threshold is less than or equal to the first intensity threshold.
[0177] Since the second light intensity threshold is less than or equal to the first light intensity threshold, when the light intensity information meets the second condition, it indicates that the ambient light intensity is relatively weak and will not affect or excessively affect the detection of long-distance signal light photons.
[0178] Taking the second light intensity threshold being equal to the first light intensity threshold as an example, the light intensity information satisfies the second condition, then N det ≤N Mem Indicates that the memory space allocated to the photoelectric detection unit is sufficient to accommodate the flight time of all photons detected by the photoelectric detection unit, and these detected photons are completely counted. At this time, the FIFO mode or LIFO mode will not miss the photons corresponding to the distant target echo, so N det ≤N Mem When the photon storage mode is selected, the FIFO mode and the LIFO mode can both be used as the photon storage mode within the pulse period, and one of them can be selected when executing S1007. In some possible implementations, in order to further save power consumption, the FIFO mode can be preferentially selected as the photon storage mode from the FIFO mode and the LIFO mode.
[0179] S1007: Periodically emit laser pulses to the target object, and preferentially save the flight time of several photons detected later by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit, or preferentially save the flight time of several photons detected earlier by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit, and enter S1008.
[0180] The schematic diagrams of LIFO mode and FIFO mode are respectively shown in Figure 9B and Figure 9C .by Figure 9B For example, if two photon events (photon events represent the associated data of photons recorded in the cache or memory, and photon events include the flight time of photons) need to be stored from the cache Buffer into the memory, then photon event 3 and photon event 4 are stored in the memory. Figure 9C For example, if two photon events need to be stored from the Buffer into the Memory, then photon event 1 and photon event 2 are stored into the Memory.
[0181] In conjunction with the relevant description of S1005 , it can be seen that when it is determined to adopt the LIFO mode to save the photon events, the photons returning from a long distance are preferentially selected.
[0182] For example, in a strong ambient light scene, N e photons and corresponds to N e TDC photon events, and N e Greater than the number of photon events N that can be stored in the memory space allocated to each photodetection unit by the system mem Consider N e The photon events occur sequentially in time and their times are The photon events at the front, t1 and t2, are from ambient light or echoes from close targets, and the photon events at the back, t2, are from ambient light or echoes from close targets. Several photon events come from ambient light or echoes from distant targets. LIFO mode saves the last For photon events that occur at the same time, the FIFO mode saves the photon events that occurred at the previous time t1, t2, etc.
[0183] S1008: Generate a direct time-of-flight (dTOF) histogram based on the stored photons.
[0184] S1009: Perform a peak search operation according to the dTOF histogram to obtain the distance of the target object.
[0185] In one possible implementation, after S1008, the histogram may be further filtered to obtain a filtered dTOF histogram. Filtering makes the signal light more easily identifiable. Therefore, S1009 may specifically be to find a peak based on the filtered histogram to obtain the distance to the target object.
[0186] Each time ambient light prior information is obtained, the system can adaptively switch between FIFO and LIFO modes based on this information. This balances the probability of detecting and storing photons returned by near- and far-range targets (the photon flight time is stored in memory), maximizing far-range target detection performance at the expense of slightly sacrificing near-range ranging performance.
[0187] Figure 11 The comparison chart of echo energy of targets at different distances in LIFO mode. Figure 12 The following is a comparison chart of the echo energy of targets at different distances in FIFO mode. Figure 11 and Figure 12 It can be seen that the amount of echo signal at a distance of 12 meters in FIFO mode is very small (less than the energy of the noise at 4 meters and 6 meters), which makes it difficult to ensure the effective detection of the target. In the LIFO mode, the echo energy of the 12-meter target at a distance is increased by more than 2 times compared with the FIFO mode and is higher than the peak value of the noise, which can ensure the effective detection of the target. For close-range targets, the target echo energy in the FIFO mode is about 2.5 times that of the LIFO mode, but because the energy of the target echo in both modes is much higher than the energy of the noise, both modes can ensure high-probability detection of the target. In summary, the LIFO mode can better balance the detection of long-range and short-range targets than the FIFO mode, and can also show better signal light detection effects under strong ambient light conditions. In the above embodiments, the distance measurement performance of long-range targets in strong ambient light scenes is improved according to the way of preserving the photon flight time according to the photon preservation mode constraints.
[0188] In the second way of constraining photon preservation introduced above, the delay threshold for photon preservation is obtained based on the prior information of the ambient light of the scene, and the probability of long-distance photon preservation is increased based on this delay threshold. In this implementation method, the obtained delay threshold is used to provide a delay for the preservation of photons. For example, without this delay, the detection of photons is only limited by the dead time of the photoelectric detection unit, and the flight time of the photon can be saved to the memory if the arrival time of the photon does not fall within the dead time. This causes the detected photons to be usually concentrated in a shorter arrival time, and the number of photons stored in the memory space corresponding to the photoelectric detection unit reaches the upper limit early, affecting the detection of long-distance photons. In the embodiment of the present application, the delay threshold provides a delay for the preservation of photons, so that the minimum time difference of the arrival time of the photons stored in the memory of the photoelectric detection unit is greater than the dead time of the photoelectric detection unit. This makes the arrival time of the photons stored in the memory more sparse and uniformly distributed in the time dimension. The following is combined with Figure 13 The second implementation method of improving the probability of long-distance photon preservation by executing the first preset operation is described.
[0189] See also Figure 13 , this figure is a flow chart of a method provided in an embodiment of the present application for utilizing the second method of performing a first preset operation to increase the probability of long-distance photon preservation for ranging.
[0190] As described above, in the second implementation, photon detection can be constrained based on a pre-set delay threshold. The delay threshold for photon storage can be determined based on prior information about the ambient light in the scene. The following describes the implementation process for determining the delay threshold based on prior information about ambient light, with reference to steps S1301 to S1304.
[0191] S1301: Turn off the laser transmitter, detect the ambient light of the scene where the target object is located, and obtain the measured ambient light photon density of a single photoelectric detection unit.
[0192] The implementation of this step is substantially the same as that of S1001 in the aforementioned embodiment, and thus the description of this step may refer to the aforementioned embodiment and formula (2).
[0193] S1302: Obtain the expected value and standard deviation of the number of photons detected by a single photodetection unit within a pulse period based on the measured ambient light photon density and the pulse period; and obtain the theoretical value of the photon density detected by a single photodetection unit within a pulse period based on the measured ambient light photon density and the dead time of the single photodetection unit.
[0194] The calculation formulas for the expected value and standard deviation of the number of photons detected by a single photoelectric detection unit can refer to formulas (3) and (4) in the above embodiments and will not be repeated here.
[0195] Combined with the above Figure 3 and for Figure 3 As can be seen from the relevant description of , the photoelectric detection unit has a dead time. The existence of the dead time affects the detection of photons. Therefore, based on the measured ambient light photon density of a single photoelectric detection unit obtained in S1301 and the inherent dead time of a single photoelectric detection unit, the theoretical value λ of the photon density detected by a single photoelectric detection unit under the influence of the dead time within the pulse period can be obtained. For details, see formula (6):
[0196]
[0197] In formula (6), λ m Represents the measured ambient light photon density of a single photodetection unit, T dead Indicates the dead time of a single photodetection unit.
[0198] S1303: Obtain the maximum number of photons detected by a single photoelectric detection unit within the pulse period according to the expected value, the preset coefficient and the standard deviation.
[0199] The implementation of this step is substantially the same as that of S1003 in the aforementioned embodiment, and thus the description of this step may refer to the aforementioned embodiment and formula (5), and will not be repeated here.
[0200] S1304: Obtain a delay threshold based on the pulse period, the maximum number of photons, and the theoretical value of photon density.
[0201] In the embodiment of the present application, the purpose of setting the delay threshold is to reduce the probability of photon preservation more evenly in the time dimension. Under strong ambient light conditions, reducing the probability of photon preservation has a great restraining and inhibitory effect on the preservation of ambient light photons. Even if the preservation of signal light photons is also inhibited, the inhibitory effect is much smaller than the inhibitory effect on the preservation of ambient light photons. In this embodiment, the delay threshold is greater than the dead time of the photoelectric detection unit. Using the delay threshold to constrain photon detection is equivalent to extending the original inherent dead time, so that even if the photon falls outside the original inherent dead time, the flight time may not be preserved.
[0202] Assuming that the time length of the delay threshold within the pulse period cannot preserve the flight time of the photons, if the delay threshold is used as the critical dead time when the number of photons detected by a single photoelectric detection unit within the pulse period just reaches the maximum number of photons, the relationship can be derived based on the combination of formula (3) and formula (6):
[0203]
[0204] In formula (7), N detIndicates the maximum number of photons detected by a single photodetection unit, T p represents the pulse period, τ delay represents the time delay threshold, and λ represents the theoretical value of the photon density detected by a single photoelectric detection unit within a pulse period.
[0205] Based on formulas (5)-(7), the calculation formula for the delay threshold can be further derived:
[0206]
[0207] In formula (8), β is a preset coefficient, and the value of β is between 1 and 3, and λ m Represents the measured ambient light photon density of a single photodetection unit.
[0208] The above S1301 to S1304 describe determining the time delay threshold within the pulse period based on the prior information of the ambient light of the scene. The predetermined time delay threshold can be used as a basis for constraining photon storage during ranging.
[0209] S1305: Acquire light intensity information, where the light intensity information is used to represent the intensity of ambient light.
[0210] S1306: Periodically emit laser pulses toward the target object.
[0211] S1307: Determine whether the light intensity information meets the first condition. If yes, execute S1308.
[0212] S1308: For the photons continuously detected by the photoelectric detection unit within the pulse period, determine whether the difference between the arrival time of the current photon and the previous photon whose flight time is successfully saved is greater than the delay threshold. If yes, execute S1309; if not, execute S1310.
[0213] In the embodiment of the present application, the validity of the photon detection is constrained by the delay threshold. If the difference between the arrival time of the current photon and the previous photon whose flight time was successfully saved (i.e., successfully detected) is greater than the delay threshold, it means that there is no need to constrain the detection of the current photon, and the flight time of the current photon can be saved to the memory. If the difference between the arrival time of the current photon and the previous photon whose flight time was successfully saved is less than or equal to the delay threshold, it means that the detection of the current photon needs to be constrained so that the flight time of the current photon cannot be saved to the memory. Through the judgment of this step and the constraint of the delay threshold, the probability of saving ambient light photons is evenly reduced, and the detection interference of signal light photons returned from distant targets under strong ambient light conditions is reduced.
[0214] In this implementation, within each pulse cycle, the area outside the delay threshold is the enabled area for saving the photon flight time, and the area within the delay threshold is the disabled area for saving the photon flight time. Figure 14 The implementation method of photon preservation constrained by delay threshold is introduced in detail.
[0215] S1309: When determining whether the difference between the arrival time of the current photon and the previous photon whose flight time is successfully saved is greater than the delay threshold, the flight time of the current photon is saved in the memory space corresponding to the photoelectric detection unit.
[0216] S1310: When it is determined that the difference between the arrival time of the current photon and the previous photon whose flight time is successfully saved is less than or equal to the delay threshold, the flight time of the current photon is discarded.
[0217] See also Figure 14 , which is a schematic diagram of photon preservation constrained by delay threshold. Figure 14 As shown, the dead time T dead Shorter than the delay threshold τ delay , and the starting time is the same. Photon 141 and photon 142 are photons that are effectively triggered and whose flight time is effectively saved to the memory; photon 143 is a photon that is located in the dead zone and cannot be triggered; photon 144 is a photon that is effectively triggered but the difference in arrival time with the previous photon (photon 141) that is effectively triggered and whose flight time is effectively saved to the memory is less than the delay threshold, that is, it does not meet the photon preservation logic of this embodiment. Therefore, the flight time corresponding to photon 142 is saved to the memory, and the flight time corresponding to photons 143 and 144 is discarded.
[0218] S1311: Generate a direct time-of-flight (dTOF) histogram based on the stored photons.
[0219] S1312: Perform a peak search operation according to the dTOF histogram to obtain the distance of the target object.
[0220] In the above embodiments, the implementation method of setting the delay threshold is introduced, and an example operation of constraining photon storage by the delay threshold is introduced. Figure 15 This is a comparison chart of the histograms corresponding to different dead time (4ns, 10ns, 20ns and 30ns dead time) in the strong ambient light scene provided by the embodiment of this application. Figure 15 As shown, by extending the dead time (the delay threshold provides a delay for photon preservation), the number of photons whose flight time is preserved can be reduced, eliminating the distortion of long and short distances in the histogram. In this embodiment, the histogram does not need to be filtered, thus avoiding signal attenuation caused by filtering, reducing the complexity of the backend algorithm, and lowering the requirements for system computing power.
[0221] The above embodiments all achieve long-distance target ranging with strong ambient light immunity through constraint operations performed during the photon flight time preservation phase. Furthermore, by setting the gating probability of the TDC time grid, photon detection can be constrained during the photon detection phase, thereby achieving long-distance target ranging with strong ambient light immunity. The specific implementation process includes controlling the TDC time grid enable based on the gating probability pre-set within the pulse cycle for all TDC time grids to constrain photon detection and increase the probability of long-distance photon preservation. Assuming that the TDC has a total of n time grids (n is an integer greater than 1), the order of the corresponding photon flight times from shortest to longest is the first time grid, the second time grid, and so on. Taking the i-th time grid as an example (i is any integer from 1 to n), the gating probability of the i-th time grid within the pulse cycle represents the probability of gating with the i-th time grid as the starting time grid within the pulse cycle and the n-th time grid as the ending time grid within the pulse cycle.
[0222] For example, a gating probability of 0.3 for the fourth time grid indicates a 0.3 probability of using the fourth and nth time grids as the start and end time grids for gating within a pulse cycle, respectively. The TDC's gated-enabled time grids can perform normal time-to-digital conversion, validating photon detection. In this implementation, the gating probability is set to adjust the enabled state of each time grid, providing a logic for setting the gating probability of the TDC time grid for detecting the distance to the target object.
[0223] Before introducing the gating probability setting method, for ease of understanding, the gating probability mentioned in the embodiments of the present application is first introduced.
[0224] Figure 16 Figure 2 shows the gating diagram for TDC bins. Assume the TDC has n bins, where n is an integer greater than 1, and i and j are integers between 1 and n. If i is less than j, the photon flight time corresponding to the i-th bin (bin i) is less than the photon flight time corresponding to the j-th bin (bin j).
[0225] If the time length of a bin is T bin , then the pulse period T p It can be expressed as:
[0226] T p =T bin *n Formula (9)
[0227] If the moment corresponding to the i-th bin is used as the starting moment of gate enable, the enabling time window of the photoelectric detection unit within the pulse period is [i*Tbin , T bin *n], and the photoelectric detection unit is in [0, i*T bin ] time, it is impossible to effectively detect photons and save the photon flight time.
[0228] Since the arrival of photons satisfies the Poisson distribution, the probability of detecting a photon within the time from 0 to τ is:
[0229] p acc (N(t)≥0|,0≤t≤τ)=1-e -λ’τ Formula (10)
[0230] In formula (10), λ' is the expectation and variance of Poisson distribution. According to formula (10), we can get The probability of detecting a photon within the time window is:
[0231]
[0232] According to formula (11), the probability of detecting a photon in a unit time window is a constant that is independent of the position of the time window. If the gating probability corresponding to each bin is: [p1 p2 p3 … p n ], Then the probability p of the i-th bin being in the disabled state is disable (i) The start time of gate enable is greater than T bin The sum of the probabilities of all possible situations of *i is expressed by the following formula:
[0233]
[0234] According to formula (12), it is not difficult to find that as the index number of the bin increases, the probability of the bin not being enabled decreases, which means that more photons can be detected and their flight time is saved. Since the echo energy of distant targets is much weaker than that of close targets, it is necessary to prioritize the probability of the bin corresponding to the distant echo being enabled. In order to prioritize the probability of the bin corresponding to the distant echo being enabled, based on the meaning of the gating probability, a smaller gating probability can be set for the bin corresponding to the longer photon flight time (even setting the gating probability to 0, that is, no gating), and a larger gating probability can be set for the bin corresponding to the shorter photon flight time. In this way, it can be guaranteed that the signal light photons returned by the distant target have a greater probability of being detected.
[0235] For example, if the gating probability of bin n-1 is set to 0.01 and the gating probability of bin 2 is set to 0.6, and if the bin corresponding to the photon returned by a distant target is bin n-3, and 2 < n-3 < n-1, then the probability of missing a signal light photon in bin n-3 is very small due to the very small gating probability of bin n-1. This setting can ensure that the detection probability of signal light photons returned by distant targets is improved.
[0236] See also Figure 17 , this figure is a flow chart of a method provided in an embodiment of the present application for using a gating method to increase the probability of long-distance photon preservation for ranging.
[0237] First, the implementation process of setting the gating probability within the pulse period for all bins of the TDC is introduced in conjunction with S1701 to S1702.
[0238] S1701: Obtain a gate expectation curve.
[0239] TDC has a total of n bins, where n is the total number of TDC bins. The purpose of obtaining the gated expectation curve in this step is to subsequently use the gated expectation curve to obtain the gating probability of each bin. The gated expectation curve refers to the ambient light baseline distortion that the dTOF depth estimation algorithm can accept, that is, the histogram with the above ambient light baseline can meet the ranging requirements after filtering. For example, the energy of the distorted area corresponding to close distances still meets the requirements for ranging success rate and accuracy, and the histogram corresponding to long distances does not have distortion.
[0240] The gated expectation curve consists of two parts, the first part is the near-distance distortion area, and the second part is the far-distance non-distortion area. thre The preset dividing value i thre It can be set based on the relationship between target distance and echo energy. Figure 18 The figure shows the relationship between echo energy and target distance: the farther the distance, the smaller the echo energy. The horizontal line in the figure represents the energy threshold. On the curve of echo energy and target distance, the distance corresponding to the energy threshold is mapped to the bin index number, which can be used as the preset demarcation value i. thre For example, on the curve of the change of echo energy and target distance, the distance corresponding to the energy threshold is x. According to the relationship between distance and flight time, the flight time corresponding to distance x is t', and the bin corresponding to t' is bin y (i.e., the yth bin). Then y can be used as the preset demarcation value i thre .
[0241] The methods for obtaining the first part and the second part of the gate expectation curve are as follows:
[0242] When the value of i is less than or equal to the preset threshold, the bin length T bin , i, light speed c and laser pulse energy a obtain the first part of the gating expectation curve, the first line in the following expression (13).
[0243] When the value of i is greater than the preset delimiter, the second part of the gated expectation curve is obtained according to the time length of the time grid, the preset delimiter, the speed of light c and the energy a of the laser pulse, see the second line in the following expression (13).
[0244]
[0245] Formula (13) fully demonstrates the gated expectation curve b(i). According to Formula (13), in the first part of the gated expectation curve, the value of the gated expectation curve increases with the value of i, while in the second part of the gated expectation curve, the value of the gated expectation curve is a constant. Figure 19 A schematic diagram of a gate expectation curve provided in an embodiment of the present application, in which the preset demarcation value i thre The left side is the first part of the gate expectation curve. thre The second part of the gated expectation curve is shown on the right.
[0246] Combine Figure 18 and Figure 19 It can be seen that in the embodiment of the present application, for the received echo energy less than the energy threshold (ie, the index number is greater than i thre ) bin does not perform gating operation, and for the received echo energy greater than or equal to the energy threshold (that is, the index number is less than or equal to i thre ) bins for gating operations.
[0247] S1702: Obtain the gating probability of all time grids of the TDC within the pulse period according to the gating expectation curve.
[0248] If the gating probability corresponding to each bin is: [p1 p2 p3 … p n ], then the gating probability and gating expectation curve b(i) of each bin satisfy expressions (14) and (15):
[0249] b(i)=1-(p i+1 +p i+2 +…+p n ) Formula (14)
[0250] b(i-1)=1-(p i +p i+1 +p i+2 +…+p n ) Formula (15)
[0251] Based on formula (14) and formula (15), the value corresponding to the i-th bin on the gate expectation curve is subtracted from the value corresponding to the i-1-th bin, and the gate probability of the i-th bin within the pulse period is obtained as follows:
[0252] p i =b(i)-b(i-1) Formula (16)
[0253] Regarding the above formula (16), since b(0)=0, when i=1, p1=b(1).
[0254] Finally, the gating probabilities of different bins can be normalized to obtain the normalized gating probability p for each bin. gate (i)
[0255]
[0256] The above S1701 to S1702 describe the specific implementation process of setting the gating probability for each bin. S1701 to S1702 can be pre-executed before the formal ranging, and the formal ranging can use the pre-set gating probability for each bin to constrain photon detection.
[0257] Before executing S1701-S1702, it is also possible to use light intensity information representing the intensity of the ambient light and determine whether the light intensity information meets the first condition. If the first condition is met, the bin gating probability is set according to the implementation method described in S1701-S1702. S1701-S1702 is another specific implementation method of the first preset operation described above.
[0258] S1703: Periodically emit laser pulses toward the target object.
[0259] S1704: Control the time grid enable of the TDC according to the gating probability pre-set within the pulse period for all time grids of the time-to-digital converter TDC to constrain photon detection and improve the probability of long-distance photon preservation.
[0260] For example, the gating probability of the 5th bin in the pulse period is 0.3. Then, in the pulse period, there is a 0.3 probability that the 5th bin is the starting bin for gating and the nth bin is the ending bin for gating.
[0261] S1705: Generate a direct time-of-flight (dTOF) histogram based on the stored photons.
[0262] S1706: Perform a peak search operation according to the dTOF histogram to obtain the distance of the target object.
[0263] The above embodiments describe how to set bin gating probabilities and how to control bin enablement to constrain photon detection based on preset gating probabilities. The bin gating probabilities set in S1702 control bin enablement, thereby constraining photon detection: enabled bins can detect photons, while disabled bins cannot. Setting the gating probabilities increases the probability of detecting distant photons, thereby increasing the probability of preserving them. This facilitates ranging for distant targets in strong ambient light conditions.
[0264] In one possible implementation, after S1705, the histogram may be further filtered to obtain a filtered dTOF histogram. Filtering makes the signal light more easily identifiable. Therefore, S1706 may specifically be performed by finding a peak based on the filtered histogram to obtain the distance to the target object.
[0265] In each of the embodiments provided above, the ranging method may further include configuring the photodetection unit in a free trigger mode. The free trigger mode means that the photodetection unit does not require active circuit quenching during each pulse cycle. Active circuit quenching refers to the process of rapidly charging the photodetection unit after the photodetection unit detects a photon, enters an avalanche state, and lowers the voltage, so that the voltage exceeds the trigger threshold and can respond to newly arrived photons.
[0266] Conventional radars generally perform active circuit quenching on the photoelectric detection unit in each pulse cycle, ensuring that the photoelectric detection unit is always in a ready-to-trigger state at the beginning of each pulse cycle. This results in the probability of the histogram being triggered by ambient light at the beginning being greater than the probability of the histogram being triggered by ambient light at the end, ultimately leading to histogram distortion. Figure 20 Shown are histograms of active quenching at the beginning of each pulse cycle.
[0267] There is no active circuit quenching operation between multiple pulse cycles, and the detection of photons is only affected by the dead time of the photodetection unit. Therefore, the detection probability of photons in the first few bins of the histogram is the same as that in the middle and back bins, and there is no distortion at the beginning of the histogram. Figure 21 The histogram of the free trigger mode is shown. Figure 21 and Figure 20 It can be seen that the free trigger mode is more conducive to overcoming the distortion in the histogram at short flight times than performing active circuit quenching operations within the pulse period.
[0268] Combination of the above Figure 10 、 Figure 13 and Figure 17Three specific implementation methods for improving the probability of long-distance photon preservation and measuring the distance to the target object are introduced respectively.
[0269] Among them, for Figure 10 The method shown can control the preservation of the photon flight time by only determining the photon preservation mode, without adding additional photons to the logic judgment circuit, so it will not increase additional costs and power consumption.
[0270] for Figure 13 The method shown here simply uses a delay threshold to provide a delay for photon storage based on prior ambient light information and the device's inherent dead time. This reduces the probability of ambient light photons being stored, resulting in more balanced photon detection performance at both long and short distances. This makes the identification of long-distance signal light in strong ambient light conditions more convenient and accurate. Furthermore, this approach eliminates histogram distortion, eliminating the need for histogram filtering and thus avoiding signal attenuation caused by histogram filtering, reducing the complexity of the back-end algorithm.
[0271] for Figure 17 The method shown in the figure addresses the problem of excess detection energy for close-range targets and too low detection energy for distant targets. By setting a gating probability for each bin, the energy of close-range and distant targets is balanced. This improves the long-range measurement performance at the expense of some close-range measurement performance, so that the detection of distant targets can be guaranteed without increasing the exposure time.
[0272] Combined with the above descriptions and introductions to various embodiments, the technical solutions provided by the embodiments of this application are simple to implement. Since no additional hardware is required, they facilitate the production of miniaturized ranging products suitable for integration into devices such as mobile phones and tablets. Furthermore, accurate ranging of distant objects in bright light environments can be achieved without incurring additional power consumption or sacrificing frame rate.
[0273] Based on the distance measurement method provided in the above embodiments, the present application also provides an electronic device capable of achieving distance measurement. The specific implementation of the electronic device is described below in conjunction with the embodiments and drawings.
[0274] Electronic device embodiment:
[0275] See also Figure 22 , which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 22 As shown, the electronic equipment includes:
[0276] The electronic device includes: a laser emitter 401, a controller 404, a photoelectric sensor 403, a time-to-digital converter (TDC), and a memory. The photoelectric sensor 403 includes a plurality of photoelectric detection units, each of which has a corresponding memory space in the memory. The laser emitter 401, the TDC, and the memory are all connected to the controller 404. The photoelectric sensor 403 is connected to the TDC.
[0277] The controller 404 is used to control the laser emitter 401 to periodically emit laser pulses toward the target object;
[0278] A photoelectric detection unit is used to detect photons; the photons come from the scene where the target object is located;
[0279] TDC is used to record the flight time of photons detected by the photodetection unit. For the photodetection unit, the flight time of photons at a long distance is greater than that of photons at a short distance.
[0280] The controller 404 is further configured to obtain light intensity information; when the light intensity information satisfies a first condition, increase the probability of long-distance photon preservation by executing a first preset operation; generate a direct time-of-flight (dTOF) histogram based on the preserved photons; and perform a peak search operation based on the dTOF histogram to obtain the distance of the target object; the light intensity information is used to represent the intensity of ambient light, and the first condition includes the ambient light intensity exceeding a first light intensity threshold;
[0281] The memory is used to store the flight time of photons according to the control of the controller 404.
[0282] The electronic device provided in the embodiment of the present application controls the preservation of photons based on the intensity of the ambient light. When the ambient light intensity is strong, the probability of preserving long-distance photons is increased through a first preset operation, breaking the inherent implementation method of prioritizing the preservation of short-distance photons, thereby avoiding the problem that under strong ambient light conditions, the number of ambient light photons returned by short-range targets first accumulates to the storage limit of the memory space of the photoelectric detection unit, resulting in the inability to successfully save long-range photons. It can be seen that the ranging method provided in the first aspect can resist the interference of strong light environments during ranging, improve the probability of preserving photons returned by long-range targets, and then generate a dTOF histogram that is more balanced in the time dimension, thereby improving the ranging performance for long-range targets. Moreover, when the electronic device of the embodiment of the present application is specifically implemented, the exposure time is short, the number of exposures is small, laser energy is not wasted, and the frame rate is high and the ranging time is short. In addition, the resistance effect to strong light environments is good, and no additional hardware costs are required.
[0283] In one possible implementation of the embodiment of the present application, light intensity information representing the intensity of the ambient light can be obtained based on prior information about the ambient light. The first light intensity threshold is a limit on the number of photons stored in the memory space allocated to a single photodetection unit;
[0284] The controller 404 is specifically used to control the shutdown of the laser emitter 401, detect the ambient light of the scene where the target object is located through the photoelectric sensor 403, and obtain the measured ambient light photon density of a single photoelectric detection unit; obtain the expected value and standard deviation of the number of photons detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the pulse period; and obtain the maximum value of the number of photons detected by the single photoelectric detection unit within the pulse period as light intensity information based on the expected value, the preset coefficient and the standard deviation.
[0285] When laser emitter 401 is turned off, prior information about ambient light is obtained by obtaining the measured ambient light photon density of a single photodetection unit, and the maximum number of photons is obtained in the manner described above. It is understood that the higher the ambient light intensity, the greater the maximum number of photons, and the lower the ambient light intensity, the smaller the maximum number of photons. Therefore, the maximum number of photons can be used to characterize the intensity of the ambient light and thus can be used as light intensity information to determine whether the first condition is met. The electronic device can use the pre-acquired light intensity information to select a specific photon storage mode, i.e., select FIFO mode or LIFO mode. Subsequent storage is then performed based on the selected photon storage mode.
[0286] For example, when the light intensity information meets the first condition, it indicates that the ambient light intensity is too strong and the storage of ambient light photons needs to be restricted. The controller 404 is specifically configured to control the memory to preferentially store the flight times of the plurality of photons detected by the photodetection unit in the memory space corresponding to the photodetection unit.
[0287] The flight times of several photons detected by the photodetection unit are saved first in the memory space corresponding to that photodetection unit. In other words, the LIFO mode is selected to prioritize the flight times of distant photons, preventing the memory from reaching its storage limit prematurely due to the early saving of nearby photons. This increases the probability of saving distant photons and improves the detection performance of distant targets.
[0288] The electronic device provided in the embodiment of the present application may further include a cache Buffer, and the cache Buffer and memory Memory store the flight time of photons under the control of the controller 404; the memory stores photon events (photon events represent associated data of photons recorded in the cache or memory, and photon events include the flight time of photons) from the cache Buffer.
[0289] As mentioned above, when the light intensity information meets the first condition, it indicates that the ambient light intensity is too strong, and it is necessary to save photons in LIFO mode to intervene to increase the probability of saving long-distance photons. In addition, when the light intensity information does not meet the first condition, the controller 404 can also be used to preferentially save the flight time of several photons detected later by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit, or preferentially save the flight time of several photons detected earlier by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit when the light intensity information meets the second condition; the second condition includes that the ambient light intensity does not exceed the second light intensity threshold; the second light intensity threshold is less than or equal to the first light intensity threshold.
[0290] When the light intensity information meets the second condition, it indicates that the photodetection unit is sufficient to store both ambient light photons and signal light photons. The number of ambient light photons does not interfere with or hinder the storage of signal light photons. Therefore, either LIFO or FIFO mode can be selected to store the photon flight time. To further reduce power consumption, FIFO mode can be preferred as the photon storage mode when the light intensity information meets the second condition.
[0291] Through the above scheme, a photon storage mode is selected based on light intensity information, the first condition, and the second condition. This prioritizes storing the flight times of several photons detected later or earlier. This increases the probability of preserving long-range photons. Ultimately, even with a slight decrease in detection performance for close-range photons, detection requirements can still be met. Crucially, this electronic device effectively improves long-range photon detection performance, facilitating accurate ranging of distant targets even in strong ambient light conditions.
[0292] In another possible implementation of the embodiment of the present application, a delay threshold for delaying photon preservation can be obtained based on prior information about ambient light. During actual photon detection and preservation, this delay threshold is used as a constraint to constrain the preservation of the photon's flight time. The following describes another implementation of controller 404 performing the first preset operation to increase the probability of long-distance photon preservation, namely, the application of the delay threshold.
[0293] Controller 404 is specifically used to obtain a delay threshold for photon preservation; for photons continuously detected by the photoelectric detection unit within a pulse period, it is determined whether the difference between the arrival time of the current photon and the previous photon whose flight time was successfully preserved is greater than the delay threshold; if so, the memory is controlled to save the flight time of the current photon to the memory space corresponding to the photoelectric detection unit; the delay threshold is used to provide a delay for the preservation of photons, so that the difference between the arrival times of two photons whose flight times are continuously preserved in the memory space corresponding to the photoelectric detection unit is greater than the dead time of the photoelectric detection unit; the arrival time of the photon is the time when the photoelectric detection unit detects the photon.
[0294] In this implementation of the present invention, a delay threshold is used to thin out the stored photons in the temporal dimension. Under strong ambient light conditions, the constraints on the storage of ambient light photons are much stronger than those on the storage of signal light photons. This prevents the number of stored ambient light photons from prematurely reaching the storage limit, thus preventing interference with the preservation of the flight time of long-range signal light photons. This increases the probability of long-range photon storage, improves detection performance of distant targets, and enables precise ranging of distant targets.
[0295] In this implementation, since there is no distortion or the distortion is very small in the histogram, no additional filtering operation is required, thus saving hardware costs.
[0296] Optionally, the controller 404 is specifically used to control the shutdown of the laser emitter 401, detect the ambient light of the scene where the target object is located through the photoelectric sensor 403, and obtain the measured ambient light photon density of a single photoelectric detection unit; obtain the expected value and standard deviation of the number of photons detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the pulse period; and obtain the theoretical value of the photon density detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the dead time of the single photoelectric detection unit; obtain the maximum number of photons detected by the single photoelectric detection unit within the pulse period based on the expected value, the preset coefficient and the standard deviation; and obtain the delay threshold based on the pulse period, the maximum number of photons and the theoretical value of the photon density.
[0297] By deriving the delay threshold based on a priori information about ambient light obtained when laser emitter 401 is turned off, the set delay threshold can be more accurately tailored to the actual ambient light conditions. This allows for more precise and accurate constraints on photon preservation, preventing problems such as excessively long delay thresholds and excessively strong constraints that could affect ranging. It also avoids problems such as excessively short delay thresholds and weak constraints that could lead to a subtle improvement in the probability of long-distance photon preservation and suboptimal ranging performance.
[0298] Optionally, the delay threshold is obtained by the following formula:
[0299]
[0300] Among them, N det Indicates the maximum number of photons detected by a single photodetection unit, T p represents the pulse period, τ delay represents the time delay threshold, and λ represents the theoretical value of the photon density detected by a single photoelectric detection unit within a pulse period.
[0301] When detecting photons, the photodetection unit can operate in free-trigger mode. Compared to active circuit quenching during the pulse period, free-trigger mode effectively reduces distortion at short flight times in the resulting histogram, thereby reducing interference with peak detection and improving ranging accuracy for distant targets.
[0302] In the electronic device provided in the embodiment of the present application, in some implementations, a histogram is formed directly based on the stored photons, and distortion may still exist in the histogram. Therefore, the electronic device, the controller 404 can also be used to filter according to the dTOF histogram to obtain a filtered dTOF histogram; and then specifically used to find the peak according to the filtered dTOF histogram to obtain the direct flight time corresponding to the peak; according to the direct flight time corresponding to the peak and the speed of light, the distance of the target object is obtained.
[0303] By filtering the histogram, the accuracy and precision of peak finding are improved, thereby improving the accuracy and precision of target ranging. On the basis of increasing the probability of saving long-distance photons through the first preset operation, the detection performance of long-distance targets is further guaranteed.
[0304] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A distance measurement method, characterized in that: include: Periodically emit laser pulses toward the target object; Acquiring light intensity information, where the light intensity information is used to represent the intensity of ambient light; When the light intensity information satisfies a first condition, a first preset operation is performed to increase the probability of long-distance photon preservation; wherein the first condition includes the light intensity of the ambient light exceeding a first light intensity threshold, the first light intensity threshold being a limit on the number of photons stored in the memory space allocated to a single photodetection unit; Generate a direct time-of-flight dTOF histogram based on the saved photons; A peak search operation is performed according to the dTOF histogram to obtain the distance of the target object.
2. The distance measurement method according to claim 1, wherein: The obtaining of light intensity information specifically includes: Turning off the laser emitter, detecting the ambient light of the scene where the target object is located, and obtaining the measured ambient light photon density of a single photoelectric detection unit; Obtaining an expected value and a standard deviation of the number of photons detected by a single photodetection unit within a pulse period according to the measured ambient light photon density and the pulse period; The maximum number of photons detected by a single photoelectric detection unit within a pulse period is obtained as the light intensity information according to the expected value, the preset coefficient and the standard deviation.
3. The distance measurement method according to claim 2, wherein: Also includes: When the light intensity information meets the second condition, the flight time of each of the several photons detected later by the photoelectric detection unit is preferentially saved in the memory space corresponding to the photoelectric detection unit, or the flight time of each of the several photons detected first by the photoelectric detection unit is preferentially saved in the memory space corresponding to the photoelectric detection unit; the second condition includes that the light intensity of the ambient light does not exceed the second light intensity threshold; the second light intensity threshold is less than or equal to the first light intensity threshold.
4. The distance measurement method according to any one of claims 1 to 3, characterized in that: The method of increasing the probability of long-distance photon preservation by performing the first preset operation specifically includes: The flight times of the respective photons detected by the photoelectric detection unit are preferentially saved in the memory space corresponding to the photoelectric detection unit.
5. The distance measurement method according to claim 1, wherein: The method of increasing the probability of long-distance photon preservation by performing the first preset operation specifically includes: Obtaining a delay threshold for photon storage; the delay threshold is used to provide a delay for photon storage so that the difference between the arrival times of two photons whose flight times are continuously stored in the memory space corresponding to the photoelectric detection unit is greater than the dead time of the photoelectric detection unit; the arrival time of the photon is the time when the photoelectric detection unit detects the photon; For the photons continuously detected by the photoelectric detection unit within the pulse period, determine whether the difference between the arrival time of the current photon and the previous photon whose flight time was successfully saved is greater than the delay threshold. If so, save the flight time of the current photon to the memory space corresponding to the photoelectric detection unit.
6. The distance measurement method according to claim 5, characterized in that: The delay threshold for obtaining photon preservation specifically includes: Turning off the laser emitter, detecting the ambient light of the scene where the target object is located, and obtaining the measured ambient light photon density of a single photoelectric detection unit; Obtaining an expected value and a standard deviation of the number of photons detected by a single photodetection unit within a pulse period based on the measured ambient light photon density and the pulse period; and obtaining a theoretical value of the photon density detected by a single photodetection unit within a pulse period based on the measured ambient light photon density and the dead time of the single photodetection unit; Obtaining the maximum number of photons detected by a single photoelectric detection unit within a pulse period according to the expected value, the preset coefficient and the standard deviation; The delay threshold is obtained according to the pulse period, the maximum value of the number of photons and the theoretical value of the photon density.
7. The distance measurement method according to claim 6, characterized in that: The delay threshold is specifically obtained by the following formula: Among them, the N det It represents the maximum number of photons detected by a single photodetection unit. p represents the pulse period, the τ delay represents the time delay threshold, and λ represents the theoretical value of the photon density detected by a single photoelectric detection unit within a pulse period.
8. The distance measurement method according to any one of claims 1 to 3, characterized in that: The light intensity information is obtained by using data collected by a photoelectric detection unit.
9. The distance measurement method according to any one of claims 1 to 3, characterized in that: The photoelectric detection unit works in free trigger mode.
10. The distance measurement method according to any one of claims 1 to 3, characterized in that: After generating the direct time of flight dTOF histogram, the method further includes: Filtering according to the dTOF histogram to obtain a filtered dTOF histogram; The step of finding a peak according to the dTOF histogram to obtain the distance of the target object specifically includes: Finding a peak according to the filtered dTOF histogram to obtain the direct flight time corresponding to the peak; The distance of the target object is obtained according to the direct flight time corresponding to the peak and the speed of light.
11. An electronic device, characterized in that: include: A laser emitter, a controller, a photoelectric sensor, a time-to-digital converter (TDC), and a memory; the photoelectric sensor includes a plurality of photoelectric detection units, each photoelectric detection unit having a corresponding memory space in the memory; the laser emitter, the TDC, and the memory are all connected to the controller; the photoelectric sensor is connected to the TDC; The controller is used to control the laser emitter to periodically emit laser pulses toward the target object; The photoelectric detection unit is used to detect photons; the photons come from the scene where the target object is located; The TDC is used to record the flight time of photons detected by the photodetection unit; for the photodetection unit, the flight time of long-distance photons is greater than the flight time of short-distance photons; The controller is further configured to obtain light intensity information; when the light intensity information satisfies a first condition, increase the probability of long-distance photon preservation by executing a first preset operation; generate a direct time-of-flight (dTOF) histogram based on the preserved photons; and perform a peak search operation based on the dTOF histogram to obtain the distance of the target object; the light intensity information is used to represent the intensity of ambient light, the first condition including the intensity of the ambient light exceeding a first light intensity threshold, the first light intensity threshold being a limit on the number of photons stored in the memory space allocated to a single photodetection unit; The memory is used to store the flight time of photons according to the control of the controller.
12. The electronic device according to claim 11, wherein: The controller is specifically used to control the shutdown of the laser emitter, detect the ambient light of the scene where the target object is located through the photoelectric sensor, and obtain the measured ambient light photon density of a single photoelectric detection unit; obtain the expected value and standard deviation of the number of photons detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the pulse period; and obtain the maximum value of the number of photons detected by the single photoelectric detection unit within the pulse period as the light intensity information based on the expected value, the preset coefficient and the standard deviation.
13. The electronic device according to claim 12, wherein: The controller is also used to, when the light intensity information meets a second condition, preferentially save the flight time of each of the several photons detected later by the photoelectric detection unit into the memory space corresponding to the photoelectric detection unit, or preferentially save the flight time of each of the several photons detected earlier by the photoelectric detection unit into the memory space corresponding to the photoelectric detection unit; the second condition includes that the intensity of the ambient light does not exceed a second light intensity threshold; the second light intensity threshold is less than or equal to the first light intensity threshold.
14. The electronic device according to any one of claims 11 to 13, characterized in that: The controller is specifically used to control the memory to preferentially save the flight times of the respective photons detected by the photoelectric detection unit to the memory space corresponding to the photoelectric detection unit.
15. The electronic device according to claim 11, wherein The controller is specifically used to obtain a delay threshold for photon preservation; for photons continuously detected by the photoelectric detection unit within a pulse period, it is determined whether the difference between the arrival time of the current photon and the previous photon whose flight time was successfully preserved is greater than the delay threshold; if so, the memory is controlled to save the flight time of the current photon to the memory space corresponding to the photoelectric detection unit; the delay threshold is used to provide a delay for the preservation of photons, so that the difference between the arrival times of two photons whose flight times are continuously preserved in the memory space corresponding to the photoelectric detection unit is greater than the dead time of the photoelectric detection unit; the arrival time of the photon is the moment when the photoelectric detection unit detects the photon.
16. The electronic device according to claim 15, characterized in that The controller is specifically used to control the shutdown of the laser emitter, detect the ambient light of the scene where the target object is located through the photoelectric sensor, and obtain the measured ambient light photon density of a single photoelectric detection unit; obtain the expected value and standard deviation of the number of photons detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the pulse period; and obtain the theoretical value of the photon density detected by the single photoelectric detection unit within the pulse period based on the measured ambient light photon density and the dead time of the single photoelectric detection unit; obtain the maximum number of photons detected by the single photoelectric detection unit within the pulse period based on the expected value, the preset coefficient and the standard deviation; and obtain the delay threshold based on the pulse period, the maximum number of photons and the theoretical value of the photon density.
17. The electronic device according to claim 16, wherein: The delay threshold is specifically obtained by the following formula: Among them, the N det It represents the maximum number of photons detected by a single photodetection unit. p represents the pulse period, the τ delay represents the time delay threshold, and λ represents the theoretical value of the photon density detected by a single photoelectric detection unit within a pulse period.
18. The electronic device according to any one of claims 11 to 13, characterized in that: Each photoelectric detection unit of the photoelectric sensor operates in a free trigger mode.
19. The electronic device according to any one of claims 11 to 13, characterized in that: The controller is further configured to perform filtering according to the dTOF histogram to obtain a filtered dTOF histogram; The controller is specifically used to find the peak according to the filtered dTOF histogram to obtain the direct flight time corresponding to the peak; and obtain the distance of the target object according to the direct flight time corresponding to the peak and the speed of light.
Citation Information
Patent Citations
Distance measurement method and system and computer readable storage medium
CN111766596A