Laser ranging device, ranging method and readable storage medium

By integrating DCMI and HRTIM in the laser ranging device and combining low-rate ADC for phase-shifting pulse signal processing, the contradiction between cost and accuracy in laser ranging is solved, and high-precision ranging is achieved.

CN114355376BActive Publication Date: 2025-08-08IBE ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111536332.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-08-08
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

In existing laser ranging technology, in order to improve measurement accuracy, high-rate ADCs are usually required, which leads to an increase in production costs, while low-rate ADCs affect measurement accuracy and leads to poor user experience.

Method used

The digital camera interface DCMI and high-speed timer HRTIM are integrated in the microcontroller unit MCU. By transmitting high-speed phase-shifting pulse signals, and combining DCMI with low-rate ADC, the reflected signal is superimposed to determine the target pulse position and achieve distance measurement.

Benefits of technology

On the basis of not increasing production costs, the measurement accuracy of laser ranging is improved, and the MCU's strong computing power and algorithm processing are used to achieve high-precision ranging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114355376B_ABST
    Figure CN114355376B_ABST
Patent Text Reader

Abstract

The present invention discloses a laser ranging device, ranging method, and readable storage medium. The laser ranging device includes: a microcontroller (MCU); a laser transmitter connected to the MCU and configured to transmit a pulse signal to an object being measured; a digital camera interface (DCMI) integrated into the MCU; a high-speed timer (HRTIM) integrated into the MCU; an analog-to-digital converter (ADC) connected to the DCMI; and a laser receiver connected to the ADC and configured to receive a reflected signal from the object being measured. The present invention aims to improve the measurement accuracy of laser ranging without increasing production costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of laser ranging, and in particular to a laser ranging device, a ranging method and a readable storage medium. Background Art

[0002] To improve measurement accuracy in laser ranging, a high-speed ADC (Analog to Digital Converter) (above 100 MHz) is typically required for data acquisition. High-speed ADCs place high demands on data acquisition and are also expensive. To reduce production costs, most manufacturers choose lower-speed ADCs for data acquisition. However, using lower-speed ADCs for data acquisition inevitably affects measurement accuracy, resulting in a poor user experience. Improving laser ranging accuracy without increasing production costs has become a major challenge facing current laser ranging technology. Summary of the Invention

[0003] The main purpose of the present invention is to provide a laser ranging device, a ranging method and a readable storage medium, aiming to improve the measurement accuracy of laser ranging without increasing production costs.

[0004] To achieve the above object, the present invention provides a laser distance measuring device, comprising:

[0005] Microcontroller unit MCU;

[0006] A laser transmitter, connected to the MCU, for transmitting a pulse signal to the object under test;

[0007] A digital camera interface DCMI, wherein the DCMI is integrated into the MCU;

[0008] A high-speed timer HRTIM, wherein the HRTIM is integrated with the MCU;

[0009] an analog-to-digital converter ADC, wherein the ADC is connected to the DCMI;

[0010] A laser receiver is connected to the ADC and is used to receive a reflected signal reflected from the object to be measured.

[0011] Optionally, the DCMI is an 8-bit or 10-bit synchronous parallel interface, and the ADC rate is 64 MHz-100 MHz.

[0012] In addition, to achieve the above object, the present invention further provides a laser ranging method, the laser ranging method comprising:

[0013] Controlling the laser transmitter to continuously transmit at least two groups of pulse signals to the object to be measured, and controlling the laser receiver to receive reflected signals reflected by the object to be measured, wherein each group of pulse signals includes at least two pulse signals with different phases;

[0014] collecting the reflected signal through the DCMI and the ADC;

[0015] Superimposing the reflected signals with the same phase to obtain a plurality of first superimposed signals;

[0016] determining a target pulse position of the reflected signal according to the first superimposed signal;

[0017] The distance between the laser emitter and the measured object is determined according to the target pulse position.

[0018] Optionally, the step of determining the target pulse position of the reflected signal according to the first superimposed signal includes:

