Distance measurement method, device, electronic device and storage medium
By calculating the changes in the distance measurement result of the laser rangefinder in scanning mode and issuing a prompt, the problem of inaccurate distance measurement of the laser rangefinder is solved, and the distance measurement accuracy of the target object is improved.
Patent Information
- Application Number
- CN202210065261.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-01-18
AI Technical Summary
Existing laser rangefinders have the problem of inaccurate distance measurement, especially when the user positioning is inaccurate, the measurement results are prone to misjudging the distance of other objects.
Use the scanning mode to transmit the ranging signal and receive the echo signal, calculate the ranging result, and issue a prompt when the ranging value changes greater than the preset value, display the corresponding ranging value, and improve the ranging accuracy of the target object.
By issuing a prompt and displaying the distance measurement value when the distance measurement result changes at adjacent moments, the distance measurement accuracy of the laser rangefinder for the target object is improved.
Smart Images

Figure CN114624719B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distance measurement technology, and in particular to a distance measurement method, device, electronic equipment and storage medium. Background Art
[0002] Miniaturized portable laser rangefinders are a development trend in civilian laser rangefinders. Due to their portability, handheld laser rangefinders are widely used in engineering projects such as construction and transportation, and are also widely used in various distance measurement scenarios in leisure activities such as golf and hunting. However, most existing laser rangefinders use single-point distance measurement. After observing the object of interest through the eyepiece, the user clicks the rangefinder's distance switch once to measure the distance. This distance measurement method often requires the user to locate the target object through the eyepiece. If the user's positioning is accurate, the measurement result is the distance value of the target object. If the user's positioning is inaccurate, the measurement result is the distance value of other objects. Therefore, existing laser rangefinders have the problem of inaccurate distance measurement. Summary of the Invention
[0003] Embodiments of the present invention provide a ranging method, device, electronic device, and storage medium. The method calculates a ranging result in the scanning mode after acquiring a ranging signal emitted and an echo signal received in the scanning mode. The ranging result includes ranging values at each moment. When a variation in the ranging values between two adjacent moments is greater than a preset value, it indicates a change in the distance to the object, which can be considered to be scanning from the background to the target object or from the target object to the background. At this time, a prompt is issued and the corresponding ranging value is displayed, thereby improving the ranging accuracy of the target object and solving the problem of inaccurate ranging in existing laser rangefinders.
[0004] In a first aspect, an embodiment of the present invention provides a ranging method, the method comprising:
[0005] Acquire the ranging signal emitted and the echo signal received in scanning mode;
[0006] Calculating a ranging result in the scanning mode according to the ranging signal and the echo signal, the ranging result including a ranging value at each moment;
[0007] When the distance measurement value change between two adjacent moments in the distance measurement result is greater than a preset value, a preset prompt is issued, and at least one of the distance measurement value before the distance measurement value change and the distance measurement value after the distance measurement value change is displayed.
[0008] Furthermore, the step of acquiring the ranging signal emitted in the scanning mode and the echo signal received includes:
[0009] After receiving the scanning mode start instruction, start the scanning mode;
[0010] In the scanning mode, continuous ranging signals are transmitted and continuous echo signals are received.
[0011] Furthermore, the step of calculating the ranging result in the scanning mode according to the ranging signal and the echo signal includes:
[0012] The ranging result in the scanning mode is calculated according to the ranging signal and the echo signal in combination with a pre-stored target optical path structure.
[0013] Furthermore, 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, and the step of calculating the ranging result in the scanning mode according to the ranging signal and the echo signal in combination with the pre-stored target optical path diagram structure includes:
[0014] Generate a first optical path diagram structure according to the transmission optical path structure of the ranging signal, and generate a second optical path diagram structure according to the reception optical path structure of the echo signal;
[0015] Obtaining environment variables and generating weighted edges according to the environment variables;
[0016] Connecting the end point of the first light path graph structure with the starting point of the second light path graph structure through the weighted edge to obtain a target light path graph structure;
[0017] The ranging signal, the echo signal and the target optical path diagram structure are input into a preset calculation model to perform ranging calculation to obtain a ranging result in the scanning mode.
[0018] Furthermore, the step of generating a first optical path diagram structure according to the transmission optical path structure of the ranging signal includes:
[0019] A first optical path diagram structure is generated with the first lens in the emission optical path structure as the first node, the optical parameters of the first lens and the distance between the first lenses as the first relationship edge, and each first node in the first optical path diagram structure is connected by the first relationship edge. The first first lens in the first optical path diagram structure serves as the starting point of the first optical path diagram structure, and the last first lens in the first optical path diagram structure serves as the end point of the first optical path diagram structure.
[0020] Furthermore, the step of generating a second optical path diagram structure according to the receiving optical path structure of the echo signal includes:
[0021] A second optical path diagram structure is generated with the second lens in the receiving optical path structure as the second node, the optical parameters of the second lens and the distance between the second lenses as the second relationship edge, and the second nodes in the second optical path diagram structure are connected by the second relationship edge. The first second lens in the second optical path diagram structure serves as the starting point of the second optical path diagram structure, and the last second lens in the second optical path diagram structure serves as the end point of the second optical path diagram structure.
[0022] Furthermore, the step of obtaining the environment variables and generating weighted edges according to the environment variables includes:
[0023] Calculating the environmental variable according to the ranging signal, the echo signal and the ranging value difference at any two moments;
[0024] Generate weighted edges according to the environment variables.
[0025] In a second aspect, a distance measuring device is provided, the device comprising:
[0026] An acquisition module is used to acquire the ranging signal emitted in the scanning mode and the echo signal received;
[0027] a calculation module, configured to calculate a ranging result in the scanning mode according to the ranging signal and the echo signal, wherein the ranging result includes a ranging value at each moment;
[0028] The display module is used to issue a preset prompt when the distance measurement value change between two adjacent moments in the distance measurement result is greater than a preset value, and display at least one of the distance measurement value before the distance measurement value change and the distance measurement value after the distance measurement value change.
[0029] In a third aspect, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the ranging method as 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, wherein 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 as described in any one of the embodiments of the present invention are implemented.
[0031] In an embodiment of the present invention, a ranging signal transmitted in a scanning mode and an echo signal received are acquired; a ranging result in the scanning mode is calculated based on the ranging signal and the echo signal, the ranging result including the ranging value at each moment; and when the ranging value change between two adjacent moments in the ranging result is greater than a preset value, a preset prompt is issued, and at least one of the ranging value before the change and the ranging value after the change is displayed. After acquiring the ranging signal transmitted in the scanning mode and the echo signal received, the ranging result in the scanning mode is calculated, including the ranging value at each moment. When the ranging value change between two adjacent moments in the ranging result is greater than a preset value, indicating a change in the distance to the object, which can be considered to be scanning from the background to the target object or from the target object to the background, a prompt is issued, and the corresponding ranging value is displayed. This improves the accuracy of distance measurement for the target object, thereby resolving the problem of inaccurate ranging in existing laser rangefinders. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 It is a flow chart of a distance measurement method.
[0034] Figure 2 It is a structural diagram of a distance measuring device. DETAILED DESCRIPTION
[0035] The following describes in detail embodiments of the present invention, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are 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", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "circumferential", "radial", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying 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 operate in a specific orientation, and therefore cannot be understood as limiting the present invention.
[0037] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature identified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0038] In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "connect," "fixed," etc. should be understood broadly. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediary; or internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0039] In the present invention, unless otherwise expressly specified or limited, a first feature being "above" or "below" a second feature may include the first and second features being in direct contact, or may include the first and second features being in contact not directly but through another feature between them. Furthermore, a first feature being "above," "above," and "above" a second feature may include the first feature being directly above or obliquely above the second feature, or may simply mean that the first feature is higher in level than the second feature. A first feature being "below," "below," and "below" a second feature may include the first feature being directly below or obliquely below the second feature, or may simply mean that the first feature is lower in level than the second feature.
[0040] See also Figure 1 , Figure 1 A distance measurement method provided in this application includes:
[0041] 101. Acquire the ranging signal transmitted and the echo signal received in the scanning mode.
[0042] In an embodiment of the present invention, the above-mentioned ranging method can be applied to a ranging device such as a ranging camera or a laser rangefinder. The ranging device is provided with a single-point ranging mode and a scanning mode. The single-point ranging mode can be understood as the user single-clicking the ranging button to perform ranging, and the scanning mode can be understood as the user continuously pressing the ranging button to perform continuous ranging.
[0043] The above-mentioned ranging signal may be a laser ranging signal, and the above-mentioned echo signal is the laser ranging signal returned after the ranging signal encounters an object.
[0044] Optionally, in the step of acquiring the ranging signal emitted and the echo signal received in the scanning mode, the scanning mode can be turned on after receiving the scanning mode start instruction; continuous ranging signals are emitted in the scanning mode, and continuous echo signals are received.
[0045] The scanning mode start instruction may be an instruction generated when the user continuously presses the distance measurement button. After the user turns on the scanning mode, the user may slowly move the distance measurement device to perform scanning.
[0046] The ranging signal can be transmitted by a signal transmitter, which can be a laser transmitter, and transmits a continuous ranging signal. The echo signal can be received by a signal receiver. Since the signal transmitter transmits a continuous ranging signal, the echo signal is also a continuous echo signal.
[0047] 102. Calculate the ranging result in the scanning mode according to the ranging signal and the echo signal, where the ranging result includes the ranging value at each moment.
[0048] In the embodiment of the present invention, in the scanning mode, the distance to the object in front is measured at every moment. The distance measurement targets include the background and the object. The foreground and the object have different spatial positions and therefore have different distances, thereby obtaining different distance measurement values.
[0049] The ranging in the scanning mode can be understood as performing a single-point ranging at each moment, and the length of the above moment can be the time length of the single-point ranging.
[0050] Optionally, in the step of calculating the ranging result in the scanning mode based on the ranging signal and the echo signal, the ranging result in the scanning mode can be calculated based on the ranging signal and the echo signal in combination with a pre-stored target optical path diagram structure.
[0051] Specifically, the target optical path graph structure includes nodes and edges, with nodes connected by edges. The target optical path graph structure can be obtained based on the optical path structure of the ranging device. The optical path structure includes lenses and the distances between lenses. Each lens has optical parameters, such as curvature and refractive index. Lenses can be used as nodes of the target optical path graph structure, and the distances between lenses as edges of the target optical path graph structure, thereby generating the target optical path graph structure.
[0052] Optionally, the target optical path diagram structure includes a first optical path diagram structure and a second optical path diagram structure, and the first optical path diagram structure and the second optical path diagram structure are connected through a weighted edge formed by environmental variables. In the step of calculating the ranging result in the scanning mode based on the ranging signal and the echo signal, combined with the pre-stored target optical path diagram structure, 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; the environmental variables are obtained, and the weighted edge is generated according to the environmental variables; the end point of the first optical path diagram structure is connected to the starting point of the second optical path diagram structure through the weighted edge to obtain the target optical path diagram structure; the ranging signal, the echo signal and the target optical path diagram structure are input into a preset calculation model to perform ranging calculation to obtain the ranging result in the scanning mode.
[0053] It should be noted that the optical path structure of the transmitting distance measurement signal is different from the optical path structure of the receiving echo signal.
[0054] Optionally, in the step of generating a first optical path diagram structure based on 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 first lens in the first optical path diagram structure serves as the starting point of the first optical path diagram structure, and the last first lens in the first optical path diagram structure serves as the end point of the first optical path diagram structure.
[0055] Optionally, in the step of generating a second optical path diagram structure based on the receiving optical path structure of the echo signal, the second lens in the receiving optical path structure can be used as the second node, 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 second lens in the second optical path diagram structure serves as the starting point of the second optical path diagram structure, and the last second lens in the second optical path diagram structure serves as the end point of the second optical path diagram structure.
[0056] 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 using the following formula:
[0057]
[0058]
[0059] Among them, the above a n Represents the weight value of the first relationship edge between the nth node and the n-1th node in the first light path graph structure. k Represents the weight value of the second relationship edge between the kth node and the k-1th node in the second light path graph structure. Represents the prior value of the first optical path structure, the above Represents the prior value of the second optical path structure, Greater than and It can be set manually. n Represents the optical parameters of the nth first lens in the first optical path structure. The above λ k Represents the optical parameters of the kth first lens in the second optical path diagram structure. n Represents the distance between the nth node and the n-1th node in the first optical path structure. The above d k Represents the distance between the kth node and the k-1th node in the second light path diagram structure.
[0060] Optionally, in the step of obtaining environmental variables and generating weighted edges based on the environmental variables, the environmental variables can be calculated based on the ranging signal, echo signal and ranging value difference at any two moments; and the weighted edges can be generated based on the environmental variables.
[0061] The above-mentioned arbitrary two moments may be any two moments before the current moment. Preferably, the above-mentioned arbitrary two moments may be any two adjacent moments before the current moment.
[0062] Specifically, the first time required for the signal to return can be calculated based on the ranging signal and the echo signal at one moment, and the second time required for the signal to return can be calculated based on the ranging signal and the echo signal at another moment. The time difference between the first time and the second time can be calculated, and the signal propagation speed can be calculated based on the time difference and the ranging value difference. The medium of signal propagation in the current environment can be estimated based on the signal propagation speed, thereby obtaining the corresponding environmental variables. The relationship between environmental variables and media is set by default.
[0063] In one possible embodiment, the ranging results in the scanning mode can be calculated by 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 quantified, thereby greatly reducing the number of parameters. It can then be deployed in an embedded processor, so that the ranging device can also be equipped with a neural network corresponding to the calculation of the ranging results.
[0064] 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 used to process the ranging signal, the echo signal and the target optical path diagram structure respectively. 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 to obtain fused high-level features. The fused high-level features are then convolved through the convolution network to further extract higher-level features. Finally, the higher-level features are linearly regressed through the output network to obtain the ranging value at the current moment.
[0065] 103. When a distance measurement value change between two adjacent moments is greater than a preset value in the distance measurement result, a preset prompt is issued, and at least one of the distance measurement value before the distance measurement value change and the distance measurement value after the distance measurement value change is displayed.
[0066] In an embodiment of the present invention, when the distance measurement results show that the difference between two adjacent distance measurement values is greater than a preset value, it indicates that there has been a distance change. For example, a distance change occurs when scanning from the background to the target object, or from the target object to the background. In this case, a preset prompt can be issued, which can be a red light prompt in the eyepiece, a buzzer prompt, or a combination of a red light and a buzzer prompt.
[0067] The distance value before the distance value changes may be displayed, the distance value after the distance value changes may be displayed, or the distance value before the distance value changes and the distance value after the distance value changes may be displayed simultaneously.
[0068] In a possible embodiment, since the target object is closer to the user than the background, the smaller value between the distance value before the distance value changes and the distance value after the distance value changes may be displayed.
[0069] In an embodiment of the present invention, a ranging signal transmitted in a scanning mode and an echo signal received are acquired; a ranging result in the scanning mode is calculated based on the ranging signal and the echo signal, the ranging result including the ranging value at each moment; and when the ranging value change between two adjacent moments in the ranging result is greater than a preset value, a preset prompt is issued, and at least one of the ranging value before the change and the ranging value after the change is displayed. After acquiring the ranging signal transmitted in the scanning mode and the echo signal received, the ranging result in the scanning mode is calculated, including the ranging value at each moment. When the ranging value change between two adjacent moments in the ranging result is greater than a preset value, indicating a change in the distance to the object, which can be considered to be scanning from the background to the target object or from the target object to the background, a prompt is issued, and the corresponding ranging value is displayed. This improves the accuracy of distance measurement for the target object, thereby resolving the problem of inaccurate ranging in existing laser rangefinders.
[0070] See also Figure 2 , Figure 2 A distance measuring device provided in this application includes:
[0071] An acquisition module 201 is used to acquire the ranging signal transmitted and the echo signal received in the scanning mode;
[0072] a calculation module 202, configured to calculate a ranging result in the scanning mode according to the ranging signal and the echo signal, wherein the ranging result includes a ranging value at each moment;
[0073] The display module 203 is configured to issue a preset prompt and display at least one of the distance value before the change and the distance value after the change when the distance measurement value between two adjacent moments in the distance measurement result is greater than a preset value.
[0074] Furthermore, the acquisition module 201 includes:
[0075] The start submodule is used to start the scanning mode after receiving the scanning mode start instruction;
[0076] The receiving submodule is used to transmit continuous ranging signals and receive continuous echo signals in the scanning mode.
[0077] Furthermore, the calculation module 202 includes:
[0078] The calculation submodule is used to calculate the ranging result in the scanning mode according to the ranging signal and the echo signal in combination with the pre-stored target light path diagram structure.
[0079] Furthermore, the target light path graph structure includes a first light path graph structure and a second light path graph structure, the first light path graph structure and the second light path graph structure are connected through a weighted edge formed by an environmental variable, and the calculation submodule includes:
[0080] A generating unit, configured to generate a first optical path diagram structure according to a transmitting optical path structure of a ranging signal, and to generate a second optical path diagram structure according to a receiving optical path structure of an echo signal;
[0081] An acquisition unit, configured to acquire environment variables and generate weighted edges according to the environment variables;
[0082] a connecting unit, configured to connect an end point of the first light path graph structure with a starting point of the second light path graph structure through the weighted edge to obtain a target light path graph structure;
[0083] The calculation unit is used to input the ranging signal, the echo signal and the target optical path diagram structure into a preset calculation model to perform ranging calculation and obtain the ranging result in the scanning mode.
[0084] Furthermore, the generation unit is also used to generate a first optical path diagram structure with the first lens in the emitting optical path structure as the first node, the optical parameters of the first lens and the distance between the first lenses as the first relationship edge, the first nodes in the first optical path diagram structure are connected by the first relationship edge, the first first lens in the first optical path diagram structure serves as the starting point of the first optical path diagram structure, and the last first lens in the first optical path diagram structure serves as the end point of the first optical path diagram structure.
[0085] Furthermore, the generation unit is also used to generate a second optical path diagram structure with the second lens in the receiving optical path structure as the second node, the optical parameters of the second lens and the distance between the second lenses as the second relationship edge, and the respective second nodes in the second optical path diagram structure are connected by the second relationship edge, the first second lens in the second optical path diagram structure serves as the starting point of the second optical path diagram structure, and the last second lens in the second optical path diagram structure serves as the end point of the second optical path diagram structure.
[0086] Furthermore, the acquisition unit includes:
[0087] a calculation subunit, configured to calculate the environmental variable based on the ranging signal, the echo signal, and the ranging value difference at any two moments;
[0088] A generating subunit is used to generate weighted edges according to the environment variables.
[0089] An embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any ranging method described in the above method embodiments.
[0090] An embodiment of the present invention further provides an electronic device, comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute part or all of the steps of any ranging method described in the above method embodiments.
[0091] It should be noted that for the aforementioned method embodiments, for simplicity of 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 order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0092] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0094] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0095] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software program modules.
[0096] If 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, 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 enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned memory includes various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0097] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0098] The embodiments of the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A distance measurement method, characterized in that: The method comprises: After receiving a scanning mode start instruction, the scanning mode is started; in the scanning mode, a continuous ranging signal is transmitted and a continuous echo signal is received; A first optical path diagram structure is generated according to the transmitting optical path structure of the ranging signal, and a second optical path diagram structure is generated according to the receiving optical path structure of the echo signal; environmental variables are obtained, and weight edges are generated according to the environmental variables; the end point of the first optical path diagram structure is connected to the starting point of the second optical path diagram structure through the weight edges to obtain a target optical path diagram structure; the ranging signal, the echo signal and the target optical path diagram structure are used as three inputs and are respectively input into a lightweight neural network, the lightweight neural network includes 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 to obtain fused high-level features, and then the fused high-level features are convolved by a convolution network to further extract higher-level features, and finally the higher-level features are linearly regressed by the output network to obtain a ranging result, which includes the ranging value at each moment; When the distance measurement value change between two adjacent moments in the distance measurement result is greater than a preset value, a preset prompt is issued, and at least one of the distance measurement value before the distance measurement value change and the distance measurement value after the distance measurement value change is displayed.
2. The method according to claim 1, characterized in that The step of generating a first optical path diagram structure according to the transmission optical path structure of the ranging signal includes: A first optical path diagram structure is generated with the first lens in the emission optical path structure as the first node, the optical parameters of the first lens and the distance between the first lenses as the first relationship edge, and each first node in the first optical path diagram structure is connected by the first relationship edge. The first first lens in the first optical path diagram structure serves as the starting point of the first optical path diagram structure, and the last first lens in the first optical path diagram structure serves as the end point of the first optical path diagram structure.
3. The method according to claim 1, characterized in that The step of generating a second optical path diagram structure according to the receiving optical path structure of the echo signal includes: A second optical path diagram structure is generated with the second lens in the receiving optical path structure as the second node, the optical parameters of the second lens and the distance between the second lenses as the second relationship edge, and the second nodes in the second optical path diagram structure are connected by the second relationship edge. The first second lens in the second optical path diagram structure serves as the starting point of the second optical path diagram structure, and the last second lens in the second optical path diagram structure serves as the end point of the second optical path diagram structure.
4. The method according to claim 1, wherein The step of obtaining environment variables and generating weighted edges according to the environment variables includes: Calculating the environmental variable based on the ranging signal, the echo signal, and the ranging value difference at any two moments; Generate weighted edges according to the environment variables.
5. A distance measuring device, characterized in that: The device comprises: An acquisition module, configured to start the scanning mode upon receiving a scanning mode start instruction; transmit continuous ranging signals and receive continuous echo signals in the scanning mode; A computing module is configured to generate a first optical path diagram structure based on the transmitting optical path structure of the ranging signal, and to generate a second optical path diagram structure based on the receiving optical path structure of the echo signal; obtain environmental variables and generate weighted edges based on the environmental variables; connect the end point of the first optical path diagram structure with the starting point of the second optical path diagram structure through the weighted edges to obtain a target optical path diagram structure; input the ranging signal, the echo signal, and the target optical path diagram structure as three inputs, respectively, into a lightweight neural network, the lightweight neural network including three branch networks, respectively used to process the ranging signal, the echo signal, and the target optical path diagram structure, the outputs of the three branch networks being connected to a fusion network for fusing implicit features extracted by the three branch networks to obtain fused high-level features, and then performing convolution calculation on the fused high-level features through a convolutional network to further extract higher-level features, and finally performing linear regression on the higher-level features through an output network to obtain a ranging result, the ranging result including the ranging value at each moment; The display module is used to issue a preset prompt when the distance measurement value change between two adjacent moments in the distance measurement result is greater than a preset value, and display at least one of the distance measurement value before the distance measurement value change and the distance measurement value after the distance measurement value change.
6. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the ranging method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the ranging method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Distance measuring apparatus, method for measuring distance, on-vehicle apparatus, and mobile object
EP3764124A1
Portable laser surveillance method of a point on a target
US8111383B1