WO2022247286A1 - Positioning method, apparatus, device, and storage medium - Google Patents

Positioning method, apparatus, device, and storage medium Download PDF

Info

Publication number
WO2022247286A1
WO2022247286A1 PCT/CN2021/143513 CN2021143513W WO2022247286A1 WO 2022247286 A1 WO2022247286 A1 WO 2022247286A1 CN 2021143513 W CN2021143513 W CN 2021143513W WO 2022247286 A1 WO2022247286 A1 WO 2022247286A1
Authority
WO
WIPO (PCT)
Prior art keywords
image frame
plane
current image
point
structured
Prior art date
Application number
PCT/CN2021/143513
Other languages
French (fr)
Chinese (zh)
Inventor
王帅
陈丹鹏
Original Assignee
浙江商汤科技开发有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江商汤科技开发有限公司 filed Critical 浙江商汤科技开发有限公司
Publication of WO2022247286A1 publication Critical patent/WO2022247286A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/04Constraint-based CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Definitions

  • the present application relates to the technical field of positioning, and in particular to a positioning method and device, equipment and storage medium.
  • a structured plane refers to a three-dimensional plane established from constructed three-dimensional points.
  • the positioning result of the device is optimized based on the relationship between the constructed 3D point and the structured plane, and the accuracy of the 3D point will directly affect the optimization result. In other words, if the precision of the three-dimensional points is not high, the precision of the optimization of the positioning result by the structured plane will be low.
  • the present application provides at least one positioning method and device, equipment and storage medium.
  • the present application provides a positioning method, including: obtaining the current image frame captured by the device; determining the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame; using a point-plane constraint model The initial pose is optimized, and the optimized pose is obtained as the visual positioning result of the device; among them, the point-plane constraint model uses the feature point pairs between the current image frame and the second historical image frame, and the structure plane relationship built.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model. Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • the structured plane is a three-dimensional plane constructed by using the current image frame captured by the device and the historical image frames before the current image frame;
  • the point-plane constraint model is used to optimize the initial pose before obtaining the optimized pose, including: Obtain the first feature point pair that has an association relationship between the feature point pairs of the current image frame and the second historical image frame and the structured plane; according to the first position of the current image frame and the second historical image frame in the world coordinate system parameter, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane to construct a point-plane constraint model.
  • the The point-plane constraint model is constructed, and in the process of optimizing the initial pose using the point-plane constraint model, it is not affected by the three-dimensional point accuracy, which effectively improves the positioning accuracy of the device.
  • the point-plane constraint model includes the point-plane optimization equation, the point-plane optimization equation includes the first item and the second item, and the first item and the second item are respectively located on both sides of the equal sign of the point-plane optimization equation;
  • the first position parameter includes the rotation Matrix and translation matrix, the second position parameter includes direction matrix and distance matrix;
  • use the point-plane constraint model to optimize the initial pose including: rotation matrix and translation matrix based on the current image frame and the second historical image frame, structured plane The direction matrix and the distance matrix, the two-dimensional coordinates of the historical feature points in the second historical image frame in the first feature point pair, determine the predicted coordinates of the matching feature points corresponding to the historical feature points in the current image frame, wherein, The predicted coordinates are the first item in the point-plane optimization equation; adjust the preset parameters in the point-plane optimization equation so that the first item in the point-plane optimization equation is equal to the second item in the point-plane optimization equation, where the first The binomial is the real two-
  • the point-plane constraint model is used to optimize the initial pose, and the optimized pose is obtained as the visual positioning result of the device, including: responding to the second historical image frame being the last historical image frame of the current image frame, the second The pose of the historical image frame, the pose of the current image frame, and the structured plane are optimized to obtain the visual positioning results of the device at two moments; in response to the second historical image frame not being the last historical image frame of the current image frame, The pose and structured plane of the current image frame are optimized to obtain the visual positioning result of the device at the current moment.
  • the second historical image frame is the previous historical image frame of the current image frame, not only the pose of the current image frame can be optimized, but also the pose of the second historical image frame can be optimized, thereby improving The accuracy of the positioning results of the device at each time.
  • the first feature point pair that has an association relationship between the feature point pair of the current image frame and the second historical image frame and the structured plane, it includes: triangulating the current image frame to obtain the corresponding two-dimensional A grid group, wherein the two-dimensional grid group is composed of several two-dimensional grids.
  • the vertices in the two-dimensional grid group are the feature points in the current image frame; the two-dimensional grid group is projected into the world coordinate system to obtain the corresponding three-dimensional mesh group, wherein the three-dimensional mesh group includes several three-dimensional
  • the vertices in the three-dimensional grid group are three-dimensional points corresponding to the feature points in the current image frame; the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group is obtained to generate a structured plane.
  • a 2D mesh group is obtained by triangulating the current image frame, and a 3D mesh group is obtained by using the 2D mesh group, and then the first 3D mesh that satisfies the first preset condition in the 3D mesh group is obtained , rather than arbitrary three-dimensional grids to generate structured planes, making the constructed structured planes more precise.
  • the three-dimensional grid group includes several three-dimensional grids; obtaining the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate the structured plane includes: making the distance from the current image frame less than or equal to The three-dimensional grid of the first preset distance is used as a candidate three-dimensional grid; two or more candidates whose difference in direction is less than or equal to the first preset difference, and/or the difference in distance is less than or equal to the second preset difference are selected 3D mesh, as the first 3D mesh.
  • the precision of the structured plane can be improved.
  • acquiring the first feature point pair that has an association relationship with the structured plane between the feature point pairs of the current image frame and the second historical image frame includes: acquiring the first feature point pair that has an association relationship with the structured plane in the three-dimensional grid group Two three-dimensional grid; determine some first feature point pairs corresponding to the second three-dimensional grid in the feature point pairs of the current image frame and the second historical image frame, and there is an association relationship between the first feature point pair and the structured plane .
  • association relationship between the 3D grid and the structured plane to determine the association relationship between the feature points and the structured plane, compared with the construction of the association relationship between the 3D points and the structured plane, it can reduce the false association probability.
  • obtaining the second three-dimensional grid that has an association relationship with the structured plane in the three-dimensional grid group includes: obtaining the first distance between each vertex of all three-dimensional grids in the three-dimensional grid group and the structured plane; selecting all A 3D grid whose first distance between the vertices and the structured plane is all less than or equal to the second preset distance is used as the second 3D grid; or the first distance between all vertices and the structured plane is selected to be less than or equal to the second A 3D grid with a preset distance and a plane composed of all vertices parallel to the structured plane is used as the second 3D grid.
  • the second three-dimensional grid that has an association relationship with the structured plane in the three-dimensional grid group includes: selecting the first structured plane that satisfies the second preset condition from multiple structured planes, and the second preset The conditions include that the distance from the current image frame is less than or equal to the third preset distance threshold; obtaining the second 3D grid in the 3D grid group that has an associated relationship with the structured plane includes: obtaining the second 3D grid in the 3D grid group that is associated with the structured plane A second three-dimensional grid with associated relations on a structured plane.
  • the amount of calculation in the process of constructing the association relationship can be reduced.
  • using the point-plane constraint model to optimize the initial pose includes: merging the point-plane constraint model with at least one of the reprojection constraint model and the IMU constraint model to obtain a fusion constraint model; using the fusion constraint model to optimize the initial pose optimization.
  • the positioning accuracy of the device can be improved.
  • the present application provides a positioning device, including: an image acquisition module, used to acquire the current image frame captured by the device; an initial pose acquisition module, used to obtain the relative positional relationship between the current image frame and the first historical image frame, Determine the initial pose of the current image frame; the pose optimization module is used to optimize the initial pose using the point-plane constraint model, and obtain the optimized pose as the visual positioning result of the device; wherein, the point-plane constraint model uses the current The feature point pairs between the image frame and the second historical image frame, and the association relationship between the structured plane are constructed.
  • the present application provides an electronic device, including a memory and a processor, and the processor is used to execute program instructions stored in the memory, so as to realize the above positioning method.
  • the present application provides a computer-readable storage medium, on which program instructions are stored, and the above positioning method is implemented when the program instructions are executed by a processor.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • FIG. 1 is a schematic flow diagram of an embodiment of the positioning method of the present application
  • FIG. 2 is a schematic flow diagram of another embodiment of the positioning method of the present application.
  • Fig. 3 is a schematic structural view of an embodiment of the positioning device of the present application.
  • FIG. 4 is a schematic structural diagram of an embodiment of the electronic device of the present application.
  • Fig. 5 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application.
  • FIG. 1 is a schematic flowchart of an embodiment of a positioning method of the present application. Specifically, the positioning method may include the following steps:
  • Step S11 Obtain the current image frame captured by the device.
  • the device executing the positioning method may be the device that captures the current image frame, or may not be the device that captures the current image frame.
  • the execution device may acquire the current image frame by establishing a communication connection with the device that captures the current image frame.
  • the execution device is not the same device as the device that captures the current image frame, there is no limitation on the communication connection between the two.
  • the following uses the same device as the execution device and the device that captures the current image frame as an example for introduction.
  • the device includes a device for taking a current image frame and a sensor. Among them, the sensor is used to measure the motion information of the device.
  • the current image frame may be an image acquired in real time without any image processing, or may be image processed.
  • the image processing here may be cropping, data enhancement and other processing methods.
  • the methods for judging whether the image frame captured by the device can be used as the current image frame may include: 1. Extract the feature points in the image frame, and if the number of feature points is greater than or equal to the first preset number, use the image frame as the current image frame; 2. Obtain the number of feature point pairs between the image frame and the historical image frame in the preset time period, and when the number of feature point pairs is greater than or equal to the second preset number, use the image frame as the current image frame.
  • Step S12 Determine the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame.
  • the first historical image frame is an image frame that has undergone positioning processing, for example, it may be a previous frame of the current image frame.
  • the relative positional relationship includes relative distance and relative angle.
  • a distance is assumed as the relative distance between the current image frame and the historical image frame, and the sensor readings between the current image frame and the first historical image frame are pre-integrated to obtain the relative angle between the two . Since the pose of the first historical image frame is known, the initial pose of the current image frame can be determined through the relative distance and relative angle between the two.
  • Step S13 Use the point-plane constraint model to optimize the initial pose, and obtain the optimized pose as the visual positioning result of the device; wherein, the point-plane constraint model uses the feature points between the current image frame and the second historical image frame It is built on the association relationship between , and structured plane.
  • the first historical image frame and the second historical image frame may be the same or different.
  • the structured plane here refers to a three-dimensional plane constructed by using the three-dimensional points observed in the current image frame and each historical image frame.
  • the feature point pairs between the current image frame and the second historical image frame are obtained by matching the feature points in the current image frame with the feature points in the second historical image frame.
  • the association relationship between the feature point pair and the structured plane may be the positional relationship between the feature point pair and the structured plane.
  • the pose of the current image frame can be optimized through the positional relationship between the feature point pairs and the structured plane to obtain more accurate results.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • the structured plane is a three-dimensional plane constructed by using the current image frame captured by the device and the historical image frames before the current image frame.
  • a structured plane may be constructed using the current image frame and the first historical image frame.
  • a structured plane can be represented parametrically using certain mathematical expressions, for example, using directions and distances.
  • the parametric expression ⁇ of the structured plane is:
  • is a four-dimensional vector
  • n is a three-dimensional vector, representing the direction
  • d is a constant, representing the distance.
  • the direction here is for the world coordinate system.
  • n can be a set of vectors for the three coordinate axes, or it can be considered as the direction for the origin of the world coordinate system.
  • the specific way to build a structured plane may include the following steps:
  • the current image frame is triangulated to obtain the corresponding two-dimensional grid group.
  • the two-dimensional grid group is composed of several two-dimensional grids. Each vertex in the two-dimensional grid group is a feature point in the current image frame. That is, performing triangulation on the current image frame is actually performing triangulation on the feature points in the current image frame.
  • the feature points in the current image frame can be extracted, and the feature points in the current image frame can be matched with the feature points in the previous historical image frame to obtain the current image frame with the previous historical image frame A pair of feature points between historical image frames.
  • the three-dimensional points corresponding to the feature point pairs can be determined. Further, only the feature points located in the feature point pairs are triangulated.
  • the second step is to project the 2D grid group into the world coordinate system to obtain the corresponding 3D grid group.
  • the three-dimensional grid group includes several three-dimensional grids.
  • the vertices in the three-dimensional grid group are three-dimensional points corresponding to the feature points in the current image frame. That is, according to the connection relationship between the feature points in the two-dimensional grid group, the connection relationship between the three-dimensional points corresponding to each feature point is determined, so as to obtain the corresponding three-dimensional grid group.
  • the "several numbers" mentioned in the embodiments of the present disclosure may be 1 or more, for example, 2, 3, 10, 20, 30, 50 and so on.
  • a three-dimensional grid may include three three-dimensional points.
  • the third step is to acquire the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate the structured plane.
  • a three-dimensional grid whose distance from the current image frame is less than or equal to a first preset distance is used as a candidate three-dimensional grid. Because when the distance between the 3D grid and the current image frame exceeds the first preset distance, the coordinate error of the 3D points in the 3D grid may be relatively large. If the 3D grid is used to construct a structured plane, it may cause The constructed structured plane is less accurate.
  • the first preset distance here can be set according to specific scenarios and requirements, and is not specifically regulated here.
  • two or more candidate 3D grids whose direction difference is less than or equal to the first preset difference value, and/or whose distance difference is less than or equal to the second preset difference value are selected as the first 3D grid.
  • the direction difference here is less than or equal to the first preset difference means that the difference between the three-dimensional vectors of the two candidate three-dimensional grids is less than or equal to the first preset difference.
  • these two candidate 3D grids may be used as the first 3D grid, and a plane including the two candidate 3D grids may be generated.
  • the constructed structured plane can be expanded by utilizing the information in the current image frame on the constructed partially structured plane.
  • the expansion of the structured plane is realized, and the positioning of the current image frame can refer to the previous information, so that the positioning result is more accurate.
  • Obtain a two-dimensional grid group by triangulating the current image frame, and use the two-dimensional grid group to obtain a three-dimensional grid group, and then obtain the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group, and
  • the non-arbitrary three-dimensional grid generates a structured plane, which makes the constructed structured plane more precise. Further, by setting the first preset distance and the first preset difference and/or the second preset difference to select the first three-dimensional grid for generating the structured plane, the precision of the structured plane can be improved.
  • the first feature point pair that has an association relationship with the structured plane among the feature point pairs of the current image frame and the second historical image frame is acquired.
  • the following steps need to be performed, so as to obtain from many A first structured plane that satisfies the second preset condition is selected from the structured planes.
  • the second preset condition includes that the distance to the current image frame is less than or equal to a third preset distance threshold.
  • the third preset distance threshold here can be comprehensively determined according to the computing power of the specific execution device and the positioning accuracy requirements.
  • the third preset distance threshold may be relatively small; if the positioning accuracy requirement is low, the third preset distance threshold may be relatively high.
  • the computing power of the execution device is weak, the third preset distance threshold may be relatively low; if the computing power of the execution device is strong, the third preset distance threshold may be relatively high. Therefore, no specific provisions are made here for the determination of the third preset distance threshold.
  • the method of obtaining the first feature point pair that has an association relationship with the structured plane may include the following steps:
  • a second 3D grid that has an association relationship with the structured plane in the 3D grid group is acquired. Specifically, the first distance between each vertex of all three-dimensional meshes in the three-dimensional mesh group and the structured plane is obtained. And select the 3D grid whose first distance between all vertices and the structured plane is less than or equal to the second preset distance as the second 3D grid. That is, a three-dimensional grid includes three vertices, and only when the first distances between the three vertices and the structured plane are all less than or equal to the second preset distance, the three-dimensional grid can be used as the second three-dimensional grid.
  • a three-dimensional grid whose first distance between all vertices and the structured plane is less than or equal to the second preset distance and whose plane is parallel to the structured plane is selected as the second three-dimensional grid. That is, the second three-dimensional grid is parallel to the structured plane, and the distance between all vertices of the second three-dimensional grid and the structured plane is less than or equal to the second preset distance.
  • the second preset distance is not fixed, and the second preset distance may be dynamically adjusted according to the distance of the three-dimensional grid or structured plane relative to the current image frame. For example, the distance between the three-dimensional grid or structured plane and the current image frame is proportional to the second preset distance, that is, the second preset distance can fluctuate within a certain range.
  • the second preset distance can be determined as 0.1 meters, and the distance between the B three-dimensional grid and the current image frame is 15 meters, then the second preset distance can be determined.
  • the preset distance is 0.15 meters.
  • a second three-dimensional grid that has an association relationship with the first structured plane in the three-dimensional grid group is acquired.
  • the first structured plane is selected from a plurality of structured planes.
  • first feature point pairs corresponding to the second three-dimensional grid are determined among the feature point pairs of the current image frame and the second historical image frame. There is an association relationship between the first feature point pair and the structured plane.
  • association relationship between the 3D grid and the structured plane By constructing the association relationship between the 3D grid and the structured plane to determine the association relationship between the feature point pair and the structured plane, compared with the construction of the association relationship between the 3D point and the structured plane, it can reduce the probability of wrong association .
  • a position parameter, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane are used to construct a point-plane constraint model.
  • the point-surface constraint model includes point-surface optimization equations.
  • the point-surface optimization equation includes the first item and the second item, and the first item and the second item are respectively located on both sides of the equal sign of the point-surface optimization equation.
  • the first position parameter includes a rotation matrix and a translation matrix
  • the second position parameter includes a direction matrix and a distance matrix.
  • the rotation matrix and translation matrix are relative to the origin of the world coordinate system, the rotation matrix is used to represent the rotation amount of the current image frame or the second historical image frame in the world coordinate system, and the translation matrix is used to represent the current image frame Or the translation amount of the second historical image frame in the world coordinate system.
  • the above equation (2) can be and Convert to the corresponding two-dimensional coordinates and From this, the final point-surface optimization equation is obtained.
  • a point-plane constraint model is constructed by using the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane.
  • the second term is the term on the left side of the equal sign in the final point-surface optimization equation, for example, the second term is
  • the first item is the item on the right side of the equal sign in the final point-surface optimization equation, for example, the first item is the operation result on the right side of the equal sign.
  • the point-plane constraint model is used to optimize the initial pose, including: according to the rotation matrix and translation matrix of the current image frame and the second historical image frame, the direction matrix and distance matrix of the structured plane, the first feature point is located at
  • the two-dimensional coordinates of the feature points (hereinafter also referred to as historical feature points) in the second historical image frame determine the matching feature points corresponding to the historical feature points in the current image frame (which can be equivalent to the centering of the first feature points)
  • the predicted coordinates of the feature points located in the current image frame is the first item in the point-surface optimization equation.
  • the preset parameters include the initial pose of the current image frame.
  • the initial pose of the current image frame includes the position and orientation of the current image frame in the world coordinate system.
  • the position can be represented by the above-mentioned translation matrix
  • the orientation can be represented by the above-mentioned rotation matrix.
  • the two-dimensional predicted coordinates of point f should be equal to the real two-dimensional coordinates of point f .
  • the preset parameters in the point-surface optimization equation can be adjusted according to the difference between the predicted coordinates and the real two-dimensional coordinates, so that the two-dimensional predicted coordinates of the final point f are equal to the real two-dimensional coordinates, or between the two The error is less than or equal to the preset error.
  • the preset parameters include a rotation matrix and a translation matrix of the current image frame, and a direction matrix and a distance matrix of the structured plane.
  • the rotation matrix and translation matrix of the second historical image frame may also be included.
  • the optimization of the initial pose using the point-plane constraint model further includes: in response to the second historical image frame being the last historical image frame of the current image frame, the pose of the second historical image frame, the current The pose and structured plane of the image frame are optimized to obtain the visual positioning results of the device at two moments. In response to the fact that the second historical image frame is not the last historical image frame of the current image frame, the pose and structured plane of the current image frame are optimized to obtain a visual positioning result of the device at the current moment. Because the earlier the shooting time of the historical image frame is, the more accurate its corresponding pose will be. Similarly, the later the shooting time of the historical image frame, the accuracy of its corresponding pose will be reduced.
  • the second historical image frame when the second historical image frame is the previous historical image frame of the current image frame, while optimizing the pose and structured plane of the current image frame, the second historical image frame will also be optimized pose. Therefore, in the embodiment of the present disclosure, when the second historical image frame is the previous historical image frame of the current image frame, not only the pose of the current image frame can be optimized, but also the position of the second historical image frame can be optimized. The attitude is optimized to improve the accuracy of the positioning results of the device at each moment.
  • several frames of historical image frames may be used to simultaneously optimize the initial pose of the current image frame.
  • the current image frame is optimized first by using a previous historical image frame of the current image frame, and then the current image frame is optimized by using a previous historical image frame of the historical image frame.
  • the historical image frame can be used to optimize the pose of the current image frame only if there are matching feature point pairs between the current image frame and the historical image frame, and the feature point pair has an association relationship with the structured plane.
  • the historical image frames in the sliding window may be used as the second historical image frames.
  • the latest historical image frame in the sliding window is the previous historical image frame of the current image frame.
  • older point-plane constraints are marginalized. That is, the oldest historical image frame in the sliding window does not participate in the optimization process of the pose of the current image frame.
  • using the point-plane constraint model to optimize the initial pose includes: fusing the point-plane constraint model with at least one of the reprojection constraint model and the IMU constraint model to obtain the fusion constraint model. And use the fusion constraint model to optimize the initial pose of the current image frame. By building a fusion constraint model to optimize the pose of the current image frame of the device, the positioning accuracy of the device can be improved.
  • the process of using the re-projection constraint model to constrain the pose of the current image frame mainly includes adjusting the pose of the current image frame by using the re-projection error, so that the re-projection error meets the preset error requirements.
  • the process of using the IMU constraint model to constrain the pose of the current image frame mainly includes using the IMU integral error to optimize the initial pose of the current image frame.
  • the form of the fusion constraint model is as follows:
  • X represents the amount to be optimized, including the device pose (the device pose corresponding to the current image frame and/or the device pose corresponding to the second historical image frame), IMU parameters, parameters of 3D points and structured planes.
  • r p is the prior residual
  • H p is its corresponding measurement matrix
  • B is all IMU measurements
  • the residual between the IMU measurements at time k and k+1 is
  • the corresponding covariance matrix is C is the feature set observed by the device at all times
  • the reprojection residual of the device at point l at time j is
  • the corresponding covariance matrix is P is the set of all structured planes.
  • the homography-based plane residual of point l under structured plane k at time i and j of the device is The corresponding covariance matrix is
  • FIG. 2 is a schematic flowchart of another embodiment of the positioning method of the present application.
  • the positioning method includes the following steps:
  • Step S21 Obtain the current image frame captured by the device.
  • Step S22 Determine the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame.
  • step S12 the manner of determining the initial pose of the current image frame is as in the above-mentioned step S12, which will not be repeated here.
  • Step S23 Generate a structured plane using the current image frame.
  • the following steps may be included: 1. Perform triangulation on the current image frame to obtain a corresponding two-dimensional grid group.
  • the vertices in the two-dimensional grid group are feature points in the current image frame.
  • the second is to project the two-dimensional grid group into the world coordinate system to obtain the corresponding three-dimensional grid group.
  • the vertices in the three-dimensional grid group are three-dimensional points corresponding to the feature points in the current image frame.
  • the third is to obtain the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate the structured plane.
  • Step S24 Obtain the first feature point pair that has an association relationship between the feature point pairs of the current image frame and the second historical image frame and the structured plane.
  • Step S25 Construct a point-plane constraint model according to the first position parameter of the current image frame and the second historical image frame in the world coordinate system, the two-dimensional coordinates of the feature point pairs, and the second position parameter of the structured plane.
  • point-plane constraint model and the way of constructing the point-plane constraint model are as above, and will not be repeated here.
  • Step S26 Use the point-plane constraint model to optimize the initial pose, and obtain the optimized pose as the visual positioning result of the device.
  • the method of optimizing the initial pose by using the point-plane constraint model, and obtaining the optimized pose as the visual positioning result of the device is as described above, and will not be repeated here.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model , so that the 3D point parameters are not included in the point-plane constraint model, so that in the process of optimizing the initial pose using the point-plane constraint model, it will not be affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible
  • the inner logic is OK.
  • the execution subject of the positioning method may be a positioning device.
  • the positioning method may be executed by a terminal device or a server or other processing equipment, wherein the terminal device may be a user equipment (User Equipment) that has requirements for visual positioning, three-dimensional reconstruction, image registration, etc. , UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, Personal Digital Assistant (PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, and self-driving cars.
  • PDA Personal Digital Assistant
  • the positioning method may be implemented by a processor calling computer-readable instructions stored in a memory.
  • FIG. 3 is a schematic structural diagram of an embodiment of the positioning device of the present application.
  • the positioning device 30 includes an image acquisition module 31 , an initial pose acquisition module 32 and a pose optimization module 33 .
  • the image acquisition module 31 is used to acquire the current image frame captured by the device;
  • the initial pose acquisition module 32 is used to determine the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame;
  • the pose optimization module 33 is used to optimize the initial pose using the point-plane constraint model, and obtain the optimized pose as the visual positioning result of the device; wherein, the point-plane constraint model uses the current image frame and the second historical image frame It is constructed by the feature point pairs between them and the association relationship with the structured plane.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • the structured plane is a three-dimensional plane constructed by using the current image frame captured by the device and the historical image frames before the current image frame; the pose optimization module 33 optimizes the initial pose using a point-plane constraint model to obtain Before the optimized pose, it is also used to: obtain the first feature point pair that has an association relationship between the feature point pair of the current image frame and the second historical image frame and the structured plane; according to the current image frame and the second historical image frame The first position parameter of the image frame in the world coordinate system, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane construct a point-plane constraint model.
  • the point-plane constraint model includes a point-plane optimization equation
  • the point-plane optimization equation includes a first term and a second term, and the first term and the second term are respectively located on both sides of the equal sign of the point-plane optimization equation
  • the position parameters include a rotation matrix and a translation matrix
  • the second position parameters include a direction matrix and a distance matrix
  • the pose optimization module 33 optimizes the initial pose using the point-plane constraint model, including: based on the current image frame and the second historical image frame The rotation matrix and translation matrix, the direction matrix and the distance matrix of the structured plane, the two-dimensional coordinates of the historical feature points in the second historical image frame in the first feature point pair, determine the corresponding historical feature point in the current image frame Match the predicted coordinates of the feature points, where the predicted coordinates are the first item in the point-surface optimization equation; adjust the preset parameters in the point-surface optimization equation so that the first item in the point-surface optimization equation is the same as that in the point-surface optimization equation
  • the positioning accuracy of the device can be improved.
  • the pose optimization module 33 uses the point-plane constraint model to optimize the initial pose, and the step of obtaining the optimized pose as the visual positioning result of the device includes: responding to the second historical image frame being the current image The last historical image frame of the frame, the pose of the second historical image frame, the pose of the current image frame, and the structured plane are optimized to obtain the visual positioning results of the device at two moments; in response to the second historical image frame not being For the previous historical image frame of the current image frame, the pose and structured plane of the current image frame are optimized to obtain the visual positioning result of the device at the current moment.
  • the second historical image frame is the last historical image frame of the current image frame
  • the pose optimization module 33 before the pose optimization module 33 acquires the first feature point pair that has an association relationship between the feature point pair of the current image frame and the second historical image frame and the structured plane, it includes: performing Triangulation to obtain the corresponding two-dimensional grid group, wherein, the two-dimensional grid group is composed of several two-dimensional grids, and each vertex in the two-dimensional grid group is a feature point in the current image frame;
  • the grid group is projected to the world coordinate system to obtain the corresponding 3D grid group, wherein the 3D grid group includes several 3D grids, and the vertices in the 3D grid group are the 3D points corresponding to the feature points in the current image frame. point; acquiring the first 3D grid satisfying the first preset condition in the 3D grid group to generate the structured plane.
  • the two-dimensional mesh group is obtained by triangulating the current image frame, and the three-dimensional mesh group is obtained by using the two-dimensional mesh group, and then the first three-dimensional network that satisfies the first preset condition in the three-dimensional mesh group is obtained.
  • a structured plane is generated using a grid instead of an arbitrary three-dimensional grid, so that the precision of the constructed structured plane is higher.
  • the three-dimensional mesh group includes several three-dimensional meshes.
  • the pose optimization module 33 obtains the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate a structured plane, including: dividing the three-dimensional grid whose distance from the current image frame is less than or equal to the first preset distance As a candidate three-dimensional grid; select two or more candidate three-dimensional grids whose difference in direction is less than or equal to the first preset difference, and/or the difference in distance is less than or equal to the second preset difference, as the first three-dimensional network grid.
  • the precision of the structured plane can be improved.
  • the pose optimization module 33 acquires the first feature point pair that has an association relationship between the feature point center of the current image frame and the second historical image frame and the structured plane, including: acquiring A second three-dimensional grid having an association relationship with the structured plane; determining a number of first feature point pairs corresponding to the second three-dimensional grid among the feature point pairs of the current image frame and the second historical image frame, the first feature point pairs There is an associative relationship with the structured plane.
  • the above scheme determines the relationship between the feature point pair and the structured plane by constructing the relationship between the 3D grid and the structured plane, which can reduce errors compared to building the relationship between the 3D point and the structured plane. probability of association.
  • the pose optimization module 33 acquires the second 3D grid that has an association relationship with the structured plane in the 3D grid group, including: acquiring vertices and structured planes of all 3D grids in the 3D grid group The first distance between; select the 3D grid whose first distance between all vertices and the structured plane is less than or equal to the second preset distance as the second 3D grid; or select the distance between all vertices and the structured plane The first distance is less than or equal to the second preset distance, and the three-dimensional grid whose plane composed of all vertices is parallel to the structured plane is used as the second three-dimensional grid.
  • the pose optimization module 33 before the pose optimization module 33 acquires the second 3D grid that has an association relationship with the structured plane in the 3D grid group, it includes: selecting the first 3D grid that satisfies the second preset condition from multiple structured planes A structured plane, the second preset condition includes that the distance between the current image frame and the current image frame is less than or equal to the third preset distance threshold; obtaining the second three-dimensional grid in the three-dimensional grid group that has an association relationship with the structured plane includes : Obtain the second 3D grid that has an association relationship with the first structured plane in the 3D grid group.
  • the pose optimization module 33 uses the point-plane constraint model to optimize the initial pose, including: fusing the point-plane constraint model with at least one of the reprojection constraint model and the IMU constraint model to obtain the fusion constraint model; The initial pose is optimized using the fused constraint model.
  • the pose of the current image frame of the device is optimized by constructing a fusion constraint model, which can improve the positioning accuracy of the device.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • FIG. 4 is a schematic structural diagram of an embodiment of an electronic device of the present application.
  • the electronic device 40 includes a memory 41 and a processor 42, and the processor 42 is configured to execute program instructions stored in the memory 41, so as to realize the steps in the above positioning method embodiments.
  • the electronic device 40 may include, but is not limited to: a microcomputer and a server.
  • the electronic device 40 may also include mobile devices such as notebook computers and tablet computers, which are not limited here.
  • the processor 42 is used to control itself and the memory 41 to implement the steps in the above positioning method embodiments.
  • the processor 42 may also be called a CPU (Central Processing Unit, central processing unit).
  • the processor 42 may be an integrated circuit chip with signal processing capability.
  • the processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the processor 42 may also be jointly realized by an integrated circuit chip.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model , so that the 3D point parameters are not included in the point-plane constraint model, so that in the process of optimizing the initial pose using the point-plane constraint model, it will not be affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • FIG. 5 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application.
  • the computer-readable storage medium 50 stores program instructions 501 that can be executed by the processor, and the program instructions 501 are used to implement the steps in the above positioning method embodiments when executed by the processor.
  • a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
  • the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
  • the disclosed methods and devices may be implemented in other ways.
  • the device implementations described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed in the present application are a positioning method, an apparatus, a device, and a storage medium. The positioning method comprises: obtaining a current image frame photographed by a device; determining an initial pose of the current image frame according to a relative positional relationship between the current image frame and a first historical image frame; utilizing a point-plane constraint model to optimize the initial pose, and obtaining an optimized pose that serves as a visual positioning result of the device, wherein the point-plane constraint model is constructed by utilizing an association relationship between a structured plane and a feature point pair between the current image frame and a second historical image frame.

Description

定位方法和装置、设备及存储介质Positioning method and device, equipment and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年5月27日提交的、申请号为202110587271.1、发明名称为“定位方法和装置、设备及存储介质”的中国专利申请的优先权,该中国专利申请公开的全部内容以引用的方式并入本文中。This application claims the priority of the Chinese patent application with the application number 202110587271.1 and the title of the invention "Positioning method and device, equipment and storage medium" submitted on May 27, 2021. The entire content of the Chinese patent application is cited by reference way incorporated into this article.
技术领域technical field
本申请涉及定位技术领域,特别是涉及一种定位方法和装置、设备及存储介质。The present application relates to the technical field of positioning, and in particular to a positioning method and device, equipment and storage medium.
背景技术Background technique
视觉定位技术在很多领域中都起着很重要的作用,例如在无人驾驶、机器人等领域。在视觉定位技术中,很多时候会利用结构化平面来优化对设备的定位结果。结构化平面指的是根据构建的三维点建立的三维平面。一般是基于构建的三维点与结构化平面的关系来优化对设备的定位结果,三维点的精度将直接影响优化结果。换言之,若三维点精度不高,则会导致结构化平面对定位结果优化的精度不高。Visual positioning technology plays an important role in many fields, such as unmanned driving, robotics and other fields. In visual positioning technology, structured planes are often used to optimize the positioning results of devices. A structured plane refers to a three-dimensional plane established from constructed three-dimensional points. Generally, the positioning result of the device is optimized based on the relationship between the constructed 3D point and the structured plane, and the accuracy of the 3D point will directly affect the optimization result. In other words, if the precision of the three-dimensional points is not high, the precision of the optimization of the positioning result by the structured plane will be low.
发明内容Contents of the invention
本申请至少提供一种定位方法和装置、设备及存储介质。The present application provides at least one positioning method and device, equipment and storage medium.
本申请提供了一种定位方法,包括:获取设备拍摄的当前图像帧;依据当前图像帧与第一历史图像帧之间的相对位置关系,确定当前图像帧的初始位姿;利用点面约束模型对初始位姿进行优化,得到优化后的位姿作为设备的视觉定位结果;其中,点面约束模型是利用当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建的。The present application provides a positioning method, including: obtaining the current image frame captured by the device; determining the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame; using a point-plane constraint model The initial pose is optimized, and the optimized pose is obtained as the visual positioning result of the device; among them, the point-plane constraint model uses the feature point pairs between the current image frame and the second historical image frame, and the structure plane relationship built.
因此,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化。由于点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了对设备的定位精度。Therefore, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model. Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
其中,结构化平面是利用设备拍摄的当前图像帧及当前图像帧以前的各历史图像帧构建得到的三维平面;利用点面约束模型对初始位姿进行优化得到优化后的位姿之前,包括:获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对;依据当前图像帧和第二历史图像帧在世界坐标系下的第一位置参数、第一特征点对的二维坐标以及结构化平面的第二位置参数,构建点面约束模型。Among them, the structured plane is a three-dimensional plane constructed by using the current image frame captured by the device and the historical image frames before the current image frame; the point-plane constraint model is used to optimize the initial pose before obtaining the optimized pose, including: Obtain the first feature point pair that has an association relationship between the feature point pairs of the current image frame and the second historical image frame and the structured plane; according to the first position of the current image frame and the second historical image frame in the world coordinate system parameter, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane to construct a point-plane constraint model.
因此,通过使用当前图像帧和第二历史图像帧在世界坐标系下的第一位置参数、第一特征点对的二维坐标以及结构化平面的第二位置参数,而非利用三维点,来构建点面约束模型,在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,有效提高了对设备的定位精度。Therefore, by using the first position parameter of the current image frame and the second historical image frame in the world coordinate system, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane, instead of using three-dimensional points, the The point-plane constraint model is constructed, and in the process of optimizing the initial pose using the point-plane constraint model, it is not affected by the three-dimensional point accuracy, which effectively improves the positioning accuracy of the device.
其中,点面约束模型包括点面优化方程,点面优化方程包括第一项和第二项,第一项和第二项分别位于点面优化方程的等号的两边;第一位置参数包括旋转矩阵和平移矩阵,第二位置参数包括方向矩阵以及距离矩阵;利用点面约束模型对初始位姿进行优化,包括:依据当前图像帧和第二历史图像帧的旋转矩阵和平移矩阵、结构化平面的方向矩阵以及距离矩阵、第一特征点对中位于第二历史图像帧中的历史特征点的二维坐标,确定当前图像帧中与该历史特征点对应的匹配特征点的预测坐标,其中,预测坐标为点面优化方程中的第一项;调整点面优化方程中的预设参数,以使点面优化方程中的第一项与点面优化方程中的第二项相等,其中,第二项为对应的匹配特征点在当前图像帧中的真实二维坐标,预设参数包括当前图像帧的初始位姿。Among them, the point-plane constraint model includes the point-plane optimization equation, the point-plane optimization equation includes the first item and the second item, and the first item and the second item are respectively located on both sides of the equal sign of the point-plane optimization equation; the first position parameter includes the rotation Matrix and translation matrix, the second position parameter includes direction matrix and distance matrix; use the point-plane constraint model to optimize the initial pose, including: rotation matrix and translation matrix based on the current image frame and the second historical image frame, structured plane The direction matrix and the distance matrix, the two-dimensional coordinates of the historical feature points in the second historical image frame in the first feature point pair, determine the predicted coordinates of the matching feature points corresponding to the historical feature points in the current image frame, wherein, The predicted coordinates are the first item in the point-plane optimization equation; adjust the preset parameters in the point-plane optimization equation so that the first item in the point-plane optimization equation is equal to the second item in the point-plane optimization equation, where the first The binomial is the real two-dimensional coordinates of the corresponding matching feature points in the current image frame, and the preset parameters include the initial pose of the current image frame.
因此,通过构建特征点与结构化平面之间的关联关系,对包含当前图像帧初始位姿的预设参数进行优化,能够提高对设备的定位精度。Therefore, by constructing the association relationship between the feature points and the structured plane, optimizing the preset parameters including the initial pose of the current image frame can improve the positioning accuracy of the device.
其中,利用点面约束模型对初始位姿进行优化,得到优化后的位姿作为设备的视觉定位结果,包括:响应于第二历史图像帧为当前图像帧的上一历史图像帧,对第二历史图像帧的位姿、当前图像帧的位姿以及结构化平面进行优化,得到设备在两个时刻的视觉定位结果;响应于第二历史图像帧不为当前图像帧的上一历史图像帧,对当前图像帧的位姿以及结构化平面进行优化,得到设备在当前时刻的视觉定位结果。Wherein, the point-plane constraint model is used to optimize the initial pose, and the optimized pose is obtained as the visual positioning result of the device, including: responding to the second historical image frame being the last historical image frame of the current image frame, the second The pose of the historical image frame, the pose of the current image frame, and the structured plane are optimized to obtain the visual positioning results of the device at two moments; in response to the second historical image frame not being the last historical image frame of the current image frame, The pose and structured plane of the current image frame are optimized to obtain the visual positioning result of the device at the current moment.
因此,在第二历史图像帧为当前图像帧的上一历史图像帧的情况下,不仅能够对当前图像帧的位姿进行优化,还能对第二历史图像帧的位姿进行优化,从而提高各时刻对设备的定位结果的精度。Therefore, when the second historical image frame is the previous historical image frame of the current image frame, not only the pose of the current image frame can be optimized, but also the pose of the second historical image frame can be optimized, thereby improving The accuracy of the positioning results of the device at each time.
其中,获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对之前,包括:对当前图像帧进行三角剖分以得到对应的二维网格组,其中,二维网格组由若干的二维网格组成。二维网格组中的各顶点为当前图像帧中的特征点;将二维网格组投影到世界坐标系下,得到对应的三维网格组,其中,三维网格组中包括若干个三维网格,三维网格组中的顶点为当前图像帧中的特征点对应的三维点;获取三维网格组中满足第一预设条件的第一三维网格以生成结构化平面。Wherein, before obtaining the first feature point pair that has an association relationship between the feature point pair of the current image frame and the second historical image frame and the structured plane, it includes: triangulating the current image frame to obtain the corresponding two-dimensional A grid group, wherein the two-dimensional grid group is composed of several two-dimensional grids. The vertices in the two-dimensional grid group are the feature points in the current image frame; the two-dimensional grid group is projected into the world coordinate system to obtain the corresponding three-dimensional mesh group, wherein the three-dimensional mesh group includes several three-dimensional The vertices in the three-dimensional grid group are three-dimensional points corresponding to the feature points in the current image frame; the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group is obtained to generate a structured plane.
因此,通过对当前图像帧进行三角剖分得到二维网格组,并利用二维网格组得到三维网格组,然后获取三维网格组中满足第一预设条件的第一三维网格、而非任意的三维网格生成结构化平面,使得构建的结构化平面的精度更高。Therefore, a 2D mesh group is obtained by triangulating the current image frame, and a 3D mesh group is obtained by using the 2D mesh group, and then the first 3D mesh that satisfies the first preset condition in the 3D mesh group is obtained , rather than arbitrary three-dimensional grids to generate structured planes, making the constructed structured planes more precise.
其中,三维网格组中包括若干个三维网格;获取三维网格组中满足第一预设条件的第一三维网格以生成结构化平面,包括:将与当前图像帧的距离小于或等于第一预设距 离的三维网格作为候选三维网格;选取方向之差小于或等于第一预设差值、和/或距离之差小于或等于第二预设差值的两个或以上候选三维网格,作为第一三维网格。Wherein, the three-dimensional grid group includes several three-dimensional grids; obtaining the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate the structured plane includes: making the distance from the current image frame less than or equal to The three-dimensional grid of the first preset distance is used as a candidate three-dimensional grid; two or more candidates whose difference in direction is less than or equal to the first preset difference, and/or the difference in distance is less than or equal to the second preset difference are selected 3D mesh, as the first 3D mesh.
因此,通过设置第一预设距离以及第一预设差值和/或第二预设差值挑选第一三维网格用以生成结构化平面,能够提高结构化平面的精度。Therefore, by setting the first preset distance and the first preset difference and/or the second preset difference to select the first three-dimensional grid for generating the structured plane, the precision of the structured plane can be improved.
其中,获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对,包括:获取三维网格组中与结构化平面具备关联关系的第二三维网格;确定当前图像帧和第二历史图像帧的特征点对中与第二三维网格对应的若干第一特征点对,该第一特征点对与结构化平面之间具有关联关系。Wherein, acquiring the first feature point pair that has an association relationship with the structured plane between the feature point pairs of the current image frame and the second historical image frame includes: acquiring the first feature point pair that has an association relationship with the structured plane in the three-dimensional grid group Two three-dimensional grid; determine some first feature point pairs corresponding to the second three-dimensional grid in the feature point pairs of the current image frame and the second historical image frame, and there is an association relationship between the first feature point pair and the structured plane .
因此,通过构建三维网格与结构化平面的关联关系,来确定特征点对于结构化平面之间的关联关系,相对于构建三维点与结构化平面之间的关联关系而言,能够减少错误关联的几率。Therefore, by constructing the association relationship between the 3D grid and the structured plane to determine the association relationship between the feature points and the structured plane, compared with the construction of the association relationship between the 3D points and the structured plane, it can reduce the false association probability.
其中,获取三维网格组中与结构化平面具备关联关系的第二三维网格,包括:获取三维网格组中所有三维网格的各顶点与结构化平面之间的第一距离;选取所有顶点与结构化平面之间的第一距离均小于或等于第二预设距离的三维网格作为第二三维网格;或选取所有顶点与结构化平面之间的第一距离小于或等于第二预设距离,且所有顶点组成的平面与结构化平面平行的三维网格作为第二三维网格。Wherein, obtaining the second three-dimensional grid that has an association relationship with the structured plane in the three-dimensional grid group includes: obtaining the first distance between each vertex of all three-dimensional grids in the three-dimensional grid group and the structured plane; selecting all A 3D grid whose first distance between the vertices and the structured plane is all less than or equal to the second preset distance is used as the second 3D grid; or the first distance between all vertices and the structured plane is selected to be less than or equal to the second A 3D grid with a preset distance and a plane composed of all vertices parallel to the structured plane is used as the second 3D grid.
因此,通过选取与结构化平面的距离小于第二预设距离的三维网格,然后构建该三维网格与结构化平面之间的关联关系,能够提高关联的准确度。Therefore, by selecting a three-dimensional grid whose distance from the structured plane is smaller than the second preset distance, and then constructing an association relationship between the three-dimensional grid and the structured plane, the accuracy of the association can be improved.
其中,获取三维网格组中与结构化平面具备关联关系的第二三维网格之前,包括:从多个结构化平面中选择满足第二预设条件的第一结构化平面,第二预设条件包括与当前图像帧之间的距离小于或等于第三预设距离阈值;获取三维网格组中与结构化平面具备关联关系的第二三维网格,包括:获取三维网格组中与第一结构化平面具备关联关系的第二三维网格。Wherein, before acquiring the second three-dimensional grid that has an association relationship with the structured plane in the three-dimensional grid group, it includes: selecting the first structured plane that satisfies the second preset condition from multiple structured planes, and the second preset The conditions include that the distance from the current image frame is less than or equal to the third preset distance threshold; obtaining the second 3D grid in the 3D grid group that has an associated relationship with the structured plane includes: obtaining the second 3D grid in the 3D grid group that is associated with the structured plane A second three-dimensional grid with associated relations on a structured plane.
因此,通过从多个结构化平面中选择满足第二预设条件的第一结构化平面,能够减少构建关联关系过程中的计算量。Therefore, by selecting the first structured plane that satisfies the second preset condition from the multiple structured planes, the amount of calculation in the process of constructing the association relationship can be reduced.
其中,利用点面约束模型对初始位姿进行优化,包括:将点面约束模型与重投影约束模型、IMU约束模型中的至少一个融合,得到融合约束模型;利用融合约束模型对初始位姿进行优化。Wherein, using the point-plane constraint model to optimize the initial pose includes: merging the point-plane constraint model with at least one of the reprojection constraint model and the IMU constraint model to obtain a fusion constraint model; using the fusion constraint model to optimize the initial pose optimization.
因此,通过构建融合约束模型对设备的当前图像帧的位姿进行优化,能够提高对设备的定位精度。Therefore, by constructing a fusion constraint model to optimize the pose of the current image frame of the device, the positioning accuracy of the device can be improved.
本申请提供了一种定位装置,包括:图像获取模块,用于获取设备拍摄的当前图像帧;初始位姿获取模块,用于依据当前图像帧与第一历史图像帧之间的相对位置关系,确定当前图像帧的初始位姿;位姿优化模块,用于利用点面约束模型对初始位姿进行优 化,得到优化后的位姿作为设备的视觉定位结果;其中,点面约束模型是利用当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建的。The present application provides a positioning device, including: an image acquisition module, used to acquire the current image frame captured by the device; an initial pose acquisition module, used to obtain the relative positional relationship between the current image frame and the first historical image frame, Determine the initial pose of the current image frame; the pose optimization module is used to optimize the initial pose using the point-plane constraint model, and obtain the optimized pose as the visual positioning result of the device; wherein, the point-plane constraint model uses the current The feature point pairs between the image frame and the second historical image frame, and the association relationship between the structured plane are constructed.
本申请提供了一种电子设备,包括存储器和处理器,处理器用于执行存储器中存储的程序指令,以实现上述定位方法。The present application provides an electronic device, including a memory and a processor, and the processor is used to execute program instructions stored in the memory, so as to realize the above positioning method.
本申请提供了一种计算机可读存储介质,其上存储有程序指令,程序指令被处理器执行时实现上述定位方法。The present application provides a computer-readable storage medium, on which program instructions are stored, and the above positioning method is implemented when the program instructions are executed by a processor.
上述方案,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化。由于点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了对设备的定位精度。In the above scheme, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本申请。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本申请的实施例,并与说明书一起用于说明本申请的技术方案。The accompanying drawings here are incorporated into the specification and constitute a part of the specification. These drawings show embodiments consistent with the application, and are used together with the description to describe the technical solution of the application.
图1是本申请定位方法一实施例的流程示意图;FIG. 1 is a schematic flow diagram of an embodiment of the positioning method of the present application;
图2是本申请定位方法又一实施例的流程示意图;FIG. 2 is a schematic flow diagram of another embodiment of the positioning method of the present application;
图3是本申请定位装置一实施例的结构示意图;Fig. 3 is a schematic structural view of an embodiment of the positioning device of the present application;
图4是本申请电子设备一实施例的结构示意图;FIG. 4 is a schematic structural diagram of an embodiment of the electronic device of the present application;
图5是本申请计算机可读存储介质一实施例的结构示意图。Fig. 5 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application.
具体实施方式Detailed ways
下面结合说明书附图,对本申请实施例的方案进行详细说明。The solutions of the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、接口、技术之类的具体细节,以便透彻理解本申请。In the following description, for purposes of illustration rather than limitation, specific details, such as specific system architectures, interfaces, and techniques, are set forth in order to provide a thorough understanding of the present application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。此外,本文中的“多”表示两个或者多于两个。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship. In addition, "many" herein means two or more than two. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
请参阅图1,图1是本申请定位方法一实施例的流程示意图。具体而言,该定位方法可以包括如下步骤:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of an embodiment of a positioning method of the present application. Specifically, the positioning method may include the following steps:
步骤S11:获取设备拍摄的当前图像帧。Step S11: Obtain the current image frame captured by the device.
该定位方法的执行设备可以是拍摄当前图像帧的设备,也可以不是拍摄当前图像帧的设备。例如,执行设备可以通过与拍摄当前图像帧的设备建立通信连接等方式获取当前图像帧。在执行设备与拍摄当前图像帧的设备不是同一设备的情况下,二者之间的通信连接的方式不限。以下以执行设备与拍摄当前图像帧的设备为同一设备为例进行介绍。该设备包括用于拍摄当前图像帧的设备以及传感器。其中,传感器用于测量设备的运动信息。当前图像帧可以是实时获取的且未经过任何图像处理的图像,也可以是经过图像处理的。这里的图像处理可以是裁剪、数据增强等处理方式。The device executing the positioning method may be the device that captures the current image frame, or may not be the device that captures the current image frame. For example, the execution device may acquire the current image frame by establishing a communication connection with the device that captures the current image frame. In the case that the execution device is not the same device as the device that captures the current image frame, there is no limitation on the communication connection between the two. The following uses the same device as the execution device and the device that captures the current image frame as an example for introduction. The device includes a device for taking a current image frame and a sensor. Among them, the sensor is used to measure the motion information of the device. The current image frame may be an image acquired in real time without any image processing, or may be image processed. The image processing here may be cropping, data enhancement and other processing methods.
一些公开实施例中,为保障设备的定位精度,并非设备拍摄的所有图像帧均会作为当前图像帧,有的质量较低的图像帧不会作为当前图像帧。判断设备拍摄的图像帧是否可作为当前图像帧的方式可以有:1、提取图像帧中的特征点,在特征点数量大于或等于第一预设数量的情况下,将该图像帧作为当前图像帧;2、获取图像帧与预设时间段内的历史图像帧之间的特征点对的数量,在特征点对的数量大于或等于第二预设数量的情况下,将该图像帧作为当前图像帧。当然,除了这里列举的两个条件之外,还可以判断图像的清晰度、亮度等是否满足要求。通过选择满足质量要求的图像帧作为当前图像帧,能够减少因为图像帧的质量不佳导致定位结果过差的情况出现,从而保障了对设备的定位精度。In some disclosed embodiments, in order to ensure the positioning accuracy of the device, not all image frames captured by the device will be used as the current image frame, and some image frames with lower quality will not be used as the current image frame. The methods for judging whether the image frame captured by the device can be used as the current image frame may include: 1. Extract the feature points in the image frame, and if the number of feature points is greater than or equal to the first preset number, use the image frame as the current image frame; 2. Obtain the number of feature point pairs between the image frame and the historical image frame in the preset time period, and when the number of feature point pairs is greater than or equal to the second preset number, use the image frame as the current image frame. Of course, in addition to the two conditions listed here, it is also possible to judge whether the clarity and brightness of the image meet the requirements. By selecting an image frame that meets the quality requirements as the current image frame, it is possible to reduce the occurrence of poor positioning results due to poor quality of the image frame, thereby ensuring the positioning accuracy of the device.
步骤S12:依据当前图像帧与第一历史图像帧之间的相对位置关系,确定当前图像帧的初始位姿。Step S12: Determine the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame.
第一历史图像帧是已经经过定位处理的图像帧,例如可以是当前图像帧的上一帧。一般地,相对位置关系包括相对距离和相对角度。本公开实施例中,假定一个距离作为当前图像帧和历史图像帧之间的相对距离,并将当前图像帧和第一历史图像帧之间的传感器读数进行预积分得到二者之间的相对角度。因第一历史图像帧的位姿已知,通过二者之间的相对距离和相对角度,即可确定当前图像帧的初始位姿。The first historical image frame is an image frame that has undergone positioning processing, for example, it may be a previous frame of the current image frame. Generally, the relative positional relationship includes relative distance and relative angle. In the embodiment of the present disclosure, a distance is assumed as the relative distance between the current image frame and the historical image frame, and the sensor readings between the current image frame and the first historical image frame are pre-integrated to obtain the relative angle between the two . Since the pose of the first historical image frame is known, the initial pose of the current image frame can be determined through the relative distance and relative angle between the two.
步骤S13:利用点面约束模型对初始位姿进行优化,得到优化后的位姿作为设备的视觉定位结果;其中,点面约束模型是利用当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建的。Step S13: Use the point-plane constraint model to optimize the initial pose, and obtain the optimized pose as the visual positioning result of the device; wherein, the point-plane constraint model uses the feature points between the current image frame and the second historical image frame It is built on the association relationship between , and structured plane.
第一历史图像帧和第二历史图像帧可以相同或不同。这里的结构化平面指的是利用当前图像帧和各历史图像帧观测到的三维点构建的三维平面。当前图像帧同第二历史图像帧之间的特征点对,是通过对当前图像帧中的特征点与第二历史图像帧中的特征点进行匹配得到。特征点对与结构化平面之间的关联关系可以是特征点对与结构化平面之间的位置关系。可以通过特征点对与结构化平面之间的位置关系来优化当前图像帧的位姿, 以得到更为精确的结果。The first historical image frame and the second historical image frame may be the same or different. The structured plane here refers to a three-dimensional plane constructed by using the three-dimensional points observed in the current image frame and each historical image frame. The feature point pairs between the current image frame and the second historical image frame are obtained by matching the feature points in the current image frame with the feature points in the second historical image frame. The association relationship between the feature point pair and the structured plane may be the positional relationship between the feature point pair and the structured plane. The pose of the current image frame can be optimized through the positional relationship between the feature point pairs and the structured plane to obtain more accurate results.
上述方案,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化。由于点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了对设备的定位精度。In the above scheme, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
一些公开实施例中,结构化平面是利用设备拍摄的当前图像帧及当前图像帧以前的各历史图像帧构建得到的三维平面。在执行步骤S13之前,可利用当前图像帧与第一历史图像帧构建结构化平面。结构化平面可以使用一定的数学表达式进行参数化表示,例如,使用方向和距离来表示。本公开实施例中,结构化平面的参数化表达Π为:In some disclosed embodiments, the structured plane is a three-dimensional plane constructed by using the current image frame captured by the device and the historical image frames before the current image frame. Before step S13 is executed, a structured plane may be constructed using the current image frame and the first historical image frame. A structured plane can be represented parametrically using certain mathematical expressions, for example, using directions and distances. In the embodiment of the present disclosure, the parametric expression Π of the structured plane is:
Π=[n d]Π=[n d]
其中,Π是一个四维的向量,n是一个三维的向量,表示方向;d是一个常量,表示距离。这里的方向是针对世界坐标系而言的,例如,n可以是分别针对三个坐标轴的向量集合,也可认为是针对世界坐标系原点的方向。Among them, Π is a four-dimensional vector, n is a three-dimensional vector, representing the direction; d is a constant, representing the distance. The direction here is for the world coordinate system. For example, n can be a set of vectors for the three coordinate axes, or it can be considered as the direction for the origin of the world coordinate system.
具体构建结构化平面的方式可以包括如下几个步骤:The specific way to build a structured plane may include the following steps:
第一步,对当前图像帧进行三角剖分以得到对应的二维网格组。其中,二维网格组由若干的二维网格组成。二维网格组中的各顶点为当前图像帧中的特征点。即,对当前图像帧进行三角剖分实际上是对当前图像帧中的特征点进行三角剖分。在对当前图像帧进行三角剖分之前,可提取当前图像帧中的特征点,并将当前图像帧中的特征点与上一历史图像帧中的特征点进行匹配,得到当前图像帧同该上一历史图像帧之间的特征点对。结合当前图像帧的初始位姿、上一历史图像帧的位姿、和特征点对在各自图像帧中的二维坐标,可确定特征点对对应的三维点。进一步地,仅对位于特征点对中的特征点进行三角剖分。In the first step, the current image frame is triangulated to obtain the corresponding two-dimensional grid group. Wherein, the two-dimensional grid group is composed of several two-dimensional grids. Each vertex in the two-dimensional grid group is a feature point in the current image frame. That is, performing triangulation on the current image frame is actually performing triangulation on the feature points in the current image frame. Before triangulating the current image frame, the feature points in the current image frame can be extracted, and the feature points in the current image frame can be matched with the feature points in the previous historical image frame to obtain the current image frame with the previous historical image frame A pair of feature points between historical image frames. Combining the initial pose of the current image frame, the pose of the last historical image frame, and the two-dimensional coordinates of the feature point pairs in their respective image frames, the three-dimensional points corresponding to the feature point pairs can be determined. Further, only the feature points located in the feature point pairs are triangulated.
第二步,将二维网格组投影到世界坐标系下,得到对应的三维网格组。其中,三维网格组中包括若干个三维网格。三维网格组中的顶点为当前图像帧中的特征点对应的三维点。也就是,根据二维网格组中各特征点之间的连接关系,确定各特征点对应的三维点之间的连接关系,从而得到对应的三维网格组。本公开实施例中提出的“若干个”可以是1个及以上,例如2个、3个、10个、20个、30个、50个等。其中,一个三维网格中可以包括三个三维点。The second step is to project the 2D grid group into the world coordinate system to obtain the corresponding 3D grid group. Wherein, the three-dimensional grid group includes several three-dimensional grids. The vertices in the three-dimensional grid group are three-dimensional points corresponding to the feature points in the current image frame. That is, according to the connection relationship between the feature points in the two-dimensional grid group, the connection relationship between the three-dimensional points corresponding to each feature point is determined, so as to obtain the corresponding three-dimensional grid group. The "several numbers" mentioned in the embodiments of the present disclosure may be 1 or more, for example, 2, 3, 10, 20, 30, 50 and so on. Wherein, a three-dimensional grid may include three three-dimensional points.
第三步,获取三维网格组中满足第一预设条件的第一三维网格以生成结构化平面。具体地,首先,将与当前图像帧的距离小于或等于第一预设距离的三维网格作为候选三维网格。因为在三维网格与当前图像帧的距离超过第一预设距离的情况下,该三维网格中的三维点的坐标误差可能相对较大,若使用该三维网格构建结构化平面,可能导致构建的结构化平面精度较低。这里的第一预设距离可根据具体场景和需求设置,此处不对 其做具体规定。接着,选取方向之差小于或等于第一预设差值、和/或距离之差小于或等于第二预设差值的两个或以上候选三维网格,作为第一三维网格。其中,这里的方向之差小于或等于第一预设差值指的是两个候选三维网格的三维向量之间的差值均小于或等于第一预设差值。进一步地,本公开实施例中,只有在两个候选三维网格之间的方向之差小于或等于第一预设差值、且距离之差小于或等于第二预设差值的情况下,才将这两个候选三维网格作为第一三维网格。例如,两个候选三维网格位于同一竖直平面上时,可以将这两个候选三维网格作为第一三维网格,并生成一个包括这两个候选三维网格的平面。当然,若在当前图像帧以前,基于若干历史图像帧已经构建了部分结构化平面,则可以在已构建的部分结构化平面上利用当前图像帧中的信息对已构建的结构化平面进行扩张。此时,还可以选取与已构建的结构化平面之间的方向之差小于或等于第一预设差值、和/或距离之差小于或等于第二预设差值的候选三维网格作为第一三维网格,并将选取出的第一三维网格与已构建的结构化平面组成一个新的结构化平面。通过此种方式,实现了对结构化平面的扩张,并且对当前图像帧的定位可以参考之前的信息,使得定位结果更加准确。The third step is to acquire the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate the structured plane. Specifically, firstly, a three-dimensional grid whose distance from the current image frame is less than or equal to a first preset distance is used as a candidate three-dimensional grid. Because when the distance between the 3D grid and the current image frame exceeds the first preset distance, the coordinate error of the 3D points in the 3D grid may be relatively large. If the 3D grid is used to construct a structured plane, it may cause The constructed structured plane is less accurate. The first preset distance here can be set according to specific scenarios and requirements, and is not specifically regulated here. Next, two or more candidate 3D grids whose direction difference is less than or equal to the first preset difference value, and/or whose distance difference is less than or equal to the second preset difference value are selected as the first 3D grid. Wherein, the direction difference here is less than or equal to the first preset difference means that the difference between the three-dimensional vectors of the two candidate three-dimensional grids is less than or equal to the first preset difference. Further, in the embodiment of the present disclosure, only when the direction difference between two candidate 3D grids is less than or equal to the first preset difference value, and the distance difference is less than or equal to the second preset difference value, Then these two candidate 3D grids are used as the first 3D grids. For example, when two candidate 3D grids are located on the same vertical plane, these two candidate 3D grids may be used as the first 3D grid, and a plane including the two candidate 3D grids may be generated. Of course, if a partial structured plane has been constructed based on several historical image frames before the current image frame, the constructed structured plane can be expanded by utilizing the information in the current image frame on the constructed partially structured plane. At this time, it is also possible to select a candidate three-dimensional grid whose direction difference from the constructed structured plane is less than or equal to the first preset difference value, and/or whose distance difference is less than or equal to the second preset difference value as the first three-dimensional grid, and form a new structured plane with the selected first three-dimensional grid and the constructed structured plane. In this way, the expansion of the structured plane is realized, and the positioning of the current image frame can refer to the previous information, so that the positioning result is more accurate.
通过对当前图像帧进行三角剖分得到二维网格组,并利用二维网格组得到三维网格组,然后获取三维网格组中满足第一预设条件的第一三维网格、而非任意的三维网格生成结构化平面,使得构建的结构化平面的精度更高。进一步地,通过设置第一预设距离以及第一预设差值和/或第二预设差值挑选第一三维网格用以生成结构化平面,能够提高结构化平面的精度。Obtain a two-dimensional grid group by triangulating the current image frame, and use the two-dimensional grid group to obtain a three-dimensional grid group, and then obtain the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group, and The non-arbitrary three-dimensional grid generates a structured plane, which makes the constructed structured plane more precise. Further, by setting the first preset distance and the first preset difference and/or the second preset difference to select the first three-dimensional grid for generating the structured plane, the precision of the structured plane can be improved.
在结构化平面构建之后,获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对。一些公开实施例中,为减轻执行设备的计算量以及为保障后续定位精度,在获取三维网格组中与结构化平面具备关联关系的第二三维网格之前,需要执行以下步骤,以便从众多结构化平面中选出满足第二预设条件的第一结构化平面。其中,第二预设条件包括与当前图像帧之间的距离小于或等于第三预设距离阈值。这里的第三预设距离阈值可根据具体执行设备的计算力以及定位精度需求综合确定。例如,若定位精度需求较高,则第三预设距离阈值可以相对较小,若定位精度需求较低,则第三预设距离阈值可以相对较高。又例如,若执行设备的计算力较弱,则第三预设距离阈值可以相对较低,若执行设备的计算力较强,则第三预设距离阈值可以相对较高。因此,对于第三预设距离阈值的确定此处不做具体规定。通过从多个结构化平面中选择满足第二预设条件的第一结构化平面,能够减少构建关联关系过程中的计算量。After the structured plane is constructed, the first feature point pair that has an association relationship with the structured plane among the feature point pairs of the current image frame and the second historical image frame is acquired. In some disclosed embodiments, in order to reduce the calculation load of the execution device and ensure the subsequent positioning accuracy, before obtaining the second 3D grid in the 3D grid group that has an associated relationship with the structured plane, the following steps need to be performed, so as to obtain from many A first structured plane that satisfies the second preset condition is selected from the structured planes. Wherein, the second preset condition includes that the distance to the current image frame is less than or equal to a third preset distance threshold. The third preset distance threshold here can be comprehensively determined according to the computing power of the specific execution device and the positioning accuracy requirements. For example, if the positioning accuracy requirement is high, the third preset distance threshold may be relatively small; if the positioning accuracy requirement is low, the third preset distance threshold may be relatively high. For another example, if the computing power of the execution device is weak, the third preset distance threshold may be relatively low; if the computing power of the execution device is strong, the third preset distance threshold may be relatively high. Therefore, no specific provisions are made here for the determination of the third preset distance threshold. By selecting the first structured plane that satisfies the second preset condition from multiple structured planes, the calculation amount in the process of constructing the association relationship can be reduced.
其中,获取所述当前图像帧与所述第二历史图像帧的特征点对中与所述结构化平面之间具有关联关系的第一特征点对的方式可以包括如下几个步骤:Among the feature point pairs of the current image frame and the second historical image frame, the method of obtaining the first feature point pair that has an association relationship with the structured plane may include the following steps:
首先,获取三维网格组中与结构化平面具有关联关系的第二三维网格。具体地,获取三维网格组中所有三维网格的各顶点与结构化平面之间的第一距离。并选取所有顶点与结构化平面之间的第一距离均小于或等于第二预设距离的三维网格作为第二三维网 格。即,一个三维网格包括三个顶点,只有三个顶点与结构化平面之间的第一距离均小于或等于第二预设距离的情况下,该三维网格才能作为第二三维网格。或者,选取所有顶点与结构化平面之间的第一距离小于或等于第二预设距离,且所有顶点组成的平面与结构化平面平行的三维网格作为第二三维网格。即,第二三维网格与结构化平面平行,且第二三维网格的所有顶点与结构化平面之间的距离小于或等于第二预设距离。可选地,第二预设距离并非是固定不变的,可根据三维网格或结构化平面相对于当前图像帧的距离动态调整第二预设距离。例如,三维网格或结构化平面与当前图像帧之间的距离相对于第二预设距离呈正比例关系,即第二预设距离能够在一定的范围内波动。例如,A三维网格与当前图像帧之间的距离为10米,可以确定第二预设距离为0.1米,B三维网格与当前图像帧之间的距离为15米,则可以确定第二预设距离为0.15米。具体地,获取三维网格组中与第一结构化平面具备关联关系的第二三维网格。如上述,第一结构化平面是从众多结构化平面中选出的。Firstly, a second 3D grid that has an association relationship with the structured plane in the 3D grid group is acquired. Specifically, the first distance between each vertex of all three-dimensional meshes in the three-dimensional mesh group and the structured plane is obtained. And select the 3D grid whose first distance between all vertices and the structured plane is less than or equal to the second preset distance as the second 3D grid. That is, a three-dimensional grid includes three vertices, and only when the first distances between the three vertices and the structured plane are all less than or equal to the second preset distance, the three-dimensional grid can be used as the second three-dimensional grid. Alternatively, a three-dimensional grid whose first distance between all vertices and the structured plane is less than or equal to the second preset distance and whose plane is parallel to the structured plane is selected as the second three-dimensional grid. That is, the second three-dimensional grid is parallel to the structured plane, and the distance between all vertices of the second three-dimensional grid and the structured plane is less than or equal to the second preset distance. Optionally, the second preset distance is not fixed, and the second preset distance may be dynamically adjusted according to the distance of the three-dimensional grid or structured plane relative to the current image frame. For example, the distance between the three-dimensional grid or structured plane and the current image frame is proportional to the second preset distance, that is, the second preset distance can fluctuate within a certain range. For example, if the distance between the A three-dimensional grid and the current image frame is 10 meters, the second preset distance can be determined as 0.1 meters, and the distance between the B three-dimensional grid and the current image frame is 15 meters, then the second preset distance can be determined. The preset distance is 0.15 meters. Specifically, a second three-dimensional grid that has an association relationship with the first structured plane in the three-dimensional grid group is acquired. As mentioned above, the first structured plane is selected from a plurality of structured planes.
其次,确定当前图像帧和第二历史图像帧的特征点对中与第二三维网格对应的若干第一特征点对。该第一特征点对与结构化平面之间具有关联关系。Second, several first feature point pairs corresponding to the second three-dimensional grid are determined among the feature point pairs of the current image frame and the second historical image frame. There is an association relationship between the first feature point pair and the structured plane.
通过构建三维网格与结构化平面的关联关系来确定特征点对与结构化平面之间的关联关系,相对于构建三维点与结构化平面之间的关联关系而言,能够减少错误关联的几率。By constructing the association relationship between the 3D grid and the structured plane to determine the association relationship between the feature point pair and the structured plane, compared with the construction of the association relationship between the 3D point and the structured plane, it can reduce the probability of wrong association .
在获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对之后,依据当前图像帧和第二历史图像帧在世界坐标系下的第一位置参数、第一特征点对的二维坐标以及结构化平面的第二位置参数,构建点面约束模型。其中点面约束模型包括点面优化方程。点面优化方程包括第一项和第二项,第一项和第二项分别位于点面优化方程的等号的两边。第一位置参数包括旋转矩阵和平移矩阵,第二位置参数包括方向矩阵以及距离矩阵。其中,这里的旋转矩阵和平移矩阵均是相对于世界坐标系原点的,旋转矩阵用于表示当前图像帧或第二历史图像帧在世界坐标系下的旋转量,平移矩阵用于表示当前图像帧或第二历史图像帧在世界坐标系下的平移量。After acquiring the first feature point pair that has an association relationship with the structured plane between the feature point pairs of the current image frame and the second historical image frame, according to the first feature point pair of the current image frame and the second historical image frame in the world coordinate system A position parameter, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane are used to construct a point-plane constraint model. The point-surface constraint model includes point-surface optimization equations. The point-surface optimization equation includes the first item and the second item, and the first item and the second item are respectively located on both sides of the equal sign of the point-surface optimization equation. The first position parameter includes a rotation matrix and a translation matrix, and the second position parameter includes a direction matrix and a distance matrix. Among them, the rotation matrix and translation matrix here are relative to the origin of the world coordinate system, the rotation matrix is used to represent the rotation amount of the current image frame or the second historical image frame in the world coordinate system, and the translation matrix is used to represent the current image frame Or the translation amount of the second historical image frame in the world coordinate system.
其中,点面优化方程如下:Among them, the point-surface optimization equation is as follows:
Figure PCTCN2021143513-appb-000001
Figure PCTCN2021143513-appb-000001
其中,
Figure PCTCN2021143513-appb-000002
Figure PCTCN2021143513-appb-000003
分别是第二历史图像帧c 1和当前图像帧c 2对应坐标系下f点的3D坐标,其中,这里的f点是与结构化平面具备关联关系的第一特征点对中的特征点;
Figure PCTCN2021143513-appb-000004
Figure PCTCN2021143513-appb-000005
分别用于表示第二历史图像帧c 1和当前图像帧c 2在世界坐标系W下的旋转矩阵;
Figure PCTCN2021143513-appb-000006
Figure PCTCN2021143513-appb-000007
分别用于表示第二历史图像帧c 1和当前图像帧c 2在世界坐标系W下的平移矩阵。n和d分别用于表示结构化平面的方向矩阵和距离矩阵,E是单位矩阵,T表示转置。对点面优化方程进行简化,得到等式(2):
in,
Figure PCTCN2021143513-appb-000002
and
Figure PCTCN2021143513-appb-000003
are respectively the 3D coordinates of point f in the coordinate system corresponding to the second historical image frame c1 and the current image frame c2 , wherein point f here is a feature point in the first feature point pair that has an association relationship with the structured plane;
Figure PCTCN2021143513-appb-000004
and
Figure PCTCN2021143513-appb-000005
Respectively used to represent the rotation matrix of the second historical image frame c 1 and the current image frame c 2 in the world coordinate system W;
Figure PCTCN2021143513-appb-000006
and
Figure PCTCN2021143513-appb-000007
are respectively used to represent the translation matrices of the second historical image frame c1 and the current image frame c2 in the world coordinate system W. n and d are used to represent the direction matrix and distance matrix of the structured plane, respectively, E is the identity matrix, and T represents the transpose. Simplify the point-surface optimization equation to get equation (2):
Figure PCTCN2021143513-appb-000008
Figure PCTCN2021143513-appb-000008
因为三维坐标转换为归一化相机平面坐标,并且特征点对中各特征点在对应的图像帧中的二维坐标已知,所以可以将上述等式(2)中的
Figure PCTCN2021143513-appb-000009
Figure PCTCN2021143513-appb-000010
转换为对应的二维坐标
Figure PCTCN2021143513-appb-000011
Figure PCTCN2021143513-appb-000012
由此得到最终的点面优化方程。以此利用当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建了点面约束模型。可选地,第二项为最终点面优化方程中等号左侧的一项,例如,第二项为
Figure PCTCN2021143513-appb-000013
第一项为最终点面优化方程中等号右侧的一项,例如,第一项为等号右边的运算结果。
Since the three-dimensional coordinates are transformed into normalized camera plane coordinates, and the two-dimensional coordinates of each feature point in the corresponding image frame in the feature point pair are known, the above equation (2) can be
Figure PCTCN2021143513-appb-000009
and
Figure PCTCN2021143513-appb-000010
Convert to the corresponding two-dimensional coordinates
Figure PCTCN2021143513-appb-000011
and
Figure PCTCN2021143513-appb-000012
From this, the final point-surface optimization equation is obtained. In this way, a point-plane constraint model is constructed by using the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane. Optionally, the second term is the term on the left side of the equal sign in the final point-surface optimization equation, for example, the second term is
Figure PCTCN2021143513-appb-000013
The first item is the item on the right side of the equal sign in the final point-surface optimization equation, for example, the first item is the operation result on the right side of the equal sign.
通过使用当前图像帧和第二历史图像帧在世界坐标系下的第一位置参数、第一特征点对的二维坐标以及结构化平面的第二位置参数,而非利用三维点,来构建点面约束模型,在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,有效提高了对设备的定位精度。Construct points by using the first position parameter of the current image frame and the second historical image frame in the world coordinate system, the 2D coordinates of the first feature point pair, and the second position parameter of the structured plane, instead of using 3D points The surface constraint model, in the process of optimizing the initial pose by using the point-surface constraint model, is not affected by the accuracy of the three-dimensional point, which effectively improves the positioning accuracy of the device.
其中,利用点面约束模型对初始位姿进行优化,包括:依据当前图像帧和第二历史图像帧的旋转矩阵和平移矩阵、结构化平面的方向矩阵以及距离矩阵、第一特征点对中位于第二历史图像帧中的特征点(以下也可简称为历史特征点)的二维坐标,确定当前图像帧中与该历史特征点对应的匹配特征点(可相当于该第一特征点对中位于当前图像帧中的特征点)的预测坐标。其中,预测坐标为点面优化方程中的第一项。并调整点面优化方程中的预设参数,以使点面优化方程中的第一项与点面优化方程中的第二项相等。其中,第二项为对应的匹配特征点在当前图像帧中的真实二维坐标。其中,预设参数包括当前图像帧的初始位姿。当前图像帧的初始位姿包括当前图像帧在世界坐标系下的位置和朝向。其中,位置可用上述平移矩阵表示,朝向可用上述旋转矩阵表示。结合上述点面优化方程而言就是,等式右边计算的结果将会得到当前图像帧中f点的二维预测坐标,理论上f点的二维预测坐标应该与f点真实的二维坐标相等。但是,因为当前图像帧的初始位姿一般不太准确,导致f点的二维预测坐标与其在当前图像帧中的二维坐标不相等。因此,可根据预测坐标与真实的二维坐标之间的差值调整点面优化方程中的预设参数,使得最终f点的二维预测坐标与真实的二维坐标相等,或者二者之间的误差小于或等于预设误差。具体地,预设参数包括当前图像帧的旋转矩阵和平移矩阵、结构化平面的方向矩阵和距离矩阵。当然,还可包括第二历史图像帧的旋转矩阵和平移矩阵。通过构建特征点与结构化平面之间的关联关系,对包含当前图像帧的初始位姿的预设参数进行优化,能够提高对设备的定位精度。Among them, the point-plane constraint model is used to optimize the initial pose, including: according to the rotation matrix and translation matrix of the current image frame and the second historical image frame, the direction matrix and distance matrix of the structured plane, the first feature point is located at The two-dimensional coordinates of the feature points (hereinafter also referred to as historical feature points) in the second historical image frame determine the matching feature points corresponding to the historical feature points in the current image frame (which can be equivalent to the centering of the first feature points) The predicted coordinates of the feature points located in the current image frame). Among them, the predicted coordinate is the first item in the point-surface optimization equation. And adjust the preset parameters in the point-surface optimization equation, so that the first item in the point-surface optimization equation is equal to the second item in the point-surface optimization equation. Wherein, the second item is the real two-dimensional coordinates of the corresponding matching feature points in the current image frame. Wherein, the preset parameters include the initial pose of the current image frame. The initial pose of the current image frame includes the position and orientation of the current image frame in the world coordinate system. Wherein, the position can be represented by the above-mentioned translation matrix, and the orientation can be represented by the above-mentioned rotation matrix. Combined with the above point-surface optimization equation, the result calculated on the right side of the equation will get the two-dimensional predicted coordinates of point f in the current image frame. In theory, the two-dimensional predicted coordinates of point f should be equal to the real two-dimensional coordinates of point f . However, because the initial pose of the current image frame is generally not very accurate, the two-dimensional predicted coordinates of point f are not equal to its two-dimensional coordinates in the current image frame. Therefore, the preset parameters in the point-surface optimization equation can be adjusted according to the difference between the predicted coordinates and the real two-dimensional coordinates, so that the two-dimensional predicted coordinates of the final point f are equal to the real two-dimensional coordinates, or between the two The error is less than or equal to the preset error. Specifically, the preset parameters include a rotation matrix and a translation matrix of the current image frame, and a direction matrix and a distance matrix of the structured plane. Of course, the rotation matrix and translation matrix of the second historical image frame may also be included. By constructing the association relationship between the feature points and the structured plane, optimizing the preset parameters including the initial pose of the current image frame can improve the positioning accuracy of the device.
一些公开实施例中,利用点面约束模型对初始位姿进行优化,还包括:响应于第二历史图像帧为当前图像帧的上一历史图像帧,对第二历史图像帧的位姿、当前图像帧的位姿以及结构化平面进行优化,得到设备在两个时刻的视觉定位结果。响应于第二历史图像帧不为当前图像帧的上一历史图像帧,对当前图像帧的位姿以及结构化平面进行优化,得到设备在当前时刻的视觉定位结果。因为历史图像帧的拍摄时间越早,则其对应 的位姿越准确,同理,历史图像帧的拍摄时间越晚,则其对应位姿的准确度就会有所下降。本公开实施例中,在第二历史图像帧为当前图像帧的上一历史图像帧的情况下,在优化当前图像帧的位姿和结构化平面的同时,还会优化第二历史图像帧的位姿。因此,本公开实施例中,在第二历史图像帧为当前图像帧的上一历史图像帧的情况下,不仅能够对当前图像帧的位姿进行优化,还能对第二历史图像帧的位姿进行优化,从而提高各时刻对设备的定位结果的精度。In some disclosed embodiments, the optimization of the initial pose using the point-plane constraint model further includes: in response to the second historical image frame being the last historical image frame of the current image frame, the pose of the second historical image frame, the current The pose and structured plane of the image frame are optimized to obtain the visual positioning results of the device at two moments. In response to the fact that the second historical image frame is not the last historical image frame of the current image frame, the pose and structured plane of the current image frame are optimized to obtain a visual positioning result of the device at the current moment. Because the earlier the shooting time of the historical image frame is, the more accurate its corresponding pose will be. Similarly, the later the shooting time of the historical image frame, the accuracy of its corresponding pose will be reduced. In the embodiment of the present disclosure, when the second historical image frame is the previous historical image frame of the current image frame, while optimizing the pose and structured plane of the current image frame, the second historical image frame will also be optimized pose. Therefore, in the embodiment of the present disclosure, when the second historical image frame is the previous historical image frame of the current image frame, not only the pose of the current image frame can be optimized, but also the position of the second historical image frame can be optimized. The attitude is optimized to improve the accuracy of the positioning results of the device at each moment.
本公开实施例中,可以使用若干帧历史图像帧同时对当前图像帧的初始位姿进行优化。例如,先使用当前图像帧的上一历史图像帧对当前图像帧进行优化,再使用该历史图像帧的上一历史图像帧对当前图像帧进行优化等。其中,只有当前图像帧和历史图像帧之间具有匹配的特征点对,并且所述特征点对与结构化平面之间具备关联关系才能够使用历史图像帧对当前图像帧的位姿进行优化。进一步地,可以使用滑动窗口中的历史图像帧作为第二历史图像帧。一般地,滑动窗口中最新的一帧历史图像帧为当前图像帧的上一历史图像帧。一些公开实施例中,为降低系统耗时,边缘化较老的点面约束。即滑动窗口中最老的一帧历史图像帧不参与对当前图像帧位姿的优化过程。In the embodiment of the present disclosure, several frames of historical image frames may be used to simultaneously optimize the initial pose of the current image frame. For example, the current image frame is optimized first by using a previous historical image frame of the current image frame, and then the current image frame is optimized by using a previous historical image frame of the historical image frame. Wherein, the historical image frame can be used to optimize the pose of the current image frame only if there are matching feature point pairs between the current image frame and the historical image frame, and the feature point pair has an association relationship with the structured plane. Further, the historical image frames in the sliding window may be used as the second historical image frames. Generally, the latest historical image frame in the sliding window is the previous historical image frame of the current image frame. In some disclosed embodiments, in order to reduce system time consumption, older point-plane constraints are marginalized. That is, the oldest historical image frame in the sliding window does not participate in the optimization process of the pose of the current image frame.
一些公开实施例中,利用点面约束模型对初始位姿进行优化,包括:将点面约束模型与重投影约束模型、IMU约束模型中的至少一个融合,得到融合约束模型。并利用融合约束模型对当前图像帧的初始位姿进行优化。通过构建融合约束模型对设备的当前图像帧的位姿进行优化,能够提高对设备的定位精度。In some disclosed embodiments, using the point-plane constraint model to optimize the initial pose includes: fusing the point-plane constraint model with at least one of the reprojection constraint model and the IMU constraint model to obtain the fusion constraint model. And use the fusion constraint model to optimize the initial pose of the current image frame. By building a fusion constraint model to optimize the pose of the current image frame of the device, the positioning accuracy of the device can be improved.
其中,使用重投影约束模型对当前图像帧位姿的约束的过程主要包括使用重投影误差调整当前图像帧的位姿,使得重投影误差满足预设的误差要求。使用IMU约束模型对当前图像帧位姿的约束的过程主要包括使用IMU积分误差对当前图像帧的初始位姿进行优化。本公开实施例中,融合约束模型的形式如下:Wherein, the process of using the re-projection constraint model to constrain the pose of the current image frame mainly includes adjusting the pose of the current image frame by using the re-projection error, so that the re-projection error meets the preset error requirements. The process of using the IMU constraint model to constrain the pose of the current image frame mainly includes using the IMU integral error to optimize the initial pose of the current image frame. In the embodiment of the present disclosure, the form of the fusion constraint model is as follows:
Figure PCTCN2021143513-appb-000014
Figure PCTCN2021143513-appb-000014
其中,
Figure PCTCN2021143513-appb-000015
in,
Figure PCTCN2021143513-appb-000015
其中,X表示需要优化的量,包含设备位姿(当前图像帧对应的设备位姿和/或第二历史图像帧对应的设备位姿),IMU参数,三维点和结构化平面的参数。r p是先验残差,H p是其对应的测量矩阵,B是所有的IMU测量值,k时刻与k+1时刻的IMU测量值之间的残差是
Figure PCTCN2021143513-appb-000016
对应的协方差矩阵为
Figure PCTCN2021143513-appb-000017
C是设备在所有时刻观测到的特征集合,设备在j时刻l点的重投影残差为
Figure PCTCN2021143513-appb-000018
对应协方差矩阵为
Figure PCTCN2021143513-appb-000019
P是所有的结构 化平面集合,设备在i,j时刻下l点在结构化平面k下的基于单应性平面残差为
Figure PCTCN2021143513-appb-000020
对应的协方差矩阵为
Figure PCTCN2021143513-appb-000021
Among them, X represents the amount to be optimized, including the device pose (the device pose corresponding to the current image frame and/or the device pose corresponding to the second historical image frame), IMU parameters, parameters of 3D points and structured planes. r p is the prior residual, H p is its corresponding measurement matrix, B is all IMU measurements, and the residual between the IMU measurements at time k and k+1 is
Figure PCTCN2021143513-appb-000016
The corresponding covariance matrix is
Figure PCTCN2021143513-appb-000017
C is the feature set observed by the device at all times, and the reprojection residual of the device at point l at time j is
Figure PCTCN2021143513-appb-000018
The corresponding covariance matrix is
Figure PCTCN2021143513-appb-000019
P is the set of all structured planes. The homography-based plane residual of point l under structured plane k at time i and j of the device is
Figure PCTCN2021143513-appb-000020
The corresponding covariance matrix is
Figure PCTCN2021143513-appb-000021
为更好地理解本公开实施例提出的技术方案,请参阅图2,图2是本申请定位方法又一实施例的流程示意图。本公开实施例中,定位方法包括以下步骤:In order to better understand the technical solutions proposed by the embodiments of the present disclosure, please refer to FIG. 2 , which is a schematic flowchart of another embodiment of the positioning method of the present application. In the embodiment of the present disclosure, the positioning method includes the following steps:
步骤S21:获取设备拍摄的当前图像帧。Step S21: Obtain the current image frame captured by the device.
其中,获取当前图像帧的方式如上述步骤S11,此处不再赘述。Wherein, the manner of obtaining the current image frame is as in the above step S11, which will not be repeated here.
步骤S22:依据当前图像帧与第一历史图像帧之间的相对位置关系,确定当前图像帧的初始位姿。Step S22: Determine the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame.
其中,确定当前图像帧的初始位姿的方式如上述步骤S12,此处不再赘述。Wherein, the manner of determining the initial pose of the current image frame is as in the above-mentioned step S12, which will not be repeated here.
步骤S23:利用当前图像帧生成结构化平面。Step S23: Generate a structured plane using the current image frame.
具体地,可包括如下步骤:一是对当前图像帧进行三角剖分以得到对应的二维网格组。其中,二维网格组中的顶点为当前图像帧中的特征点。二是将二维网格组投影到世界坐标系下,得到对应的三维网格组。其中,三维网格组中的顶点为当前图像帧中的特征点对应的三维点。三是获取三维网格组中满足第一预设条件的第一三维网格以生成结构化平面。其中,这里三个步骤可具体参见上述实施例,此处不再赘述。Specifically, the following steps may be included: 1. Perform triangulation on the current image frame to obtain a corresponding two-dimensional grid group. Wherein, the vertices in the two-dimensional grid group are feature points in the current image frame. The second is to project the two-dimensional grid group into the world coordinate system to obtain the corresponding three-dimensional grid group. Wherein, the vertices in the three-dimensional grid group are three-dimensional points corresponding to the feature points in the current image frame. The third is to obtain the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate the structured plane. Wherein, for the three steps here, reference may be made to the foregoing embodiments in detail, and details are not repeated here.
步骤S24:获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对。Step S24: Obtain the first feature point pair that has an association relationship between the feature point pairs of the current image frame and the second historical image frame and the structured plane.
具体获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对的方式如上述,此处不再赘述。The specific manner of obtaining the first feature point pair that has an association relationship with the structured plane between the feature point pairs of the current image frame and the second historical image frame is as described above, and will not be repeated here.
步骤S25:依据当前图像帧和第二历史图像帧在世界坐标系下的第一位置参数、特征点对的二维坐标以及结构化平面的第二位置参数,构建点面约束模型。Step S25: Construct a point-plane constraint model according to the first position parameter of the current image frame and the second historical image frame in the world coordinate system, the two-dimensional coordinates of the feature point pairs, and the second position parameter of the structured plane.
其中,点面约束模型以及构建点面约束模型的方式如上述,此处不再赘述。Wherein, the point-plane constraint model and the way of constructing the point-plane constraint model are as above, and will not be repeated here.
步骤S26:利用点面约束模型对初始位姿进行优化,得到优化后的位姿作为设备的视觉定位结果。Step S26: Use the point-plane constraint model to optimize the initial pose, and obtain the optimized pose as the visual positioning result of the device.
其中,利用点面约束模型对初始位姿进行优化,得到优化后的位姿作为设备的视觉定位结果的方式如上述,此处不再赘述。Among them, the method of optimizing the initial pose by using the point-plane constraint model, and obtaining the optimized pose as the visual positioning result of the device is as described above, and will not be repeated here.
上述方案,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化,以使得点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了设备的定位精度。In the above scheme, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model , so that the 3D point parameters are not included in the point-plane constraint model, so that in the process of optimizing the initial pose using the point-plane constraint model, it will not be affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不 意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.
定位方法的执行主体可以是定位装置,例如,定位方法可以由终端设备或服务器或其它处理设备执行,其中,终端设备可以为具有视觉定位、三维重建、图像配准等需求的用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备以及自动驾驶汽车,有定位及建图需求的机器人,有配准需求的医疗成像系统,用于增强现实或虚拟现实的眼镜、头盔等产品等。在一些可能的实现方式中,该定位方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。The execution subject of the positioning method may be a positioning device. For example, the positioning method may be executed by a terminal device or a server or other processing equipment, wherein the terminal device may be a user equipment (User Equipment) that has requirements for visual positioning, three-dimensional reconstruction, image registration, etc. , UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, Personal Digital Assistant (PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, and self-driving cars. Robots with graphic needs, medical imaging systems with registration needs, glasses, helmets and other products for augmented reality or virtual reality, etc. In some possible implementation manners, the positioning method may be implemented by a processor calling computer-readable instructions stored in a memory.
请参阅图3,图3是本申请定位装置一实施例的结构示意图。定位装置30包括图像获取模块31,初始位姿获取模块32以及位姿优化模块33。图像获取模块31,用于获取设备拍摄的当前图像帧;初始位姿获取模块32,用于依据当前图像帧与第一历史图像帧之间的相对位置关系,确定当前图像帧的初始位姿;位姿优化模块33,用于利用点面约束模型对初始位姿进行优化,得到优化后的位姿作为设备的视觉定位结果;其中,点面约束模型是利用当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建的。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of an embodiment of the positioning device of the present application. The positioning device 30 includes an image acquisition module 31 , an initial pose acquisition module 32 and a pose optimization module 33 . The image acquisition module 31 is used to acquire the current image frame captured by the device; the initial pose acquisition module 32 is used to determine the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame; The pose optimization module 33 is used to optimize the initial pose using the point-plane constraint model, and obtain the optimized pose as the visual positioning result of the device; wherein, the point-plane constraint model uses the current image frame and the second historical image frame It is constructed by the feature point pairs between them and the association relationship with the structured plane.
上述方案,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化。由于点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了对设备的定位精度。In the above scheme, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
一些公开实施例中,结构化平面是利用设备拍摄的当前图像帧及当前图像帧以前的各历史图像帧构建得到的三维平面;位姿优化模块33利用点面约束模型对初始位姿进行优化得到优化后的位姿之前,还用于:获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对;依据当前图像帧和第二历史图像帧在世界坐标系下的第一位置参数、第一特征点对的二维坐标以及结构化平面的第二位置参数,构建点面约束模型。In some disclosed embodiments, the structured plane is a three-dimensional plane constructed by using the current image frame captured by the device and the historical image frames before the current image frame; the pose optimization module 33 optimizes the initial pose using a point-plane constraint model to obtain Before the optimized pose, it is also used to: obtain the first feature point pair that has an association relationship between the feature point pair of the current image frame and the second historical image frame and the structured plane; according to the current image frame and the second historical image frame The first position parameter of the image frame in the world coordinate system, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane construct a point-plane constraint model.
上述方案,通过使用当前图像帧和第二历史图像帧在世界坐标系下的第一位置参数、第一特征点对的二维坐标以及结构化平面的第二位置参数,而非利用三维点,来构建点面约束模型,在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,有效提高了设备的定位精度。In the above scheme, by using the first position parameter of the current image frame and the second historical image frame in the world coordinate system, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane, instead of using three-dimensional points, To build a point-plane constraint model, in the process of optimizing the initial pose using the point-plane constraint model, it is not affected by the three-dimensional point accuracy, which effectively improves the positioning accuracy of the device.
一些公开实施例中,点面约束模型包括点面优化方程,点面优化方程包括第一项和第二项,第一项和第二项分别位于点面优化方程的等号的两边;第一位置参数包括旋转矩阵和平移矩阵,第二位置参数包括方向矩阵以及距离矩阵;位姿优化模块33利用点面约束模型对初始位姿进行优化,包括:依据当前图像帧和第二历史图像帧的旋转矩阵 和平移矩阵、结构化平面的方向矩阵以及距离矩阵、第一特征点对中位于第二历史图像帧中的历史特征点的二维坐标,确定当前图像帧中与该历史特征点对应的匹配特征点的预测坐标,其中,预测坐标为点面优化方程中的第一项;调整点面优化方程中的预设参数,以使点面优化方程中的第一项与点面优化方程中的第二项相等,其中,第二项为对应的匹配特征点在当前图像帧中的真实二维坐标,预设参数包括当前图像帧的初始位姿。In some disclosed embodiments, the point-plane constraint model includes a point-plane optimization equation, and the point-plane optimization equation includes a first term and a second term, and the first term and the second term are respectively located on both sides of the equal sign of the point-plane optimization equation; The position parameters include a rotation matrix and a translation matrix, and the second position parameters include a direction matrix and a distance matrix; the pose optimization module 33 optimizes the initial pose using the point-plane constraint model, including: based on the current image frame and the second historical image frame The rotation matrix and translation matrix, the direction matrix and the distance matrix of the structured plane, the two-dimensional coordinates of the historical feature points in the second historical image frame in the first feature point pair, determine the corresponding historical feature point in the current image frame Match the predicted coordinates of the feature points, where the predicted coordinates are the first item in the point-surface optimization equation; adjust the preset parameters in the point-surface optimization equation so that the first item in the point-surface optimization equation is the same as that in the point-surface optimization equation The second term of is equal, where the second term is the real two-dimensional coordinates of the corresponding matching feature points in the current image frame, and the preset parameters include the initial pose of the current image frame.
上述方案,通过构建特征点与结构化平面之间的关联关系,对包含当前图像帧的初始位姿的预设参数进行优化,能够提高对设备的定位精度。In the above solution, by constructing the association relationship between the feature points and the structured plane, optimizing the preset parameters including the initial pose of the current image frame, the positioning accuracy of the device can be improved.
一些公开实施例中,位姿优化模块33利用点面约束模型对初始位姿进行优化,得到优化后的位姿作为设备的视觉定位结果的步骤,包括:响应于第二历史图像帧为当前图像帧的上一历史图像帧,对第二历史图像帧的位姿、当前图像帧的位姿以及结构化平面进行优化,得到设备在两个时刻的视觉定位结果;响应于第二历史图像帧不为当前图像帧的上一历史图像帧,对当前图像帧的位姿以及结构化平面进行优化,得到设备在当前时刻的视觉定位结果。In some disclosed embodiments, the pose optimization module 33 uses the point-plane constraint model to optimize the initial pose, and the step of obtaining the optimized pose as the visual positioning result of the device includes: responding to the second historical image frame being the current image The last historical image frame of the frame, the pose of the second historical image frame, the pose of the current image frame, and the structured plane are optimized to obtain the visual positioning results of the device at two moments; in response to the second historical image frame not being For the previous historical image frame of the current image frame, the pose and structured plane of the current image frame are optimized to obtain the visual positioning result of the device at the current moment.
上述方案,在第二历史图像帧为当前图像帧的上一历史图像帧的情况下,不仅能够对当前图像帧的位姿进行优化,还能对第二历史图像帧的位姿进行优化,从而提高各时刻对设备的定位结果的精度。The above solution, in the case that the second historical image frame is the last historical image frame of the current image frame, can not only optimize the pose of the current image frame, but also optimize the pose of the second historical image frame, thereby Improve the accuracy of the positioning results of the device at each time.
一些公开实施例中,位姿优化模块33获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对之前,包括:对当前图像帧进行三角剖分以得到对应的二维网格组,其中,二维网格组由若干的二维网格组成,二维网格组中的各顶点为当前图像帧中的特征点;将二维网格组投影到世界坐标系下,得到对应的三维网格组,其中,三维网格组中包括若干个三维网格,三维网格组中的顶点为当前图像帧中的特征点对应的三维点;获取三维网格组中满足第一预设条件的第一三维网格以生成结构化平面。In some disclosed embodiments, before the pose optimization module 33 acquires the first feature point pair that has an association relationship between the feature point pair of the current image frame and the second historical image frame and the structured plane, it includes: performing Triangulation to obtain the corresponding two-dimensional grid group, wherein, the two-dimensional grid group is composed of several two-dimensional grids, and each vertex in the two-dimensional grid group is a feature point in the current image frame; The grid group is projected to the world coordinate system to obtain the corresponding 3D grid group, wherein the 3D grid group includes several 3D grids, and the vertices in the 3D grid group are the 3D points corresponding to the feature points in the current image frame. point; acquiring the first 3D grid satisfying the first preset condition in the 3D grid group to generate the structured plane.
上述方案,通过对当前图像帧进行三角剖分得到二维网格组,并利用二维网格组得到三维网格组,然后获取三维网格组中满足第一预设条件的第一三维网格、而非任意的三维网格生成结构化平面,使得构建的结构化平面的精度更高。In the above solution, the two-dimensional mesh group is obtained by triangulating the current image frame, and the three-dimensional mesh group is obtained by using the two-dimensional mesh group, and then the first three-dimensional network that satisfies the first preset condition in the three-dimensional mesh group is obtained. A structured plane is generated using a grid instead of an arbitrary three-dimensional grid, so that the precision of the constructed structured plane is higher.
一些公开实施例中,三维网格组中包括若干个三维网格。位姿优化模块33获取三维网格组中满足第一预设条件的第一三维网格以生成结构化平面,包括:将与当前图像帧的距离小于或等于第一预设距离的三维网格作为候选三维网格;选取方向之差小于或等于第一预设差值、和/或距离之差小于或等于第二预设差值的两个或以上候选三维网格,作为第一三维网格。In some disclosed embodiments, the three-dimensional mesh group includes several three-dimensional meshes. The pose optimization module 33 obtains the first three-dimensional grid satisfying the first preset condition in the three-dimensional grid group to generate a structured plane, including: dividing the three-dimensional grid whose distance from the current image frame is less than or equal to the first preset distance As a candidate three-dimensional grid; select two or more candidate three-dimensional grids whose difference in direction is less than or equal to the first preset difference, and/or the difference in distance is less than or equal to the second preset difference, as the first three-dimensional network grid.
上述方案,通过设置第一预设距离以及第一预设差值和/或第二预设差值挑选第一三维网格用以生成结构化平面,能够提高结构化平面的精度。In the solution above, by setting the first preset distance and the first preset difference and/or the second preset difference to select the first three-dimensional grid to generate the structured plane, the precision of the structured plane can be improved.
一些公开实施例中,位姿优化模块33获取当前图像帧与第二历史图像帧的特征点对中与结构化平面之间具有关联关系的第一特征点对,包括:获取三维网格组中与结构化平面具备关联关系的第二三维网格;确定当前图像帧和第二历史图像帧的特征点对中与第二三维网格对应的若干第一特征点对,该第一特征点对与结构化平面之间具有关联关系。In some disclosed embodiments, the pose optimization module 33 acquires the first feature point pair that has an association relationship between the feature point center of the current image frame and the second historical image frame and the structured plane, including: acquiring A second three-dimensional grid having an association relationship with the structured plane; determining a number of first feature point pairs corresponding to the second three-dimensional grid among the feature point pairs of the current image frame and the second historical image frame, the first feature point pairs There is an associative relationship with the structured plane.
上述方案,通过构建三维网格与结构化平面的关联关系来确定特征点对与结构化平面之间的关联关系,相对于构建三维点与结构化平面之间的关联关系而言,能够减少错误关联的几率。The above scheme determines the relationship between the feature point pair and the structured plane by constructing the relationship between the 3D grid and the structured plane, which can reduce errors compared to building the relationship between the 3D point and the structured plane. probability of association.
一些公开实施例中,位姿优化模块33获取三维网格组中与结构化平面具备关联关系的第二三维网格,包括:获取三维网格组中所有三维网格的各顶点与结构化平面之间的第一距离;选取所有顶点与结构化平面之间的第一距离均小于或等于第二预设距离的三维网格作为第二三维网格;或选取所有顶点与结构化平面之间的第一距离小于或等于第二预设距离,且所有顶点组成的平面与结构化平面平行的三维网格作为第二三维网格。In some disclosed embodiments, the pose optimization module 33 acquires the second 3D grid that has an association relationship with the structured plane in the 3D grid group, including: acquiring vertices and structured planes of all 3D grids in the 3D grid group The first distance between; select the 3D grid whose first distance between all vertices and the structured plane is less than or equal to the second preset distance as the second 3D grid; or select the distance between all vertices and the structured plane The first distance is less than or equal to the second preset distance, and the three-dimensional grid whose plane composed of all vertices is parallel to the structured plane is used as the second three-dimensional grid.
上述方案,通过选取与结构化平面的距离小于第二预设距离的三维网格,然后构建该三维网格与结构化平面之间的关联关系,能够提高关联的准确度。In the above scheme, by selecting a three-dimensional grid whose distance from the structured plane is smaller than the second preset distance, and then constructing an association relationship between the three-dimensional grid and the structured plane, the accuracy of the association can be improved.
一些公开实施例中,位姿优化模块33获取三维网格组中与结构化平面具备关联关系的第二三维网格之前,包括:从多个结构化平面中选择满足第二预设条件的第一结构化平面,第二预设条件包括与当前图像帧之间的距离小于或等于第三预设距离阈值;获取三维网格组中与结构化平面具备关联关系的第二三维网格,包括:获取三维网格组中与第一结构化平面具备关联关系的第二三维网格。In some disclosed embodiments, before the pose optimization module 33 acquires the second 3D grid that has an association relationship with the structured plane in the 3D grid group, it includes: selecting the first 3D grid that satisfies the second preset condition from multiple structured planes A structured plane, the second preset condition includes that the distance between the current image frame and the current image frame is less than or equal to the third preset distance threshold; obtaining the second three-dimensional grid in the three-dimensional grid group that has an association relationship with the structured plane includes : Obtain the second 3D grid that has an association relationship with the first structured plane in the 3D grid group.
上述方案,通过从多个结构化平面中选择满足第二预设条件的第一结构化平面,能够减少构建关联关系过程中的计算量。In the above solution, by selecting the first structured plane that satisfies the second preset condition from multiple structured planes, the calculation amount in the process of building the association relationship can be reduced.
一些公开实施例中,位姿优化模块33利用点面约束模型对初始位姿进行优化,包括:将点面约束模型与重投影约束模型、IMU约束模型中的至少一个融合,得到融合约束模型;利用融合约束模型对初始位姿进行优化。In some disclosed embodiments, the pose optimization module 33 uses the point-plane constraint model to optimize the initial pose, including: fusing the point-plane constraint model with at least one of the reprojection constraint model and the IMU constraint model to obtain the fusion constraint model; The initial pose is optimized using the fused constraint model.
上述方案,通过构建融合约束模型对设备的当前图像帧的位姿进行优化,能够提高对设备的定位精度。In the above solution, the pose of the current image frame of the device is optimized by constructing a fusion constraint model, which can improve the positioning accuracy of the device.
上述方案,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化。由于点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了对设备的定位精度。In the above scheme, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
请参阅图4,图4是本申请电子设备一实施例的结构示意图。电子设备40包括存储器41和处理器42,处理器42用于执行存储器41中存储的程序指令,以实现上述定 位方法实施例中的步骤。在一个具体的实施场景中,电子设备40可以包括但不限于:微型计算机、服务器,此外,电子设备40还可以包括笔记本电脑、平板电脑等移动设备,在此不做限定。Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an embodiment of an electronic device of the present application. The electronic device 40 includes a memory 41 and a processor 42, and the processor 42 is configured to execute program instructions stored in the memory 41, so as to realize the steps in the above positioning method embodiments. In a specific implementation scenario, the electronic device 40 may include, but is not limited to: a microcomputer and a server. In addition, the electronic device 40 may also include mobile devices such as notebook computers and tablet computers, which are not limited here.
具体而言,处理器42用于控制其自身以及存储器41以实现上述定位方法实施例中的步骤。处理器42还可以称为CPU(Central Processing Unit,中央处理单元)。处理器42可能是一种集成电路芯片,具有信号的处理能力。处理器42还可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。另外,处理器42也可以由集成电路芯片共同实现。Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in the above positioning method embodiments. The processor 42 may also be called a CPU (Central Processing Unit, central processing unit). The processor 42 may be an integrated circuit chip with signal processing capability. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Wherein, the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 42 may also be jointly realized by an integrated circuit chip.
上述方案,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化,以使得点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了设备的定位精度。In the above scheme, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model , so that the 3D point parameters are not included in the point-plane constraint model, so that in the process of optimizing the initial pose using the point-plane constraint model, it will not be affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
请参阅图5,图5为本申请计算机可读存储介质一实施例的结构示意图。计算机可读存储介质50存储有能够被处理器运行的程序指令501,程序指令501被处理器运行时用于实现上述定位方法实施例中的步骤。Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 50 stores program instructions 501 that can be executed by the processor, and the program instructions 501 are used to implement the steps in the above positioning method embodiments when executed by the processor.
上述方案,通过当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建点面约束模型,并通过该点面约束模型对设备的初始位姿进行优化。由于点面约束模型中不包括三维点参数,从而在利用点面约束模型对初始位姿进行优化的过程中,不受三维点精度的影响,进而提高了对设备的定位精度。In the above scheme, a point-plane constraint model is constructed through the feature point pairs between the current image frame and the second historical image frame, and the relationship between the structured plane, and the initial pose of the device is optimized through the point-plane constraint model . Since the point-plane constraint model does not include 3D point parameters, the process of optimizing the initial pose using the point-plane constraint model is not affected by the accuracy of the 3D point, thereby improving the positioning accuracy of the device.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments, the same or similar points can be referred to each other, and for the sake of brevity, details are not repeated herein.
在本申请所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性、机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed methods and devices may be implemented in other ways. For example, the device implementations described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .

Claims (15)

  1. 一种定位方法,其特征在于,包括:A positioning method, characterized in that, comprising:
    获取设备拍摄的当前图像帧;Get the current image frame captured by the device;
    依据所述当前图像帧与第一历史图像帧之间的相对位置关系,确定所述当前图像帧的初始位姿;determining the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame;
    利用点面约束模型对所述初始位姿进行优化,得到优化后的位姿作为所述设备的视觉定位结果;Optimizing the initial pose by using a point-plane constraint model, and obtaining the optimized pose as a visual positioning result of the device;
    其中,所述点面约束模型是利用所述当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建的。Wherein, the point-plane constraint model is constructed using the feature point pairs between the current image frame and the second historical image frame, and the association relationship between the structured plane.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    获取所述当前图像帧与所述第二历史图像帧的特征点对中与所述结构化平面之间具有关联关系的第一特征点对;Obtaining a first feature point pair that has an association relationship with the structured plane among the feature point pairs of the current image frame and the second historical image frame;
    依据所述当前图像帧和所述第二历史图像帧在世界坐标系下的第一位置参数、所述第一特征点对的二维坐标以及所述结构化平面的第二位置参数,构建所述点面约束模型,According to the first position parameter of the current image frame and the second historical image frame in the world coordinate system, the two-dimensional coordinates of the first feature point pair, and the second position parameter of the structured plane, construct the The point-surface constraint model,
    其中,所述点面约束模型包括点面优化方程,Wherein, the point-plane constraint model includes a point-plane optimization equation,
    所述点面优化方程包括第一项和第二项,所述第一项和第二项分别位于所述点面优化方程的等号的两边;The point-surface optimization equation includes a first item and a second item, and the first item and the second item are respectively located on both sides of the equal sign of the point-surface optimization equation;
    所述第一位置参数包括旋转矩阵和平移矩阵,The first position parameter includes a rotation matrix and a translation matrix,
    所述第二位置参数包括方向矩阵以及距离矩阵。The second position parameter includes a direction matrix and a distance matrix.
  3. 根据权利要求2所述的方法,所述利用点面约束模型对所述初始位姿进行优化,包括:The method according to claim 2, said utilizing a point-surface constraint model to optimize said initial pose, comprising:
    依据所述当前图像帧和所述第二历史图像帧的旋转矩阵和平移矩阵、所述结构化平面的方向矩阵以及距离矩阵、所述第一特征点对中位于所述第二历史图像帧中的历史特征点的二维坐标,确定所述当前图像帧中与所述历史特征点对应的匹配特征点的预测坐标,其中,所述预测坐标作为所述第一项;According to the rotation matrix and translation matrix of the current image frame and the second historical image frame, the direction matrix and the distance matrix of the structured plane, the first feature point pair is located in the second historical image frame The two-dimensional coordinates of the historical feature points, determining the predicted coordinates of the matching feature points corresponding to the historical feature points in the current image frame, wherein the predicted coordinates are used as the first item;
    调整所述点面优化方程中的预设参数,以使所述第一项与所述第二项相等,其中,所述第二项为所述匹配特征点在所述当前图像帧中的真实二维坐标,所述预设 参数包括所述当前图像帧的初始位姿。Adjusting the preset parameters in the point-plane optimization equation, so that the first term is equal to the second term, wherein the second term is the true value of the matching feature point in the current image frame Two-dimensional coordinates, the preset parameters include the initial pose of the current image frame.
  4. 根据权利要求2所述的方法,其特征在于,所述利用点面约束模型对所述初始位姿进行优化,得到优化后的位姿作为所述设备的视觉定位结果,包括:The method according to claim 2, wherein the initial pose is optimized using a point-plane constraint model, and the optimized pose is obtained as a visual positioning result of the device, comprising:
    响应于所述第二历史图像帧为所述当前图像帧的上一历史图像帧,对所述第二历史图像帧的位姿、所述当前图像帧的位姿以及所述结构化平面进行优化,得到所述设备在两个时刻的视觉定位结果;In response to the second historical image frame being a previous historical image frame of the current image frame, optimizing the pose of the second historical image frame, the pose of the current image frame, and the structured plane , to obtain the visual positioning results of the device at two moments;
    响应于所述第二历史图像帧不为所述当前图像帧的上一历史图像帧,对所述当前图像帧的位姿以及所述结构化平面进行优化,得到所述设备在当前时刻的视觉定位结果。In response to the fact that the second historical image frame is not the previous historical image frame of the current image frame, optimizing the pose of the current image frame and the structured plane to obtain the visual positioning results.
  5. 根据权利要求2所述的方法,其特征在于,还包括:The method according to claim 2, further comprising:
    利用所述当前图像帧及所述当前图像帧以前的历史图像帧构建所述结构化平面。The structured plane is constructed by using the current image frame and historical image frames preceding the current image frame.
  6. 根据权利要求5所述的方法,其特征在于,利用所述当前图像帧及所述当前图像帧以前的历史图像帧构建所述结构化平面,包括:The method according to claim 5, wherein constructing the structured plane using the current image frame and historical image frames before the current image frame comprises:
    对所述当前图像帧进行三角剖分,以得到包括多个二维网格的二维网格组,其中,所述二维网格组中的顶点为所述当前图像帧中的特征点;performing triangulation on the current image frame to obtain a two-dimensional grid group comprising a plurality of two-dimensional grids, wherein the vertices in the two-dimensional grid group are feature points in the current image frame;
    将所述二维网格组投影到世界坐标系下,得到包括多个三维网格的三维网格组,其中,各所述三维网格的顶点为所述当前图像帧中的特征点对应的三维点;Projecting the two-dimensional grid group into the world coordinate system to obtain a three-dimensional grid group including a plurality of three-dimensional grids, wherein the vertices of each of the three-dimensional grids are corresponding to the feature points in the current image frame 3D point;
    基于所述三维网格组中满足第一预设条件的两个以上第一三维网格生成所述结构化平面,generating the structured plane based on two or more first three-dimensional grids satisfying a first preset condition in the three-dimensional grid group,
    其中,所述第一预设条件包括:所述两个以上第一三维网格与所述当前图像帧的距离小于或等于第一预设距离,并且所述两个以上第一三维网格之间的方向之差小于或等于第一预设差值、和/或距离之差小于或等于第二预设差值。Wherein, the first preset condition includes: the distance between the two or more first three-dimensional grids and the current image frame is less than or equal to the first preset distance, and the distance between the two or more first three-dimensional grids The direction difference between them is less than or equal to the first preset difference, and/or the distance difference is less than or equal to the second preset difference.
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述三维网格组中满足第一预设条件的两个以上第一三维网格生成所述结构化平面,包括:The method according to claim 6, wherein the generating the structured plane based on two or more first three-dimensional grids satisfying a first preset condition in the three-dimensional grid group comprises:
    将所述三维网格组中与所述当前图像帧的距离小于或等于所述第一预设距离的三维网格作为候选三维网格;Using a 3D grid whose distance from the current image frame in the 3D grid group is less than or equal to the first preset distance as a candidate 3D grid;
    选取相互之间的方向之差小于或等于所述第一预设差值、和/或距离之差小于或等于所述第二预设差值的两个以上候选三维网格,或者与已构建的结构化平面之间 的方向之差小于或等于所述第一预设差值、和/或距离之差小于或等于所述第二预设差值的候选三维网格,作为所述第一三维网格;Select two or more candidate three-dimensional grids whose direction difference is less than or equal to the first preset difference, and/or whose distance difference is less than or equal to the second preset difference, or with the constructed Candidate three-dimensional grids whose direction difference between structured planes is less than or equal to the first preset difference value, and/or whose distance difference is less than or equal to the second preset difference value, are used as the first 3D grid;
    基于所述第一三维网格生成结构化平面,或将所述已构建的结构化平面组成一个新的结构化平面。A structured plane is generated based on the first three-dimensional grid, or a new structured plane is formed from the constructed structured plane.
  8. 根据权利要求6所述的方法,其特征在于,所述获取所述当前图像帧与所述第二历史图像帧的特征点对中与所述结构化平面之间具有关联关系的第一特征点对,包括:The method according to claim 6, wherein said acquiring the first feature point that has an association relationship between the feature point pair of the current image frame and the second historical image frame and the structured plane Yes, including:
    获取所述三维网格组中与所述结构化平面具备关联关系的第二三维网格;Acquiring a second 3D grid in the 3D grid group that has an associated relationship with the structured plane;
    确定所述当前图像帧和所述第二历史图像帧的特征点对中与所述第二三维网格对应的若干第一特征点对。Determining several first feature point pairs corresponding to the second three-dimensional grid among the feature point pairs of the current image frame and the second historical image frame.
  9. 根据权利要求8所述的方法,其特征在于,所述获取所述三维网格组中与所述结构化平面具备关联关系的第二三维网格,包括:The method according to claim 8, wherein the acquiring the second 3D grid that has an association relationship with the structured plane in the 3D grid group comprises:
    获取所述三维网格组中所有三维网格的各顶点与所述结构化平面之间的第一距离;Obtain a first distance between each vertex of all 3D meshes in the 3D mesh group and the structured plane;
    选取所有顶点与所述结构化平面之间的第一距离均小于或等于第二预设距离的三维网格作为所述第二三维网格。A three-dimensional grid whose first distances between all vertices and the structured plane are less than or equal to a second preset distance is selected as the second three-dimensional grid.
  10. 根据权利要求8所述的方法,其特征在于,所述获取所述三维网格组中与所述结构化平面具备关联关系的第二三维网格,包括:The method according to claim 8, wherein the acquiring the second 3D grid that has an association relationship with the structured plane in the 3D grid group comprises:
    获取所述三维网格组中所有三维网格的各顶点与所述结构化平面之间的第一距离;Obtain a first distance between each vertex of all 3D meshes in the 3D mesh group and the structured plane;
    获取所述三维网格组中所有三维网格的各顶点与所述结构化平面之间的第一距离;Obtain a first distance between each vertex of all 3D meshes in the 3D mesh group and the structured plane;
    选取所有顶点与所述结构化平面之间的第一距离小于或等于第二预设距离,且所有顶点组成的平面与所述结构化平面平行的三维网格作为所述第二三维网格。A three-dimensional grid whose first distance between all vertices and the structured plane is less than or equal to a second preset distance and whose plane is parallel to the structured plane is selected as the second three-dimensional grid.
  11. 根据权利要求8所述的方法,其特征在于,所述获取所述三维网格组中与所述结构化平面具备关联关系的第二三维网格,包括:The method according to claim 8, wherein the acquiring the second 3D grid that has an association relationship with the structured plane in the 3D grid group comprises:
    从所述结构化平面中选择满足第二预设条件的第一结构化平面,所述第二预设条件包括与所述当前图像帧之间的距离小于或等于第三预设距离阈值;Selecting a first structured plane that satisfies a second preset condition from the structured planes, the second preset condition includes that the distance from the current image frame is less than or equal to a third preset distance threshold;
    获取所述三维网格组中与所述第一结构化平面具备关联关系的第二三维网格。Acquiring a second 3D grid in the 3D grid group that has an association relationship with the first structured plane.
  12. 根据权利要求1至11任一项所述的方法,其特征在于,所述利用点面约束模型对所述初始位姿进行优化,包括:The method according to any one of claims 1 to 11, wherein the optimization of the initial pose using a point-surface constraint model includes:
    将所述点面约束模型与重投影约束模型、IMU约束模型中的至少一个融合,得到融合约束模型;Fusing the point-plane constraint model with at least one of the reprojection constraint model and the IMU constraint model to obtain a fusion constraint model;
    利用所述融合约束模型对所述初始位姿进行优化。The initial pose is optimized by using the fusion constraint model.
  13. 一种定位装置,其特征在于,包括:A positioning device is characterized in that it comprises:
    图像获取模块,用于获取设备拍摄的当前图像帧;An image acquisition module, configured to acquire the current image frame captured by the device;
    初始位姿获取模块,用于依据所述当前图像帧与第一历史图像帧之间的相对位置关系,确定所述当前图像帧的初始位姿;An initial pose acquisition module, configured to determine the initial pose of the current image frame according to the relative positional relationship between the current image frame and the first historical image frame;
    位姿优化模块,用于利用点面约束模型对所述初始位姿进行优化,得到优化后的位姿作为所述设备的视觉定位结果;其中,所述点面约束模型是利用所述当前图像帧同第二历史图像帧之间的特征点对、与结构化平面之间的关联关系构建的。A pose optimization module, configured to optimize the initial pose using a point-plane constraint model, and obtain the optimized pose as a visual positioning result of the device; wherein, the point-plane constraint model utilizes the current image The feature point pairs between the frame and the second historical image frame, and the association relationship between the structured plane are constructed.
  14. 一种电子设备,其特征在于,包括存储器和处理器,所述处理器用于执行所述存储器中存储的程序指令,以实现权利要求1至12任一项所述的方法。An electronic device, characterized by comprising a memory and a processor, the processor is configured to execute program instructions stored in the memory, so as to implement the method according to any one of claims 1 to 12.
  15. 一种计算机可读存储介质,其上存储有程序指令,其特征在于,所述程序指令被处理器执行时实现权利要求1至12任一项所述的方法。A computer-readable storage medium on which program instructions are stored, wherein the method according to any one of claims 1 to 12 is implemented when the program instructions are executed by a processor.
PCT/CN2021/143513 2021-05-27 2021-12-31 Positioning method, apparatus, device, and storage medium WO2022247286A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110587271.1 2021-05-27
CN202110587271.1A CN113256718B (en) 2021-05-27 2021-05-27 Positioning method and device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022247286A1 true WO2022247286A1 (en) 2022-12-01

Family

ID=77184892

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143513 WO2022247286A1 (en) 2021-05-27 2021-12-31 Positioning method, apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN113256718B (en)
WO (1) WO2022247286A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256718B (en) * 2021-05-27 2023-04-07 浙江商汤科技开发有限公司 Positioning method and device, equipment and storage medium
CN113847907A (en) * 2021-09-29 2021-12-28 深圳市慧鲤科技有限公司 Positioning method and device, equipment and storage medium
CN113899364B (en) * 2021-09-29 2022-12-27 深圳市慧鲤科技有限公司 Positioning method and device, equipment and storage medium
CN116824026B (en) * 2023-08-28 2024-01-09 华东交通大学 Three-dimensional reconstruction method, device, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170132827A1 (en) * 2015-11-10 2017-05-11 Disney Enterprises, Inc. Data Driven Design and Animation of Animatronics
CN110866496A (en) * 2019-11-14 2020-03-06 合肥工业大学 Robot positioning and mapping method and device based on depth image
CN111951325A (en) * 2019-05-14 2020-11-17 虹软科技股份有限公司 Pose tracking method, pose tracking device and electronic equipment
CN112752028A (en) * 2021-01-06 2021-05-04 南方科技大学 Pose determination method, device and equipment of mobile platform and storage medium
CN113256718A (en) * 2021-05-27 2021-08-13 浙江商汤科技开发有限公司 Positioning method and device, equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10062010B2 (en) * 2015-06-26 2018-08-28 Intel Corporation System for building a map and subsequent localization
CN105469405B (en) * 2015-11-26 2018-08-03 清华大学 Positioning and map constructing method while view-based access control model ranging
CN107796397B (en) * 2017-09-14 2020-05-15 杭州迦智科技有限公司 Robot binocular vision positioning method and device and storage medium
CN111127524A (en) * 2018-10-31 2020-05-08 华为技术有限公司 Method, system and device for tracking trajectory and reconstructing three-dimensional image
CN110223348B (en) * 2019-02-25 2023-05-23 湖南大学 Robot scene self-adaptive pose estimation method based on RGB-D camera
CN110349213B (en) * 2019-06-28 2023-12-12 Oppo广东移动通信有限公司 Pose determining method and device based on depth information, medium and electronic equipment
CN111586360B (en) * 2020-05-14 2021-09-10 佳都科技集团股份有限公司 Unmanned aerial vehicle projection method, device, equipment and storage medium
CN112270709B (en) * 2020-11-12 2024-05-14 Oppo广东移动通信有限公司 Map construction method and device, computer readable storage medium and electronic equipment
CN112396656B (en) * 2020-11-24 2023-04-07 福州大学 Outdoor mobile robot pose estimation method based on fusion of vision and laser radar

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170132827A1 (en) * 2015-11-10 2017-05-11 Disney Enterprises, Inc. Data Driven Design and Animation of Animatronics
CN111951325A (en) * 2019-05-14 2020-11-17 虹软科技股份有限公司 Pose tracking method, pose tracking device and electronic equipment
CN110866496A (en) * 2019-11-14 2020-03-06 合肥工业大学 Robot positioning and mapping method and device based on depth image
CN112752028A (en) * 2021-01-06 2021-05-04 南方科技大学 Pose determination method, device and equipment of mobile platform and storage medium
CN113256718A (en) * 2021-05-27 2021-08-13 浙江商汤科技开发有限公司 Positioning method and device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HSIAO MING; WESTMAN ERIC; KAESS MICHAEL: "Dense Planar-Inertial SLAM with Structural Constraints", 2018 IEEE INTERNATIONAL CONFERENCE ON ROBOTICS AND AUTOMATION (ICRA), IEEE, 21 May 2018 (2018-05-21), pages 6521 - 6528, XP033403516, DOI: 10.1109/ICRA.2018.8461094 *

Also Published As

Publication number Publication date
CN113256718A (en) 2021-08-13
CN113256718B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
WO2022247286A1 (en) Positioning method, apparatus, device, and storage medium
US11295472B2 (en) Positioning method, positioning apparatus, positioning system, storage medium, and method for constructing offline map database
US11954870B2 (en) Dynamic scene three-dimensional reconstruction method, apparatus and system, server, and medium
US11423508B2 (en) Method and system of point cloud registration for image processing
EP3786890B1 (en) Method and apparatus for determining pose of image capture device, and storage medium therefor
US11145083B2 (en) Image-based localization
WO2022247548A1 (en) Positioning method, apparatus, electronic device, and storage medium
JP2020507850A (en) Method, apparatus, equipment, and storage medium for determining the shape of an object in an image
JP5833507B2 (en) Image processing device
US20210334569A1 (en) Image depth determining method and living body identification method, circuit, device, and medium
WO2023093739A1 (en) Multi-view three-dimensional reconstruction method
CN112784765A (en) Method, apparatus, device and storage medium for recognizing motion
WO2021258588A1 (en) Face image recognition method, apparatus and device and storage medium
WO2023087758A1 (en) Positioning method, positioning apparatus, computer-readable storage medium, and computer program product
CN114998433A (en) Pose calculation method and device, storage medium and electronic equipment
JP2009186287A (en) Plane parameter estimating device, plane parameter estimating method, and plane parameter estimating program
Wang et al. Handling occlusion and large displacement through improved RGB-D scene flow estimation
CN112634366A (en) Position information generation method, related device and computer program product
CN112085842B (en) Depth value determining method and device, electronic equipment and storage medium
US20220414919A1 (en) Method and apparatus for depth-aided visual inertial odometry
CN115578432B (en) Image processing method, device, electronic equipment and storage medium
Liao et al. VI-NeRF-SLAM: a real-time visual–inertial SLAM with NeRF mapping
Pautrat et al. Vanishing Point Estimation in Uncalibrated Images with Prior Gravity Direction
CN115439331B (en) Corner correction method and generation method and device of three-dimensional model in meta universe
Li et al. Multimodal Feature Association-based Stereo Visual SLAM Method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21942849

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE