Motion pose estimation method and device of recording equipment, equipment and storage medium

By identifying and clustering feature points in images, constructing a world coordinate system and dividing classification areas, the problem of low accuracy of motion pose estimation in SLAM technology is solved, and the real-time performance and reliability of SLAM technology are improved.

CN118628562APending Publication Date: 2024-09-10NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410649421.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The accuracy of motion pose estimation of recording equipment in existing SLAM technology is not high, resulting in problems such as reconstruction errors and drift during positioning and navigation in unknown environments, which reduces the real-time performance of the system.

Method used

By identifying matching feature points in two consecutive frames of images under the target scene, perform depth restoration and construct a world coordinate system, use the Euclidean clustering algorithm to cluster map points, divide classification areas, and only use normal number clusters and excess number The map points in the cluster perform motion pose estimation to avoid interference from weak texture map points in too few clusters.

Benefits of technology

It improves the accuracy of motion pose estimation of the recording device, enhances the real-time performance and reliability of SLAM technology, and reduces the computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628562A
    Figure CN118628562A
Patent Text Reader

Abstract

The invention discloses a motion pose estimation method and device of recording equipment, equipment and a storage medium. A plurality of first matching feature points in a first frame of image and a plurality of second matching feature points in a second frame of image are identified, and depth recovery is performed on the two frames of images based on the feature points to obtain a first target image and a second target image. And constructing a world coordinate system based on the first target image and the first frame image, projecting the first target image and the second target image as key frames into the world coordinate system to obtain a projection map with a plurality of map points, and clustering the map points by using a European clustering algorithm to obtain a clustering result. Dividing the projection map based on the clustering result to obtain classification areas, wherein the names of the classification areas comprise normal quantity clusters, excessive quantity clusters or excessive quantity clusters; and performing motion pose estimation on the target recording equipment according to the map points in the normal number cluster and the excessive number cluster. According to the invention, the precision and reliability of motion pose estimation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a method, device, equipment and storage medium for estimating the motion posture of a recording device. Background Art

[0002] Simultaneous Localization and Mapping (SLAM) technology is a technology that uses environmental information obtained by cameras or other visual sensors (hereinafter referred to as recording devices) to perform self-positioning and environmental map construction. Through SLAM technology, robots or unmanned vehicles (hereinafter referred to as mobile devices) can achieve autonomous navigation and driving in unknown environments, thereby achieving tasks such as target detection and environmental monitoring. The main methods for implementing SLAM technology are feature point method and direct method.

[0003] The feature point method is one of the most widely used SLAM algorithms. This method estimates the motion pose of the recording device by selecting relatively representative image features from the image. Based on the estimated motion pose, the environment map is constructed according to the position of the feature points and descriptors. That is, the estimated motion pose can provide the motion trajectory and posture information of the camera or other visual sensors for the construction of the environment map. However, the accuracy of motion pose estimation in related technologies is not high.

[0004] In SLAM technology, motion pose estimation is a core link that affects the positioning and navigation of mobile devices in unknown environments. When the pose estimation accuracy of the recording device on the mobile device decreases, it will cause reconstruction errors and drift during the map update process of the mobile device, causing the system to need to be repositioned and corrected, which will increase the computational overhead and time complexity of the SLAM technology, thereby reducing the real-time operation of the SLAM technology. Summary of the invention

[0005] Based on the above problems, the present application provides a method, apparatus, device and storage medium for estimating the motion pose of a recording device, the purpose of which is to improve the motion pose estimation accuracy of a recording device on a mobile device, thereby improving the real-time performance of the SLAM technology operation of the mobile device.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] A method for estimating a motion posture of a recording device, the method comprising:

[0008] Identify a plurality of first matching feature points in a first frame image and a plurality of second matching feature points in a second frame image; the first frame image and the second frame image are two consecutive frames of images recorded by the same target recording device in a target scene; the second frame image is recorded later than the first frame image;

[0009] Based on the first matching feature points and the second matching feature points, the first frame image and the second frame image are respectively depth-restored to obtain a first target image and a second target image, and a world coordinate system is constructed based on the first target image and the first frame image; the first target image includes a plurality of first three-dimensional feature points; the second target image includes a plurality of second three-dimensional feature points;

[0010] The first target image and the second target image are projected as key frames into the world coordinate system to obtain a projection map; the projection map includes a plurality of map points; the map points are obtained by projecting the first three-dimensional feature points or the second three-dimensional feature points into the world coordinate system;

[0011] Clustering each map point using a Euclidean clustering algorithm to obtain a clustering result of each map point; the clustering result includes whether the map point belongs to a normal cluster map point, an overly large cluster map point, or an overly small cluster map point;

[0012] Based on the clustering results of the map points, the projected map is divided into multiple classification areas, and each classification area is named based on the clustering results; map points with the same clustering results are divided into the same classification area; the naming names of the classification areas include normal number clusters, excessive number clusters, or too few number clusters;

[0013] The motion pose of the target recording device is estimated according to the map points in the normal number of clusters and the excessive number of clusters.

[0014] In a possible implementation, the method further includes:

[0015] Identify the number of feature points of a first frame image and a second frame image; the first frame image and the second frame image both include a plurality of feature points;

[0016] When the number of feature points of the first frame image and the second frame image is greater than the feature point threshold, feature point matching is performed on the feature points of the first frame image and the feature points of the second frame image;

[0017] The feature points successfully matched in the first frame image are defined as the first matching feature points; and the feature points successfully matched in the second frame image are defined as the second matching feature points.

[0018] In a possible implementation, the first matching feature point includes a first matching correct feature point and a first matching incorrect feature point; the second matching feature point includes a second matching correct feature point and a second matching incorrect feature point;

[0019] The method of performing depth restoration on the first frame image and the second frame image based on the first matching feature point and the second matching feature point to obtain the first target image and the second target image includes:

[0020] The random sampling consensus algorithm RANSAC algorithm is used to iteratively calculate the number of inliers for all matching feature points until the iteration cutoff condition is met, and multiple iteration results are obtained; the iteration result is the number of inliers obtained by this iteration calculation; each iteration result corresponds to N feature points in the first frame image; the N feature points are matched with the feature points in the second frame image; N is a positive integer;

[0021] Screening the multiple iteration results, and forming N feature pairs from N feature points in the first frame image corresponding to the iteration results that meet the screening conditions and feature points in the second frame image that match the N feature points;

[0022] Calculating the basic matrix and homography matrix of the N pairs of feature pairs, calculating the Euclidean transformation of the basic matrix, and calculating the Euclidean transformation of the homography matrix; the Euclidean transformation includes a displacement vector and a rotation matrix;

