Ranging methods, systems, devices and computer-readable storage media
By employing the random photon method in the photon time-of-flight ranging system, the measurement results of a subset of photons are randomly determined for storage or output, thus solving the problem of histogram distortion under strong noise and achieving high-precision long-distance and short-distance ranging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2022-06-27
- Publication Date
- 2026-05-26
AI Technical Summary
Existing photon time-of-flight ranging systems are prone to histogram distortion under strong ambient noise, leading to decreased accuracy in long-distance ranging while increasing circuit power consumption and area.
A photon time-of-flight ranging scheme based on the random photon method is adopted. The laser emitter periodically emits lasers, and the laser receiver randomly determines at least one target photon for storage or output in each cycle, thereby reducing the amount of data stored or output and avoiding histogram distortion under strong noise.
While reducing the storage circuit area, it improves the accuracy of long-distance ranging and maintains the accuracy of short-distance ranging under strong ambient background noise.
Smart Images

Figure CN117331087B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser technology, and more particularly to a ranging method, system, device, and computer-readable storage medium. Background Technology
[0002] Time-of-flight (TOF) photon ranging is a commonly used distance measurement method. It involves emitting a laser beam from a laser emitter and receiving individual reflected photons with a highly sensitive laser receiver. Distance is measured by determining the time it takes for the photons to travel. The high sensitivity of TOF photon ranging allows for long-range distance measurement.
[0003] In existing photon time-of-flight ranging systems, histogram analysis and peak finding are typically performed on the flight times of all photons received by the laser receiver to obtain the most accurate flight time of the reflected photons. However, in practical applications, before performing histogram analysis, a large amount of storage circuitry is needed to store the flight times of all received photons, or a high-bandwidth data transmission circuit is needed to transmit the received photon flight times to the histogram analysis module. This significantly increases the power consumption and area of the circuit. Currently, to alleviate the pressure on power consumption and area, the first-photon detection method for data compression has been proposed. That is, in a single laser emission, the ranging system only stores and transmits the flight time of the first photon received by the laser receiver.
[0004] However, numerous experiments have shown that in the first-photon detection method, when the ambient background noise is weak, peak finding of the histogram can yield photon flight times that can be used for accurate ranging; however, under strong ambient background noise, the histogram will be severely distorted, making the peak finding results unsuitable for accurate ranging over long distances. Summary of the Invention
[0005] The main objective of this invention is to provide a ranging method, system, device, and computer-readable storage medium, aiming to propose a photon time-of-flight ranging scheme based on the random photon method, so as to alleviate the pressure on circuit area while improving the accuracy of long-distance ranging.
[0006] To achieve the above objectives, the present invention provides a ranging method, the method comprising the following steps:
[0007] The laser emitter periodically emits laser light, and the laser light reflected from the target object is received by the laser receiver.
[0008] At least one target photon is randomly selected from the photons received by the laser receiver within a laser emission cycle. The measurement result corresponding to the target photon is stored or output to determine the ranging result of the target object based on the measurement result stored or output within multiple laser emission cycles. The number of target photons determined within a laser emission cycle is less than the total number of photons received by the laser receiver within the corresponding laser emission cycle.
[0009] Optionally, the step of randomly determining at least one target photon among the photons received by the laser receiver within a laser emission cycle includes:
[0010] For any target laser emission period of the laser emitter, obtain the random number corresponding to the target laser emission period;
[0011] Based on the comparison between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, at least one target photon is determined from the photons received by the laser receiver within the target laser emission period, and the measurement result corresponding to the obtained target photon is stored or output.
[0012] Optionally, the step of determining at least one target photon from among the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and storing or outputting the measurement result corresponding to the obtained target photon includes:
[0013] Count the total number of photons received by the laser receiver during the target laser emission cycle;
[0014] If the total number of photons is greater than or equal to the random number corresponding to the target laser emission period, then the random number corresponding to the target laser emission period is used as the target sequence number;
[0015] If the total number of photons is less than the target random number corresponding to the target laser emission period, then the total number of photons is determined as the target sequence number;
[0016] The photon with the target index among the photons received by the laser receiver within the target laser emission period is taken as the target photon, and the measurement result corresponding to the obtained target photon is stored or output. The photons received within the target laser emission period are ordered according to the order of reception time.
[0017] Optionally, the step of obtaining the random number corresponding to the target laser emission period includes:
[0018] When the target laser emission period is the first emission period of the laser emitter, the preset initial value is set to a random number corresponding to the target laser emission period;
[0019] When the target laser emission period is the first or subsequent emission period of the laser emitter, if the total number of photons received by the laser receiver in the previous laser emission period is less than the random number corresponding to the previous laser emission period, then the preset initial value is set to the random number corresponding to the target laser emission period. If the total number of photons received by the laser receiver in the previous laser emission period is greater than or equal to the random number corresponding to the previous laser emission period, then the result of adding 1 to the random number corresponding to the previous laser emission period is set as the random number corresponding to the target laser emission period. Here, the previous laser emission period is the emission period preceding the target laser emission period.
[0020] Optionally, the step of determining at least one target photon from among the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and storing or outputting the measurement result corresponding to the obtained target photon includes:
[0021] Whenever the laser receiver receives a photon during the target laser emission cycle, it increments the number of photons recorded in the counter by 1 and obtains the measurement result of the received photon, wherein the counter is set to 0 when entering the target laser emission cycle;
[0022] After each update of the photon count in the counter, it is checked whether the updated photon count is less than or equal to the random number corresponding to the target laser emission period;
[0023] If the updated number of photons is less than or equal to the random number corresponding to the target laser emission period, then the historical measurement results in the buffer are updated using the measurement results of the obtained photons;
[0024] If the updated number of photons is greater than the random number corresponding to the target laser emission period, the measurement result of the obtained photons is discarded.
[0025] At the end of the target laser emission cycle, the measurement results of the target photons in the buffer are stored or output.
[0026] Optionally, when the measurement result is the time of flight of the target photon, after the step of storing the obtained measurement result corresponding to the target photon, the method further includes:
[0027] When the number of stored photon flight times reaches a preset number, histogram statistics are performed based on each stored flight time.
[0028] The target flight time is obtained by finding the peak of the statistically obtained histogram;
[0029] The distance measurement result of the target object is calculated based on the target's flight time.
[0030] To achieve the above objectives, the present invention also provides a ranging system, the ranging system comprising:
[0031] A laser transceiver module is used to periodically emit laser light through a laser transmitter and receive the laser light reflected from the target object through a laser receiver.
[0032] An output module is configured to randomly determine at least one target photon from among the photons received by the laser receiver in a laser emission cycle, store or output the measurement result corresponding to the target photon, so as to determine the ranging result of the target object based on the measurement results stored or output in multiple laser emission cycles, wherein the number of target photons determined in a laser emission cycle is less than the total number of photons received by the laser receiver in the corresponding laser emission cycle.
[0033] Optionally, the output module includes:
[0034] The random number unit is used to obtain a random number corresponding to any target laser emission cycle of the laser emitter.
[0035] The output unit is used to determine at least one target photon from the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and to store or output the measurement result corresponding to the obtained target photon.
[0036] To achieve the above objectives, the present invention also provides a ranging device, the ranging device comprising: a memory, a processor, and a ranging program stored in the memory and executable on the processor, wherein the ranging program, when executed by the processor, implements the steps of the ranging method as described above.
[0037] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a ranging program, which, when executed by a processor, implements the steps of the ranging method described above.
[0038] In this invention, a laser emitter periodically emits laser light, and a laser receiver receives the laser light reflected from the target object. At least one target photon is randomly selected from the photons received by the laser receiver within a laser emission cycle. The measurement results corresponding to the obtained target photons are stored or output, so as to determine the ranging result of the target object based on the measurement results stored or output within multiple laser emission cycles. The number of target photons determined within a laser emission cycle is limited to less than the total number of photons received by the laser receiver within the corresponding laser emission cycle, thus realizing a photon time-of-flight ranging scheme based on the random photon method. Compared to storing or outputting the measurement results of all photons received in each laser emission cycle, the photon time-of-flight ranging scheme based on the random photon method in this invention stores or outputs the measurement results of a subset of photons by randomly determining them. This reduces the amount of data that needs to be stored or output, thereby reducing the required storage circuit area or memory size. Compared to the first-photon detection method, this invention uses a random determination method, which avoids the situation where the histogram is severely distorted under strong environmental background noise. This ensures the accuracy of short-range ranging while also improving the accuracy of long-range ranging. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention;
[0040] Figure 2 This is a flowchart illustrating the first embodiment of the ranging method of the present invention;
[0041] Figure 3 This is a timing diagram of a ranging system circuit according to an embodiment of the present invention.
[0042] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0043] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0044] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0045] It should be noted that the ranging device in this embodiment of the invention can be a smartphone, personal computer, server, or other similar device, and no specific limitation is made here. At least one first camera unit is installed at the entrance of the cleaning area of the construction site, and at least one second camera unit is installed at the exit of the cleaning area.
[0046] like Figure 1 As shown, the ranging device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0047] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the ranging device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0048] like Figure 1 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a ranging program. The operating system is a program that manages and controls the device's hardware and software resources, supporting the operation of the ranging program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the ranging program stored in the memory 1005 and perform the following operations:
[0049] The laser emitter periodically emits laser light, and the laser light reflected from the target object is received by the laser receiver.
[0050] At least one target photon is randomly selected from the photons received by the laser receiver within a laser emission cycle. The measurement result corresponding to the target photon is stored or output to determine the ranging result of the target object based on the measurement result stored or output within multiple laser emission cycles. The number of target photons determined within a laser emission cycle is less than the total number of photons received by the laser receiver within the corresponding laser emission cycle.
[0051] Furthermore, the operation of randomly determining at least one target photon among the photons received by the laser receiver within a laser emission cycle includes:
[0052] For any target laser emission period of the laser emitter, obtain the random number corresponding to the target laser emission period;
[0053] Based on the comparison between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, at least one target photon is determined from the photons received by the laser receiver within the target laser emission period, and the measurement result corresponding to the obtained target photon is stored or output.
[0054] Further, the step of determining at least one target photon from among the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and storing or outputting the measurement result corresponding to the obtained target photon includes:
[0055] Count the total number of photons received by the laser receiver during the target laser emission cycle;
[0056] If the total number of photons is greater than or equal to the random number corresponding to the target laser emission period, then the random number corresponding to the target laser emission period is used as the target sequence number;
[0057] If the total number of photons is less than the target random number corresponding to the target laser emission period, then the total number of photons is determined as the target sequence number;
[0058] The photon with the target index among the photons received by the laser receiver within the target laser emission period is taken as the target photon, and the measurement result corresponding to the obtained target photon is stored or output. The photons received within the target laser emission period are ordered according to the order of reception time.
[0059] Furthermore, the operation of obtaining the random number corresponding to the target laser emission period includes:
[0060] When the target laser emission period is the first emission period of the laser emitter, the preset initial value is set to a random number corresponding to the target laser emission period;
[0061] When the target laser emission period is the first or subsequent emission period of the laser emitter, if the total number of photons received by the laser receiver in the previous laser emission period is less than the random number corresponding to the previous laser emission period, then the preset initial value is set to the random number corresponding to the target laser emission period. If the total number of photons received by the laser receiver in the previous laser emission period is greater than or equal to the random number corresponding to the previous laser emission period, then the result of adding 1 to the random number corresponding to the previous laser emission period is set as the random number corresponding to the target laser emission period. Here, the previous laser emission period is the emission period preceding the target laser emission period.
[0062] Further, the step of determining at least one target photon from among the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and storing or outputting the measurement result corresponding to the obtained target photon includes:
[0063] Whenever the laser receiver receives a photon during the target laser emission cycle, it increments the number of photons recorded in the counter by 1 and obtains the measurement result of the received photon, wherein the counter is set to 0 when entering the target laser emission cycle;
[0064] After each update of the photon count in the counter, it is checked whether the updated photon count is less than or equal to the random number corresponding to the target laser emission period;
[0065] If the updated number of photons is less than or equal to the random number corresponding to the target laser emission period, then the historical measurement results in the buffer are updated using the measurement results of the obtained photons;
[0066] If the updated number of photons is greater than the random number corresponding to the target laser emission period, the measurement result of the obtained photons is discarded.
[0067] At the end of the target laser emission cycle, the measurement results of the target photons in the buffer are stored or output.
[0068] Furthermore, when the measurement result is the time of flight of the target photon, after storing the obtained measurement result corresponding to the target photon, the method further includes:
[0069] When the number of stored photon flight times reaches a preset number, histogram statistics are performed based on each stored flight time.
[0070] The target flight time is obtained by finding the peak of the statistically obtained histogram;
[0071] The distance measurement result of the target object is calculated based on the target's flight time.
[0072] Based on the above structure, various embodiments of the ranging method are proposed.
[0073] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the ranging method of the present invention.
[0074] This invention provides an embodiment of a ranging method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order. In this embodiment, the executing entity of the ranging method can be a ranging system, which can be a smartphone, personal computer, server, or other device that communicates with a laser transmitter and laser receiver to exchange data; alternatively, the testing system can be a circuit system composed of a laser transmitter and laser receiver, etc., where the various components are connected according to the needs of data or signal interaction. The connection method can be determined based on the form of the data or signals to be exchanged, and is not limited in this embodiment. In this embodiment, for ease of description, the ranging system is used as the executing entity. In this embodiment, the ranging method includes the following steps:
[0075] Step S10: Periodically emit laser light through a laser emitter and receive the laser light reflected from the target object through a laser receiver;
[0076] A laser emitter is a device that emits laser light. A laser receiver is paired with a laser emitter and receives the laser light emitted by the laser emitter after it has been reflected by a target object. The target object is the object whose distance needs to be measured. The measured distance is generally the distance between the target object and a reference point that has been pre-calibrated based on the positions of the laser emitter and the laser receiver.
[0077] The ranging system periodically emits laser light through a laser emitter and receives the reflected laser light from the target object through a laser receiver. The period length of the laser emission cycle can be set as needed and is not limited in this embodiment. Within each laser emission cycle, the laser emitter may emit multiple photons, and the laser receiver may receive one or more photons within that cycle.
[0078] The ranging system obtains the measurement result corresponding to a photon based on the time it takes for the laser emitter to emit a photon and the time it takes for the laser receiver to receive the photon. The measurement result can be used to directly or indirectly determine the distance to a target object, and this embodiment is not limited to this. For example, in a specific implementation, the measurement result may include the emission and reception times of the photon, that is, directly obtaining the time it takes for the laser emitter to emit the photon and the time it takes for the laser receiver to receive the photon as the measurement result; or, the measurement result may also be the round-trip flight time of the photon, that is, the reception time minus the emission time; or the measurement result may also be the distance calculated based on the flight time, that is, the reception time minus the emission time multiplied by the speed of light and then divided by 2. This distance is calculated based on a single photon and is not the final ranging result; or the measurement result may also be other results that can be calculated based on the emission and reception times of the photon.
[0079] In this embodiment, there are no restrictions on the method for determining whether the photons emitted by the laser emitter and the photons received by the laser receiver are the same photons.
[0080] Step S20: Randomly determine at least one target photon from the photons received by the laser receiver in one laser emission cycle, and store or output the measurement result corresponding to the target photon so as to determine the ranging result of the target object based on the measurement results stored or output in multiple laser emission cycles, wherein the number of target photons determined in one laser emission cycle is less than the total number of photons received by the laser receiver in the corresponding laser emission cycle.
[0081] For each laser emission cycle, the ranging system stores or outputs the photon measurement results in the same way. Therefore, the following explanation uses one laser emission cycle as an example.
[0082] Within a laser emission cycle, the ranging system randomly selects at least one photon (hereinafter referred to as the target photon) from the photons received by the laser receiver within that laser emission cycle, and stores or outputs the measurement result corresponding to the target photon. There are many methods for randomly selecting at least one photon from multiple photons, and this embodiment is not limited to any particular method. It is only necessary to ensure a certain degree of randomness to avoid storing or outputting the measurement results of the same photon with the same sequence number in each laser emitter cycle. The photon's sequence number refers to the number assigned to the photon within a laser emission cycle according to the order in which it is received by the laser receiver. It should be noted that the concept of sequence number is introduced here to explain the effect achievable by the ranging scheme in this embodiment. However, in specific implementations, the method of randomly selecting the target photon may or may not include numbering the photon, but it can still achieve the effect of avoiding storing or outputting the measurement results of the same photon with the same sequence number in each laser emitter cycle.
[0083] In a specific implementation, the ranging system may determine the target photon during the laser emission cycle of the laser emitter, or it may begin determining the target photon at the end of the laser emission cycle; this embodiment is not limited to either. Furthermore, in a specific implementation, the ranging system may first acquire the measurement results of all photons received by the laser receiver during the laser emission cycle, then determine the target photon, and then store or output the measurement results of the target photon; alternatively, it may acquire the measurement results of the target photon for storage or output after determining the target photon.
[0084] The ranging system stores the measurement results of the target photons in its memory or storage circuit. After multiple laser emission cycles, the ranging system determines the distance to the target based on the measurement results stored in the memory or storage circuit. The ranging system outputs the measurement results of the target photons either to other devices connected in communication with the ranging system, where the other devices determine the distance to the target based on the measurement results received during the multiple laser emission cycles, or to a statistical module within the ranging system, where the statistical module determines the distance to the target based on the measurement results received during the multiple laser emission cycles.
[0085] The number of target photons determined by the ranging system within one laser emission cycle is less than the total number of photons received by the laser receiver within that laser emission cycle. In other words, the ranging system only stores or outputs the measurement results of a portion of the photons received within one laser emission cycle.
[0086] The number of laser emission cycles can be set as needed and is not limited in this embodiment. It is understood that statistically analyzing the measurement results of all photons received in each laser emission cycle to determine the ranging result results results in a large amount of data requiring storage. In this embodiment, the number of laser emission cycles remains constant, and only a portion of the photon measurement results are stored within each laser emission cycle. This reduces the amount of data requiring storage, thereby reducing the area of the storage circuitry or the size of the memory in the ranging system. Similarly, when the ranging system outputs the measurement results, compared to outputting the measurement results of all photons, this embodiment reduces the amount of data requiring output, thus reducing the required data output bandwidth.
[0087] There are many ways to determine the ranging result of a target object based on the measurement results of individual photons, and this embodiment does not impose any limitations. For example, in one embodiment, a histogram statistical method can be used to find the peaks in the statistical histogram, and the ranging result of the target object can be determined based on the peak finding result. When the histogram statistical method is used, the ranging system can output the measurement results of the target photons to the histogram statistical module, which is used to determine the ranging result of the target object based on the various measurement results received in multiple laser emission cycles.
[0088] Additionally, it should be noted that since the measurement results of the photons stored or output in each laser emission cycle are randomly determined, compared to storing or outputting the measurement results of the first photon received in each laser emission cycle, the severe distortion of the histogram under strong environmental background noise is avoided. Thus, while ensuring the accuracy of short-range ranging, the accuracy of long-range ranging is also improved.
[0089] In this embodiment, a laser emitter periodically emits laser light, and a laser receiver receives the laser light reflected from the target object. At least one target photon is randomly selected from the photons received by the laser receiver within a laser emission cycle. The measurement results corresponding to the obtained target photons are stored or output, so as to determine the ranging result of the target object based on the measurement results stored or output within multiple laser emission cycles. The number of target photons determined within a laser emission cycle is limited to less than the total number of photons received by the laser receiver within the corresponding laser emission cycle, thus realizing a photon time-of-flight ranging scheme based on the random photon method. Compared to storing or outputting the measurement results of all photons received in each laser emission cycle, the photon time-of-flight ranging scheme based on the random photon method in this embodiment stores or outputs the measurement results of a subset of photons by randomly determining them. This reduces the amount of data that needs to be stored or output, thereby reducing the required storage circuit area or memory size. Compared to the first-photon detection method, this embodiment uses a random determination method, which avoids the situation where the histogram is severely distorted under strong environmental background noise. This ensures the accuracy of short-range ranging while also improving the accuracy of long-range ranging.
[0090] Furthermore, based on the first embodiment described above, a second embodiment of the ranging method of the present invention is proposed. In this embodiment, step S20 includes:
[0091] Step S201: For any target laser emission cycle of the laser emitter, obtain the random number corresponding to the target laser emission cycle;
[0092] The following explanation uses a single laser emission cycle as an example; for clarity, this laser emission cycle will be referred to as the target laser emission cycle. The ranging system can obtain a random number corresponding to the target laser emission cycle.
[0093] In this embodiment, the method for obtaining the random number corresponding to the target laser emission period is not limited. For example, the random number can be generated in real time, or a pre-generated random number stored in the ranging system can be called. There are many methods for generating random numbers in real time, such as using a random number generator, or other methods. This embodiment does not impose any restrictions.
[0094] Step S202: Based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, at least one target photon is determined from the photons received by the laser receiver within the target laser emission period, and the measurement result corresponding to the obtained target photon is stored or output.
[0095] After obtaining the random number corresponding to the target laser emission period, the ranging system can compare the random number with the number of photons received by the laser receiver within the target laser emission period. Based on the comparison result, at least one target photon can be determined from the photons received within the target laser emission period, and the measurement result corresponding to the target photon can be stored or output.
[0096] In this embodiment, there are no restrictions on the rules for determining the target photon based on the comparison result between the random number and the photon count. It is understood that a uniform rule is used across all laser emission cycles. Since random numbers have a certain degree of randomness, the random numbers corresponding to each laser emission cycle may be the same or different. Similarly, the number of photons received by the laser receiver in each laser emission cycle may also be the same or different. Therefore, the result of comparing the random number with the photon count in each laser emission cycle is also random. This ensures that when the target photon is determined according to the comparison result using a uniform rule in each laser emission cycle, the sequence number of the target photon determined in each laser emission cycle is also random. This avoids storing or outputting the measurement results of the same sequence number photon in each laser emitter cycle, thereby preventing severe distortion of the histogram under strong background noise.
[0097] In a specific implementation, comparing the random number with the number of photons received by the laser receiver within the target laser emission cycle can be achieved by starting photon counting as soon as the target laser emission cycle begins, comparing the count with the random number each time it changes, and determining whether to use the received photon as the target photon based on the comparison result, i.e., determining whether to store or output the measurement result of the received photon. Alternatively, comparing the random number with the number of photons received by the laser receiver within the target laser emission cycle can also be achieved by comparing the random number with the total number of photons received during the target laser emission cycle after the target laser emission cycle ends, and determining which photon(s) to use as the target photon based on the comparison result, i.e., determining which photon(s) to store or output the measurement result of.
[0098] In a specific implementation, the ranging system can use a counter (hereinafter also referred to as a photon counter) to count the photons received by the laser receiver. The counter is set to 0 when entering the target laser emission cycle, and incremented by 1 for each received photon. When the ranging system is an independent device communicating with the laser transmitter and laser receiver, the laser transmitter can send an indication message to the ranging system indicating the start of a new laser emission cycle. Alternatively, the laser transmitter and ranging system can be pre-synchronized, with the duration of the laser emission cycle and the start time of the first laser emission cycle set to ensure synchronization between the ranging system and the laser transmitter. Each time the laser receiver receives a photon, it sends an indication message to the ranging system, which then controls the counter to count based on the indication message. When the ranging system is a circuit system consisting of a laser emitter and a laser receiver, the circuit system (ranging system) may also include a counter; the laser emitter periodically emits laser light and also periodically sends signals to the counter to instruct the counter to periodically increment the count value to 0; the laser receiver sends a signal to the counter when it receives a photon to instruct the counter to increment the count value by 1.
[0099] Further, in one embodiment, step S202 includes:
[0100] Step S2021: Count the total number of photons received by the laser receiver during the target laser emission cycle;
[0101] In this embodiment, it is proposed that after the target laser emission cycle ends, a random number is compared with the total number of photons received during the target laser emission cycle, and a rule for determining the target photon is proposed based on the comparison result.
[0102] Specifically, the ranging system can count the total number of photons received by the laser receiver during the target laser emission cycle, that is, count the total number of photons received during the target laser emission cycle.
[0103] Step S2022: If the total number of photons is greater than or equal to the random number corresponding to the target laser emission period, then the random number corresponding to the target laser emission period is used as the target sequence number.
[0104] The ranging system compares the total number of photons received within the target laser emission cycle with the random number corresponding to the target laser emission cycle, and determines the sequence number of the target photon (hereinafter referred to as the target sequence number for distinction) based on the comparison result. In other words, it determines which photon received within the target laser emission cycle will be the target photon.
[0105] Step S2023: If the total number of photons is less than the random number corresponding to the target laser emission period, then the total number of photons is determined as the target sequence number;
[0106] The rule for determining the target number based on the comparison results is as follows: if the total number of photons is greater than or equal to the random number, the ranging system will use the random number corresponding to the target laser emission period as the target number; if the total number of photons is less than the random number corresponding to the target laser emission period, the ranging system will determine the total number of photons as the target number.
[0107] Step S2024: The photon with the target sequence number among the photons received by the laser receiver within the target laser emission period is taken as the target photon, and the measurement result corresponding to the obtained target photon is stored or output. The photons received within the target laser emission period are sorted in the order of reception time.
[0108] After determining the target number, the ranging system takes the photon with the target number among the photons received by the laser receiver during the target laser emission period as the target photon, and stores or outputs the measurement results corresponding to the acquired target photon.
[0109] Furthermore, in one embodiment, when the ranging system is a circuit system composed of a laser emitter and a laser receiver, the circuit system (ranging system) may further include a measurement result acquisition module, a counter, a random number module, a comparison module, and a buffer; the laser emitter sends a signal to the measurement result acquisition module each time it emits a photon, and the laser receiver sends a signal to the measurement result acquisition module each time it receives a photon; the measurement result acquisition module obtains the measurement result of each photon received by the laser receiver based on the signals sent by the laser emitter and the laser receiver, and buffers the measurement result in the buffer, the buffer size being set large enough to store the measurement results of all photons emitted in one laser emission cycle. The measurement results can be obtained in the next laser emission cycle, which can overwrite the measurement results obtained in the previous laser emission cycle in the buffer. The laser emitter periodically emits lasers and also periodically sends signals to the random number module and the comparison module to instruct the random number module to obtain the random number corresponding to each laser emission cycle, and to instruct the comparison module to compare the total number of photons received in the laser emission cycle recorded in the counter with the random number in the random number module at the end of the laser emission cycle. Based on the comparison result, an execution signal is sent to the buffer to instruct the buffer to store the measurement results of the photons with the target sequence number in the memory of the ranging system or output them to the statistics module of the ranging system.
[0110] Further, in one embodiment, step S201 includes:
[0111] Step S2011: When the target laser emission period is the first emission period of the laser emitter, the preset initial value is set to a random number corresponding to the target laser emission period;
[0112] This embodiment proposes a method for obtaining a random number corresponding to the emission period of a target laser. Specifically, when the emission period of the target laser is the first emission period of the laser emitter, the ranging system can set a preset initial value to a random number corresponding to the emission period of the target laser. The preset initial value can be a value set in advance as needed, for example, 1.
[0113] Step S2012: When the target laser emission period is the first or subsequent emission period of the laser emitter, if the total number of photons received by the laser receiver in the previous laser emission period is less than the random number corresponding to the previous laser emission period, then the preset initial value is set to the random number corresponding to the target laser emission period. If the total number of photons received by the laser receiver in the previous laser emission period is greater than or equal to the random number corresponding to the previous laser emission period, then the result of adding 1 to the random number corresponding to the previous laser emission period is set as the random number corresponding to the target laser emission period. Here, the previous laser emission period is the emission period preceding the target laser emission period.
[0114] When the target laser emission period is the first or subsequent emission period of the laser emitter, the ranging system can determine the random number corresponding to the target laser emission period based on the random number corresponding to the previous laser emission period (hereinafter referred to as the previous laser emission period for distinction) and the total number of photons received by the laser receiver in the previous laser emission period. Further, the ranging system can compare the total number of photons received by the laser receiver in the previous laser emission period with the random number corresponding to the previous laser emission period, and determine the random number corresponding to the target laser emission period based on the comparison result. Further, if the total number of photons received by the laser receiver in the previous laser emission period is less than the random number corresponding to the previous laser emission period, a preset initial value can be set to the random number corresponding to the target laser emission period; if the total number of photons received by the laser receiver in the previous laser emission period is greater than or equal to the random number corresponding to the previous laser emission period, the result of adding 1 to the random number corresponding to the previous laser emission period can be set as the random number corresponding to the target laser emission period.
[0115] In this embodiment, by setting the random number corresponding to the first laser emission cycle to a preset initial value, and for subsequent laser emission cycles, determining the random number of the laser emission cycle based on the random number of the previous laser emission cycle and the total number of received photons, it is not necessary to use a random number generator to generate random numbers according to a complex algorithm, thereby reducing the computational overhead of the ranging system.
[0116] Further, in one embodiment, step S202 includes:
[0117] Step S2025: Whenever the laser receiver receives a photon within the target laser emission cycle, the number of photons recorded in the counter is incremented by 1, and the measurement result of the received photon is obtained, wherein the counter is set to 0 when entering the target laser emission cycle;
[0118] In this embodiment, it is proposed to start counting photons as soon as the target laser emission cycle begins, and to compare the count with a random number each time the count changes. Based on the comparison result, it is determined whether to take the received photon as the target photon, that is, whether to store or output the measurement result of the received photon. A rule for determining the target photon based on the comparison result is also proposed.
[0119] Specifically, the ranging system increments the number of photons recorded in the counter by 1 each time the laser receiver receives a photon during the target laser emission cycle, and obtains the measurement result of the received photon. The counter is reset to 0 when the target laser emission cycle begins.
[0120] Step S2026: After each update of the number of photons in the counter, check whether the updated number of photons is less than or equal to the random number corresponding to the target laser emission period;
[0121] Step S2027: If the updated number of photons is less than or equal to the random number corresponding to the target laser emission period, then the historical measurement results in the buffer are updated using the measurement results of the obtained photons.
[0122] The ranging system uses a buffer to store the measurement results of photons. The buffer can hold the measurement results of N photons, where N is the number of target photons identified from the photons received during the target laser emission cycle. After the laser emitter receives a photon, the photon count in the counter is updated, and the measurement result of that photon is acquired. Based on the comparison between the updated photon count in the counter and a random number, it is determined whether to cache the acquired measurement result of that photon in the buffer.
[0123] Furthermore, if the updated number of photons is less than or equal to the random number corresponding to the target laser emission period, the ranging system can use the measurement result of the acquired photons to update the cached measurement result (hereinafter referred to as the historical measurement result). It should be noted that if N is greater than 1, the measurement result of the acquired photons can be used to update one of the N cached measurement results.
[0124] Step S2028: If the updated number of photons is greater than the random number corresponding to the target laser emission period, then discard the measurement result of the obtained photons;
[0125] If the updated number of photons is greater than the random number corresponding to the target laser emission period, the ranging system can discard the measurement results of the acquired photons, that is, it will not perform the operation of updating the buffer.
[0126] Step S2029: At the end of the target laser emission cycle, the measurement results of the target photons in the buffer are stored or output.
[0127] At the end of the target laser emission cycle, the ranging system can store or output the measurement results of the target photons in the buffer. It can be understood that if the random number is greater than the total number of photons received during the target laser emission cycle, then the target photon is the last N photons received during the target laser emission cycle; if the random number is less than or equal to the total number of photons received during the target laser emission cycle, then the target photon is the total N photons received during the target laser emission cycle, including those numbered by the random number and those preceding that number; if N is 1, then the target photon is the photon received during the target laser emission cycle with the random number as its index.
[0128] Furthermore, in one embodiment, when N is greater than 1, the buffer can be cleared to zero when entering the target laser emission cycle, so as to prevent the measurement results buffered in the previous laser emission cycle from being stored or output as the measurement results of the target laser emission cycle.
[0129] Furthermore, in one embodiment, when the ranging system is a circuit system composed of a laser emitter and a laser receiver, the circuit system (ranging system) may further include a measurement result acquisition module, a counter, a random number module, and a buffer; the laser emitter sends a signal to the measurement result acquisition module every time it emits a photon, and the laser receiver sends a signal to the measurement result acquisition module every time it receives a photon; the laser emitter periodically emits laser light and also periodically sends signals to the random number module to instruct the random number module to acquire random numbers corresponding to each laser emission cycle; the measurement result acquisition module acquires random numbers every time it receives a signal from the laser receiver. Upon receiving a photon signal, the measurement result of that photon is acquired. At the start of each laser emission cycle, the historical test results in the buffer are updated by default using the acquired test results. In some embodiments, the measurement result acquisition module can be implemented using a time-to-digital converter (TDC). After the number of photons in the counter is updated, if it is greater than the random number in the random number module, a signal is sent to the measurement result acquisition module to instruct it not to update the buffer in the current laser emission cycle. At the end of the laser emission cycle, the measurement results in the buffer are stored in the memory of the ranging system or output to the statistics module of the ranging system.
[0130] like Figure 3 The diagram shows the timing of an exemplary ranging system. In laser cycle 1 (i.e., laser emission cycle 1), the random number is 4, and the number of events is 5 (i.e., the photon counter value at the end of the laser cycle is 5). The ranging system stores the 4th event (i.e., the measurement result of the 4th photon) and increments the random number by 1. In laser cycle 2, the random number is 5, and the system plans to store the 5th event, but only 2 events are actually stored (i.e., the photon counter value at the end of the laser cycle is 2). Therefore, the system stores the 2nd event (i.e., the ranging result of the last photon) and resets the random number to 1. In laser cycle 3, the random number is 1, and the number of events is 3 (i.e., the photon counter value at the end of the laser cycle is 3). The expected number of events has been reached, so the system stores the 1st event (i.e., the ranging result of the 1st photon) and increments the random number by 1.
[0131] Furthermore, based on the first and / or second embodiments described above, a third embodiment of the ranging method of the present invention is proposed. In this embodiment, when the measurement result is the time of flight of the target photon, after the step of storing the obtained measurement result corresponding to the target photon in step S20, the method further includes:
[0132] Step S30: When the number of stored photon flight times reaches a preset number, perform histogram statistics based on each stored flight time.
[0133] Step S40: Find the peak of the statistically obtained histogram to obtain the target flight time;
[0134] Step S50: Calculate the ranging result of the target object based on the target flight time.
[0135] In this embodiment, the measurement result of the photon can be the flight time of the photon. The ranging result of the target object can be determined by using the histogram statistical method based on the flight time of each stored photon.
[0136] Specifically, when the number of stored photon flight times reaches a preset number, histogram statistics can be performed based on each stored flight time. The preset number can be set as needed and is not limited in this embodiment.
[0137] Histogram statistics can specifically involve counting the number of photons with the same flight time among the stored photons, obtaining the number of photons corresponding to multiple flight times. These flight times are then arranged from largest to smallest, and the peak value corresponding to each flight time is identified as the target flight time. The ranging result for the target object is calculated based on this target flight time. For example, in one embodiment, when the target flight time represents the time it takes for a photon to travel to and from the target, the target flight time can be multiplied by the speed of light and then divided by 2. The result is used as the ranging result for the target object, i.e., the distance between the target object and the reference point of the ranging system.
[0138] Furthermore, embodiments of the present invention also propose a ranging system, the ranging system comprising:
[0139] A laser transceiver module is used to periodically emit laser light through a laser transmitter and receive the laser light reflected from the target object through a laser receiver.
[0140] An output module is configured to randomly determine at least one target photon from among the photons received by the laser receiver in a laser emission cycle, store or output the measurement result corresponding to the target photon, so as to determine the ranging result of the target object based on the measurement results stored or output in multiple laser emission cycles, wherein the number of target photons determined in a laser emission cycle is less than the total number of photons received by the laser receiver in the corresponding laser emission cycle.
[0141] Furthermore, the output module includes:
[0142] The random number unit is used to obtain a random number corresponding to any target laser emission cycle of the laser emitter.
[0143] The output unit is used to determine at least one target photon from the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and to store or output the measurement result corresponding to the obtained target photon.
[0144] Furthermore, the output unit includes:
[0145] The first counting subunit is used to count the total number of photons received by the laser receiver during the target laser emission cycle;
[0146] The comparison subunit is configured to, if the total number of photons is greater than or equal to the random number corresponding to the target laser emission period, use the random number corresponding to the target laser emission period as the target sequence number; and if the total number of photons is less than the target random number corresponding to the target laser emission period, determine the total number of photons as the target sequence number.
[0147] The first output subunit is used to take the photon with the target index among the photons received by the laser receiver in the target laser emission period as the target photon, and to store or output the measurement result corresponding to the target photon. The photons received in the target laser emission period are ordered according to the order of reception time.
[0148] Furthermore, the random number unit is also used for:
[0149] When the target laser emission period is the first emission period of the laser emitter, the preset initial value is set to a random number corresponding to the target laser emission period;
[0150] When the target laser emission period is the first or subsequent emission period of the laser emitter, if the total number of photons received by the laser receiver in the previous laser emission period is less than the random number corresponding to the previous laser emission period, then the preset initial value is set to the random number corresponding to the target laser emission period. If the total number of photons received by the laser receiver in the previous laser emission period is greater than or equal to the random number corresponding to the previous laser emission period, then the result of adding 1 to the random number corresponding to the previous laser emission period is set as the random number corresponding to the target laser emission period. Here, the previous laser emission period is the emission period preceding the target laser emission period.
[0151] Furthermore, the output unit includes:
[0152] The second counting subunit is used to increment the number of photons recorded in the counter by 1 whenever the laser receiver receives a photon during the target laser emission cycle;
[0153] An acquisition subunit is used to acquire the measurement results of the received photons, wherein the counter is set to 0 when the target laser emission cycle begins;
[0154] The detection subunit is used to detect whether the updated photon count is less than or equal to the random number corresponding to the target laser emission period after each update of the photon count in the counter.
[0155] The update subunit is used to update the historical measurement results in the buffer with the measurement results of the obtained photons if the updated number of photons is less than or equal to the random number corresponding to the target laser emission period.
[0156] The discard subunit is used to discard the measurement result of the obtained photons if the updated number of photons is greater than the random number corresponding to the target laser emission period;
[0157] The second output subunit is used to store or output the measurement results of the target photons in the buffer at the end of the target laser emission cycle.
[0158] Furthermore, the ranging system also includes:
[0159] The histogram statistics module is used to perform histogram statistics based on each stored flight time when the number of stored photon flight times reaches a preset number.
[0160] The peak finding module is used to find the peaks in the statistically obtained histogram to obtain the target flight time;
[0161] The calculation module is used to calculate the ranging result of the target based on the target's flight time.
[0162] The extended content of the specific implementation of the ranging system of the present invention is basically the same as the above-described embodiments of the ranging method, and will not be repeated here.
[0163] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing a ranging program, wherein the ranging program, when executed by a processor, implements the steps of the ranging method described below.
[0164] The various embodiments of the ranging device, system, and computer-readable storage medium of the present invention can all be referred to the various embodiments of the ranging method of the present invention, and will not be repeated here.
[0165] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0166] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0168] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A distance measurement method, characterized in that, The method includes the following steps: The laser emitter periodically emits laser light, and the laser light reflected from the target object is received by the laser receiver. At least one target photon is randomly selected from the photons received by the laser receiver within a laser emission cycle. The measurement result corresponding to the target photon is stored or output to determine the ranging result of the target object based on the measurement result stored or output within multiple laser emission cycles. The number of target photons determined within a laser emission cycle is less than the total number of photons received by the laser receiver within the corresponding laser emission cycle.
2. The ranging method as described in claim 1, characterized in that, The step of randomly determining at least one target photon from among the photons received by the laser receiver within a laser emission cycle includes: For any target laser emission period of the laser emitter, obtain the random number corresponding to the target laser emission period; Based on the comparison between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, at least one target photon is determined from the photons received by the laser receiver within the target laser emission period, and the measurement result corresponding to the obtained target photon is stored or output.
3. The ranging method as described in claim 2, characterized in that, The step of determining at least one target photon from among the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and storing or outputting the measurement result corresponding to the obtained target photon includes: Count the total number of photons received by the laser receiver during the target laser emission cycle; If the total number of photons is greater than or equal to the random number corresponding to the target laser emission period, then the random number corresponding to the target laser emission period is used as the target sequence number; If the total number of photons is less than the target random number corresponding to the target laser emission period, then the total number of photons is determined as the target sequence number; The photon with the target index among the photons received by the laser receiver within the target laser emission period is taken as the target photon, and the measurement result corresponding to the obtained target photon is stored or output. The photons received within the target laser emission period are ordered according to the order of reception time.
4. The ranging method as described in claim 2, characterized in that, The step of obtaining the random number corresponding to the target laser emission period includes: When the target laser emission period is the first emission period of the laser emitter, the preset initial value is set to a random number corresponding to the target laser emission period; When the target laser emission period is the first or subsequent emission period of the laser emitter, if the total number of photons received by the laser receiver in the previous laser emission period is less than the random number corresponding to the previous laser emission period, then the preset initial value is set to the random number corresponding to the target laser emission period. If the total number of photons received by the laser receiver in the previous laser emission period is greater than or equal to the random number corresponding to the previous laser emission period, then the result of adding 1 to the random number corresponding to the previous laser emission period is set as the random number corresponding to the target laser emission period. Here, the previous laser emission period is the emission period preceding the target laser emission period.
5. The ranging method as described in claim 2, characterized in that, The step of determining at least one target photon from among the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and storing or outputting the measurement result corresponding to the obtained target photon includes: Whenever the laser receiver receives a photon during the target laser emission cycle, it increments the number of photons recorded in the counter by 1 and obtains the measurement result of the received photon, wherein the counter is set to 0 when entering the target laser emission cycle; After each update of the photon count in the counter, it is checked whether the updated photon count is less than or equal to the random number corresponding to the target laser emission period; If the updated number of photons is less than or equal to the random number corresponding to the target laser emission period, the historical measurement results in the buffer are updated using the measurement results of the obtained photons. If the updated number of photons is greater than the random number corresponding to the target laser emission period, the measurement result of the obtained photons is discarded. At the end of the target laser emission cycle, the measurement results of the target photons in the buffer are stored or output.
6. The ranging method according to any one of claims 1 to 5, characterized in that, When the measurement result is the time of flight of the target photon, after storing the obtained measurement result corresponding to the target photon, the method further includes: When the number of stored photon flight times reaches a preset number, histogram statistics are performed based on each stored flight time. The target flight time is obtained by finding the peak of the statistically obtained histogram; The distance measurement result of the target object is calculated based on the target's flight time.
7. A ranging system, characterized in that, The ranging system includes: A laser transceiver module is used to periodically emit laser light through a laser transmitter and receive the laser light reflected from the target object through a laser receiver. An output module is configured to randomly determine at least one target photon from among the photons received by the laser receiver in a laser emission cycle, store or output the measurement result corresponding to the target photon, so as to determine the ranging result of the target object based on the measurement results stored or output in multiple laser emission cycles, wherein the number of target photons determined in a laser emission cycle is less than the total number of photons received by the laser receiver in the corresponding laser emission cycle.
8. The ranging system as described in claim 7, characterized in that, The output module includes: The random number unit is used to obtain a random number corresponding to any target laser emission cycle of the laser emitter. The output unit is used to determine at least one target photon from the photons received by the laser receiver within the target laser emission period based on the comparison result between the random number corresponding to the target laser emission period and the number of photons received by the laser receiver within the target laser emission period, and to store or output the measurement result corresponding to the obtained target photon.
9. A ranging device, characterized in that, The ranging device includes: a memory, a processor, and a ranging program stored in the memory and executable on the processor, wherein the ranging program, when executed by the processor, implements the steps of the ranging method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a ranging program, which, when executed by a processor, implements the steps of the ranging method as described in any one of claims 1 to 6.