[0019] Superimposing a plurality of the first superimposed signals to obtain a second superimposed signal;

[0020] Acquiring the pulse intensity of the second superposition signal;

[0021] determining a signal type of the second superimposed signal according to the pulse intensity, wherein the signal type includes a strong signal and a weak signal;

[0022] A target pulse position of the reflected signal is determined according to the signal type and the first superimposed signal.

[0023] Optionally, the step of determining a target pulse position of the reflected signal according to the signal type and the first superimposed signal includes:

[0024] If the signal type is a strong signal, performing interpolation combination on a plurality of the first superimposed signals to obtain a combined signal;

[0025] determining a pulse width of the combined signal according to a rising edge and a falling edge of the combined signal;

[0026] A target pulse position of the reflected signal is determined according to the pulse width.

[0027] Optionally, the step of determining a target pulse position of the reflected signal according to the signal type and the first superimposed signal includes:

[0028] If the signal type is a weak signal, obtaining a first pulse position of the second superimposed signal;

[0029] Mapping the first pulse position to each of the first superimposed signals to determine a second pulse position corresponding to the first pulse position in each of the first superimposed signals;

[0030] performing sub-pixel processing on each of the second pulse positions;

[0031] The processed second pulse positions are averaged to obtain the target pulse position of the reflected signal.

[0032] Optionally, after the step of determining the distance between the laser emitter and the measured object according to the target pulse position, the method further includes:

[0033] Get the target pulse position obtained in the last measurement;

[0034] Obtain the error value between the target pulse position obtained by the current measurement and the target pulse position obtained by the previous measurement;

[0035] If the error value is less than a preset threshold, the step of determining the distance between the laser emitter and the measured object according to the target pulse position is performed.

[0036] Optionally, the step of determining the distance between the laser emitter and the measured object according to the target pulse position includes:

[0037] determining a time of flight of the pulse signal according to the target pulse position;

[0038] The distance between the laser emitter and the measured object is determined according to the flight time and the flight speed of the pulse signal.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides an MCU, which includes a memory, a processor, and a laser ranging program stored in the memory and runnable on the processor. When the laser ranging program is executed by the processor, the steps of the laser ranging method described in any one of the above items are implemented.

[0040] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a laser ranging program is stored. When the laser ranging program is executed by a processor, the steps of any one of the above-mentioned laser ranging methods are implemented.

[0041] The present invention provides a laser ranging device, ranging method, and readable storage medium. The laser ranging device includes a microcontroller (MCU); a laser transmitter connected to the MCU for transmitting pulse signals to an object to be measured; a digital camera interface (DCMI) integrated into the MCU; a high-speed timer (HRTIM) integrated into the MCU; an analog-to-digital converter (ADC) connected to the DCMI; and a laser receiver connected to the ADC for receiving a reflected signal from the object to be measured. Based on the above laser ranging device, the laser transmitter is controlled to continuously transmit at least two groups of pulse signals to the object to be measured, and the laser receiver is controlled to receive the reflected signal from the object to be measured, wherein each group of pulse signals includes at least two pulse signals with different phases. The reflected signals are collected using the DCMI and the ADC. Reflected signals with the same phase are superimposed to obtain multiple first superimposed signals. The target pulse position of the reflected signal is determined based on the first superimposed signals. The distance between the laser transmitter and the object to be measured is determined based on the target pulse position. This solution is based on the function of the high-speed timer HRTIM, which transmits a high-speed phase-shifted pulse signal to the object being measured. At the same time, through the mutual cooperation of DCMI and ADC, data of the reflected signal reflected back from the object being measured is collected to measure the distance. Therefore, there is no need to use a high-speed ADC, and a low-speed ADC can achieve higher measurement accuracy, realizing the improvement of the measurement accuracy of laser ranging without increasing production costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 Schematic diagram of the hardware architecture of the MCU of the present invention;

[0043] Figure 2 Schematic diagram of the module structure of the laser distance measuring device of the present invention;

[0044] Figure 3 1 is a schematic flow chart of a first embodiment of the laser ranging method of the present invention;