[0023] Using a reprojection method, a Euclidean transformation amount that meets an error condition is selected from the Euclidean transformation amount of the basic matrix and the Euclidean transformation amount of the homography matrix as a target transformation amount, and depth information of the first frame image and the second frame image is calculated based on the target transformation amount;

[0024] Delete the first matching error feature point in the first frame image, and perform depth recovery on the first frame image from which the first matching error feature point has been deleted based on the depth information of the first frame image to obtain a first target image; delete the second matching error feature point in the second frame image, and perform depth recovery on the second frame image from which the second matching error feature point has been deleted based on the depth information of the second frame image to obtain a second target image.

[0025] In a possible implementation, the random sampling consensus algorithm RANSAC algorithm is used to iteratively calculate the number of inliers for all matching feature points until an iteration cutoff condition is met, and multiple iteration results are obtained, including:

[0026] Selecting N matching feature points from all matching feature points, and projecting the first frame image onto the second frame image based on the N matching feature points to obtain a projected image; the projected image includes a plurality of projected feature points;

[0027] Performing feature matching on all feature points of the second frame image and the multiple projected feature points using the RANSAC algorithm, and calculating the distance between two mutually matching feature points as the first distance;

[0028] If the first distance is less than a first distance threshold, taking the projection feature points corresponding to the first distance less than the first distance threshold as inliers, and counting the number of inliers;

[0029] The above steps are continuously iterated and executed until the iteration cutoff condition is met to obtain the multiple iteration results.

[0030] In a possible implementation, clustering each map point using the Euclidean clustering algorithm to obtain a clustering result includes:

[0031] Take any map point as the target map point;

[0032] Using a K-dimensional tree to query multiple surrounding map points of the target map point, and setting a clustering range based on the number of surrounding map points of the target map point;

[0033] Calculating the Euclidean distance between the target map point and each surrounding map point to obtain a plurality of second distances;

[0034] Counting the number of second distances equal to the second distance threshold;

[0035] Clustering the target map points based on the number of second distances equal to the second distance threshold and the clustering range to obtain the clustering result;

[0036] The process of taking any map point as a target map point and subsequent steps is continuously performed until all map points have completed map point clustering.

[0037] In a possible implementation manner, constructing a world coordinate system based on the first target image and the first frame image includes:

[0038] The world coordinate system is constructed by taking the first target image as the coordinate origin of the world coordinate system and taking the coordinate axes of the device recording the first frame image as the coordinate axes of the world coordinate system.

[0039] In a possible implementation, the method further includes:

[0040] The map point attributes in the key frame are added to the corresponding map point.

[0041] A motion posture estimation device for a recording device, the device comprising:

[0042] A first recognition unit is used to recognize a plurality of first matching feature points in a first frame image and a plurality of second matching feature points in a second frame image; the first frame image and the second frame image are two consecutive frames of images recorded by the same target recording device in a target scene; the second frame image is recorded later than the first frame image;

[0043] a depth recovery unit, configured to perform depth recovery on the first frame image and the second frame image respectively based on the first matching feature points and the second matching feature points to obtain a first target image and a second target image, and to construct a world coordinate system based on the first target image and the first frame image; the first target image includes a plurality of first three-dimensional feature points; the second target image includes a plurality of second three-dimensional feature points;

[0044] A projection unit, used for projecting the first target image and the second target image as key frames into the world coordinate system to obtain a projection map; the projection map includes a plurality of map points; the map points are obtained by projecting the first three-dimensional feature points or the second three-dimensional feature points into the world coordinate system;

[0045] A clustering unit, for clustering each map point using a Euclidean clustering algorithm to obtain a clustering result of each map point; the clustering result includes whether the map point belongs to a normal cluster map point, an over-large cluster map point, or an over-small cluster map point;

[0046] An image division unit, configured to perform image division on the projection map based on the clustering results of the map points to obtain a plurality of classification areas, and name each classification area based on the clustering results; map points with the same clustering results are divided into the same classification area; the naming names of the classification areas include normal number clusters, excessive number clusters, or insufficient number clusters;

[0047] The pose estimation unit is used to estimate the motion pose of the target recording device according to the map points in the normal number of clusters and the excessive number of clusters.

[0048] A motion pose estimation device for a recording device, 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 motion pose estimation method for the recording device as described in any one of claims 1 to 7 is implemented.

[0049] A computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the motion posture estimation method of the recording device as described above.

[0050] Compared with the prior art, this application has the following beneficial effects:

[0051] The embodiment of the present application identifies multiple first matching feature points in a first frame image and multiple second matching features in a second frame image, wherein the first frame image and the second frame image are two consecutive frames of images recorded by the same target recording device in a target scene. Then, based on the feature points identified above, the first frame image and the second frame image are respectively subjected to depth recovery to obtain the first target image and the second target image. Then, a world coordinate system is constructed based on the first target image and the first frame image, and the first target image and the second target image are projected into the world coordinate system as key frames to obtain a projection map having multiple map points. The Euclidean clustering algorithm is used to cluster each map point to obtain a clustering result of each map point, and the projection map is image-divided based on these clustering results to obtain multiple classification areas, and each classification area obtained by the division is named based on these clustering results. When performing image division, the map points with the same clustering results are divided into the same classification area, and the naming names of the classification areas include normal number clusters, excessive number clusters, or too few number clusters. The motion pose of the target recording device is estimated only based on the map points in the normal number clusters and the excessive number clusters.

[0052] This application identifies matching feature points in the first frame image and the second frame image, obtains the target image and constructs a world coordinate system based on depth recovery, projects the key frame into the world coordinate system to obtain a projection map, and then uses the Euclidean clustering algorithm to cluster the map points to obtain clustering results, thereby distinguishing normal number clusters, excessive number clusters, and too few number clusters. When performing motion pose estimation, only map points in normal number clusters and excessive number clusters are used, and weak texture map points in too few number clusters are filtered out, thereby avoiding interference and errors of these map points on motion pose estimation, thereby improving the real-time operation of the SLAM technology of the mobile device where the target recording device is located. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0054] Figure 1A schematic diagram of an application scenario of motion posture estimation of a recording device provided in an embodiment of the present application;

[0055] Figure 2 A flowchart of an implementation method of motion pose estimation of a recording device provided in an embodiment of the present application;

[0056] Figure 3 A flowchart of an implementation method of a feature point definition method provided in an embodiment of the present application;

[0057] Figure 4 A flowchart of an implementation method of an image frame depth recovery method provided in an embodiment of the present application;

