Distance measurement method and system, intelligent terminal and storage medium
By adjusting the frequency and weighted calculations based on the ambient light intensity in the laser rangefinder, the measurement error problem caused by sunlight interference is solved, and the measurement accuracy and stability are improved.
Patent Information
- Application Number
- CN202411264674.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-27
AI Technical Summary
When using laser rangefinder outdoors, due to the interference of sunlight, the measurement error increases, reducing the accuracy of the measurement results.
By selecting the appropriate frequency according to the ambient light intensity, adjusting the frequency of the outgoing signal until the signal quality of the reflected signal meets the standards, and weighted calculations to obtain the target distance, reducing noise interference and improving measurement accuracy.
The accuracy and stability of the measurement data are ensured, the measurement errors caused by sunlight interference are reduced, and the reliability of the measurement results is improved.
Smart Images

Figure CN119199876A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of surveying and mapping technology, and in particular to a distance measurement method, system, intelligent terminal and storage medium. Background Art
[0002] During the production process, the distance between two units needs to be measured. Considering the convenience of carrying and measurement accuracy, a distance meter is usually used for measurement.
[0003] The relevant technology usually uses a laser rangefinder, which emits a laser beam and then measures the time it takes for the laser to reflect back from an object. Since the speed of light is known, the distance can be calculated based on the principle that distance = (speed of light × time) / 2.
[0004] With respect to the above-mentioned related technologies, the inventors believe that when a laser rangefinder is used outdoors, it will be seriously disturbed by sunlight, causing measurement errors and reducing the accuracy of the measurement results. Summary of the invention
[0005] In order to reduce ranging errors and improve the accuracy of measurement results, the present application provides a ranging method, system, intelligent terminal and storage medium.
[0006] In a first aspect, the present application provides a ranging method, which adopts the following technical solution: A distance measurement method, comprising: Selecting a first frequency and a second frequency according to ambient light intensity; Executing a distance measurement step, the distance measurement step includes: controlling the rangefinder to transmit a first outgoing signal of a first frequency and a second outgoing signal of a second frequency to a measurement surface of the target object, the first outgoing signal and the second outgoing signal having the same phase; receiving a first reflected signal and a second reflected signal through the rangefinder, the first reflected signal being generated by the first outgoing signal being transmitted by the target object, and the second reflected signal being generated by the second outgoing signal being reflected by the target object; obtaining a first signal quality of the first reflected signal and a second signal quality of the second reflected signal; and updating the first frequency and the second frequency according to the first signal quality and the second signal quality; Repeat the distance measurement step until the first signal quality is greater than the preset signal quality and the second signal quality is greater than the preset signal quality, to obtain a first distance corresponding to the first reflection signal and a second distance corresponding to the second reflection signal; The first distance and the second distance are weightedly calculated to obtain a first target distance.
[0007] By adopting the above technical solution, the frequency of the outgoing signal can be continuously adjusted until the signal quality of the reflected signal meets the standard, and then the two reflected signals are used to calculate the first distance and the second distance respectively, and the first distance and the second distance are weighted to obtain the first target distance. Since the rangefinder can select the optimal operating frequency, the accuracy and stability of the measurement data are ensured.
[0008] Optionally, a frequency corresponding to a larger value of the first signal quality and the second signal quality is determined as the target frequency; Calculate the frequency difference between the first frequency and the second frequency; Reduce the frequency difference according to a preset ratio to obtain the sample frequency; Calculate the difference between the target frequency and the sample frequency to obtain the third frequency; Calculate the sum of the target frequency and the sample frequency to obtain a fourth frequency; The first frequency is updated using the third frequency, and the second frequency is updated using the fourth frequency.
[0009] By adopting the above technical solution, the third frequency and the fourth frequency are generated based on the frequency with good signal quality among the first frequency and the second frequency, so that the subsequent first frequency and the second frequency can obtain better signal quality.
[0010] Optionally, when the number of repetitions of the ranging step reaches a preset number of times, and the first signal quality is less than a preset signal quality, and the second signal quality is less than a preset signal quality, a base signal is selected according to the first frequency and the second frequency; modulating a first output signal and a base signal to obtain a first modulated signal; modulating the second output signal and the base signal to obtain a second modulated signal; The first output signal is replaced by the first modulation signal, and the second output signal is replaced by the second signal.
[0011] By adopting the above technical solution, if there is a certain noise frequency with large interference in the external environment, the frequency of the outgoing signal is extended to the frequency band to weaken the influence of the noise frequency on the outgoing signal.
[0012] Optionally, controlling the rangefinder to rotate in a first direction by a first angle; Execute a ranging step to obtain a third reflection signal and a fourth reflection signal; Obtaining a second target distance according to phase information of the third reflected signal and the fourth reflected signal; Convert the distance of the second target according to the first angle to obtain a converted distance; The first target distance is updated according to the average of the converted distance and the first target distance.
[0013] By adopting the above technical solution, the rangefinder can be deflected at a certain angle for measurement, and the first target distance can be corrected according to the second target distance obtained after the deflection, so that the measurement result is more accurate.
[0014] Optionally, when the difference between the converted distance and the first target distance is greater than a preset difference, the rangefinder is rotated by a second angle in a second direction, the second direction being different from and not opposite to the first direction; Execute a ranging step to obtain a fifth reflection signal and a sixth reflection signal; Obtaining a third target distance according to phase information of the fifth reflected signal and the sixth reflected signal; The tilt direction and tilt angle of the measuring surface are generated according to the first target distance, the first angle, the second target distance, the second angle, and the third target distance.
[0015] By adopting the above technical solution, when the measuring surface of the target object is in an inclined state, the inclination direction and the inclination angle of the measuring surface can be calculated, thereby providing more information for technicians.
[0016] Optionally, performing a frequency domain conversion operation on the first output signal to obtain a first frequency domain signal; Performing a frequency domain conversion operation on the second output signal to obtain a second frequency domain signal; Performing a frequency domain conversion operation on the first reflected signal to obtain a third frequency domain signal; Performing a frequency domain conversion operation on the second reflected signal to obtain a fourth frequency domain signal; Integrate the first frequency domain signal and the second frequency domain signal to obtain a first integrated signal; Integrate the third frequency domain signal and the fourth frequency domain signal to obtain a second integrated signal; Obtaining an interference frequency band according to a frequency spectrum difference between the first integrated signal and the second integrated signal; If the interference frequency band is located in the passband used for the filtering process, the stopband used for the filtering process is set according to the interference frequency band.
[0017] By adopting the above technical solution, the passband and stopband of the filtering process can be adjusted, the interference frequency band in the passband can be removed, the noise can be reduced, and the accuracy of the measurement result can be improved.
[0018] Optionally, the first outgoing signal and the second outgoing signal have the same outgoing phase; Preprocessing the first reflection signal and the second reflection signal; According to the first signal quality and the second signal quality, a fusion operation is performed on the first reflection signal and the second reflection signal to obtain a fusion signal; The first target distance is obtained according to the phase difference between the phase of the fusion signal and the output phase.
[0019] By adopting the above technical solution, when the phases of the two outgoing signals are the same, the first reflection signal and the second reflection signal can be fused to obtain a fused signal, and the fused signal can be used to obtain the first target distance. Since the fused signal combines the characteristics of the first reflection signal and the second reflection signal, the accuracy of the measurement result can be improved.
[0020] In a second aspect, the present application provides a ranging system, which adopts the following technical solution: A distance measurement system, comprising: an acquisition module, used to acquire ambient light intensity, a first reflection signal, a second reflection signal, a first angle, a third reflection signal, a fourth reflection signal, a second angle, a fifth reflection signal and a sixth reflection signal; A memory for storing a program of the distance measurement method as described above; The program in the memory can be loaded and executed by the processor to implement the distance measurement method as described above.
[0021] In a third aspect, the present application provides a smart terminal, which adopts the following technical solution: An intelligent terminal comprises a memory and a processor, wherein the memory stores a computer program which can be loaded by the processor and execute the distance measurement method as described above.
[0022] In a fourth aspect, the present application provides a computer storage medium capable of storing a corresponding program, which is convenient for reducing ranging errors and improving the accuracy of measurement results, and adopts the following technical solutions: A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any of the above-mentioned distance measurement methods.
[0023] In summary, the present application includes at least one of the following beneficial technical effects: 1. The frequency of the outgoing signal can be continuously adjusted until the signal quality of the reflected signal meets the standard, and then the first distance and the second distance are calculated using the two reflected signals respectively, and the first distance and the second distance are weighted to obtain the first target distance. Since the rangefinder can select the best operating frequency, the accuracy and stability of the measurement data are ensured; 2. If there is a certain noise frequency in the external environment with large interference, the frequency of the outgoing signal will be expanded to the frequency band to weaken the influence of the noise frequency on the outgoing signal; 3. The rangefinder can be deflected at a certain angle for measurement, and the first target distance can be corrected according to the second target distance obtained after deflection to make the measurement result more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of a method for using a rangefinder provided in an embodiment of the present application.
[0025] Figure 2 It is a flow chart of a distance measurement method provided in an embodiment of the present application.
[0026] Figure 3 It is a flowchart of a method for updating a first frequency and a second frequency provided in an embodiment of the present application.
[0027] Figure 4 It is a flowchart of a method for correcting the first target distance provided in an embodiment of the present application.
[0028] Figure 5 It is a flowchart of a method for updating a first target distance provided in an embodiment of the present application.
[0029] Figure 6 It is a schematic diagram of a method for updating a first target distance provided in an embodiment of the present application.
[0030] Figure 7 It is a flow chart of a method for measuring the tilt direction and tilt angle of a measuring surface provided in an embodiment of the present application.
[0031] Figure 8 It is a schematic diagram of measuring the tilt direction and tilt angle of a measuring surface provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1-8 It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] The present application embodiment discloses a schematic diagram of a method for using a rangefinder. Figure 1 The distance meter 11 transmits an outgoing signal toward the measuring surface 12 of the target object. The outgoing signal is reflected by the measuring surface 12 to obtain a reflected signal, which is received by the distance meter 11.
[0034] In some embodiments, when the speed of light is known, the rangefinder 11 calculates the distance from the rangefinder 11 to the measuring surface 12 according to the time difference between the emission time and the reception time of the reflection time of the emission signal.
[0035] In some embodiments, since the phase difference of a signal is proportional to the transmission distance of the signal, the rangefinder 11 calculates the distance from the rangefinder 11 to the measuring surface 12 by analyzing the phase difference between the outgoing signal and the reflected signal.
[0036] The present application embodiment provides a flow chart of a distance measurement method. Figure 2, the method comprising: Step S210: selecting a first frequency and a second frequency according to the ambient light intensity.
[0037] In some embodiments, the ambient light that affects the rangefinder is mainly sunlight, which includes infrared, visible light, and ultraviolet light. Exemplarily, the frequency range of infrared is 300 GHz to 430 THz, the frequency range of visible light is 430 THz to 770 THz, and the frequency range of ultraviolet light is 300 THz to 430 THz. As the intensity of ambient light increases, the infrared, visible light, and ultraviolet light in the sunlight will increase to varying degrees. If the frequency of the signal used by the rangefinder is close to the frequency of sunlight, the rangefinder will be severely interfered by the sunlight when receiving the reflected signal, affecting the ranging accuracy.
[0038] In some embodiments, if the ambient light intensity is detected to be greater than the light intensity threshold, the first frequency and the second frequency that are not in the sunlight frequency band are selected. Exemplarily, the sunlight frequency band is 300 GHz to 770 THz. For example, the first frequency is 290 GHz and the second frequency is 270 GHz; or, the first frequency is 780 THz and the second frequency is 800 THz; or, the first frequency is 250 GHz and the second frequency is 810 THz.
[0039] Step S220: Execute the distance measurement step.
[0040] The ranging step includes: Step S2201: Control the rangefinder to transmit a first outgoing signal of a first frequency and a second outgoing signal of a second frequency to a measuring surface of a target object.
[0041] The first outgoing signal and the second outgoing signal are emitted toward the same point on the measuring surface.
[0042] In some embodiments, the first outgoing signal and the second outgoing signal may be transmitted simultaneously or may not be transmitted simultaneously.
[0043] In some embodiments, the first outgoing signal and the second outgoing signal are laser or infrared light.
[0044] Step S2202: receiving a first reflection signal and a second reflection signal through a rangefinder, wherein the first reflection signal is generated when the first outgoing signal is transmitted by a target object, and the second reflection signal is generated when the second outgoing signal is reflected by the target object.
[0045] In some embodiments, the rangefinder is provided with a receiver having high reception efficiency and sensitivity to the first frequency and the second frequency.
[0046] In some embodiments, the rangefinder receives a reflected signal, which includes a first reflected signal, a second reflected signal, and noise, so it is necessary to perform a filtering operation on the reflected signal to obtain the first reflected signal and the second reflected signal. Exemplarily, a first filtering operation is performed on the reflected signal to obtain the first reflected signal, and the passband used in the first filtering operation is related to the first frequency; a second filtering operation is performed on the reflected signal to obtain the second reflected signal, and the passband used in the second filtering operation is related to the second frequency.
[0047] In some embodiments, the embodiments of the present application can also adjust the passband and stopband used in the filtering operation so that the first reflected signal and the second reflected signal obtained by the filtering operation contain less noise. In some embodiments, the first output signal is subjected to a frequency domain conversion operation to obtain a first frequency domain signal; the second output signal is subjected to a frequency domain conversion operation to obtain a second frequency domain signal; the first reflected signal is subjected to a frequency domain conversion operation to obtain a third frequency domain signal; the second reflected signal is subjected to a frequency domain conversion operation to obtain a fourth frequency domain signal. Optionally, the method for generating the frequency domain signal includes Fourier transform or wavelet transform.
[0048] In some embodiments, the first frequency domain signal and the second frequency domain signal are integrated to obtain a first integrated signal. The third frequency domain signal and the fourth frequency domain signal are integrated to obtain a second integrated signal. Among them, the first integrated signal can represent the frequency domain distribution of the outgoing signal, and the second integrated signal can represent the frequency domain distribution of the reflected signal. Since the noise has little interference on the signal frequency, the changes in the frequency domain of the outgoing signal and the reflected signal can be basically ignored. In theory, the frequency domain distribution of the outgoing signal and the reflected signal is the same, but due to the presence of noise, a noise component will appear in the frequency domain of the reflected signal, so the frequency domain component where the second integrated signal exists but the first integrated signal does not exist is the frequency domain component of the noise. Therefore, the interference frequency band can be obtained according to the difference in the spectrum of the first integrated signal and the second integrated signal. In some embodiments, if the above-mentioned interference frequency band is located in the passband used for filtering processing, the stopband used for filtering processing is set according to the interference frequency band. Among them, the passband used for filtering processing is related to the first frequency and the second frequency, and the passband is used to filter out the signals of the first frequency and the second frequency. Exemplarily, the passband used in the filtering process is 200kHz to 300kHz, and the detected interference frequency band is 250kHz to 270kHz, then 250kHz to 270kHz is set as the stopband, and 200kHz to 250kHz and 270kHz to 300kHz are set as the passband.
[0049] Step S2203: Obtain a first signal quality of the first reflected signal and a second signal quality of the second reflected signal.
[0050] In some embodiments, the signal quality includes at least one of signal-to-noise ratio, distortion, jitter, and signal strength.
[0051] In some embodiments, a first effective power and a first total power of a first reflected signal are calculated; a difference between the first total power and the first effective power is calculated to obtain a first noise power; a signal-to-noise ratio of the first reflected signal is obtained according to a ratio of the first effective power to the first noise power. A second effective power and a second total power of a second reflected signal are calculated; a difference between the second total power and the second effective power is calculated to obtain a second noise power; a signal-to-noise ratio of the second reflected signal is obtained according to a ratio of the second effective power to the second noise power.
[0052] In some embodiments, signal strength refers to the amplitude of the reflected signal.
[0053] Step S2204: Update the first frequency and the second frequency according to the first signal quality and the second signal quality.
[0054] In some embodiments, the method of updating the first frequency and the second frequency is as follows: Step S301: Determine the frequency corresponding to the larger value of the first signal quality and the second signal quality as the target frequency.
[0055] In some embodiments, if the signal quality is high, it means that the reflected signal is less interfered by the external environment, and the signal of this frequency is more suitable for ranging in this environment. Taking the signal quality as the signal-to-noise ratio as an example, if the signal-to-noise ratio of the first reflected signal is greater than the signal-to-noise ratio of the second reflected signal, the first frequency of the first reflected signal is used as the target frequency.
[0056] Step S302: Calculate the frequency difference between the first frequency and the second frequency.
[0057] Exemplarily, a difference between the first frequency and the second frequency is calculated to obtain a frequency difference.
[0058] Step S303: reducing the frequency difference according to a preset ratio to obtain a sample frequency.
[0059] Exemplarily, assuming that the preset ratio is 20%, the first frequency is 270 GHz, the second frequency is 290 GHz, the frequency difference is 20 GHz, and the sample frequency is 4 GHz.
[0060] Step S304: Calculate the difference between the target frequency and the sample frequency to obtain a third frequency.
[0061] Exemplarily, if the target frequency is 270 GHz and the sample frequency is 4 GHz, the third frequency is 266 GHz.
[0062] Step S305: Calculate the sum of the target frequency and the sample frequency to obtain a fourth frequency.
[0063] Exemplarily, if the target frequency is 270 GHz and the sample frequency is 4 GHz, the fourth frequency is 274 GHz.
[0064] It should be noted that there is no order between step S304 and step S305. Step S304 may be performed first, or step S305 may be performed first, or step S304 and step S305 may be performed simultaneously.
[0065] Step S306: Use the third frequency to update the first frequency, and use the fourth frequency to update the second frequency.
[0066] Exemplarily, the third frequency is used to replace the first frequency, and the fourth frequency is used to replace the second frequency.
[0067] In some embodiments, the signal quality clocks of the reflected signals corresponding to the first frequency and the second frequency cannot meet the requirements of the preset signal quality. At this time, the embodiment of the present application can select to broaden the frequency of the outgoing signal to make it a frequency band. Exemplarily, when the number of repetitions of the ranging step reaches a preset number of times, and the first signal quality is less than the preset signal quality, and the second signal quality is less than the preset signal quality, select a base signal according to the first frequency and the second frequency; modulate the first outgoing signal and the base signal to obtain a first modulated signal; modulate the second outgoing signal and the base signal to obtain a second modulated signal; replace the first outgoing signal with the first modulated signal, and replace the second outgoing signal with the second signal. Wherein, the frequency of the base signal is different from the frequency of the above-mentioned sunlight, and the base signal can be a pre-set signal.
[0068] Optionally, methods of modulating the outgoing signal and the base signal include frequency modulation and hybrid modulation.
[0069] In summary, by adopting the above technical solution, the third frequency and the fourth frequency are generated based on the frequency with good signal quality among the first frequency and the second frequency, so that the subsequent first frequency and the second frequency can obtain better signal quality.
[0070] Step S230: Repeat the distance measurement step until the first signal quality is greater than the preset signal quality and the second signal quality is greater than the preset signal quality, and obtain a first distance corresponding to the first reflection signal and a second distance corresponding to the second reflection signal.
[0071] In some embodiments, the first distance is obtained according to the phase difference between the first outgoing signal and the first reflected signal; and the second distance is obtained according to the phase difference between the second outgoing signal and the second reflected signal.
[0072] In some embodiments, the first distance is obtained according to the time delay between the first outgoing signal and the second reflected signal; and the second distance is obtained according to the time delay between the second outgoing signal and the second reflected signal.
[0073] Step S240: weighted calculation of the first distance and the second distance to obtain a first target distance.
[0074] In some embodiments, the weights of the first distance and the second distance are related to the signal quality. The higher the signal quality, the greater the weight corresponding to the distance.
[0075] The present application also provides another method for correcting the distance of the first target. The method requires that the first outgoing signal and the second outgoing signal have the same outgoing phase. The method includes steps S401 to S403. The specific contents are as follows: Step S401: pre-processing the first reflected signal and the second reflected signal.
[0076] Optionally, the preprocessing includes at least one of interpolation operation, normalization operation, smoothing, sampling and resampling.
[0077] The interpolation operation is used to insert a zero value into the reflected signal. Exemplarily, when there is a significant deviation between the period of the reflected signal and the period of the emitted signal, the interpolation operation is performed to make the period of the reflected signal the same as the period of the emitted signal.
[0078] Step S402: performing a fusion operation on the first reflected signal and the second reflected signal according to the first signal quality and the second signal quality to obtain a fused signal.
[0079] Optionally, fusion operations include weighted averaging, Kalman filtering, and Bayesian networks.
[0080] Exemplarily, taking weighted averaging as an example, a weight is generated according to a first signal quality of the first reflected signal and a second signal quality of the second reflected signal, and the first reflected signal and the second reflected signal are weightedly superimposed by the weight to obtain a fused signal.
[0081] In some other implementations, a weight is generated by using the amplitude of the first reflection signal and the amplitude of the second reflection signal, and the first reflection signal and the second reflection signal are weighted and superimposed by the weight to obtain a fusion signal.
[0082] Step S403: Obtain the first target distance according to the phase difference between the phase of the fused signal and the output phase.
[0083] In summary, the frequency of the outgoing signal can be continuously adjusted through the above technical solution until the signal quality of the reflected signal meets the standard, and then the first distance and the second distance are calculated respectively using the two reflected signals, and the first distance and the second distance are weighted to obtain the first target distance. Since the rangefinder can select the optimal operating frequency, the accuracy and stability of the measurement data are ensured.
[0084] In the following embodiments, since the measuring surface itself is not necessarily flat and smooth, resulting in a deviation in the first target distance measured by the rangefinder, the present application can also obtain a second target distance through the rangefinder after rotating the rangefinder by a certain angle, and use the second target distance to update the first target distance, so that the first target distance is more accurate. The method includes: Step S501: controlling the rangefinder to rotate in a first direction at a first angle.
[0085] Optionally, the first direction is a horizontal direction.
[0086] In some embodiments, the first angle is an angle smaller than a preset angle. For example, the first angle is 1 degree, 3 degrees, 5 degrees or 10 degrees.
[0087] For example, please refer to Figure 6 , the rangefinder 11 transmits an outgoing signal to the measuring surface 12, the outgoing signal is reflected at point A on the measuring surface 12, and is received by the rangefinder 11. Point O is the signal transmitting point of the rangefinder 11. After the rangefinder 11 is rotated α degrees along the first direction, the rangefinder 11 transmits an outgoing signal to the measuring surface 12, the outgoing signal is reflected at point B on the measuring surface 12, and is received by the rangefinder 11.
[0088] Step S502: Execute a ranging step to obtain a third reflection signal and a fourth reflection signal.
[0089] The specific content of the ranging step can be referred to step S2201 to step S2204, which will not be repeated here.
[0090] Step S503: Obtain the second target distance according to the phase information of the third reflection signal and the fourth reflection signal.
[0091] Optionally, the third reflected signal is obtained by reflecting the third outgoing signal, and the fourth reflected signal is obtained by reflecting the fourth outgoing signal. A third distance is obtained according to a phase difference between the third reflected signal and the third outgoing signal; a fourth distance is obtained according to a phase difference between the fourth reflected signal and the fourth outgoing signal; and the third distance and the fourth distance are weightedly calculated to obtain a second target distance.
[0092] Step S504: converting the second target distance according to the first angle to obtain a converted distance.
[0093] In some embodiments, for the sake of measurement accuracy, before rotating the rangefinder, the emission direction of the emission signal needs to be perpendicular to the measurement surface, so the second target distance can be converted into a vertical distance by converting the first angle. Figure 6 In the equation, the converted distance is OB×cosα.
[0094] Step S505: updating the first target distance according to the average of the converted distance and the first target distance.
[0095] In some embodiments, the first angle may be updated, and the above steps S501 to S504 may be repeated to obtain a plurality of converted distances, wherein the first angle obtained each time is updated is different. The first target distance is updated according to the average of the plurality of converted distances and the first target distance.
[0096] In some other embodiments, if it is found during the measurement process that the error between the converted distance and the first target distance is too large. According to the method of using the rangefinder, the rangefinder is movable and the emission direction can be adjusted within a certain range. Therefore, the error is caused by the measurement surface itself and the ground forming a certain angle. Therefore, the embodiment of the present application also provides a method for measuring the tilt direction and tilt angle of the measurement surface, which includes steps S701 to S704, and the specific contents are as follows: Step S701: when the difference between the converted distance and the first target distance is greater than a preset difference, the rangefinder is rotated in a second direction by a second angle, where the second direction is different from and not opposite to the first direction.
[0097] Optionally, the second direction is a vertical direction.
[0098] In some embodiments, the angle between the first direction and the second direction is not 0 degree or 180 degrees.
[0099] For example, please refer to Figure 8 After the rangefinder 11 is rotated β degrees in the second direction, the rangefinder 11 transmits an outgoing signal to the measuring surface 12 . The outgoing signal is reflected at point C on the measuring surface 12 and is received by the rangefinder 11 .
[0100] Step S702: Execute the ranging step to obtain the fifth reflection signal and the sixth reflection signal.
[0101] The specific content of the ranging step can be referred to step S2201 to step S2204, which will not be repeated here.
[0102] Step S703: Obtain a third target distance according to phase information of the fifth reflection signal and the sixth reflection signal.
[0103] Optionally, the fifth reflected signal is obtained by reflecting the fifth outgoing signal, and the sixth reflected signal is obtained by reflecting the sixth outgoing signal. A fifth distance is obtained according to a phase difference between the fifth reflected signal and the fifth outgoing signal; a sixth distance is obtained according to a phase difference between the sixth reflected signal and the sixth outgoing signal; and the fifth distance and the sixth distance are weightedly calculated to obtain a third target distance.
[0104] Step S704: Generate the tilt direction and tilt angle of the measuring surface according to the first target distance, the first angle, the second target distance, the second angle, and the third target distance.
[0105] For example, please refer to Figure 8 , to simplify the description, let the first direction be the horizontal direction, the second direction be the vertical direction, OA be parallel to the ground, and establish the xyz coordinates with the OA direction as the x-axis direction, where the xoy plane can be regarded as the ground. When the first target distance, the first angle and the second target distance, the second angle and the third target distance are known, the coordinates of point A can be obtained as (x1, y1, z1), the coordinates of point B can be obtained as (x2, y2, z2), and the coordinates of point C can be obtained as (x3, y3, z3). Further, the normal vector n of plane ABC can be calculated through the coordinates of points A, B and C, and plane ABC is the measurement surface 12. Then, according to the direction of the normal vector n and the angle between the normal vector n and the xoy plane, the inclination direction and inclination angle of the measurement surface are determined.
[0106] In summary, the rangefinder can be deflected at a certain angle, and the first target distance can be corrected according to the second target distance obtained after the deflection, so that the measurement result is more accurate. Moreover, when the measuring surface of the target object is in an inclined state, the inclination direction and the inclination angle of the measuring surface can be calculated, providing more information for technicians.
[0107] Based on the same inventive concept, an embodiment of the present application provides a ranging system, including: A distance measurement system, comprising: an acquisition module, used to acquire ambient light intensity, a first reflection signal, a second reflection signal, a first angle, a third reflection signal, a fourth reflection signal, a second angle, a fifth reflection signal and a sixth reflection signal; A memory for storing a program of the distance measurement method as described above; The program in the memory can be loaded and executed by the processor to implement the distance measurement method as described above.
[0108] In summary, the above scheme can continuously adjust the frequency of the outgoing signal until the signal quality of the reflected signal meets the standard, and then use the two reflected signals to calculate the first distance and the second distance respectively, and weightedly calculate the first distance and the second distance to obtain the first target distance. Since the rangefinder can select the optimal operating frequency, the accuracy and stability of the measurement data are ensured.
[0109] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0110] An embodiment of the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute a ranging method.
[0111] Computer storage media include, for example, various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0112] Based on the same inventive concept, an embodiment of the present application provides an intelligent terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute a ranging method.
[0113] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0114] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
Claims
1. A distance measurement method, characterized in that: include: Selecting a first frequency and a second frequency according to ambient light intensity; Executing a distance measurement step, the distance measurement step comprising: controlling a distance meter to transmit a first outgoing signal of a first frequency and a second outgoing signal of a second frequency to a measurement surface of a target object; receiving a first reflected signal and a second reflected signal through the distance meter, the first reflected signal being generated by the first outgoing signal being transmitted by the target object, and the second reflected signal being generated by the second outgoing signal being reflected by the target object; acquiring a first signal quality of the first reflected signal and a second signal quality of the second reflected signal; and updating the first frequency and the second frequency according to the first signal quality and the second signal quality; Repeat the distance measurement step until the first signal quality is greater than a preset signal quality and the second signal quality is greater than the preset signal quality, to obtain a first distance corresponding to the first reflected signal and a second distance corresponding to the second reflected signal; The first distance and the second distance are weightedly calculated to obtain a first target distance.
2. The method according to claim 1, characterized in that The step of updating the first frequency and the second frequency according to the first signal quality and the second signal quality comprises: Determine a frequency corresponding to a larger value of the first signal quality and the second signal quality as a target frequency; calculating a frequency difference between the first frequency and the second frequency; Reducing the frequency difference according to a preset ratio to obtain a sample frequency; Calculating a difference between the target frequency and the sample frequency to obtain a third frequency; Calculating a sum of the target frequency and the sample frequency to obtain a fourth frequency; The first frequency is updated using the third frequency, and the second frequency is updated using the fourth frequency.
3. The method according to claim 2, characterized in that The method further comprises: When the number of repetitions of the ranging step reaches a preset number, and the first signal quality is less than the preset signal quality, and the second signal quality is less than the preset signal quality, selecting a base signal according to the first frequency and the second frequency; modulating the first output signal and the base signal to obtain a first modulated signal; modulating the second output signal and the base signal to obtain a second modulated signal; The first output signal is replaced by the first modulation signal, and the second output signal is replaced by the second signal.
4. The method according to claim 1, characterized in that: The method further comprises: Controlling the rangefinder to rotate in a first direction by a first angle; Execute the ranging step to obtain a third reflection signal and a fourth reflection signal; Obtaining a second target distance according to phase information of the third reflected signal and the fourth reflected signal; Convert the second target distance according to the first angle to obtain a converted distance; The first target distance is updated according to an average of the converted distance and the first target distance.
5. The method according to claim 4, characterized in that The method further comprises: When the difference between the converted distance and the first target distance is greater than a preset difference, rotating the rangefinder in a second direction by a second angle, the second direction being different from and not opposite to the first direction; Execute the ranging step to obtain a fifth reflection signal and a sixth reflection signal; Obtaining a third target distance according to phase information of the fifth reflected signal and the sixth reflected signal; The tilt direction and tilt angle of the measuring surface are generated according to the first target distance, the first angle and the second target distance, and the second angle and the third target distance.
6. The method according to claim 1, characterized in that The method further comprises: Performing a frequency domain conversion operation on the first output signal to obtain a first frequency domain signal; Performing a frequency domain conversion operation on the second output signal to obtain a second frequency domain signal; Performing a frequency domain conversion operation on the first reflected signal to obtain a third frequency domain signal; Performing a frequency domain conversion operation on the second reflected signal to obtain a fourth frequency domain signal; Integrating the first frequency domain signal and the second frequency domain signal to obtain a first integrated signal; Integrating the third frequency domain signal and the fourth frequency domain signal to obtain a second integrated signal; Obtaining an interference frequency band according to a frequency spectrum difference between the first integrated signal and the second integrated signal; If the interference frequency band is located in the passband used in the filtering process, the stopband used in the filtering process is set according to the interference frequency band.
7. The method according to claim 1, characterized in that The first output signal and the second output signal have the same output phase; The method further comprises: Preprocessing the first reflected signal and the second reflected signal; performing a fusion operation on the first reflected signal and the second reflected signal according to the first signal quality and the second signal quality to obtain a fused signal; The first target distance is obtained according to a phase difference between a phase of the fusion signal and the output phase.
8. A distance measurement system, characterized in that: include: An acquisition module, used to acquire the ambient light intensity, the first reflection signal, the second reflection signal, the first angle, the third reflection signal, the fourth reflection signal, the second angle, the fifth reflection signal and the sixth reflection signal; A memory for storing a program of the distance measurement method according to any one of claims 1 to 7; The program in the memory can be loaded and executed by the processor to implement the distance measurement method according to any one of claims 1 to 7.
9. An intelligent terminal, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program which can be loaded by the processor and executes any one of the distance measurement methods according to claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and executes any distance measurement method according to any one of claims 1 to 7.