[0045] Figure 4 4 is a flow chart of the second embodiment of the laser ranging method of the present invention.

[0046] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0048] As an implementation solution, refer to Figure 1 , Figure 1 This is a schematic diagram of the hardware architecture of the MCU of the present invention, such as Figure 1As shown, the MCU may include a processor 101, such as a CPU, a memory 102, and a communication bus 103, wherein the communication bus 103 is used to implement connection and communication between these components.

[0049] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a laser ranging program; and the processor 101 may be used to call the laser ranging program stored in the memory 102 and perform the following operations:

[0050] Controlling the laser transmitter to continuously transmit at least two groups of pulse signals to the object to be measured, and controlling the laser receiver to receive reflected signals reflected by the object to be measured, wherein each group of pulse signals includes at least two pulse signals with different phases;

[0051] collecting the reflected signal through the DCMI and the ADC;

[0052] Superimposing the reflected signals with the same phase to obtain a plurality of first superimposed signals;

[0053] determining a target pulse position of the reflected signal according to the first superimposed signal;

[0054] The distance between the laser emitter and the measured object is determined according to the target pulse position.

[0055] Furthermore, the processor 101 may be configured to call a laser ranging program stored in the memory 102 and perform the following operations:

[0056] Superimposing a plurality of the first superimposed signals to obtain a second superimposed signal;

[0057] Acquiring the pulse intensity of the second superposition signal;

[0058] determining a signal type of the second superimposed signal according to the pulse intensity, wherein the signal type includes a strong signal and a weak signal;

[0059] A target pulse position of the reflected signal is determined according to the signal type and the first superimposed signal.

[0060] Furthermore, the processor 101 may be configured to call a laser ranging program stored in the memory 102 and perform the following operations:

[0061] If the signal type is a strong signal, performing interpolation combination on a plurality of the first superimposed signals to obtain a combined signal;

[0062] determining a pulse width of the combined signal according to a rising edge and a falling edge of the combined signal;

[0063] A target pulse position of the reflected signal is determined according to the pulse width.

[0064] Furthermore, the processor 101 may be configured to call a laser ranging program stored in the memory 102 and perform the following operations:

[0065] If the signal type is a weak signal, obtaining a first pulse position of the second superimposed signal;

[0066] Mapping the first pulse position to each of the first superimposed signals to determine a second pulse position corresponding to the first pulse position in each of the first superimposed signals;

[0067] performing sub-pixel processing on each of the second pulse positions;

[0068] The processed second pulse positions are averaged to obtain the target pulse position of the reflected signal.

[0069] Furthermore, the processor 101 may be configured to call a laser ranging program stored in the memory 102 and perform the following operations:

[0070] Get the target pulse position obtained in the last measurement;

[0071] Obtain the error value between the target pulse position obtained by the current measurement and the target pulse position obtained by the previous measurement;

[0072] If the error value is less than a preset threshold, the step of determining the distance between the laser emitter and the measured object according to the target pulse position is performed.

[0073] Furthermore, the processor 101 may be configured to call a laser ranging program stored in the memory 102 and perform the following operations:

[0074] determining a time of flight of the pulse signal according to the target pulse position;

[0075] The distance between the laser emitter and the measured object is determined according to the flight time and the flight speed of the pulse signal.

[0076] To improve measurement accuracy in laser ranging, a high-speed ADC (Analog to Digital Converter) (above 100 MHz) is typically required for data acquisition. High-speed ADCs place high demands on data acquisition and are also expensive. To reduce production costs, most manufacturers choose lower-speed ADCs for data acquisition. However, using lower-speed ADCs for data acquisition inevitably affects measurement accuracy, resulting in a poor user experience. Improving laser ranging accuracy without increasing production costs has become a major challenge facing current laser ranging technology.