[0058] Figure 5 A flowchart of an implementation method of a map point clustering method provided in an embodiment of the present application;

[0059] Figure 6 A schematic diagram of the structure of a motion posture estimation device for a recording device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

[0061] SLAM technology is a technology that uses environmental information obtained by recording devices (such as cameras or other visual sensors) to locate itself and build environmental maps. It can enable mobile devices (such as robots or unmanned vehicles) to navigate and drive autonomously in unknown environments. There are two main methods for implementing SLAM technology: feature point method and direct method. The feature point method is one of the most widely used SLAM algorithms. The feature point method estimates the motion posture of the recording device based on representative image features selected from the image, and builds an environmental map based on information such as feature point positions and descriptors.

[0062] Most feature point methods are based on the ORB-SLAM2 (Oriented FAST and Rotated BRIEF SLAM) algorithm. The ORB-SLAM2 algorithm has the advantages of fast calculation speed and high robustness. However, in weak texture scenes, the ORB-SLAM2 algorithm may have problems such as tracking failure or mismatching, resulting in low accuracy of the ORB-SLAM2 algorithm in estimating the motion pose of the recording device.

[0063] However, low accuracy in motion pose estimation may cause reconstruction errors and drift in mobile devices during map updates, requiring repositioning and correction, thereby reducing the real-time performance of SLAM technology.

[0064] It should be noted that weak texture scenes refer to environments where the texture features of the object surface are not obvious or lack texture features. In weak texture scenes, there are fewer feature points in the image and they are sparsely distributed, so it is difficult to perform motion pose estimation and SLAM technology through feature point matching methods. For example, gray walls and daytime skies are all weak texture scenes.

[0065] Based on this, the embodiments of the present application provide a method, apparatus, device and storage medium for estimating the motion pose of a recording device, which identifies the matching feature points in two images acquired by the same recording device in the target scene, and then performs depth restoration on the two images based on these feature points to obtain two target images, and constructs a world coordinate system to project them as key frames into it to obtain a projection map with multiple map points. Then, a Euclidean clustering algorithm is used to cluster all map points, and the projection map is divided into multiple classification areas according to the clustering results. Finally, only the map points in the normal number of clusters and the excessive number of clusters are used to estimate the motion pose of the target recording device, avoiding the interference and error of the weak texture map points in the too small number of clusters on the motion pose estimation.

[0066] For example, one of the scenarios of the embodiments of the present application may be applied to Figure 1 The scene shown. The scene includes a server 101 and a client 102, wherein the client 102 is used to obtain two consecutive frames of images from the same target recording device in the target scene, upload the images to the server for feature point recognition, cluster analysis, and pose estimation, and at the same time receive and display the processing results returned by the server. The server 102 adopts the implementation method provided in the embodiment of the present application to perform feature point recognition on the image uploaded by the client 101, and obtain a first target image and a second target image, so as to estimate the motion pose of the target recording device based on the first target image and the second target image.

[0067] First, in the above application scenario, although the action description of the implementation method provided in the embodiment of the present application is executed by the server 101; however, the embodiment of the present application is not limited in terms of the execution subject, as long as the actions disclosed in the implementation method provided in the embodiment of the present application are executed.

[0068] Secondly, the above scenario is only an example scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.

[0069] To facilitate understanding of the present application, a method for estimating the motion posture of a recording device provided in an embodiment of the present application is described below in conjunction with the accompanying drawings.

[0070] See also Figure 2As shown in FIG. 1 , this figure is a flow chart of a method for estimating a motion posture of a recording device provided in an embodiment of the present application, as shown in FIG. Figure 2 As shown, the method may include S201-S206:

[0071] S201: Identify a plurality of first matching feature points in a first frame image and a plurality of second matching feature points in a second frame image.

[0072] In SLAM technology, it is necessary to identify the feature points in each frame of the image in order to perform subsequent depth recovery and map construction. To this end, it is necessary to use two consecutive images obtained from the same target recording device, namely the first frame and the second frame, to identify different types of feature points.

[0073] Specifically, the present application needs to identify multiple first matching feature points in the first frame image, and multiple second matching feature points in the second frame image. The two images are two consecutive frames recorded by the same target recording device in the target scene, wherein the second frame image is recorded later than the first frame image. By identifying these feature points, the two images can be deeply restored, and map points can be obtained based on projection, thereby realizing subsequent clustering and image segmentation and other processing. In addition, the second frame image is the latest frame image recorded by the target recording device.

[0074] It should be noted that two consecutive image frames refer to two adjacent image frames, which are continuous in time, that is, there is no interval between the two images.

[0075] In a possible implementation, the first matching feature point includes a first matching correct feature point and a first matching incorrect feature point. The second matching feature point includes a second matching correct feature point and a second matching incorrect feature point. Both the matching correct feature point and the matching incorrect feature point are successfully matched feature points, but not all feature points among the successfully matched feature points are correctly matched. Feature points that are successfully matched and correctly matched are called matching correct feature points, and feature points that are successfully matched but incorrectly matched are called matching correct feature points.

[0076] See also Figure 3 , Figure 3 The following is a flowchart of an implementation method of a method for defining a feature point provided in an embodiment of the present application. Specifically, the feature point definition can be performed according to the following steps:

[0077] A1: Identify the number of feature points of the first frame image and the second frame image.

[0078] In order to define the feature points of each frame image, it is first necessary to identify the number of feature points included in two consecutive images, namely the first frame image and the second frame image, obtained by the same target recording device under the target scene. Both the first frame image and the second frame image include multiple feature points.

[0079] Identifying the number of feature points in the first frame and the second frame is an important step in SLAM technology, which is usually achieved through feature extraction algorithms. Commonly used feature extraction algorithms include Oriented FAST and Rotated BRIEF (ORB) and the like.

[0080] In the specific implementation, firstly, two consecutive images acquired by the same target recording device under the target scene need to be input, and the key feature points in the image need to be extracted using a feature extraction algorithm. Then, different methods can be used to count the number of extracted feature points according to different algorithms.

[0081] For example, in the ORB algorithm, the feature points in the image can be detected by the orb.detect function, and their descriptors can be calculated using the orb.compute function, ultimately obtaining the number of feature points and the corresponding descriptors.

[0082] A2: When the number of feature points of the first frame image and the second frame image is greater than the feature point threshold, feature point matching is performed on the feature points of the first frame image and the feature points of the second frame image.

