Laser ranging device, working mode switching method thereof, electronic device and storage medium
Patent Information
- Application Number
- CN202211364478.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-11-02
AI Technical Summary
[0003]现有的快速测距产品的工作模式分为室内、室外两种模式,在不同的模式下DTOF芯片需要配置不同的激光发送参数和接收参数,然而,现有的快速测距产品需要手动切换其工作模式为室内或者室外工作模式,如果忘记切换会导致工作模式与环境模式不匹配,影响测距的准备性,因此现有快速测距产品的智能化程度还有待提高
[0025]本发明的有益效果为:提供一种激光测距装置及其工作模式切换方法、电子设备和存储介质,通过将获取的环境光信号做直方图处理,并对直方图中的波形按光子数量大小排序,之后计算排序后直方图的时间箱的上限和下限之间的光子数量的平均值,作为当前的环境光值,并将所述当前的环境光值与预设的室内阈值和预设的室外阈值比较来识别激光测距装置所处的环境模式,在当前的工作模式与所述环境模式不匹配时,将当前的工作模式切换为相应的环境工作模式,解决现有技术需要手动切换工作模式的问题,实现了室内室外模式的自动切换,从而提高测距精准性。
Smart Images

Figure CN115752718B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distance detection technology, and in particular to laser ranging devices and their operating mode switching methods, electronic devices, and storage media. Background Technology
[0002] DTOF (direct time of flight) technology detects the distance to an object by emitting a pulse of light and measuring the flight time required for the emitted light to return. It is widely used in 3D modeling, portable electronic devices, AR / VR, drones, autonomous vehicles, and other fields.
[0003] Existing rapid ranging products have two working modes: indoor and outdoor. In different modes, the DTOF chip needs to be configured with different laser sending and receiving parameters. However, existing rapid ranging products require manual switching between indoor and outdoor working modes. If the switching is forgotten, the working mode will not match the environmental mode, affecting the accuracy of the ranging. Therefore, the intelligence level of existing rapid ranging products needs to be improved. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a laser ranging device and its working mode switching method, electronic device and storage medium, which can detect the intensity of the ambient light signal in which the laser ranging device is located and automatically switch the working mode to the corresponding environmental working mode.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] The first aspect of this invention provides a method for switching the operating mode of a laser ranging device, comprising the following steps:
[0007] A. Perform histogram processing on the acquired ambient light signal and sort the waveforms in the histogram according to the number of photons.
[0008] B. Calculate the average number of photons between the upper and lower limits of the time bins of the sorted histogram, and use it as the current ambient light value. Then compare the current ambient light value with the preset indoor threshold and the preset outdoor threshold.
[0009] C. Identify the environmental mode of the laser rangefinder based on the comparison results;
[0010] D. If the current working mode does not match the environment mode, switch the current working mode to the corresponding environment working mode.
[0011] In one embodiment, step D includes: for N consecutive frames, if the current working mode does not match the environment mode, switching the current working mode to the corresponding environment working mode.
[0012] In one embodiment, the preset indoor threshold is less than the preset outdoor threshold.
[0013] In one embodiment, the environmental mode includes an indoor mode and an outdoor mode, and the working mode includes an indoor working mode and an outdoor working mode.
[0014] In one embodiment, sorting the waveforms in the histogram by the number of photons includes arranging them from smallest to largest, wherein the lower and upper limits are 30% and 50% of the total time bins of the sorted histogram, respectively.
[0015] In one embodiment, sorting the waveforms in the histogram by the number of photons includes arranging them from largest to smallest, wherein the lower and upper limits are 50% and 70% of the total time bins of the sorted histogram, respectively.
[0016] In one embodiment, after step D, the method includes: setting the laser transmission and reception parameters of the laser rangefinder according to the switched operating mode.
[0017] A second aspect of the present invention provides a laser ranging device, comprising:
[0018] The light acquisition module is used to acquire ambient light signals;
[0019] The histogram statistics module is used to perform histogram processing on the acquired ambient light signal and sort the waveforms in the histogram according to the number of photons.
[0020] The processing module is used to calculate the average number of photons between the upper and lower limits of the time bin of the sorted histogram as the current ambient light value, and compare the current ambient light value with preset indoor thresholds and preset outdoor thresholds. Based on the comparison results, it identifies the environmental mode of the laser rangefinder. When the current working mode does not match the environmental mode, it switches the current working mode to the corresponding environmental working mode.
[0021] A third aspect of the present invention provides an electronic device comprising: a processor and a memory;
[0022] The memory stores computer programs that can be executed by the processor;
[0023] When the processor executes the computer program, it implements the steps in the working mode switching method described above.
[0024] A fourth aspect of the present invention provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the working mode switching method described above.
[0025] The beneficial effects of this invention are as follows: It provides a laser ranging device and its working mode switching method, electronic device, and storage medium. By processing the acquired ambient light signal into a histogram and sorting the waveforms in the histogram according to the number of photons, the average number of photons between the upper and lower limits of the time bin of the sorted histogram is calculated as the current ambient light value. The current ambient light value is compared with preset indoor thresholds and preset outdoor thresholds to identify the environmental mode of the laser ranging device. When the current working mode does not match the environmental mode, the current working mode is switched to the corresponding environmental working mode. This solves the problem of manual switching of working modes required in the prior art and realizes automatic switching between indoor and outdoor modes, thereby improving the accuracy of ranging. Attached Figure Description
[0026] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0027] Figure 1 This is a flowchart of the working mode switching method of the laser ranging device in an embodiment of the present invention;
[0028] Figure 2 This is a histogram of the original photon signal acquired by the DTOF chip of the laser ranging device in this embodiment of the invention.
[0029] Figure 3 This is a histogram of the photon signals collected by the DTOF chip of the laser ranging device in this embodiment of the invention after sorting.
[0030] Figure 4 This is a schematic diagram of the functional modules of the laser ranging device in an embodiment of the present invention.
[0031] Figure 5 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0032] To make the technical problems, technical solutions, and beneficial effects of the embodiments of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0033] It should be noted that when a component is referred to as "fixed to" or "set on" another component, it can be directly on or indirectly on that other component. When a component is referred to as "connected to" another component, it can be directly connected to or indirectly connected to that other component. Furthermore, a connection can be for both fixing and circuit connection purposes.
[0034] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.
[0035] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0036] The laser ranging device working mode switching method provided by this invention is applied to a laser radar measurement system based on DTOF (direct time-of-flight) technology. The laser radar measurement system includes at least a controller, a transmitter, and a receiver. The controller is connected to both the transmitter and the receiver. The transmitter emits a probe beam towards a target object, and at least a portion of the probe beam is reflected by the target object to form reflected light. The receiver includes a pixel array composed of multiple pixels for receiving the reflected light from the target object. The controller synchronously controls the emission and reception of light, performs histogram statistics on the photons received by the receiver using time bins, and then calculates the flight time of the photons using the histogram to measure the distance to the target object.
[0037] Laser rangefinders operate in both indoor and outdoor modes. Accurate measurements require the actual operating mode of the laser rangefinder to match the surrounding environment. This invention addresses the shortcomings of manual mode switching in existing laser rangefinders by providing an automatic mode switching method. The method involves collecting data from both modes of the laser rangefinder under identical environmental conditions, calculating the ambient light level from the collected data, determining whether the environment is indoors or outdoors based on the ambient light level, and automatically switching between indoor and outdoor modes according to the determination result.
[0038] like Figure 1 As shown, Figure 1 This is a flowchart of a method for switching the operating mode of a laser ranging device according to an embodiment of the present invention. The method specifically includes the following steps:
[0039] S1. Perform histogram processing on the acquired ambient light signal and sort the waveforms in the histogram according to the number of photons.
[0040] In this embodiment, the detection light used by the DTOF chip for ranging is a pulsed laser. Different laser transmission and reception parameters need to be set according to indoor and outdoor working modes to improve the accuracy of ranging.
[0041] Since the signal collected by the DTOF chip during operation includes noise signals from the current environment (i.e., ambient light signals, such as sunlight intensity), this practical example uses histogram processing on the collected noise photon signals. The horizontal axis of the histogram represents the time when the DTOF chip receives photons, and the vertical axis represents the number of photons received by the DTOF chip.
[0042] When sorting the waveforms in the histogram by the number of photons, they can be arranged in ascending order or descending order. By sorting the photon count, the ambient light value can be calculated correctly, avoiding unstable calculation results in complex environments, which could lead to misjudgments in pattern recognition.
[0043] Please see Figure 2 , Figure 2 The image shows the histogram of the original photon signal acquired by the DTOF chip. In the histogram, the thick solid line curve represents the histogram of photon information acquired indoors, and the thin dashed line curve represents the histogram of photon information acquired outdoors. The horizontal axis represents the time bin, and the vertical axis represents the number of photons. Figure 2 The photon signals shown can be sorted to obtain the following: Figure 3 The histogram shown is similar. Figure 3 The thick solid line curve represents the histogram of photon information acquired indoors, while the thin dashed line curve represents the histogram of photon information acquired outdoors. The dashed line on the left represents the lower threshold, and the dashed line on the right represents the upper threshold.
[0044] S2. Calculate the average number of photons between the upper and lower limits of the time bins of the sorted histogram as the current ambient light value, and compare the current ambient light value with the preset indoor threshold and the preset outdoor threshold.
[0045] In this embodiment of the invention, after sorting the histograms of the collected light signals, the average value of the noise signal during the time periods of the lower threshold and upper threshold of the noise signal is calculated and used as the current ambient light level. By calculating the average value of the noise signal during the time periods of the lower threshold and upper threshold of the noise signal, this invention can improve the accuracy of subsequent pattern recognition and avoid misjudgment.
[0046] During the comparison, the calculated ambient light value is compared with preset indoor thresholds and preset outdoor thresholds, respectively. Specifically, the environmental mode includes an indoor mode and an outdoor mode, and the working mode includes an indoor working mode and an outdoor working mode. The preset indoor threshold is less than the preset outdoor threshold; for example, the preset indoor threshold is 12, and the preset outdoor threshold is 16. When the calculated ambient light value is less than 12 count, it indicates that the current environmental mode is indoor mode; correspondingly, when the calculated ambient light value is greater than 16 count, it indicates that the current environmental mode is outdoor mode. When the value is between 12 and 16, the current mode remains unchanged; that is, if the current mode is indoor, it remains indoor mode; if the current mode is outdoor, it remains outdoor mode.
[0047] In an optional embodiment, when the waveforms in the histogram are arranged in ascending order of photon count, the lower and upper limits are 30% and 50% of the total time bins of the sorted histogram, respectively. That is, light signals less than 30% and greater than 50% are considered noise signals, i.e., the intensity of the ambient light at the current location.
[0048] like Figure 2 and Figure 3 As shown, there are 256 bins in the histogram. After sorting the bins by their height from smallest to largest, the average height of bins 75 (approximately 256 * 30%) to 125 (approximately 256 * 50%) is used to calculate the ambient light. The height of a bin in the histogram represents the number of photons received, which reflects the intensity of the current ambient light. Bins before 75 are mostly noise generated by distant objects, while bins after 125 are mostly noise generated by closer objects. Therefore, the average height of bins 75 (approximately 256 * 30%) to 125 (approximately 256 * 50%) can more accurately reflect the intensity of the ambient light.
[0049] In an optional embodiment, the waveforms in the histogram are arranged from largest to smallest according to the number of photons, and the lower and upper limits are set at 50% and 70% of the total time bin of the sorted histogram, respectively. Optical signals in the range of less than 50% and greater than 70% are considered noise signals.
[0050] In this embodiment, after sorting the bins by height from largest to smallest according to their corresponding heights in the histogram, the average height of bins 125 (approximately 256*50%) to 175 (approximately 256*70%) is used to calculate the ambient light. Bins before 125 are mostly noise generated by nearby objects, while bins after 175 are mostly noise generated by distant objects. Therefore, the average height of bins 125 (256*30%) to 175 (256*50%) can more accurately reflect the intensity of ambient light.
[0051] S3. Identify the environmental mode of the laser rangefinder based on the comparison results.
[0052] The calculated current ambient light value is compared with preset indoor and outdoor thresholds. When the ambient light value is greater than the outdoor threshold, the environment in which the laser rangefinder is located is identified as outdoor. When the ambient light value is less than the indoor threshold, the environment in which the laser rangefinder is located is identified as indoor.
[0053] S4. If the current working mode does not match the environment mode, switch the current working mode to the corresponding environment working mode.
[0054] After identifying the environmental mode of the laser rangefinder in step S3, it is necessary to determine whether the environmental mode of the laser rangefinder matches its operating mode. If they do not match, the operating mode must be switched to the mode corresponding to the identification result. For example, if the DTOF chip identifies the environmental mode of the laser rangefinder as indoor mode, but the laser rangefinder's operating mode is outdoor mode, then the operating mode will be automatically switched to indoor mode; if the identified environmental mode of the laser rangefinder is outdoor mode, and the laser rangefinder's operating mode is outdoor mode, then there is no need to switch the operating mode.
[0055] In an optional embodiment, to avoid frequent switching of the working mode of the laser ranging device, step S4 further includes: for N consecutive frames, if the current working mode does not match the environmental mode, switching the current working mode to the corresponding environmental working mode, thereby avoiding frequent switching of the working mode and reducing the processing capability requirements of the DTOF chip.
[0056] In an optional embodiment, the ambient light value can be calculated 30 times per second during the calculation to facilitate timely identification of the current environmental mode, thereby enabling timely switching of the operating mode when necessary. Specifically, the consecutive N frames can be 30 frames; if the ambient light value in all 30 frames indicates a need to switch operating modes, then the switching is performed.
[0057] For example, when N consecutive ambient light signals are in outdoor mode, if the DTOF chip is in indoor working mode, it will switch the DTOF chip to outdoor working mode; if N consecutive ambient light signals are in indoor mode, if the DTOF chip is in outdoor working mode, it will switch the DTOF chip to indoor working mode, thus avoiding frequent switching of the DTOF chip's working mode.
[0058] In a further embodiment, after switching the working mode, it is also necessary to set the laser transmission and reception parameters of the laser ranging device according to the switched working mode, so that the DTOF chip can be configured with different laser transmission and reception parameters in different modes, thereby improving the accuracy of ranging.
[0059] The present invention also provides a laser ranging device, such as... Figure 4 As shown, Figure 4 The present invention is a structural diagram of a laser ranging device in one embodiment of the present invention, which includes a light acquisition module 41, a histogram statistics module 42, and a processing module 43, wherein the light acquisition module 41, the histogram statistics module 42, and the processing module 43 are electrically connected in sequence.
[0060] The light acquisition module 41 is used to acquire ambient light signals. The histogram statistics module 42 is used to perform histogram processing on the acquired ambient light signals and sort the waveforms in the histogram according to the number of photons. The processing module 43 is used to calculate the average number of photons between the upper and lower limits of the time bin of the sorted histogram as the current ambient light value, and compare the current ambient light value with preset indoor thresholds and preset outdoor thresholds. Based on the comparison results, the environmental mode of the laser ranging device is identified. If the current working mode does not match the environmental mode, the current working mode is switched to the corresponding environmental working mode. Since the above method embodiments have described the processing process of the laser ranging device in detail, please refer to the corresponding method embodiments above for details, and they will not be repeated here.
[0061] Another embodiment of the present invention provides an electronic device, such as... Figure 5 As shown, the electronic device 10 includes:
[0062] One or more processors 110 and memory 120, Figure 5The following description uses a processor 110 as an example. The processor 110 and the memory 120 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.
[0063] Processor 110 is used to perform various control logics of electronic device 10. It can be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), microcontroller, ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. Furthermore, processor 110 can also be any conventional processor, microprocessor, or state machine. Processor 110 can also be implemented as a combination of computing devices, such as a combination of DSP and microprocessor, multiple microprocessors, one or more microprocessors combined with DSP and / or any other such configuration.
[0064] The memory 120, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions corresponding to the working mode switching method in the embodiments of the present invention. The processor 110 executes various functional applications and data processing of the electronic device 10 by running the non-volatile software programs, instructions, and units stored in the memory 120, thereby implementing the working mode switching method in the above-described method embodiments.
[0065] The memory 120 may include a program storage area and a data storage area. The program storage area may store applications required for the operating platform and at least one function; the data storage area may store data created based on the use of the electronic device 10. Furthermore, the memory 120 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include memory remotely located relative to the processor 110, and these remote memories may be connected to the electronic device 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0066] One or more units are stored in memory 120. When executed by one or more processors 110, they perform the working mode switching method in any of the above method embodiments, for example, performing the operation described above. Figure 1 The method steps S1 to S4 are described in the text.
[0067] Another embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions that are executed by one or more processors, for example, to perform the above-described instructions. Figure 1 The method steps S1 to S4 are described in the text.
[0068] As an example, computer-readable storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory components or memories disclosed in the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0069] In summary, this invention calculates the average ambient light value from the collected ambient light data, determines whether the environment is indoors or outdoors based on the average ambient light value, and automatically switches between indoor and outdoor working modes, eliminating the need for manual switching between indoor and outdoor working modes. This solves the problem of manual switching required in existing technologies, and achieves automatic switching between indoor and outdoor modes, thereby improving the accuracy of distance measurement.
[0070] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, several equivalent substitutions or obvious modifications can be made without departing from the concept of the present invention, and all such modifications, achieving the same performance or purpose, should be considered within the scope of protection of the present invention.
Claims
1. A method for switching the working mode of a laser rangefinder, characterized in that, Includes the following steps: A. Perform histogram processing on the acquired ambient light signal and sort the waveforms in the histogram according to the number of photons; B. Calculate the average number of photons between the upper and lower limits of the time bins of the sorted histogram, and use it as the current ambient light value. Then compare the current ambient light value with the preset indoor threshold and the preset outdoor threshold. C. Identify the environment mode of the laser ranging device based on the comparison results; the environment mode includes indoor mode and outdoor mode; when the ambient light value is greater than the outdoor threshold, the environment of the laser ranging device is identified as outdoor, and when the ambient light value is less than the indoor threshold, the environment of the laser ranging device is identified as indoor. D. When the current working mode does not match the environmental mode, switch the current working mode to the corresponding environmental working mode; the working mode is the indoor working mode and the outdoor working mode. Step D includes: If, for N consecutive frames, the current working mode does not match the environmental mode, the current working mode is switched to the corresponding environmental working mode. That is, if N consecutive ambient light signals are in outdoor mode, and the laser rangefinder is in indoor working mode, the laser rangefinder is switched to outdoor working mode; if N consecutive ambient light signals are in indoor mode, and the laser rangefinder is in outdoor working mode, the laser rangefinder is switched to indoor working mode. Following step D, the following is included: According to the switching working mode, the laser transmission and reception parameters of the laser rangefinder are set so that the laser rangefinder can be configured with different laser transmission and reception parameters in different modes.
2. The method for switching the working mode of the laser ranging device according to claim 1, characterized in that, The preset indoor threshold is less than the preset outdoor threshold.
3. The method for switching the working mode of the laser ranging device according to claim 1, characterized in that, The sorting of waveforms in the histogram according to the number of photons includes: arranging them from smallest to largest, and the lower and upper limits are 30% and 50% of the total time bins of the sorted histogram, respectively.
4. The method for switching the working mode of the laser ranging device according to claim 1, characterized in that, The sorting of waveforms in the histogram according to the number of photons includes: arranging them from largest to smallest, and the lower and upper limits are 50% and 70% of the total time bins of the sorted histogram, respectively.
5. A laser ranging device, characterized in that, include: The light acquisition module is used to acquire ambient light signals; The histogram statistics module is used to perform histogram processing on the acquired ambient light signal and sort the waveforms in the histogram according to the number of photons. The processing module is used to calculate the average number of photons between the upper and lower limits of the time bins of the sorted histogram as the current ambient light value, and compare the current ambient light value with preset indoor thresholds and preset outdoor thresholds. Based on the comparison results, it identifies the environmental mode of the laser rangefinder. When the current working mode does not match the environmental mode, it switches the current working mode to the corresponding environmental working mode. The environmental modes include indoor mode and outdoor mode, and the working modes are indoor working mode and outdoor working mode. The environment mode of the laser rangefinder is identified based on the comparison results as follows: when the ambient light value is greater than the outdoor threshold, the environment of the laser rangefinder is identified as outdoor; when the ambient light value is less than the indoor threshold, the environment of the laser rangefinder is identified as indoor. When the current working mode does not match the environmental mode, switching the current working mode to the corresponding environmental working mode includes: for N consecutive frames, if the current working mode does not match the environmental mode, switching the current working mode to the corresponding environmental working mode; that is, when N consecutive ambient light signals are in outdoor mode, if the laser rangefinder is in indoor working mode, then the laser rangefinder is switched to outdoor working mode; if N consecutive ambient light signals are in indoor mode, if the laser rangefinder is in outdoor working mode, then the laser rangefinder is switched to indoor working mode. According to the switching working mode, the laser transmission and reception parameters of the laser rangefinder are set so that the laser rangefinder can be configured with different laser transmission and reception parameters in different modes.
6. An electronic device, characterized in that, include: Processor and memory; The memory stores computer programs that can be executed by the processor; When the processor executes the computer program, it implements the steps in the working mode switching method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps in the working mode switching method as described in any one of claims 1-4.
Citation Information
Patent Citations
Light transmitting power adjusting method
CN114167384A
Ranging method and electronic equipment
CN114518581A