[0077] Based on the technical problems existing in the above-mentioned laser ranging, the present invention proposes a laser ranging device and a laser ranging method, which creatively integrates a digital camera interface DCMI and a high-speed timer HRTIM into a microcontroller unit MCU. Based on the function of the high-speed timer HRTIM, a high-speed phase-shifted pulse signal is emitted to the object to be measured. At the same time, through the mutual cooperation of DCMI and ADC, data collection is performed on the reflected signal reflected back by the object to be measured to measure the distance, so that a high-speed ADC is not required, but only a low-speed ADC is needed to achieve higher measurement accuracy, thereby improving the measurement accuracy of laser ranging without increasing production costs. At the same time, by taking advantage of the strong computing power of the MCU, a large number of complex algorithms can be run within it, improving the ranging capability at the algorithm level. The laser ranging device and laser ranging method proposed by the present invention will be further explained below through specific embodiments.

[0078] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the module structure of the laser ranging device of the present invention. The laser ranging device proposed in the present invention includes a microcontroller unit MCU01, a laser transmitter 02, a digital camera interface DCMI03, a high-speed timer HRTIM04, an analog-to-digital converter ADC05 and a laser receiver 06. Among them, MCU01, also known as a single-chip microcomputer or single-chip microcomputer, is a chip-level computer. MCU01 is the core component of the laser ranging device and is used to control the entire laser ranging process; the laser transmitter 02 is connected to the MCU01 and is used to transmit pulse signals under the control of the MCU01; DCMI03 is integrated into the MCU01; the high-speed timer HRTIM04 is integrated into the MCU01; ADC05 is connected to the DCMI03, and the laser receiver 06 is connected to the ADC05 to receive the reflected signal reflected by the object to be measured. The DCMI03 and the ADC05 are used to collect data on the reflected signal.

[0079] DCMI03 is a digital camera interface that can receive high-speed data streams from complementary metal oxide semiconductor (CMOS) camera modules. DCMI03 can receive high-speed (up to 54MB / s) data signals. DCMI03 includes up to 14 data lines (D 13 -D0) and a pixel clock line (PIXCLK). The polarity of the pixel clock line can be programmed so that data can be captured on either the rising or falling edge of the pixel clock.

[0080] Optionally, DCMI03 may be an 8-bit or 10-bit synchronous parallel interface, and the rate of ADC05 is 64 MHz-100 MHz. In actual usage scenarios, the rate of ADC05 may be selected as 64 MHz.

[0081] Based on the above-mentioned laser emitting device for measuring distance, specifically, based on the function of the high-speed timer HRTIM04, the MCU01 of the laser emitting device controls the laser emitter 02 to continuously emit at least two groups of pulse signals to the object to be measured, and controls the laser receiver 06 to receive the reflected signal reflected by the object to be measured, wherein each group of pulse signals includes at least two pulse signals with different phases, and then the reflected signal is converted into a digital signal (usually a voltage signal) through ADC05, and DCMI03 performs data acquisition on the digital signal to realize the acquisition of the reflected signal reflected by the object to be measured, and then the collected reflected signal is stored in MCU01 and analyzed and processed, and MCU01 superimposes the reflected signals with the same phase to obtain multiple first superimposed signals, determines the target pulse position of the reflected signal according to the first superimposed signal, and determines the distance between the laser emitter and the object to be measured according to the target pulse position.

[0082] It should be noted that each group of pulse signals continuously emitted by the laser transmitter 02 to the object to be measured is a group of high-speed data streams. Correspondingly, each group of reflected signals reflected back by the object to be measured and received by the laser receiver 06 is also a group of high-speed data streams. Data collection of high-speed data streams can be achieved through the mutual cooperation of ADC05 and DCMI03.

