Distance measurement method, device, electronic device and storage medium
By calculating and predicting the range measurement value sequence in the included angle mode of the laser rangefinder, the problem of inaccurate distance measurement in the included angle mode of the laser rangefinder is solved, and the distance measurement accuracy is improved.
Patent Information
- Application Number
- CN202210431647.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-04-22
AI Technical Summary
When the existing laser rangefinder is aligned with the inclined surface of the target object or the angle between the direction of the rangefinder and the front surface of the target object, it will cause the distance measurement signal to change, and the echo signal will produce deviation, which will make the distance measurement result in inaccurate.
After obtaining the range measurement signal transmitted in the angle mode and the received echo signal, the distance measurement result in the angle mode is calculated, including the range measurement value sequence at each time, and the distance measurement value sequence is predicted to obtain the distance measurement value at the current angle.
The distance measurement accuracy of the target object is improved, and the problem of inaccurate distance measurement in the existing laser rangefinder in the angle mode is solved.
Smart Images

Figure CN114814864B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ranging, and particularly to a ranging method, device, electronic device and storage medium. Background Art
[0002] Miniaturized portable laser rangefinders are a development trend of civilian laser rangefinders. Handheld laser rangefinders are widely used in engineering projects such as construction and transportation because of their convenient carrying, and are also widely used in leisure fields such as golf and hunting for various ranging occasions in leisure activities. However, most of the existing laser rangefinders measure the distance by aiming at the front of the target object. When aiming at the inclined plane of the target object or there is an angle between the direction of the rangefinder and the front of the target object, the ranging signal will change, resulting in a certain deviation in the echo signal, making the ranging result inaccurate. Therefore, the existing laser rangefinders have the problem of inaccurate ranging. Summary of the Invention
[0003] Embodiments of the present invention provide a ranging method, device, electronic device and storage medium, aiming to solve the problem that when the existing laser rangefinder aims at the inclined plane of the target object or there is an angle between the direction of the rangefinder and the front of the target object, the ranging signal will change, resulting in a certain deviation in the echo signal, making the ranging result inaccurate. After obtaining the ranging signal emitted and the echo signal received in the angle mode, the ranging result in the angle mode is calculated. The ranging result includes a sequence of ranging values at each moment. By performing prediction processing on the sequence of ranging values, the ranging value at the current angle is obtained, improving the ranging accuracy for the target object.
[0004] In a first aspect, an embodiment of the present invention provides a ranging method, the method comprising:
[0005] Obtain the ranging signal emitted and the echo signal received in the angle mode;
[0006] Calculate the ranging result in the angle mode according to the ranging signal and the echo signal, the ranging result including a sequence of ranging values corresponding to each moment;
[0007] Obtain the ranging value at the current angle by performing prediction processing on the sequence of ranging values.
[0008] Further, the step of obtaining the ranging signal emitted and the echo signal received in the angle mode comprises:
[0009] After receiving the angle mode start instruction, start the angle mode;
[0010] Emit continuous ranging signals and receive continuous echo signals in the angle mode.
[0011] Further, the step of calculating the ranging result in the included angle mode according to the ranging signal and the echo signal includes:
[0012] Calculating the ranging result in the included angle mode according to the ranging signal and the echo signal in combination with the pre-stored included angle compensation curve.
[0013] Further, before calculating the ranging result in the included angle mode according to the ranging signal and the echo signal in combination with the pre-stored included angle compensation curve, the method further includes:
[0014] In the calibration stage, determining the motion variables of the target, where the motion variables include included angle variables;
[0015] Calculating the motion compensation curve of the rangefinder according to the motion variables of the target;
[0016] Obtaining the included angle compensation curve of the rangefinder by discretizing the motion compensation curve.
[0017] Further, the step of calculating the ranging result in the included angle mode according to the ranging signal and the echo signal in combination with the pre-stored included angle compensation curve includes:
[0018] Matching the corresponding included angle compensation curve according to the ranging signal and the echo signal at the previous n moments;
[0019] Calculating the ranging result in the included angle mode at the previous t moments according to the matched included angle compensation curve, where n is less than t.
[0020] Further, the step of matching the corresponding included angle compensation curve according to the ranging signal and the echo signal at the previous n moments includes:
[0021] Matching the corresponding m included angle compensation curves according to the ranging signal and the echo signal at the previous n moments, where m is less than n.
[0022] Further, the step of calculating the ranging result in the included angle mode at the previous t moments according to the matched included angle compensation curve, where n is less than t includes:
[0023] Fitting the m matched included angle compensation curves to obtain a fitting curve;
[0024] Calculating the ranging result in the included angle mode at the previous t moments according to the fitting curve.
[0025] In a second aspect, a ranging device is provided, and the device includes:
[0026] An acquisition module, configured to acquire a ranging signal emitted in an included angle mode and an echo signal received;
[0027] A first calculation module, configured to calculate a ranging result in the included angle mode according to the ranging signal and the echo signal, where the ranging result includes a ranging value sequence corresponding to each moment;
[0028] A first processing module, configured to obtain a ranging value at the current included angle by performing prediction processing on the ranging value sequence.
[0029] In a third aspect, an electronic device is provided, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps in the ranging method described in any one of the embodiments of the present invention are implemented.
[0030] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the ranging method described in any one of the embodiments of the present invention are implemented.
[0031] In the embodiments of the present invention, a ranging signal emitted in an included angle mode and an echo signal received are acquired; a ranging result in the included angle mode is calculated according to the ranging signal and the echo signal, where the ranging result includes a ranging value sequence corresponding to each moment; a ranging value at the current included angle is obtained by performing prediction processing on the ranging value sequence. By calculating the ranging result in the included angle mode after acquiring the ranging signal emitted in the included angle mode and the echo signal received, and the ranging result includes a ranging value sequence at each moment, and by performing prediction processing on the ranging value sequence to obtain the ranging value at the current included angle, the ranging accuracy for the target object is improved. Description of the Drawings
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.
[0033] Figure 1 is a schematic flowchart of a ranging method.
[0034] Figure 2 is a schematic structural diagram of a ranging device. Detailed Embodiments
[0035] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0036] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "circumferential", "radial", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
[0037] In addition, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality" means two or more unless otherwise specifically defined.
[0038] In the present invention, unless otherwise clearly specified and limited, the terms "mounted", "connected", "coupled", "fixed", etc. shall be construed in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0039] In the present invention, unless otherwise clearly specified and defined, the first feature being "on" or "under" the second feature may include the direct contact between the first and second features, or may include the situation where the first and second features are not in direct contact but in contact through additional features therebetween. Moreover, the first feature being "above", "over" and "on top of" the second feature includes that the first feature is directly above and obliquely above the second feature, or merely indicates that the horizontal height of the first feature is higher than that of the second feature. The first feature being "under", "beneath" and "underneath" the second feature includes that the first feature is directly below and obliquely below the second feature, or merely indicates that the horizontal height of the first feature is lower than that of the second feature.
[0040] Please refer to Figure 1 , Figure 1 a ranging method provided for this application, the method comprising:
[0041] 101. Obtain the ranging signal emitted in the included angle mode and the received echo signal.
[0042] In an embodiment of the present invention, the above ranging method can be applied to ranging devices such as ranging cameras or laser rangefinders. A normal ranging mode and an included angle mode are set on the ranging device. The normal ranging mode can be understood as performing ranging when the user clicks the ranging button once, and the included angle mode can be understood as the user continuously pressing the ranging button for continuous ranging.
[0043] Further, the included angle mode is applicable to ranging objects on inclined surfaces or wavy objects. When the position where the user is located corresponds to an inclined surface of an object, at this time, the user cannot aim at the front of the object or it is difficult for the user to aim at the front of the object, and the included angle mode can be applied; or when the object is a flexible object such as a banner or a flag that will deform its surface as the air flows, the included angle mode can also be applied.
[0044] It should be noted that the activation of the included angle mode is determined by the user. After observing the situation of the object through the rangefinder, the user decides whether to activate the included angle mode. The included angle mode can be determined to be activated after the user continuously presses the ranging button.
[0045] The above ranging signal may be a laser ranging signal, and the above echo signal is the laser ranging signal returned after the ranging signal encounters an object.
[0046] Optionally, in the step of obtaining the ranging signal emitted in the included angle mode and the received echo signal, the included angle mode can be activated after receiving an included angle mode start instruction; continuous ranging signals are emitted in the included angle mode, and continuous echo signals are received.
[0047] The above included angle mode start instruction can be an instruction generated when the user continuously holds down the distance measurement button. After the user enables the included angle mode, the user can aim the rangefinder at an object without moving, so as to perform distance measurement in the included angle mode.
[0048] The above distance measurement signal can be transmitted through a signal transmitter. The above signal transmitter can be a laser transmitter, and a continuous distance measurement signal is transmitted through the signal transmitter. The above echo signal can be received through a signal receiver. Since the signal transmitter transmits a continuous distance measurement signal, the echo signal is also a continuous echo signal.
[0049] 102. Calculate the distance measurement result in the included angle mode according to the distance measurement signal and the echo signal. The distance measurement result includes a sequence of distance measurement values corresponding to each moment.
[0050] In the embodiment of the present invention, in the included angle mode, the object in front is distance measured at each moment. The distance measurement targets include the inclined plane of the object or the wavy object. The inclined plane of the object or the wavy object will affect the distance measurement signal, so that the returned echo signal is affected, resulting in inaccurate distance measurement values.
[0051] The distance measurement in the included angle mode can be understood as performing a single-point distance measurement at each moment. The length of the above moment can be the time length of the single-point distance measurement.
[0052] In the above sequence of distance measurement values, each moment corresponds to a distance measurement value. The length of the sequence of distance measurement values can be related to the time length of the included angle mode. The longer the duration of the included angle mode, the longer the length of the sequence of distance measurement values.
[0053] Furthermore, the distance measurement result in the included angle mode can be calculated according to the distance measurement signal and the echo signal in combination with the included angle compensation curve stored in advance.
[0054] Specifically, the corresponding first distance measurement result can be calculated according to the distance measurement signal and the echo signal in combination with the target optical path diagram structure stored in advance. The second distance measurement result is calculated according to the first distance measurement result in combination with the included angle compensation curve stored in advance and used as the distance measurement result in the included angle mode. The above first distance measurement result includes a first sequence of distance measurement values, and the first sequence of distance measurement values can be expressed as A(a1, a2,..., at), where at represents the first distance measurement value corresponding to the t-th moment. The above second distance measurement result includes a second sequence of distance measurement values, and the second sequence of distance measurement values can be expressed as B(b1, b2,..., bt), where bt represents the second distance measurement value corresponding to the t-th moment. B(b1, b2,..., bt) can be used as the distance measurement result in the included angle mode.
[0055] Specifically, the above-mentioned target optical path diagram structure includes nodes and relationship edges. The nodes are connected by the relationship edges. The above-mentioned target optical path diagram structure can be obtained according to the optical path structure of the ranging device. The optical path structure includes lenses and the distances between the lenses. Each lens has optical parameters, such as curvature, refractive index and other optical parameters. The lenses can be used as the nodes of the target optical path diagram structure, and the distances between the lenses can be used as the relationship edges of the target optical path diagram structure, so as to generate the target optical path diagram structure.
[0056] Further, the target optical path diagram structure includes a first optical path diagram structure and a second optical path diagram structure. The first optical path diagram structure and the second optical path diagram structure are connected by a weighted edge formed by an environmental variable. The first optical path diagram structure can be generated according to the transmitting optical path structure of the ranging signal, and the second optical path diagram structure can be generated according to the receiving optical path structure of the echo signal; obtain the environmental variable and generate the weighted edge according to the environmental variable; connect the end point of the first optical path diagram structure and the start point of the second optical path diagram structure through the weighted edge to obtain the target optical path diagram structure; input the ranging signal, the echo signal and the target optical path diagram structure into a preset calculation model for ranging calculation to obtain a first ranging result.
[0057] It should be noted that the transmitting optical path structure of the above-mentioned ranging signal is different from the receiving optical path structure of the echo signal.
[0058] Further, in the step of generating the first optical path diagram structure according to the transmitting optical path structure of the ranging signal, the first lens in the transmitting optical path structure can be used as the first node, and the optical parameters of the first lens and the distance between the first lenses can be used as the first relationship edge to generate the first optical path diagram structure. The first nodes in the first optical path diagram structure are connected by the first relationship edge. The first lens in the first optical path diagram structure is used as the start point of the first optical path diagram structure, and the last lens in the first optical path diagram structure is used as the end point of the first optical path diagram structure.
[0059] Further, the second lens in the receiving optical path structure can be used as the second node, and the optical parameters of the second lens and the distance between the second lenses can be used as the second relationship edge to generate the second optical path diagram structure. The second nodes in the second optical path diagram structure are connected by the second relationship edge. The first lens in the second optical path diagram structure is used as the start point of the second optical path diagram structure, and the last lens in the second optical path diagram structure is used as the end point of the second optical path diagram structure.
[0060] In a possible embodiment, both the first relationship edge and the second relationship edge have weight values, and the weight values of the relationship edges can be calculated by the following formula:
[0061]
[0062]
[0063] Among them, the above-mentioned a i represents the weight value of the first relationship edge between the i-th node and the (i - 1)-th node in the first optical path diagram structure. The above-mentioned b j represents the weight value of the second relationship edge between the j-th node and the (j - 1)-th node in the second optical path diagram structure. The above-mentioned represents the prior value of the first optical path diagram structure. The above-mentioned represents the prior value of the second optical path diagram structure. is greater than and can be set artificially. The above-mentioned λ i represents the optical parameter of the i-th first lens in the first optical path diagram structure. The above-mentioned λ j represents the optical parameter of the k-th first lens in the second optical path diagram structure. The above-mentioned d i represents the distance between the i-th node and the (i - 1)-th node in the first optical path diagram structure. The above-mentioned d j represents the distance between the j-th node and the (j - 1)-th node in the second optical path diagram structure.
[0064] Furthermore, the environmental variable can be calculated based on the ranging signals, echo signals, and ranging value differences at any two moments; and the weighted edge can be generated according to the environmental variable.
[0065] Among them, the above-mentioned any two moments can be any two moments before the current moment. Preferably, the above-mentioned any two moments can be any two adjacent moments before the current moment.
[0066] Specifically, the first time required for the signal to return can be calculated based on the ranging signal and echo signal at one moment, the second time required for the signal to return can be calculated based on the ranging signal and echo signal at another moment, the time difference between the first time and the second time can be calculated, the signal propagation speed can be calculated through the time difference and the ranging value difference, and the medium through which the signal propagates in the current environment can be estimated according to the signal propagation speed, so as to obtain the corresponding environmental variable. The relationship between the environmental variable and the medium is set in advance.
[0067] In a possible embodiment, the ranging result in the included angle mode can be calculated through a lightweight neural network. The above-mentioned lightweight neural network can be built based on the SSDLite network, and the parameters in the network can be quantized, so that the number of parameters is greatly reduced, and then it can be deployed on an embedded processor, enabling the ranging device to also carry the neural network for calculating the first ranging result.
[0068] Specifically, the ranging signal, the echo signal, and the target optical path diagram structure can be used as three inputs and input into a lightweight neural network. The lightweight neural network can include three branch networks, which are respectively used to process the ranging signal, the echo signal, and the target optical path diagram structure. The outputs of the three branch networks are connected to a fusion network, which is used to fuse the implicit features extracted by the three branch networks, so as to obtain the fused high-level features. Then, the fused high-level features are further convolved by a convolutional network to extract higher-level features. Finally, through an output network, the higher-level features are linearly regressed to obtain the first ranging value at the current moment.
[0069] After obtaining the first ranging value at each moment, according to the angle compensation curve, the first ranging value is processed to obtain the second ranging value. The second ranging values at each moment can be used as the ranging value sequence in the angle mode.
[0070] 103. By performing prediction processing on the ranging value sequence, the ranging value at the current angle is obtained.
[0071] In the embodiment of the present invention, after obtaining the ranging value sequence, due to the characteristics of the object itself affecting the accuracy of the echo signal, the corresponding ranging value is inaccurate. Therefore, there may be different ranging values in the ranging value sequence.
[0072] Specifically, the ranging value sequence implicitly contains the characteristic variables of the object itself. By filtering the characteristic variables in the ranging value sequence and retaining the common variables of the ranging value sequence, the ranging value at the current angle can be predicted.
[0073] Furthermore, a preset time series prediction network can be used to perform prediction processing on the ranging value sequence to obtain the ranging value at the current angle.
[0074] The above time series prediction network can be composed of an RNN recurrent neural network or an LSTM long short-term memory network. Specifically, the time series prediction network is trained through a preset data set. The data set includes ranging value sequence samples of different objects and the corresponding true distances. The ranging value sequence samples are collected in the angle mode.
[0075] During the training process, the ranging value sequence samples are input into the time series prediction network for processing, and the predicted values are output. The error between the predicted values and the true distances is calculated to obtain the loss function of the ranging value sequence samples. With the goal of minimizing the loss function, the parameters in the time series prediction network are adjusted through backpropagation. When the training iterates to the preset number of times or the time series prediction network converges, the training stops, and the trained time series prediction network is obtained.
[0076] The ranging value sequence in the included angle mode is predicted by the trained time series prediction network to obtain the ranging value at the current included angle.
[0077] Optionally, before calculating the ranging result in the included angle mode according to the ranging signal and the echo signal in combination with the pre-stored included angle compensation curve, during the calibration phase, the motion variables of the target can be determined. The motion variables include included angle variables. According to the motion variables of the target, the motion compensation curve of the rangefinder is calculated. By discretizing the motion compensation curve, the included angle compensation curve of the rangefinder is obtained.
[0078] In the embodiment of the present invention, the above calibration phase refers to sampling and calibrating rangefinders of the same batch. The above target is a movable and rotatable target. The rotatable target includes a target surface. By moving the target, the distance between the rangefinder and the target during the calibration phase is controlled. By rotating the target, the rotation angle between the rangefinder and the target surface during the calibration phase is controlled, thereby controlling the ranging included angle of the rangefinder. By randomly moving the target and randomly rotating the target surface, the motion variables of the target are determined. The above motion variables include distance variables and angle variables.
[0079] Specifically, the above Y is the compensation curve, and the motion compensation curve can be as shown in the following formula:
[0080]
[0081] The above f(di) represents the distance variable function, which can specifically be a multiplication function of the target moving speed and the moving time. The above g(θj) is the angle variable function, which can specifically be a multiplication function of the target rotation angular velocity and the rotation time.
[0082] Discretizing the above motion compensation curve can be to discretize the distance variable and the angle variable. The distance variable is discretized into I distance variables, and the angle variable is discretized into J angle variables. Specifically,
[0083]
[0084] Among them, the above Y is the compensation curve, the above di represents the i-th distance variable between the rangefinder and the target, θj represents the j-th angle variable between the rangefinder and the target surface, I is the total number of distance variables, and J is the total number of angle variables. The above Y|I is the included angle compensation curve under I distance variables.
[0085] Optionally, in the step of calculating the ranging result in the included angle mode based on the ranging signal and the echo signal in combination with the pre-stored included angle compensation curve, the ranging signal and the echo signal at the previous n moments can be used to match the corresponding included angle compensation curve; and based on the matched included angle compensation curve, the ranging result in the included angle mode at the previous t moments can be calculated, where n is greater than or equal to 1 and n is less than t.
[0086] In the embodiment of the present invention, the ranging value sequence An(a1, a2,..., an) at the previous n moments can be calculated according to the ranging signal and the echo signal at the previous n moments, where an represents the ranging value corresponding to the nth moment. According to the average value ai of the ranging value sequence An(a1, a2,..., an) at the previous n moments, then determine which distance variable is closest to the average value ai to obtain the closest distance variable Ii, and based on the closest distance variable Ii, the corresponding included angle compensation curve Y|Ii can be matched.
[0087] Optionally, in the step of matching the corresponding included angle compensation curve according to the ranging signal and the echo signal at the previous n moments, the corresponding m included angle compensation curves can be matched according to the ranging signal and the echo signal at the previous n moments, where m is less than n.
[0088] In the embodiment of the present invention, the ranging value sequence An(a1, a2,..., an) at the previous n moments can be calculated according to the ranging signal and the echo signal at the previous n moments, where an represents the ranging value corresponding to the nth moment. In the ranging value sequence An(a1, a2,..., an) at the previous n moments, each ranging value corresponds to a closest distance variable, so that the corresponding distance variable sequence I(I1, I2,..., Im) can be obtained according to the ranging value sequence An(a1, a2,..., an) at the previous n moments, where m is less than or equal to n and m is greater than or equal to 1. Based on the distance variable sequence I(I1, I2,..., Im), the corresponding included angle compensation curve Y|(I1, I2,..., Im) can be matched.
[0089] Optionally, in the step of calculating the ranging result in the included angle mode at the previous t moments according to the matched included angle compensation curve, where n is less than t, the m matched included angle compensation curves can also be fitted to obtain a fitted curve; and based on the fitted curve, the ranging result in the included angle mode at the previous t moments can be calculated.
[0090] In the embodiment of the present invention, the m included angle compensation curves can be fitted according to the least square method to obtain the fitted curve Y|I of the included angle compensation curve Y|(I1, I2,..., Im), so that the ranging result in the included angle mode at the previous t moments can be calculated according to the fitted curve Y|I.
[0091] The first ranging value sequence can be expressed as A(a1, a2, …, at), and the second ranging value sequence can be the product of the first ranging value sequence and the angle compensation curve. The ranging results in the angle pattern for the first t moments can be obtained as B(a1·Y|I, a2·Y|I, …, at·Y|I).
[0092] Furthermore, by performing prediction processing on B(a1·Y|I, a2·Y|I, …, at·Y|I), the ranging value at the current angle is obtained.
[0093] In an embodiment of the present invention, a ranging signal emitted in an angle pattern and an echo signal received are acquired; according to the ranging signal and the echo signal, the ranging result in the angle pattern is calculated, and the ranging result includes a ranging value sequence corresponding to each moment; by performing prediction processing on the ranging value sequence, the ranging value at the current angle is obtained. By calculating the ranging result in the angle pattern after acquiring the ranging signal emitted in the angle pattern and the echo signal received, and the ranging result includes the ranging value sequence at each moment, and by performing prediction processing on the ranging value sequence to obtain the ranging value at the current angle, the ranging accuracy for the target object is improved.
[0094] Please refer to Figure 2 , Figure 2 a ranging device provided by the present application. The device includes:
[0095] An acquisition module 201, configured to acquire a ranging signal emitted in an angle pattern and an echo signal received;
[0096] A first calculation module 202, configured to calculate the ranging result in the angle pattern according to the ranging signal and the echo signal, and the ranging result includes a ranging value sequence corresponding to each moment;
[0097] A first processing module 203, configured to obtain the ranging value at the current angle by performing prediction processing on the ranging value sequence.
[0098] Furthermore, the acquisition module 201 includes:
[0099] A first receiving sub-module, configured to start the angle pattern after receiving an angle pattern start instruction;
[0100] A second receiving sub-module, configured to emit continuous ranging signals and receive continuous echo signals in the angle pattern.
[0101] Furthermore, the first calculation module 202 includes:
[0102] A calculation sub-module, configured to calculate a ranging result in the included angle mode according to the ranging signal and the echo signal, in combination with a pre-stored included angle compensation curve.
[0103] Further, the device further includes:
[0104] A determination module, configured to determine a motion variable of the target during a calibration phase, where the motion variable includes an included angle variable;
[0105] A second calculation module, configured to calculate a motion compensation curve of the rangefinder according to the motion variable of the target;
[0106] A second processing module, configured to obtain an included angle compensation curve of the rangefinder by discretizing the motion compensation curve.
[0107] Further, the calculation sub-module includes:
[0108] A matching unit, configured to match a corresponding included angle compensation curve according to the ranging signal and the echo signal at the previous n moments;
[0109] A calculation unit, configured to calculate a ranging result in the included angle mode at the previous t moments according to the matched included angle compensation curve, where n is less than t.
[0110] Further, the matching unit includes:
[0111] A matching sub-unit, configured to match m corresponding included angle compensation curves according to the ranging signal and the echo signal at the previous n moments, where m is less than n.
[0112] Further, the calculation unit includes:
[0113] A fitting sub-unit, configured to fit the m matched included angle compensation curves to obtain a fitting curve;
[0114] A calculation sub-unit, configured to calculate a ranging result in the included angle mode at the previous t moments according to the fitting curve.
[0115] An embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute some or all of the steps of any ranging method recorded in the above method embodiment.
[0116] An embodiment of the present invention further provides an electronic device, where the electronic device includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any ranging method recorded in the above method embodiment.
[0117] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0118] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0119] In several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical or other forms.
[0120] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, the functional units in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software program modules.
[0122] When the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned memory includes: various media such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), external hard drives, magnetic disks, or optical discs that can store program codes.
[0123] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable memory, and the memory can include: flash drives, read-only memories (English: Read-Only Memory, abbreviated as: ROM), random access memories (English: Random Access Memory, abbreviated as: RAM), magnetic disks, or optical discs, etc.
[0124] The embodiments of the present invention have been introduced in detail above. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A ranging method, characterized in that, the method includes: In the calibration stage, determine the motion variables of the target, and the motion variables include angle variables; According to the motion variables of the target, calculate the motion compensation curve of the rangefinder; By discretizing the motion compensation curve, obtain the angle compensation curve of the rangefinder; After receiving the angle mode start instruction, activate the angle mode; In the angle mode, emit continuous ranging signals and receive continuous echo signals; According to the ranging signals and the echo signals, combined with the pre-stored angle compensation curve, calculate the ranging result in the angle mode, and the ranging result includes a sequence of ranging values corresponding to each moment; specifically, according to the ranging signals and the echo signals, combined with the pre-stored target optical path diagram structure, calculate the corresponding first ranging result, and according to the first ranging result combined with the pre-stored angle compensation curve, calculate the second ranging result as the ranging result in the angle mode; By performing prediction processing on the sequence of ranging values, obtain the ranging value at the current angle.
2. The method according to claim 1, characterized in that, the step of calculating the ranging result in the angle mode according to the ranging signals and the echo signals, combined with the pre-stored angle compensation curve includes: According to the ranging signals and the echo signals at the previous n moments, match the corresponding angle compensation curve; According to the matched angle compensation curve, calculate the ranging result in the angle mode at the previous t moments, where n is less than t.
3. The method according to claim 2, characterized in that, the step of matching the corresponding angle compensation curve according to the ranging signals and the echo signals at the previous n moments includes: According to the ranging signals and the echo signals at the previous n moments, match the corresponding m angle compensation curves, where m is less than n.
4. The method according to claim 3, characterized in that, the step of calculating the ranging result in the angle mode at the previous t moments according to the matched angle compensation curve, where n is less than t includes: Perform fitting on the m matched angle compensation curves to obtain a fitting curve; According to the fitting curve, calculate the ranging result in the angle mode at the previous t moments.
5. A ranging device, characterized in that, the device includes: A determination module, used to determine the motion variables of the target in the calibration stage, and the motion variables include angle variables; A second calculation module, used to calculate the motion compensation curve of the rangefinder according to the motion variables of the target; A second processing module, used to obtain the angle compensation curve of the rangefinder by discretizing the motion compensation curve; An acquisition module, used to activate the angle mode after receiving the angle mode start instruction; emit continuous ranging signals and receive continuous echo signals in the angle mode; A first calculation module, configured to calculate a ranging result in the included angle mode according to the ranging signal and the echo signal, in combination with a pre-stored included angle compensation curve, where the ranging result includes a ranging value sequence corresponding to each moment; specifically, calculate a corresponding first ranging result according to the ranging signal and the echo signal, in combination with a pre-stored target optical path diagram structure, and calculate a second ranging result as the ranging result in the included angle mode according to the first ranging result in combination with the pre-stored included angle compensation curve, where the ranging result includes a ranging value sequence corresponding to each moment; A first processing module, configured to obtain a ranging value at the current included angle by performing prediction processing on the ranging value sequence.
6. An electronic device, characterized in that, it includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps in the ranging method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the ranging method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Distance measurement method and device based on SiPM signal time sequence points
CN111596302A