[0083] When the number of feature points of the first frame image and the second frame image is greater than the set feature point threshold, it means that the two frames of images have sufficient feature point overlap area and may be different perspectives of the same scene or object. At this time, the correspondence between the feature points of the first frame image and the feature points of the second frame image can be established by matching the feature points of the first frame image and the second frame image.

[0084] Feature point matching is an important problem in the field of computer vision, and its purpose is to find corresponding feature points in two images. Usually, feature point matching needs to be performed based on the descriptor of the feature point, and various algorithms and methods can be used, such as the ORB algorithm.

[0085] It should be noted that the size of the feature point threshold is usually set according to the specific application scenario and algorithm, and different algorithms may have different threshold ranges. For example, in the ORB algorithm, the default value of its feature point threshold is 1000, and the number of feature points detected can be controlled by adjusting this value.

[0086] A31 defines the feature points in the first frame image that have been successfully matched as the first matching feature points.

[0087] It should be noted that there are two types of feature points that are successfully matched, one is a correctly matched feature point, and the other is an incorrectly matched feature point.

[0088] A32: defining the feature points in the first frame image that have been successfully matched as the second matching feature points.

[0089] S202: Perform depth recovery on the first frame image and the second frame image based on the first matching feature points and the second matching feature points to obtain a first target image and a second target image, and construct a world coordinate system based on the first target image and the first frame image.

[0090] For the first frame image and the second frame image, the first matching feature point and the second matching feature point are used for depth recovery respectively. Among them, the matching feature points can provide a reliable 2D-3D correspondence. Based on the depth recovery result, each matching feature point and the corresponding 3D reconstruction point in the first frame image are defined as the first 3D feature point in the first target image, and each matching feature point and the corresponding 3D reconstruction point in the second frame image are defined as the second 3D feature point in the second target image.

[0091] After the first target image and the second target image are obtained, a world coordinate system may be constructed according to the first frame image and the first target image.

[0092] In a possible implementation manner, constructing a world coordinate system based on the first target image and the first frame image includes:

[0093] The world coordinate system is constructed with the first target image as the coordinate origin of the world coordinate system and the right-handed coordinate system (for example, the x-axis points to the right, the y-axis points downward, and the z-axis points in the shooting direction) formed by the device coordinate axes recording the first frame of the image as the coordinate axes. The device coordinate axes here can be obtained through sensors such as a built-in gyroscope or accelerometer of the device.

[0094] See also Figure 4 , Figure 4 A flowchart of an implementation method of an image frame depth recovery method provided in an embodiment of the present application. Specifically, the depth recovery of the first frame image and the second frame image based on the first matching feature point and the second matching feature point to obtain the first target image and the second target image can be implemented according to the following steps:

[0095] B1: Use the random sampling consensus algorithm RANSAC algorithm to iteratively calculate the number of inliers for all matching feature points until the iteration cutoff condition is met and multiple iteration results are obtained.

[0096] This step mainly uses the RANSAC (Random Sample Consensus Algorithm) algorithm to iteratively calculate the number of inliers for all matching feature points. Specifically, for each iteration, a group of feature points is randomly selected from all matching feature points. This group of feature points includes N feature points, and the number of inliers corresponding to this group of feature points is determined. Repeat the iteration until the iteration cutoff condition is met, and multiple iteration results are obtained, that is, different numbers of inliers and corresponding feature point sets.

[0097] Optionally, N is generally set to 8, and the user can adjust N according to actual needs. This application does not impose any specific restrictions on the size of N.

[0098] It should be noted that the iteration cutoff condition refers to the condition for deciding when to stop iteration when using the RANSAC algorithm for feature point matching and motion estimation. The iteration cutoff condition may include but is not limited to the following: (1) Reaching the preset number of iterations: When the number of iterations reaches the preset value, the iteration is stopped. (2) Reaching the preset number of inliers: When the calculated number of inliers exceeds the preset threshold, the iteration is stopped. (3) The number of inliers no longer increases: In each iteration, the number of inliers is recorded and compared with the difference from the previous iteration. When the number of inliers no longer increases significantly, the iteration is stopped. (4) The error no longer decreases: In each iteration, the model fitting error is recorded and compared with the difference from the previous iteration. When the error no longer decreases significantly, the iteration is stopped. (5) Reaching the preset maximum number of iterations but still not stopping: When the preset number of iterations is reached and other stop conditions are still not met, the iteration is forced to stop.

[0099] Depending on the specific scenario and needs, different iteration cutoff conditions can be selected to meet different requirements.

[0100] In a possible implementation, the random sampling consensus algorithm RANSAC algorithm is used to iteratively calculate the number of inliers for all matching feature points until an iteration cutoff condition is met, and multiple iteration results are obtained, including:

[0101] Step 1: Select N matching feature points from all matching feature points, and project the first frame image onto the second frame image based on the N matching feature points to obtain a projected image with multiple projection feature points.

[0102] For example, assuming that the first frame image has 80 feature points, 8 feature points can be selected, and the first frame image can be projected onto the second frame image based on the 8 feature points. Specifically, any number of feature points can be selected, including selecting 8 feature points, and then using these feature points to calculate a transformation matrix (such as a homography matrix) to project the first frame image onto the second frame image.

[0103] Step 2: Use the RANSAC algorithm to perform feature matching on all feature points of the second frame image and multiple projected feature points, and calculate the distance between two matching feature points as the first distance.

[0104] Step 3: If the first distance is less than the first distance threshold, the projection feature points corresponding to the first distance less than the first distance threshold are taken as inliers, and the number of inliers is counted.

[0105] Step 4: Repeat steps 1-3 until the iteration cutoff condition is met and multiple iteration results are obtained.

[0106] The iteration result includes the number of internal points calculated by the current iteration.

[0107] B2: Filtering the multiple iteration results, and forming N feature pairs from N feature points in the first frame image corresponding to the iteration results that meet the filtering conditions and feature points in the second frame image that match the N feature points.

[0108] After screening multiple iteration results, the group with the largest number of inliers can be selected as the final result. This result corresponds to N feature points in the first frame image and N pairs of feature points in the second frame image that match these N feature points. These feature pairs can be used to calculate the basic matrix or homography matrix and further restore the three-dimensional information of the scene.

[0109] It should be noted that even if the iteration result with the largest number of inliers is selected as the final result, there may still be some mismatches or outliers. Therefore, further inspection and screening are required in practical applications to ensure the accuracy and robustness of the obtained feature point matching and motion estimation results.

[0110] B3: Calculate the basic matrix and homography matrix of the N pairs of feature pairs, calculate the Euclidean transformation of the basic matrix, and calculate the Euclidean transformation of the homography matrix.