[0083] In the technical solution provided in this embodiment, the laser ranging device includes a microcontroller unit MCU01; a laser transmitter 02, which is connected to the MCU01 and is used to transmit a pulse signal to the object being measured; a digital camera interface DCMI03, which is integrated into the MCU01; a high-speed timer HRTIM04, which is integrated into the MCU01; an analog-to-digital converter ADC05, which is connected to the DCMI03; and a laser receiver 06, which is connected to the ADC05 and is used to receive a reflected signal reflected from the object being measured. Based on the above-mentioned laser ranging device, the laser transmitter 02 is controlled to continuously transmit at least two groups of pulse signals to the object being measured, and the laser receiver 06 is controlled to receive the reflected signal reflected from the object being measured, wherein each group of pulse signals includes at least two pulse signals with different phases; the reflected signals are collected by the DCMI03 and the ADC05; the reflected signals with the same phase are superimposed to obtain multiple first superimposed signals; the target pulse position of the reflected signal is determined based on the first superimposed signals; and the distance between the laser transmitter and the object being measured is determined based on the target pulse position. This solution is based on the function of the high-speed timer HRTIM04, which transmits a high-speed phase-shifted pulse signal to the object being measured. At the same time, through the mutual cooperation of DCMI03 and ADC05, the reflected signal reflected back by the object being measured is collected to measure the distance. Therefore, there is no need to use a high-speed ADC, and a low-speed ADC can achieve higher measurement accuracy, realizing the improvement of the measurement accuracy of laser ranging without increasing production costs.

[0084] Please refer to Figure 3 , Figure 3 1 is a flow chart of a first embodiment of a laser ranging method according to the present invention, wherein the laser ranging method comprises the following steps:

[0085] Step S10, controlling the laser transmitter to continuously transmit at least two groups of pulse signals to the object to be measured, and controlling the laser receiver to receive reflected signals reflected from the object to be measured, wherein each group of pulse signals includes at least two pulse signals with different phases;

[0086] Step S20, collecting the reflected signal through the DCMI and the ADC;

[0087] In this embodiment, the executor of the laser ranging method of the present invention is a laser ranging device or a control device of the laser ranging device. Optionally, the laser ranging device may be a laser rangefinder. Of course, in other embodiments, the laser ranging device may also be other devices or equipment that can be used for laser ranging, and this embodiment does not limit this.

[0088] In this embodiment, the laser ranging device includes a microcontroller unit (MCU); a laser transmitter connected to the MCU and configured to transmit pulse signals toward the object being measured; a digital camera interface (DCMI) integrated into the MCU; a high-speed timer (HRTIM) integrated into the MCU; an analog-to-digital converter (ADC) connected to the DCMI; and a laser receiver connected to the ADC and configured to receive a reflected signal from the object being measured. During laser ranging, the MCU controls the laser transmitter to continuously transmit at least two sets of pulse signals toward the object being measured, and controls the laser receiver to receive the reflected signal from the object being measured. Each set of pulse signals includes at least two pulse signals with different phases.

[0089] Specifically, when performing laser ranging, the start button of the laser ranging device is pressed, and the laser transmitter starts emitting pulse signals. Based on the function of the HRTIM high-speed timer, a pulse signal with a 1 / N phase shift based on the AD clock is transmitted to the object being measured. The rising edge of the pulse transmission triggers the ADC to perform data sampling. The reflected signal of the 1 / N phase-shifted pulse signal is collected through the DCMI and ADC. Then, a pulse signal with a 2 / N phase shift based on the AD clock is transmitted to the object being measured. The reflected signal of the 2 / N phase-shifted pulse signal is collected through the DCMI and ADC. This cycle is repeated N times. The signals transmitted N times are called a pulse signal group. In each pulse signal group, there are N pulse signals with different phases. Optionally, the value of N can be 7. Of course, in other embodiments, the value of N can also be set according to actual needs, and this embodiment does not limit this.

[0090] In the above manner, the laser transmitter continuously and cyclically transmits at least two groups of pulse signals to the object being measured. Optionally, 30-100 groups of pulse signals can be continuously and cyclically transmitted to the object being measured.

[0091] After receiving the reflected signal, the laser receiver first converts the reflected signal into a digital signal (usually a voltage signal) through the ADC, and then collects data on the digital signal through the DCMI to collect the reflected signal reflected by the object under test. The collected reflected signal is then stored in the MCU for analysis and processing.

[0092] Step S30, superimposing the reflected signals with the same phase to obtain a plurality of first superimposed signals;

