Spatial distance measuring method and device
By performing image feature detection and motion trajectory estimation on the device, forming plane assumptions and calculating the distance between virtual anchors, the problems of low accuracy and high complexity of traditional measurement methods are solved, and efficient and accurate spatial distance measurement is achieved.
Patent Information
- Application Number
- CN202510362028.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
Traditional spatial distance measurement methods have problems such as low measurement accuracy, poor environmental adaptability, high operating complexity and low measurement efficiency.
The device's camera acquires continuous multi-frame images, performs feature detection and descriptor extraction, forms feature point pairs, and combines the device's acceleration and angular velocity information to estimate the device's motion trajectory, form a plane assumption, and then calculates the spatial distance through the virtual anchor point.
It improves the accuracy and environmental adaptability of spatial distance measurement, reduces operation complexity and measurement time, and achieves a more efficient measurement process.
Smart Images

Figure CN119879863A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for measuring space distance. Background Art
[0002] In today's era of rapid technological development, spatial distance measurement technology plays a vital role in many fields, and its application scenarios cover multiple industries such as architecture, surveying and mapping, industrial automation, smart home, virtual reality, augmented reality, and aerospace. However, traditional spatial distance measurement methods have many limitations, such as the measurement accuracy is greatly affected by the environment, the measurement process is complicated, the efficiency is low, and it is difficult to achieve in specific scenarios.
[0003] Traditional spatial distance measurement methods mainly include laser ranging, total station measurement and GPS measurement. Laser ranging technology uses the round-trip time of laser pulses to calculate distance, and has the characteristics of high precision and fast measurement, but its measurement range is limited and it is sensitive to environmental conditions. Total station measurement can measure horizontal distance, vertical distance and height difference at the same time through electronic ranging and angle measurement functions, and is suitable for medium and long-distance topographic mapping and engineering measurement.
[0004] However, traditional spatial distance measurement methods have many shortcomings in terms of measurement accuracy, environmental adaptability, operation complexity, and measurement efficiency. These shortcomings limit their application in certain complex environments or scenarios with high precision requirements, and have obvious limitations. Summary of the invention
[0005] The present invention provides a spatial distance measurement method and device to solve the problems of low measurement accuracy, poor environmental adaptability, high operation complexity and low measurement efficiency existing in the prior art.
[0006] In a first aspect, the present invention provides a method for measuring spatial distance, which specifically comprises the following steps: Step S1, acquiring multiple consecutive frames of images through the camera of the device; Step S2, performing feature detection on each frame of the continuous multiple frames of images to form feature points in the continuous multiple frames of images, and extracting the feature point information to form a descriptor for each feature point; Step S3, comparing the feature points in pairs according to the descriptors of each feature point to form matching feature point pairs; Step S4, estimating the motion trajectory of the device between consecutive frames according to the matched feature point pairs, the acceleration information and the angular velocity information of the device, to form a motion trajectory estimate of the device; Step S5, forming a plane hypothesis based on the feature points and the motion trajectory of the device; Step S6: In combination with the plane hypothesis, two virtual anchor points are obtained through the device screen, coordinates of the two virtual anchor points are transformed to form the real coordinates of the two virtual anchor points, and the distance between the two virtual anchor points is calculated.
[0007] In the present application, a descriptor refers to a set of vectors that can characterize the local features of the image around the feature point, including information such as the position, direction, scale of the feature point and texture information of the surrounding image.
[0008] Preferably, in step S2, feature detection is performed using a FAST (Features from Accelerated Segment Test) algorithm, and feature point extraction is performed using a BRIEF (Binary Robust Independent Elementary Features) algorithm.
[0009] Preferably, in step S2, feature detection and feature extraction are performed using an ORB (Oriented FAST and Rotated BRIEF) algorithm.
[0010] Preferably, in step S3, the distance between feature point descriptors is calculated by a brute-force matching algorithm, and feature point pairs whose distance is less than a first threshold (in this application, the "first threshold" changes with specific application requirements) are regarded as matching feature point pairs.
[0011] More preferably, the distance includes but is not limited to one of Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, Mahalanobis distance, and Hamming distance.
[0012] Preferably, in step S4, the motion trajectory of the device between consecutive frames is estimated by ARCore.
[0013] Preferably, in step S5, a plane hypothesis is formed based on the feature points and the motion trajectory of the device, which specifically includes the following steps: Step S501, filtering out a feature point set for forming a plane hypothesis by using a random sample consensus (RANSAC) algorithm; Step S502, forming parameters of a plane hypothesis ax+by+cz+d=0 according to the feature point set; Step S503: Optimize the parameters of the plane hypothesis until the number of internal points of the plane hypothesis is the largest, and then output the optimized plane hypothesis parameters.
[0014] The representative of the feature point set represents a set of feature points that best reflects the plane hypothesis.
[0015] The inlier point means that for a feature point, the straight-line distance between the feature point and the plane hypothesis is calculated. If the distance is less than a distance threshold, the feature point is an inlier point of the plane hypothesis.
[0016] Preferably, in step S6, the coordinate system conversion specifically includes: multiplying the virtual anchor point coordinates in the device screen coordinate system and the external parameter matrix of the camera to obtain the virtual anchor point coordinates in the world coordinate system (ie, the real coordinates).
[0017] Preferably, step S6 specifically includes: Step S601: Obtain two virtual anchor points through the device screen. After conversion through the coordinate system, the coordinates are , ; Step S602: Calculate the Euclidean distance between two virtual anchor points.
[0018] Among them, the distance d is calculated as follows: ; The distance d is the actual distance of the area that the user wants to measure.
[0019] In a second aspect, the present invention further provides a spatial distance measurement device, which specifically includes the following modules: An image acquisition module, used to acquire multiple frames of continuous images through a camera of a device; wherein the device is an external device or integrated into the device; A feature point and descriptor generation module, used to perform feature detection on each frame of the continuous multi-frame image to form feature points in the continuous multi-frame image, and extract the feature point information to form a descriptor for each feature point; A feature point pair matching module is used to compare the feature points in pairs according to the descriptors of each feature point to form matching feature point pairs; A motion trajectory estimation module, used to estimate the motion trajectory of the device between consecutive frames according to the matched feature point pairs, the acceleration information and the angular velocity information of the device, so as to form a motion trajectory estimation of the device; A plane hypothesis generating module, used to form a plane hypothesis based on the feature points and the motion trajectory estimation of the device; The distance measurement module is used to obtain two virtual anchor points through the device screen in combination with the plane hypothesis, perform coordinate transformation on the two virtual anchor points to form the real coordinates of the two virtual anchor points, and calculate the distance between the two virtual anchor points.
[0020] Preferably, in the feature point and descriptor generation module, feature detection is performed using the FAST algorithm, and feature point extraction is performed using the BRIEF algorithm.
[0021] Preferably, in the feature point and descriptor generation module, feature detection and feature extraction are performed using the ORB algorithm.
[0022] Preferably, in the feature point pair matching module, the distance between feature point descriptors is calculated by a brute force matching algorithm, and feature point pairs whose distance is less than a first threshold are regarded as matched feature point pairs.
[0023] More preferably, the distance includes but is not limited to one of Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, Mahalanobis distance, and Hamming distance.
[0024] Preferably, in the motion trajectory estimation module, ARCore is used to estimate the motion trajectory of the device between consecutive frames.
[0025] Preferably, the plane hypothesis generation module specifically includes the following submodules: A first submodule for plane hypothesis generation is used to select a set of feature points for forming a plane hypothesis through a random sampling consensus algorithm; A second plane hypothesis generation submodule is used to form parameters of a plane hypothesis ax+by+cz+d=0 according to the feature point set; The third submodule of plane hypothesis generation is used to optimize the parameters of the plane hypothesis until the number of internal points of the plane hypothesis is the largest, and then output the optimized plane hypothesis parameters.
[0026] The representative of the feature point set represents a set of feature points that best reflects the plane hypothesis.
[0027] The inlier point means that for a feature point, the straight-line distance between the feature point and the plane hypothesis is calculated. If the distance is less than a distance threshold, the feature point is an inlier point of the plane hypothesis.
[0028] Preferably, the coordinate system conversion in the distance measurement module specifically includes: multiplying the virtual anchor point coordinates in the device screen coordinate system and the external parameter matrix of the camera to obtain the virtual anchor point coordinates in the world coordinate system (ie, the real coordinates).
[0029] Preferably, the distance measurement module specifically includes the following submodules: The first submodule of distance measurement is used to obtain two virtual anchor points through the device screen. After the coordinate system conversion, the coordinates are , ; The second submodule of distance measurement is used to calculate the Euclidean distance between two virtual anchor points.
[0030] Among them, the distance d is calculated as follows: ; The distance d is the actual distance of the area that the user wants to measure.
[0031] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a spatial distance measurement method as described in any one of the first aspects of the present application.
[0032] In a fourth aspect, the present invention further provides an electronic device, comprising: a memory storing a computer program; and a processor communicatively connected to the memory, for executing a spatial distance measurement method described in any one of the first aspects of the present application when the computer program is called.
[0033] Compared with the prior art, the present invention has the following obvious outstanding substantial features and significant advantages: The present invention provides a spatial distance measurement method and device, which solves the problems of low measurement accuracy, poor environmental adaptability, high operation complexity and low measurement efficiency in the prior art. A plane hypothesis is generated and combined with the plane hypothesis to complete the construction of a virtual anchor point, and then the distance between two virtual anchor points is calculated. While improving the accuracy and environmental adaptability of spatial distance measurement, the efficiency of measurement is also improved and the complexity of operation is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which constitute part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention. In the accompanying drawings: Figure 1 It is a flow chart of a spatial distance measurement method according to a preferred embodiment of the present invention.
[0035] Figure 2 It is a schematic structural diagram of a spatial distance measuring device according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0036] The present invention provides a method and device for measuring spatial distance. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] Embodiment 1: like Figure 1 As shown, a spatial distance measurement method described in this embodiment specifically includes the following steps: Step S1: Acquire multiple consecutive frames of images through a camera of a device (such as a mobile phone, tablet, VR glasses, or other device with a camera).
[0039] Augmented Reality (AR) technology integrates the virtual environment generated by the computer with the real environment around the user by means of optoelectronic display technology, interactive technology, multiple sensor technologies, computer graphics and multimedia technology, so that the user can be convinced from the sensory effect that the virtual environment is a part of the real environment around him. Augmented reality has the characteristics of combining virtual and real, real-time interaction, and three-dimensional registration.
[0040] Step S2: performing feature detection on each frame of the continuous multiple frames of images to form feature points in the continuous multiple frames of images, and extracting the feature point information to form a descriptor of each feature point.
[0041] In the specific implementation process, the FAST algorithm can be used to perform feature detection on each frame of the image to form a descriptor. The information of the feature points is extracted by the BRIEF algorithm to form a descriptor including the position of the feature points, the method of the feature points, the scale of the feature points, and the texture of the image around the feature points. However, both the FAST algorithm and the BRIEF algorithm have the disadvantage of not being scale invariant and rotation invariant. In order to avoid this defect, the ORB algorithm can also be used for feature detection and feature extraction, so that a descriptor with scale invariance and rotation invariance can be obtained. Such a descriptor can better deal with the feature matching problem of images under translation, rotation, scaling, etc.
[0042] Among them, scale invariance means that the algorithm or feature descriptor can still maintain the consistency of feature expression and the accuracy of recognition / matching when the scale (spatial resolution or physical size) of the target object changes linearly or nonlinearly; rotation invariance means that the algorithm or feature descriptor is invariant to any rotation transformation of the target object in the image plane, that is, the feature expression and matching results are not affected by the target rotation angle.
[0043] Step S3: According to the descriptor of each feature point, the feature points are compared in pairs to form matching feature point pairs. In the specific implementation process, the distance between the feature point descriptors is calculated by a brute force matching algorithm (one of the Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, Mahalanobis distance, and Hamming distance can be used to calculate the distance), and the feature point pairs whose distance is less than the first threshold are regarded as matching feature point pairs.
[0044] Step S4: Estimate the motion trajectory of the device between consecutive frames according to the matched feature point pairs, the acceleration information and the angular velocity information of the device to form an estimated motion trajectory of the device; wherein the motion trajectory of the device between consecutive frames is estimated by ARCore.
[0045] ARCore is an augmented reality platform developed by Google, which aims to achieve a high-precision virtual-real fusion interactive experience through mobile devices such as smartphones and tablets. As the core AR technology framework of the Android ecosystem, ARCore combines computer vision, sensor fusion and machine learning algorithms to enable developers to build immersive AR applications.
[0046] Step S5: forming a plane hypothesis based on the feature points and the motion trajectory of the device.
[0047] Wherein, the step S5 specifically includes the following steps: Step S501, a feature point set for forming a plane hypothesis is screened out through a random sampling consensus (RANSAC) algorithm (the representative of the feature point set represents the feature point set that best reflects the plane hypothesis); in addition, before the random sampling consensus algorithm is used, a simple judgment can be made on whether a plane hypothesis can be formed, that is, the relative position relationship of the feature points remains unchanged. For example, in several consecutive frames of images, if it is found that the relative position relationship between some feature points remains unchanged, and the coordinates of these feature points in three-dimensional space show certain coplanar characteristics, then it can be inferred that a plane hypothesis exists. The above judgment provides a basis for the subsequent plane hypothesis fitting, makes a preliminary judgment on whether a plane hypothesis exists, and screens out the situation where no plane hypothesis exists.
[0048] Step S502: Form parameters of a plane hypothesis ax+by+cz+d=0 according to the feature point set.
[0049] Step S503, optimize the parameters of the plane hypothesis until the number of inliers of the plane hypothesis (inliers represent that for a feature point, the straight-line distance between it and the plane hypothesis is calculated, and if the distance is less than a distance threshold, then the feature point is an inlier of the plane hypothesis) is the largest, output the optimized plane hypothesis parameters, and through continuous iteration, finally select the plane hypothesis with the largest number of inliers as the final plane hypothesis, so that the finally generated plane hypothesis is more accurate and reliable.
[0050] Step S6: In combination with the plane hypothesis, two virtual anchor points are obtained through the device screen, coordinates of the two virtual anchor points are transformed to form the real coordinates of the two virtual anchor points, and the distance between the two virtual anchor points is calculated.
[0051] Among them, there are many ways to obtain virtual anchor points through the device screen, such as the user manually selecting two points on the screen of a mobile phone or tablet through a mobile phone or tablet to complete the subsequent spatial distance measurement, or the user uses a wearable device with a display device (such as AR glasses) to generate eye movement signals based on eye movement, thereby completing the generation of virtual anchor points and displaying them on the display screen of the user's wearable device.
[0052] The coordinate system conversion specifically includes: multiplying the virtual anchor point coordinates (two-dimensional coordinates) in the device screen coordinate system and the camera's external parameter matrix (including the position and posture information of the camera in the world coordinate system) to obtain the virtual anchor point coordinates (three-dimensional coordinates) in the world coordinate system, that is, the real coordinates.
[0053] Optionally, step S6 specifically includes: Step S601: Obtain two virtual anchor points through the device screen. After conversion through the coordinate system, the coordinates are , ; Step S602: Calculate the Euclidean distance d between two virtual anchor points, which is specifically expressed as follows: ; The distance d is the actual distance of the area that the user wants to measure.
[0054] In this application, the role of the plane hypothesis in the measurement of spatial distance is mainly reflected in the following aspects: 1. Determine the placement plane of the virtual anchor point After the user generates a strike point by touching the screen, the virtual anchor point needs to be placed on a suitable plane. The plane hypothesis provides a basis for the placement of the virtual anchor point. By generating a plane hypothesis through feature points, it is determined that there may be a plane hypothesis in the 3D environment. In this way, when the user constructs a virtual anchor point, the virtual anchor point can be accurately placed on these planes, ensuring that the virtual anchor point has actual physical meaning and corresponds to the plane in the real scene.
[0055] 2. Ensure the accuracy of spatial distance measurement The measurement of spatial distance is based on the real coordinates of the virtual anchor points in the 3D environment. The plane assumption can help determine the accuracy of these coordinates. Without the plane assumption, the placement of the virtual anchor points will be biased, resulting in a large error between the measured spatial distance and the actual distance. Through the plane assumption, ARCore can place the virtual anchor points on a more accurate plane, so that the error between the calculated spatial distance between the two virtual anchor points and the actual distance or height of the area the user wants to measure is smaller.
[0056] 3. Auxiliary coordinate system conversion Plane assumptions also play an auxiliary role when performing coordinate system conversion. Plane assumptions provide information about planes in the 3D environment, which allows ARCore to more accurately estimate the position and posture of the camera, thereby optimizing the conversion process from the screen coordinate system to the world coordinate system. For example, when using the RANSAC algorithm to generate plane assumptions, the obtained plane parameters can be used as additional constraints to improve the estimation accuracy of the camera extrinsic parameter matrix, thereby improving the accuracy of coordinate system conversion.
[0057] Embodiment 2: like Figure 2 As shown, the spatial distance measurement device described in this embodiment specifically includes the following modules: An image acquisition module, used to acquire multiple frames of continuous images through a camera of a device; wherein the device is an external device or integrated into the device; A feature point and descriptor generation module, used to perform feature detection on each frame of the continuous multi-frame image to form feature points in the continuous multi-frame image, and extract the feature point information to form a descriptor for each feature point; Among them, feature detection is performed using the FAST algorithm, feature point extraction is performed using the BRIEF algorithm, or feature detection and feature extraction can also be performed using the ORB algorithm.
[0058] A feature point pair matching module is used to compare the feature points in pairs according to the descriptors of each feature point to form matching feature point pairs; Optionally, the distance between feature point descriptors is calculated by a brute force matching algorithm, and feature point pairs whose distance is less than a first threshold are regarded as matching feature point pairs; wherein the distance includes but is not limited to one of Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, Mahalanobis distance, and Hamming distance.
[0059] A motion trajectory estimation module is used to estimate the motion trajectory of the device between consecutive frames based on the matched feature point pairs, the acceleration information and the angular velocity information of the device, so as to form an estimation of the motion trajectory of the device; wherein the motion trajectory of the device between consecutive frames is estimated by ARCore.
[0060] The plane hypothesis generating module is used to form a plane hypothesis according to the feature points and the motion trajectory estimation of the device.
[0061] The plane hypothesis generating module specifically includes a plane hypothesis generating first submodule, a plane hypothesis generating second submodule and a plane hypothesis generating third submodule.
[0062] The first submodule of plane hypothesis generation is used to select a feature point set for forming a plane hypothesis through a random sampling consensus algorithm.
[0063] The second submodule of plane hypothesis generation is used to form parameters of the plane hypothesis ax+by+cz+d=0 according to the feature point set.
[0064] The third submodule of plane hypothesis generation is used to optimize the parameters of the plane hypothesis until the number of internal points of the plane hypothesis is the largest, and then output the optimized plane hypothesis parameters.
[0065] The representative of the feature point set represents the feature point set that best reflects the plane hypothesis; the interior point represents that for a feature point, the straight-line distance between it and the plane hypothesis is calculated. If the distance is less than a distance threshold, the feature point is an interior point of the plane hypothesis.
[0066] The distance measurement module is used to obtain two virtual anchor points through the device screen in combination with the plane hypothesis, perform coordinate transformation on the two virtual anchor points to form the real coordinates of the two virtual anchor points, and calculate the distance between the two virtual anchor points.
[0067] The coordinate system conversion specifically includes: multiplying the virtual anchor point coordinates in the device screen coordinate system and the camera's external parameter matrix to obtain the virtual anchor point coordinates in the world coordinate system, that is, the real coordinates.
[0068] The distance measurement module specifically includes a first distance measurement submodule and a second distance measurement submodule.
[0069] The first submodule of distance measurement is used to obtain two virtual anchor points through the device screen. After the coordinate system conversion, the coordinates are , .
[0070] The second submodule of distance measurement is used to calculate the Euclidean distance between two virtual anchor points.
[0071] Among them, the distance d is calculated as follows: ; The distance d is the actual distance of the area that the user wants to measure.
[0072] The specific embodiments of the present invention are described in detail above, but they are only examples, and the present invention is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications and substitutions made to the present invention are also within the scope of the present invention. Therefore, the equalization changes and modifications made without departing from the spirit and scope of the present invention should be included in the scope of the present invention.
Claims
1. A spatial distance measurement method, characterized in that: The specific steps include: Step S1, acquiring multiple consecutive frames of images through the camera of the device; Step S2, performing feature detection on each frame of the continuous multiple frames of images to form feature points in the continuous multiple frames of images, and extracting the feature point information to form a descriptor for each feature point; Step S3, comparing the feature points in pairs according to the descriptors of each feature point to form matching feature point pairs; Step S4, estimating the motion trajectory of the device between consecutive frames according to the matched feature point pairs, the acceleration information and the angular velocity information of the device, to form a motion trajectory estimate of the device; Step S5, forming a plane hypothesis based on the feature points and the motion trajectory of the device; Step S6: In combination with the plane hypothesis, two virtual anchor points are obtained through the device screen, coordinates of the two virtual anchor points are transformed to form the real coordinates of the two virtual anchor points, and the distance between the two virtual anchor points is calculated.
2. A spatial distance measurement method according to claim 1, characterized in that: In step S2, feature detection is performed using the FAST algorithm, and feature point extraction is performed using the BRIEF algorithm.
3. A spatial distance measurement method according to claim 1, characterized in that: Feature detection and feature extraction are performed through the ORB algorithm.
4. A spatial distance measurement method according to claim 1, characterized in that: In step S3, the distance between feature point descriptors is calculated by a brute force matching algorithm, and feature point pairs whose distance is less than a first threshold are regarded as matched feature point pairs.
5. A spatial distance measurement method according to claim 4, characterized in that: The distance includes one of Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, Mahalanobis distance, and Hamming distance.
6. A spatial distance measurement method according to claim 1, characterized in that: In step S4, the motion trajectory of the device between consecutive frames is estimated through ARCore.
7. A spatial distance measurement method according to claim 1, characterized in that: In step S5, a plane hypothesis is formed based on the feature points and the motion trajectory of the device, which specifically includes the following steps: Step S501, filtering out a feature point set for forming a plane hypothesis by using a random sample consensus (RANSAC) algorithm; Step S502, forming parameters of a plane hypothesis ax+by+cz+d=0 according to the feature point set; Step S503, optimizing the parameters of the plane hypothesis until the number of the inner points of the plane hypothesis is the largest, and outputting the optimized plane hypothesis parameters; The representative of the feature point set represents the feature point set that best reflects the plane hypothesis; the interior point represents that for a feature point, the straight-line distance between it and the plane hypothesis is calculated. If the distance is less than a distance threshold, the feature point is an interior point of the plane hypothesis.
8. A spatial distance measurement method according to claim 1, characterized in that: In step S6, the coordinate conversion specifically includes: multiplying the virtual anchor point coordinates in the device screen coordinate system and the external parameter matrix of the camera to form the virtual anchor point coordinates in the world coordinate system.
9. A spatial distance measurement method according to claim 1, characterized in that: Step S6 specifically includes: Step S601: Obtain two virtual anchor points through the device screen. After conversion through the coordinate system, the coordinates are , ; Step S602: Calculate the Euclidean distance between two virtual anchor points; Among them, the distance d is calculated as follows: ; The distance d is the actual distance of the area that the user wants to measure.
10. A spatial distance measuring device, characterized in that: The modules include: An image acquisition module, used to acquire multiple frames of continuous images through a camera of a device; wherein the device is an external device or integrated into the device; A feature point and descriptor generation module, used to perform feature detection on each frame of the continuous multi-frame image to form feature points in the continuous multi-frame image, and extract the feature point information to form a descriptor for each feature point; A feature point pair matching module is used to compare the feature points in pairs according to the descriptors of each feature point to form matching feature point pairs; A motion trajectory estimation module, used to estimate the motion trajectory of the device between consecutive frames according to the matched feature point pairs, acceleration information and angular velocity information of the device, to form a motion trajectory estimation of the device; A plane hypothesis generating module, used to form a plane hypothesis based on the feature points and the motion trajectory estimation of the device; The distance measurement module is used to obtain two virtual anchor points through the device screen in combination with the plane hypothesis, perform coordinate transformation on the two virtual anchor points to form the real coordinates of the two virtual anchor points, and calculate the distance between the two virtual anchor points.
Citation Information
Patent Citations
Target distance measurement method and device based on front view image of unmanned aerial vehicle
CN114322943A
Visual mapping and positioning method based on binocular camera
CN115049731A
Method for distance measurement, Apparatus for distance measurement, Computer program for the same, and Recording medium storing computer program for the same
KR101991094B1