[0111] After obtaining N feature point pairs, these feature point pairs can be used to calculate the basic matrix or homography matrix, and their Euclidean transformations, namely, the displacement vector and the rotation matrix.

[0112] Optionally, the basic matrix can be calculated using N pairs of feature points, and methods such as the 8-point method or the RANSAC algorithm can be used. After the basic matrix F is calculated, the essential matrix E can be decomposed by singular value decomposition (SVD), and then the displacement vector t and the rotation matrix R of the basic matrix F are calculated by E.

[0113] Optionally, when calculating the homography matrix using N pairs of feature points, methods such as direct linear transformation (DLT) or RANSAC algorithm can be used. After the homography matrix H is calculated, the displacement vector t and rotation matrix R of the homography matrix H can be decomposed by SVD.

[0114] B4: Using the reprojection method, the Euclidean transformation amount that meets the error condition is selected from the Euclidean transformation amount of the basic matrix and the Euclidean transformation amount of the homography matrix as the target transformation amount, and the depth information of the first frame image and the second frame image is calculated based on the target transformation amount.

[0115] In order to select the Euclidean transformation that meets the error condition from the Euclidean transformation of the basic matrix F and the Euclidean transformation of the homography matrix H as the target transformation, firstly, the transformation matrix T between the camera coordinate systems can be calculated according to the Euclidean transformation of the basic matrix F and the homography matrix H, respectively.

[0116] Triangulate the feature points in the first frame image to obtain their spatial coordinates in the target projection device coordinate system. Use the transformation matrix T between the target projection device coordinate system to convert the spatial coordinates into coordinates in the second frame camera coordinate system. Then use the second frame camera intrinsic parameters and the converted spatial coordinates to reproject them onto the second frame image to obtain new pixel coordinates. Then calculate the error between all projected pixel coordinates and the corresponding feature point pixel coordinates, and calculate their average or weighted average as the error of the Euclidean transformation. Repeat the above steps to calculate the corresponding error values ​​for the Euclidean transformation of the basic matrix F and the Euclidean transformation of the homography matrix H. Find the Euclidean transformation with the smallest error value and use it as the target transformation.

[0117] After the target transformation amount is obtained, the depth information of the first frame image and the second frame image may be calculated based on the target transformation amount.

[0118] Specifically, the depth information of the first frame image and the second frame image may be calculated according to the depth information relationship of the matching feature point pair, and the depth information relationship of the matching feature point pair is as follows:

[0119] s1x1=s2Rx2+t (1)

[0120] Wherein, R is the rotation matrix contained in the target transformation; t is the displacement vector contained in the target transformation; s1 is the depth information of the first frame image; s2 is the depth information of the second frame image; x1 and x2 are the normalized coordinates of the feature points of the two frames of images respectively;

[0121] because Then formula (1) can be further transformed into: From this, s1 and s2 can be calculated, thereby restoring the depth of the feature point.

[0122] It should be noted that in formula (1), vector x1 can be split into x1 ^ and x 1Z Two parts, x1 = [x1 ^ , x 1Z ]^T. Among them, x1 ^ represents the component of x1 on the xy plane, and x 1Z Represents its component on the z-axis.

[0123] B51: Delete the first matching error feature point in the first frame image, and perform depth recovery on the first frame image from which the first matching error feature point has been deleted based on the depth information of the first frame image to obtain a first target image.

[0124] Depth recovery usually refers to calculating the spatial coordinates of each feature point in the camera coordinate system based on the feature point information and camera parameters in a single or multiple images, and further projecting it back to the original image according to the camera parameters to obtain an image with depth information. For the situation of this application, the depth recovery of the first frame image can be achieved through the following steps:

[0125] First, delete the first incorrectly matched feature point in the first frame image, leaving only the first correctly matched feature point. For each correctly matched feature point left, calculate its spatial coordinates in the target recording device coordinate system based on its position in the image coordinate system and the corresponding depth information. This can be obtained by converting the image coordinates into normalized plane coordinates and then back-projecting them using the camera parameters. Finally, use the target recording device parameters to project the spatial coordinates in the target recording device coordinate system back onto the original image to obtain an image with depth information.

[0126] B52: Delete the second matching error feature points in the second frame image, and perform depth recovery on the second frame image from which the second matching error feature points have been deleted based on the depth information of the second frame image to obtain a second target image.

[0127] The method for acquiring the second target image is similar to the method for acquiring the first target image, and will not be described in detail here.

[0128] S203: Projecting the first target image and the second target image as key frames into the world coordinate system to obtain a projection map.

[0129] Projecting the first target image and the second target image as key frames into the world coordinate system to obtain a projection map can be divided into the following two steps:

[0130] Projecting feature points to the world coordinate system: For each key frame (i.e., the first target image and the second target image), the 3D feature points in it need to be projected to the world coordinate system to obtain the corresponding map points. Specifically, the camera pose matrix and the spatial coordinates of the 3D feature points can be used to obtain the position of the 3D feature points in the world coordinate system through matrix transformation. These map points are then saved as part of the projected map.

[0131] Projection map construction: In a projection map, each map point is calculated in the camera coordinate system through the first three-dimensional feature point or the second three-dimensional feature point, and is projected into the world coordinate system after the camera pose transformation. This means that each map point is associated with a feature point and contains the depth and position information of the feature point. The three-dimensional structure of the scene can be restored based on the position and depth information of these map points, and operations such as map-based tracking and positioning can be performed. Therefore, building a complete projection map requires the continuous addition of new key frames and map points to ensure the accuracy and stability of the map while meeting the real-time requirements of the system.

[0132] In a possible implementation, the method further includes:

[0133] The map point attributes in the key frame are added to the corresponding map point.

[0134] Specifically, first, for each map point in each keyframe, record its corresponding observation keyframe. Since each map point is observed by at least one keyframe, it is necessary to record which keyframes observe the map point;

[0135] Then for each map point, record its BRIEF descriptor and average observation direction and depth. After completing the matching of the map points, the BRIEF descriptor corresponding to the map point can be calculated. It is also necessary to record the position and direction information of the map point in the coordinate system of the target recording device, that is, the average observation direction and depth;

[0136] At the same time, for each map point, record its corresponding feature point. Since the map point is obtained by projecting the feature points corresponding to multiple key frames, it is necessary to record the feature points in the key frame corresponding to each map point.

[0137] The observation keyframe, descriptor, average observation direction and depth of each map point and the feature point corresponding to the map point are added to the projected map.

[0138] Among them, the descriptor is a feature vector used to describe the visual information of the area around the feature point.

[0139] S204: Clustering each map point using a Euclidean clustering algorithm to obtain a clustering result for each map point.