[0093] In this embodiment, after the DCMI collects the reflected signal, the collected reflected signal is analyzed and processed by the MCU to calculate the distance between the laser emitter and the object being measured. The MCU can superimpose the reflected signals with the same phase to obtain N first superimposed signals. The first superimposed signal obtained by superimposing the reflected signals with the same phase can improve the effective signal strength and remove interference signals.

[0094] Step S40, determining a target pulse position of the reflected signal according to the first superimposed signal;

[0095] In this embodiment, after obtaining the first superposition signal, N first superposition signals can be superimposed to obtain a second superposition signal. It should be noted that the superposition processing method here is additive superposition, that is, the N first superposition signals are added together to form a single signal. Although the resolution of the second superposition signal obtained by additive superposition is lower, due to the multiple superpositions, the second superposition signal has higher signal purity and less interference, which facilitates the search for reflected pulses.

[0096] In this embodiment, after obtaining the second superimposed signal, the pulse strength of the second superimposed signal may be acquired, and the signal type of the second superimposed signal may be determined according to the pulse strength of the second superimposed signal, where the signal type includes a strong signal and a weak signal.

[0097] In this embodiment, after obtaining the pulse strength of the second superimposed signal, the signal type of the second superimposed signal can be determined by determining whether the pulse strength of the second superimposed signal is greater than the range of the ADC. The range of the ADC can be determined based on the specific ADC used and is not limited in this embodiment. Specifically, if the pulse strength of the second superimposed signal is greater than the range of the ADC, the signal type of the second superimposed signal is determined to be a strong signal, and its corresponding waveform is a square wave; if the pulse strength of the second superimposed signal is less than or equal to the range of the ADC, the signal type of the second superimposed signal is determined to be a weak signal, and its corresponding waveform is a spike wave.

[0098] In this embodiment, after determining the signal type of the second superimposed signal, the target pulse position of the reflected signal is determined based on the signal type of the second superimposed signal and the first superimposed signal. Specifically, if the signal type of the second superimposed signal is determined to be a strong signal, the N first superimposed signals are interpolated and combined to obtain a combined signal. It will be appreciated that the resolution of the combined signal is equivalent to high-rate ADC data at N times the sampling clock rate.

[0099] After obtaining the combined signal, the rising edge and falling edge of the combined signal are searched and their corresponding positions are recorded. The pulse width of the combined signal is determined according to the rising edge position and the falling edge position of the combined signal. The compensation value of the target pulse position is obtained according to the pulse width. The rising edge position of the combined signal is then compensated with the compensation value to obtain the target pulse position of the transmitted signal. If the signal type of the determined second superimposed signal is a weak signal, the first pulse position of the second superimposed signal is obtained. The first pulse position is mapped to each first superimposed signal to determine the second pulse position corresponding to the first pulse position of the second superimposed signal in each first superimposed signal. Sub-pixel processing is performed on each second pulse position. Each processed second pulse position is averaged. The pulse position obtained after the averaging process is determined as the target pulse position to obtain the target pulse position of the reflected signal, wherein the first pulse position is the spike position of the second superimposed signal, and the second pulse position is the pulse tip position of the first superimposed signal.

[0100] Step S50: determining the distance between the laser emitter and the object to be measured according to the target pulse position.

[0101] In this embodiment, after obtaining the target pulse position of the reflected signal, the flight time of the pulse signal is determined according to the target pulse position, and the distance between the laser emitter and the object to be measured is determined according to the flight time and the flight speed of the pulse signal, wherein the flight speed of the pulse signal is the speed of light.

[0102] The technical solution provided in this embodiment controls a laser transmitter to continuously transmit at least two sets of pulse signals toward the object being measured, and controls a laser receiver to receive reflected signals reflected from the object being measured, wherein each set of pulse signals includes at least two pulse signals with different phases. The reflected signals are collected using a DCMI and an ADC. The reflected signals with the same phase are superimposed to obtain multiple first superimposed signals. The target pulse position of the reflected signal is determined based on the first superimposed signals. The distance between the laser transmitter and the object being measured is determined based on the target pulse position. This solution, based on the function of a high-speed timer (HRTIM), transmits high-rate phase-shifted pulse signals toward the object being measured. Simultaneously, through the interaction between the DCMI and the ADC, data is collected from the reflected signals reflected from the object being measured to measure the distance. Therefore, a high-rate ADC is not required, and a low-rate ADC can achieve higher measurement accuracy, thus improving the measurement accuracy of laser ranging without increasing production costs.

[0103] Please refer to Figure 4 , Figure 4 4 is a flow chart of a second embodiment of the laser ranging method of the present invention. Based on the first embodiment, after the above step S40, the method further includes:

[0104] Step S60, obtaining the target pulse position obtained in the last measurement;

[0105] Step S70, obtaining an error value between the target pulse position obtained by the current measurement and the target pulse position obtained by the previous measurement;

[0106] The above-mentioned step S50 includes:

[0107] Step S51 : If the error value is less than a preset threshold, determine the distance between the laser emitter and the measured object according to the target pulse position.

[0108] In this embodiment, after the target pulse position of the reflected signal is obtained, the target pulse position of the reflected signal obtained this time is defined as the target pulse position currently measured, the target pulse position obtained last measurement is obtained, the pulse position obtained last measurement is compared with the target pulse position currently measured, and the error value between the target pulse position currently measured and the target pulse position obtained last measurement is obtained. When the error value is less than a preset threshold, it indicates that the target pulse position currently measured is valid, and the distance between the laser emitter and the object to be measured is determined based on the target pulse position currently measured. The preset threshold can be set according to actual needs, and this embodiment does not limit this.

[0109] It should be noted that when the error value is less than the preset threshold, the target pulse position obtained from the last measurement can also be used to determine the distance between the laser emitter and the object being measured. The average value of the target pulse position obtained from the last measurement and the target pulse position obtained from the current measurement can also be obtained to determine the distance between the laser emitter and the object being measured based on the average value.

[0110] It can be understood that when the error value between the target pulse position currently measured and the target pulse position last measured is greater than the preset threshold, it indicates that the target pulse position currently measured is invalid and there may be an interference signal. At this time, the target pulse position currently measured is discarded, re-measured and re-judged.

[0111] It should be noted that in order to improve the accuracy of judgment and effectively prevent the influence of interference signals, the target pulse position of each measurement can be obtained through more measurements, and the error values between each pulse position can be compared to determine whether the target pulse position obtained by the current measurement is valid.

[0112] In the technical solution provided by this embodiment, the target pulse position obtained from the previous measurement is obtained, and the error value between the currently measured target pulse position and the previously measured target pulse position is obtained. If the error value is less than a preset threshold, the step of determining the distance between the laser emitter and the measured object based on the target pulse position is performed. This solution compares the currently measured target pulse position with the previously measured target pulse position to determine whether the currently measured target pulse position is valid, preventing misjudgments due to interference signals, and thereby improving the measurement accuracy of laser ranging.

[0113] Based on the above embodiments, the present invention also provides an MCU, which may include a memory, a processor, and a laser ranging program stored in the memory and run on the processor. When the processor executes the laser ranging program, it implements the steps of the laser ranging method described in any of the above embodiments.

[0114] Based on the above embodiments, the present invention further provides a computer-readable storage medium on which a laser ranging program is stored. When the laser ranging program is executed by a processor, the steps of the laser ranging method described in any of the above embodiments are implemented.

[0115] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0116] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course, by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a smart TV, mobile phone, computer, etc.) to execute the methods described in each embodiment of the present invention.