[0140] The Euclidean clustering algorithm is used to cluster each map point, and the clustering result obtained is the process of dividing each map point into different clusters. Each map point is divided into a certain cluster, and the clusters can be divided into three types: normal clusters, oversized clusters, and undersized clusters. Therefore, the clustering result includes whether the map point is a normal cluster map point, an oversized cluster map point, or an undersized cluster map point.

[0141] See also Figure 5 , Figure 5 The present invention provides a flowchart of a method for implementing a clustering method of map points provided in an embodiment of the present invention. Specifically, clustering each map point using the Euclidean clustering algorithm to obtain a clustering result can be implemented by following the steps below:

[0142] C1: Choose any map point as the target map point.

[0143] A map point is randomly selected from the projected map as the target map point and the starting point of the current clustering operation.

[0144] C2: Use a K-dimensional tree to query multiple surrounding map points of the target map point, and set a clustering range based on the number of surrounding map points of the target map point.

[0145] Using data structures such as K-dimensional trees, we query map points within a certain range around the target map point. The clustering is usually based on the number of map points around the target map point, and the specific range can be adjusted according to the actual situation. For example, if the target map point has 30 surrounding map points, the clustering range is set to 5 to 20.

[0146] Among them, the K-dimensional tree is KD-tree (K-Dimensional Tree), and K represents the dimension of the feature space.

[0147] C3: Calculate the Euclidean distance between the target map point and each surrounding map point to obtain multiple second distances.

[0148] The Euclidean distance between the target map point and each surrounding map point is calculated as the second distance. Because the Euclidean distance between the target map point and each surrounding map point needs to be calculated, multiple second distances can be obtained.

[0149] In one possible implementation, the Euclidean distance between the target map point and the surrounding map points is:

[0150]

[0151] Among them, x i ,y i 、z i is the coordinate value of the target map point; x j ,y j 、z j is the coordinate value of the surrounding map points; distance is the Euclidean distance between the target map point and the surrounding map points, that is, the second distance.

[0152] C4: Count the number of second distances that are equal to the second distance threshold.

[0153] The number of all second distances that are equal to the second distance threshold is counted. This number represents the distance similarity between the surrounding map points and the target map point, and can be used to divide the cluster to which the target map point belongs.

[0154] It should be noted that the second distance threshold can be set according to actual needs, and this application does not impose any specific limitation on the size of the second distance threshold.

[0155] C5: clustering the target map points based on the number of second distances equal to the second distance threshold and the cluster division range to obtain the clustering result.

[0156] Based on the number of second distances equal to the second distance threshold calculated previously and the cluster division range, the target map point is clustered into a normal cluster map point, an over-large cluster map point or an over-small cluster map point.

[0157] For example, assuming that there are 30 surrounding map points around P1, the second distance threshold d is 10, and the clustering range of map points is 5 to 20, first calculate the distance between the 30 surrounding map points and P1, and count the number count_d equal to d. If count_d is equal to 15, P1 can be clustered as a normal cluster map point; if count_d is equal to 25, P1 can be clustered as an over-large cluster map point; if count_d is equal to 4, P1 can be clustered as an under-small cluster map point.

[0158] Among them, map points with too small clusters are weak texture map points.

[0159] C6: Continue to execute steps C1-C5 until all map points have been clustered.

[0160] S205: performing image division on the projection map based on the clustering results of the map points to obtain a plurality of classification areas, and naming each classification area based on the clustering results.

[0161] In the process of image segmentation of the projected map based on the clustering results of each map point, the map points with the same clustering results can be assigned to the same classification area, and a corresponding name can be set for each classification area. The classification area containing normal cluster map points is named as normal number cluster; the classification area containing too large cluster map points is named as too large number cluster; the classification area containing too small cluster map points is named as too small number cluster.

[0162] It should be noted that the naming of the classification area can be adjusted according to actual needs and data characteristics.

[0163] S206: Estimating the motion posture of the target recording device according to the map points in the normal number of clusters and the excessive number of clusters.

[0164] During the motion pose estimation process, only map points in the normal number of clusters and the excessive number of clusters are used to calculate the position and attitude of the target recording device, while map points in the under-numbered clusters are not considered.

[0165] Since the map points in a small number of clusters are usually scattered and unevenly distributed, their contribution to the pose estimation results is small, so these map points are ignored to reduce the computational complexity and improve the computational efficiency.

[0166] Based on the description of S201-S206, the embodiment of the present application identifies different types of feature points in two images acquired by the same recording device under the target scene, performs depth restoration on the two images respectively to obtain two target images, and constructs a world coordinate system to project them as key frames into it to obtain a projection map with multiple map points. Then, a Euclidean clustering algorithm is used to cluster all map points, and the projection map is image-divided according to the clustering results to obtain multiple classification areas. When performing image division, map points with the same clustering results are divided into the same classification area, and the naming names of the classification areas include normal number clusters, excessive number clusters, or too few number clusters. Finally, only the map points in the normal number clusters and the excessive number clusters are used to estimate the motion pose of the target recording device, thereby avoiding the interference and error of the weak texture map points in the too few number clusters on the motion pose estimation, thereby improving the accuracy and reliability of the motion pose estimation.

[0167] Based on the method for estimating the motion posture of a recording device provided in the above method embodiment, an embodiment of the present application also provides a device for estimating the motion posture of a recording device, which will be described below in conjunction with the accompanying drawings.

[0168] See also Figure 6 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a motion posture estimation device for a recording device provided in an embodiment of the present application. Figure 6As shown, the motion posture estimation device of the recording device includes:

[0169] The first recognition unit 601 is used to recognize a plurality of first matching feature points in a first frame image and a plurality of second matching feature points in a second frame image; the first frame image and the second frame image are two consecutive frames of images recorded by the same target recording device in a target scene; the second frame image is recorded later than the first frame image;

[0170] A depth recovery unit 602 is used to perform depth recovery on the first frame image and the second frame image based on the first matching feature points and the second matching feature points to obtain a first target image and a second target image;

[0171] A coordinate system construction unit 603 is used to construct a world coordinate system based on the first target image and the first frame image; the first target image includes a plurality of first three-dimensional feature points; the second target image includes a plurality of second three-dimensional feature points;

[0172] A projection unit 604 is used to project the first target image and the second target image as key frames into the world coordinate system to obtain a projection map; the projection map includes a plurality of map points; the map points are obtained by projecting the first three-dimensional feature points or the second three-dimensional feature points into the world coordinate system;

[0173] The clustering unit 605 is used to cluster each map point using the Euclidean clustering algorithm to obtain a clustering result of each map point; the clustering result includes whether the map point belongs to a normal cluster map point, an over-large cluster map point or an over-small cluster map point;

[0174] An image division unit 606 is used to perform image division on the projection map based on the clustering results of each map point to obtain multiple classification areas, and name each classification area based on the clustering results; map points with the same clustering results are divided into the same classification area; the naming names of the classification areas include normal number clusters, excessive number clusters, or too few number clusters;

[0175] The pose estimation unit 607 is used to estimate the motion pose of the target recording device according to the map points in the normal number of clusters and the excessive number of clusters.

[0176] In a possible implementation manner, the first matching feature points include a first matching correct feature point and a first matching incorrect feature point; and the second matching feature points include a second matching correct feature point and a second matching incorrect feature point.

[0177] In a possible implementation manner, the device further includes:

[0178] A second recognition unit is used to recognize the number of feature points of the first frame image and the second frame image; the first frame image and the second frame image both include a plurality of feature points;

[0179] a feature point matching unit, configured to perform feature point matching on the feature points of the first frame image and the second frame image when the number of feature points of the first frame image and the second frame image is greater than a feature point threshold;

[0180] A definition unit is used to define the feature points that have been successfully matched in the first frame image as the first matching feature points; and define the feature points that have been successfully matched in the second frame image as the second matching feature points.

[0181] In a possible implementation, the depth recovery unit 602 specifically includes:

[0182] an iterative calculation unit, configured to iteratively calculate the number of inliers for all matching feature points using a random sampling consensus algorithm RANSAC algorithm until an iteration cutoff condition is satisfied, thereby obtaining a plurality of iteration results; the iteration result is the number of inliers obtained by this iteration calculation; each iteration result corresponds to N feature points in the first frame image; the N feature points are matched with feature points in the second frame image; and N is a positive integer;

[0183] A first screening unit, configured to screen the multiple iteration results, and form N feature pairs from N feature points in the first frame image corresponding to the iteration results that meet the screening condition and feature points in the second frame image that match the N feature points;

[0184] A calculation unit, used to calculate the basic matrix and homography matrix of the N pairs of feature pairs, calculate the Euclidean transformation of the basic matrix, and calculate the Euclidean transformation of the homography matrix; the Euclidean transformation includes a displacement vector and a rotation matrix;

[0185] A second screening unit is used to screen out a Euclidean transformation amount that meets the error condition from the Euclidean transformation amount of the basic matrix and the Euclidean transformation amount of the homography matrix by using a reprojection method as a target transformation amount, and calculate the depth information of the first frame image and the second frame image based on the target transformation amount;

[0186] A deletion and recovery unit is used to delete the first matching error feature point in the first frame image, and perform depth recovery on the first frame image from which the first matching error feature point has been deleted based on the depth information of the first frame image to obtain a first target image; and to delete the second matching error feature point in the second frame image, and perform depth recovery on the second frame image from which the second matching error feature point has been deleted based on the depth information of the second frame image to obtain a second target image.

[0187] In a possible implementation, the iterative calculation unit specifically includes:

[0188] A projection unit is selected, which is used to select N matching feature points from all matching feature points, and project the first frame image onto the second frame image based on the N matching feature points to obtain a projected image; the projected image includes a plurality of projection feature points;

[0189] A feature matching unit, configured to perform feature matching on all feature points of the second frame image with the plurality of projected feature points using a RANSAC algorithm, and calculate a distance between two mutually matching feature points as a first distance;

[0190] Setting a counting unit, if the first distance is less than a first distance threshold, for taking the projection feature points corresponding to the first distance less than the first distance threshold as inliers, and counting the number of inliers;

[0191] The first execution unit is used to continuously iterate and execute the above steps until the iteration cutoff condition is met to obtain the multiple iteration results.

[0192] In a possible implementation manner, the device further includes:

[0193] A selection unit is used to select any map point as a target map point;

[0194] A query setting unit, configured to query a plurality of surrounding map points of the target map point using a K-dimensional tree, and set a clustering range based on the number of surrounding map points of the target map point;

[0195] A distance calculation unit, used for calculating the Euclidean distance between the target map point and each surrounding map point to obtain a plurality of second distances;

[0196] A counting unit, configured to count the number of second distances equal to a second distance threshold;

[0197] A map point clustering unit, configured to cluster the target map points based on the number of second distances equal to the second distance threshold and the cluster division range to obtain the clustering result;

[0198] The second execution unit is used to continuously execute the step of selecting any map point as a target map point and subsequent steps until all map points have completed map point clustering.

[0199] In a possible implementation, the coordinate system construction unit 603 is specifically used to:

[0200] The world coordinate system is constructed by taking the first target image as the coordinate origin of the world coordinate system and taking the coordinate axes of the device recording the first frame image as the coordinate axes of the world coordinate system.

[0201] In a possible implementation manner, the device further includes:

[0202] The map point attribute adding unit is used to add the map point attributes in the key frame to the corresponding map point.

[0203] In addition, an embodiment of the present application also provides a motion posture estimation device for a recording device, 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 motion posture estimation method for the recording device as described above is implemented.

[0204] In addition, an embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the motion posture estimation method of the recording device as described above.

[0205] The embodiment of the present application utilizes the first frame image and the second frame image acquired by the same target recording device to identify different types of feature points, perform depth restoration on the two frames of images respectively to obtain two target images, and construct a world coordinate system to project them as key frames into it to obtain a projection map with multiple map points. Then, a Euclidean clustering algorithm is used to cluster all map points, and the projection map is image-divided according to the clustering results to obtain multiple classification areas. When dividing the image, map points with the same clustering results are divided into the same classification area, and the naming names of the classification areas include normal number clusters, excessive number clusters, or too few number clusters. However, only the map points in the normal number clusters and the excessive number clusters are used to estimate the motion pose of the target recording device, thereby avoiding the interference and error of the weak texture map points in the too few number clusters on the motion pose estimation.