[0118] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A laser ranging device, characterized in that: The laser distance measuring device comprises: Microcontroller unit MCU; A laser transmitter, connected to the MCU, for transmitting a pulse signal to the object under test; A digital camera interface DCMI, wherein the DCMI is integrated into the MCU; A high-speed timer HRTIM, the HRTIM being integrated into the MCU. Based on the function of the high-speed timer HRTIM, the microcontroller unit MCU controls the laser transmitter to continuously transmit at least two groups of pulse signals to the object being measured, each group of pulse signals including at least two pulse signals with different phases; an analog-to-digital converter ADC, wherein the ADC is connected to the DCMI; A laser receiver is connected to the ADC and is used to receive a reflected signal reflected from the object to be measured. Each group of pulse signals continuously emitted by the laser transmitter to the object to be measured is a group of high-speed data streams. Each group of reflected signals reflected from the object to be measured and received by the laser receiver is also a group of high-speed data streams. Data collection of the high-speed data stream can be achieved through the mutual cooperation of the analog-to-digital converter ADC and the digital camera interface DCMI.

2. The laser distance measuring device according to claim 1, wherein: The DCMI is an 8-bit or 10-bit synchronous parallel interface, and the ADC rate is 64Mhz-100Mhz.

3. A laser ranging method, characterized in that: Applied to the laser ranging device according to any one of claims 1 to 2, the laser ranging method comprises: Controlling the laser transmitter to continuously transmit at least two groups of pulse signals to the object to be measured, and controlling the laser receiver to receive reflected signals reflected by the object to be measured, wherein each group of pulse signals includes at least two pulse signals with different phases; collecting the reflected signal through the DCMI and the ADC; Superimposing the reflected signals with the same phase to obtain a plurality of first superimposed signals; determining a target pulse position of the reflected signal according to the first superimposed signal; The distance between the laser emitter and the measured object is determined according to the target pulse position.

4. The laser ranging method according to claim 3, wherein: The step of determining the target pulse position of the reflected signal according to the first superimposed signal comprises: Superimposing a plurality of the first superimposed signals to obtain a second superimposed signal; Acquiring the pulse intensity of the second superposition signal; determining a signal type of the second superimposed signal according to the pulse intensity, wherein the signal type includes a strong signal and a weak signal; A target pulse position of the reflected signal is determined according to the signal type and the first superimposed signal.

5. The laser ranging method according to claim 4, wherein: The step of determining the target pulse position of the reflected signal according to the signal type and the first superimposed signal comprises: If the signal type is a strong signal, performing interpolation combination on a plurality of the first superimposed signals to obtain a combined signal; determining a pulse width of the combined signal according to a rising edge and a falling edge of the combined signal; A target pulse position of the reflected signal is determined according to the pulse width.

6. The laser ranging method according to claim 4, wherein: The step of determining the target pulse position of the reflected signal according to the signal type and the first superimposed signal comprises: If the signal type is a weak signal, obtaining a first pulse position of the second superimposed signal; Mapping the first pulse position to each of the first superimposed signals to determine a second pulse position corresponding to the first pulse position in each of the first superimposed signals; performing sub-pixel processing on each of the second pulse positions; The processed second pulse positions are averaged to obtain the target pulse position of the reflected signal.

7. The laser ranging method according to claim 3, wherein: After the step of determining the distance between the laser emitter and the measured object according to the target pulse position, the method further includes: Get the target pulse position obtained in the last measurement; Obtain the error value between the target pulse position obtained by the current measurement and the target pulse position obtained by the previous measurement; If the error value is less than a preset threshold, the step of determining the distance between the laser emitter and the measured object according to the target pulse position is performed.

8. The laser ranging method according to claim 3, wherein: The step of determining the distance between the laser emitter and the measured object according to the target pulse position includes: determining a time of flight of the pulse signal according to the target pulse position; The distance between the laser emitter and the measured object is determined according to the flight time and the flight speed of the pulse signal.

9. An MCU, characterized in that: The MCU includes a memory, a processor, and a laser ranging program stored in the memory and executable on the processor. When the laser ranging program is executed by the processor, the steps of the laser ranging method according to any one of claims 3 to 8 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a laser ranging program, which, when executed by a processor, implements the steps of the laser ranging method according to any one of claims 3 to 8.

Citation Information

Patent Citations

  • Laser ranging method and system

    CN111538025A

  • Radar liquid level meter

    CN112414511A