[0206] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0207] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for estimating the motion pose of a recording device, It is characterized in that The method comprises: Identify a plurality of first matching feature points in a first frame image and a plurality of second matching feature points in a second frame image; the first frame image and the second frame image are two consecutive frames of images recorded by the same target recording device in a target scene; the second frame image is recorded later than the first frame image; Based on the first matching feature points and the second matching feature points, the first frame image and the second frame image are respectively depth-restored to obtain a first target image and a second target image, and a world coordinate system is constructed based on the first target image and the first frame image; the first target image includes a plurality of first three-dimensional feature points; the second target image includes a plurality of second three-dimensional feature points; The first target image and the second target image are projected as key frames into the world coordinate system to obtain a projection map; the projection map includes a plurality of map points; the map points are obtained by projecting the first three-dimensional feature points or the second three-dimensional feature points into the world coordinate system; Clustering each map point using a Euclidean clustering algorithm to obtain a clustering result of each map point; the clustering result includes whether the map point belongs to a normal cluster map point, an overly large cluster map point, or an overly small cluster map point; Based on the clustering results of the map points, the projected map is divided into multiple classification areas, and each classification area is named based on the clustering results; map points with the same clustering results are divided into the same classification area; the naming names of the classification areas include normal number clusters, excessive number clusters, or too few number clusters; The motion pose of the target recording device is estimated according to the map points in the normal number of clusters and the excessive number of clusters.

2. The method according to claim 1, It is characterized in that The method further comprises: Identify the number of feature points of a first frame image and a second frame image; the first frame image and the second frame image both include a plurality of feature points; When the number of feature points of the first frame image and the second frame image is greater than the feature point threshold, feature point matching is performed on the feature points of the first frame image and the feature points of the second frame image; The feature points successfully matched in the first frame image are defined as the first matching feature points; and the feature points successfully matched in the second frame image are defined as the second matching feature points.

3. The method according to claim 1, It is characterized in that The first matching feature points include a first matching correct feature point and a first matching incorrect feature point; the second matching feature points include a second matching correct feature point and a second matching incorrect feature point; The method of performing depth restoration on the first frame image and the second frame image based on the first matching feature point and the second matching feature point to obtain the first target image and the second target image includes: The random sampling consensus algorithm RANSAC algorithm is used to iteratively calculate the number of inliers for all matching feature points until the iteration cutoff condition is met, and multiple iteration results are obtained; the iteration result is the number of inliers obtained by this iteration calculation; each iteration result corresponds to N feature points in the first frame image; the N feature points are matched with the feature points in the second frame image; N is a positive integer; Screening the multiple iteration results, and forming N feature pairs from N feature points in the first frame image corresponding to the iteration results that meet the screening conditions and feature points in the second frame image that match the N feature points; Calculating the basic matrix and homography matrix of the N pairs of feature pairs, calculating the Euclidean transformation of the basic matrix, and calculating the Euclidean transformation of the homography matrix; the Euclidean transformation includes a displacement vector and a rotation matrix; Using a reprojection method, a Euclidean transformation amount that meets an error condition is selected from the Euclidean transformation amount of the basic matrix and the Euclidean transformation amount of the homography matrix as a target transformation amount, and depth information of the first frame image and the second frame image is calculated based on the target transformation amount; Delete the first matching error feature point in the first frame image, and perform depth recovery on the first frame image from which the first matching error feature point has been deleted based on the depth information of the first frame image to obtain a first target image; delete the second matching error feature point in the second frame image, and perform depth recovery on the second frame image from which the second matching error feature point has been deleted based on the depth information of the second frame image to obtain a second target image.

4. The method according to claim 3, It is characterized in that The random sampling consensus algorithm RANSAC algorithm is used to iteratively calculate the number of inliers for all matching feature points until the iteration cutoff condition is met, and multiple iteration results are obtained, including: Selecting N matching feature points from all matching feature points, and projecting the first frame image onto the second frame image based on the N matching feature points to obtain a projected image; the projected image includes a plurality of projected feature points; Performing feature matching on all feature points of the second frame image and the multiple projected feature points using the RANSAC algorithm, and calculating the distance between two mutually matching feature points as a first distance; If the first distance is less than a first distance threshold, taking the projection feature points corresponding to the first distance less than the first distance threshold as inliers, and counting the number of inliers; The above steps are continuously iterated and executed until the iteration cutoff condition is met to obtain the multiple iteration results.

5. The method according to claim 1, It is characterized in that The Euclidean clustering algorithm is used to cluster each map point to obtain a clustering result, including: Take any map point as the target map point; Using a K-dimensional tree to query multiple surrounding map points of the target map point, and setting a clustering range based on the number of surrounding map points of the target map point; Calculating the Euclidean distance between the target map point and each surrounding map point to obtain a plurality of second distances; Counting the number of second distances equal to the second distance threshold; Clustering the target map points based on the number of second distances equal to the second distance threshold and the clustering range to obtain the clustering result; The process of taking any map point as a target map point and subsequent steps is continuously performed until all map points have completed map point clustering.

6. The method according to claim 1, It is characterized in that The constructing a world coordinate system based on the first target image and the first frame image includes: The world coordinate system is constructed by taking the first target image as the coordinate origin of the world coordinate system and taking the coordinate axes of the device recording the first frame image as the coordinate axes of the world coordinate system.

7. The method according to claim 1, It is characterized in that The method further comprises: The map point attributes in the key frame are added to the corresponding map point.

8. A motion pose estimation device for a recording device, It is characterized in that The device comprises: A first recognition unit is used to recognize a plurality of first matching feature points in a first frame image and a plurality of second matching feature points in a second frame image; the first frame image and the second frame image are two consecutive frames of images recorded by the same target recording device in a target scene; the second frame image is recorded later than the first frame image; a depth recovery unit, configured to perform depth recovery on the first frame image and the second frame image respectively based on the first matching feature points and the second matching feature points to obtain a first target image and a second target image, and to construct a world coordinate system based on the first target image and the first frame image; the first target image includes a plurality of first three-dimensional feature points; the second target image includes a plurality of second three-dimensional feature points; A projection unit, used for projecting the first target image and the second target image as key frames into the world coordinate system to obtain a projection map; the projection map includes a plurality of map points; the map points are obtained by projecting the first three-dimensional feature points or the second three-dimensional feature points into the world coordinate system; A clustering unit, for clustering each map point using a Euclidean clustering algorithm to obtain a clustering result of each map point; the clustering result includes whether the map point belongs to a normal cluster map point, an over-large cluster map point, or an over-small cluster map point; An image division unit, configured to perform image division on the projection map based on the clustering results of the map points to obtain a plurality of classification areas, and name each classification area based on the clustering results; map points with the same clustering results are divided into the same classification area; the naming names of the classification areas include normal number clusters, excessive number clusters, or insufficient number clusters; The pose estimation unit is used to estimate the motion pose of the target recording device according to the map points in the normal number of clusters and the excessive number of clusters.

9. A device for estimating the motion pose of a recording device, It is characterized in that include: 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 motion posture estimation method for the recording device according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the motion pose estimation method for a recording device according to any one of claims 1 to 7.