CN113223078B - Mark point matching method, device, computer equipment and storage medium - Google Patents

Mark point matching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN113223078B
CN113223078B CN202110584315.5A CN202110584315A CN113223078B CN 113223078 B CN113223078 B CN 113223078B CN 202110584315 A CN202110584315 A CN 202110584315A CN 113223078 B CN113223078 B CN 113223078B
Authority
CN
China
Prior art keywords
point
current
matching
mark
dimensional
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110584315.5A
Other languages
Chinese (zh)
Other versions
CN113223078A (en
Inventor
杨琪
冉国江
翟剑坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xhorse Electronics Co Ltd
Original Assignee
Shenzhen Xhorse Electronics Co Ltd
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 Shenzhen Xhorse Electronics Co Ltd filed Critical Shenzhen Xhorse Electronics Co Ltd
Priority to CN202110584315.5A priority Critical patent/CN113223078B/en
Publication of CN113223078A publication Critical patent/CN113223078A/en
Application granted granted Critical
Publication of CN113223078B publication Critical patent/CN113223078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • 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/10028Range image; Depth image; 3D point clouds

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)

Abstract

The application relates to a method, a device, computer equipment and a storage medium for matching mark points, wherein different mark points are selected from a mark point set for a plurality of times, three-edge lengths of a triangle obtained by construction are used as coordinate values of three-dimensional points, and space searching is performed based on the three-dimensional points, so that matched triangle pairs are obtained, and point cloud splicing is realized; three edges of the triangle are changed into three points, so that a space searching mode can be combined, the complex triangle matching problem is simplified, and the time complexity is reduced.

Description

Mark point matching method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of laser scanning technologies, and in particular, to a method and apparatus for matching a marker point, a computer device, and a storage medium.
Background
In laser real-time three-dimensional scanning, point cloud images of different visual angles are spliced together finally, so that tracking and calculating of the point cloud position relation are very important. The existing three-dimensional scanning is widely used for positioning reflective marker points, and the principle is that the three-dimensional positions corresponding to the marker points are completely different under different visual angles, and the topological relation among the marker points is not transformed, so that the principle is utilized, the relative position relation among handheld scanning instruments under different visual angles can be obtained through transformation, and point clouds under different visual angles can be spliced successfully. The traditional method for matching the marker points directly screens out accurate matching points by triangles, and then determines the optimal transformation relation according to other test attributes.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a computer-readable storage medium for matching marker points that can reduce time complexity.
A method of matching landmark points, the method comprising:
acquiring a forward mark point set in a forward frame;
selecting three different forward mark points from the forward mark point set for multiple times to obtain a forward point group set;
the side lengths of three sides of the triangle constructed by each point group in the forward point group set are respectively used as each coordinate value of the forward three-dimensional point to obtain a forward three-dimensional point coordinate set;
acquiring a current mark point set in a current frame;
selecting three different current mark points from the current mark point set for multiple times to obtain a current point set;
the side lengths of three sides of the triangle constructed by each point group in the current point group set are respectively used as coordinate values of the current three-dimensional point to obtain a current three-dimensional point coordinate set;
performing space search according to the forward three-dimensional point coordinate set and the current three-dimensional point coordinate set to obtain matched triangle pairs;
and performing point cloud splicing according to the matched triangle pairs.
A token matching apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a forward mark point set in a forward frame;
the first selecting module is used for selecting three different forward mark points from the forward mark point set for multiple times to obtain a forward point group set;
the forward three-dimensional point coordinate set acquisition module is used for respectively taking the side lengths of three sides of the triangle constructed by each point group in the forward point group set as each coordinate value of the forward three-dimensional point to acquire a forward three-dimensional point coordinate set;
the second acquisition module is used for acquiring a current mark point set in the current frame;
the second selecting module is used for selecting three different current mark points from the current mark point set for multiple times to obtain a current point set;
the current three-dimensional point coordinate set acquisition module is used for respectively taking the side lengths of three sides of the triangle constructed by each point group in the current point group set as each coordinate value of the current three-dimensional point to acquire the current three-dimensional point coordinate set;
the space searching module is used for carrying out space searching according to the forward three-dimensional point coordinate set and the current three-dimensional point coordinate set to obtain matched triangle pairs;
And the splicing module is used for carrying out point cloud splicing according to the matched triangle pairs.
A computer device comprising a memory storing a computer program and a processor implementing method embodiments of a method of matching marker points when the computer program is executed.
A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements method embodiments of a method of matching marker points.
The method, the device, the computer equipment and the storage medium for matching the mark points are characterized in that different mark points are selected from the mark point set for a plurality of times, the three-side length of the constructed triangle is used as each coordinate value of the three-dimensional point, and space searching is performed based on the three-dimensional point, so that matched triangle pairs are obtained, and point cloud splicing is realized; the principle that the triangles with the same side lengths and the same side lengths are congruent is utilized, and three sides of the triangle are changed into three points, so that a space searching mode can be combined, the complex triangle matching problem is simplified, and the time complexity is reduced.
Drawings
FIG. 1 is an application environment diagram of point cloud stitching in one embodiment;
FIG. 2 is a flow diagram of a method of matching marker points in one embodiment;
FIG. 3 is a flow diagram of one embodiment for obtaining matched triangle pairs;
FIG. 4 is a schematic diagram of octree partitioning in one embodiment;
FIG. 5 is a flow chart of a method of matching mark points in another embodiment;
FIG. 6 is a block diagram of the structure of a device for matching marker points in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without any inventive effort, are intended to be within the scope of the invention.
It should be noted that, in the embodiments of the present invention, all directional indicators (such as up, down, left, right, front, and rear … …) are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture (as shown in the drawings), if the specific posture is changed, the directional indicators correspondingly change, and the connection may be a direct connection or an indirect connection.
In addition, descriptions such as those related to "forward", "current", etc. in this disclosure are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "forward", "current" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
In one embodiment, as shown in fig. 1, an application environment diagram of point cloud stitching in one embodiment is shown. Included in fig. 1 are a first image pickup apparatus 110, a second image pickup apparatus 120, a laser emitter 130, an object 140, and a computer apparatus 150. Object 140 may include a marker thereon. The computer device 150 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, in-vehicle devices, portable wearable devices, and servers. The first image pickup apparatus 110, the second image pickup apparatus 120, and the laser emitter 130 are connected to the computer apparatus 150, respectively. The first image capturing apparatus 110 and the second image capturing apparatus 120 are not the same image capturing apparatus, and the first image capturing apparatus 110 and the second image capturing apparatus 120 are located at different positions. The laser emitter 130 emits a plurality of laser lights to the object 140, scans the entire object 140, photographs the object 140 while scanning, photographs a first laser light pattern by the first image pickup apparatus 110, and photographs a second laser light pattern by the second image pickup apparatus 120. The computer device 150 generates a current frame based on the first laser map and the second laser map, wherein the current frame is a three-dimensional image frame constructed based on the first laser map and the second laser map. The forward frame is a three-dimensional image frame preceding the current frame. It can be understood that the method for matching the marker points in the embodiments of the present application may also be applied to computer devices only.
In one embodiment, as shown in fig. 2, a flow chart of a method for matching marker points in one embodiment is shown, and the method for matching marker points is applied to laser three-dimensional scanning and includes:
step 202, a set of forward marker points in a forward frame is acquired.
Wherein, the forward frame refers to the three-dimensional image frame obtained before the current frame. The forward frame is specifically a forward three-dimensional image frame obtained after line laser light is emitted to an object by a line laser emitter and preceding the current frame. The forward frame may specifically be an image frame of a previous frame connected to the current frame, or may be an image frame two frames before the current frame, or the like, without being limited thereto.
The forward marker point set comprises at least three forward marker points. The forward marker points are points in three-dimensional space. The forward set of landmark coordinates may include a forward set of landmark coordinates.
Specifically, the computer device acquires a first laser map captured by the first image capturing device and a second laser map captured by the second image capturing device, and generates a forward frame from the first laser map and the second laser map. The computer device identifies forward marker points in the forward frame, obtaining a set of forward marker points.
Step 204, selecting three different forward marker points from the forward marker point set for multiple times to obtain a forward point set.
Wherein the forward point group set comprises at least two forward point groups. Each forward point group comprises three mark points.
Specifically, the computer equipment randomly selects three different forward mark points from the forward mark point set each time, constructs to obtain a forward point set, and obtains the forward point set through multiple selections.
In this embodiment, the computer device may search through three different forward marker points from the forward marker point set to obtain a forward point group set.
In this embodiment, the computer device may search through three different forward marker points from the forward marker point set, and screen out a marker point set capable of constructing a non-isosceles triangle from the three different forward marker points, to obtain a forward marker point set.
And 206, taking the side lengths of three sides of the triangle constructed by each point group in the forward point group set as the coordinate values of the forward three-dimensional points respectively to obtain a forward three-dimensional point coordinate set.
Wherein the side length of three sides of the triangle can be l 1 、l 2 And l 3 Wherein l 1 <l 2 <l 3 Then the forward three-dimensional coordinate point may be (l) 1 ,l 2 ,l 3 ). The coordinate values of the forward three-dimensional coordinate points are consistent in size arrangement sequence.
Specifically, knowing the coordinates of three points, a triangle can be constructed and the side lengths of the three sides of the triangle can be calculated. The computer equipment calculates the side lengths of three sides of the triangle constructed by each point group in the forward point group set, and sequences the three sides of each point group according to the order of the side lengths from small to large or the order from large to small, and the like, so as to obtain the forward three-dimensional point coordinate set.
Step 208, a current set of marker points in the current frame is obtained.
Wherein the current frame refers to the three-dimensional image frame currently being processed. The current frame is specifically a current three-dimensional image frame obtained after line laser light is emitted to an object by a line laser emitter.
The current mark point set comprises at least four current mark points. The current landmark point is a point in three-dimensional space. The current set of landmark points may include a current set of landmark point coordinates.
Specifically, the computer device acquires a first laser image currently shot by the first image pickup device and a second laser image shot by the second image pickup device, and generates a current frame according to the first laser image and the second laser image. The computer device identifies a current landmark in the current frame, obtaining a current set of landmark.
Step 210, selecting three different current mark points from the current mark point set for multiple times to obtain a current point set.
Wherein the forward point group set comprises at least two forward point groups. Each forward point group comprises three mark points.
Specifically, the computer equipment randomly selects three different current marking points from the current marking point set each time, constructs a current point set, and obtains the current point set through multiple selections.
In this embodiment, the computer device may search through three different current landmark points from the current landmark set to obtain the current point set.
In this embodiment, the computer device may search through three different current landmark sets from the current landmark set, and screen out a landmark set capable of constructing a non-isosceles triangle from the three different current landmark sets to obtain the current landmark set.
And 212, taking the side lengths of three sides of the triangle constructed by each point group in the current point group set as the coordinate values of the current three-dimensional point respectively to obtain the current three-dimensional point coordinate set.
Specifically, the computer equipment calculates the side lengths of three sides of the triangle constructed by each point group in the current point group set, and sequences the three sides of each point group according to the order of the side lengths from small to large or the order from large to small, and the like, so as to obtain the current three-dimensional point coordinate set.
And step 214, performing space search according to the forward three-dimensional point coordinate set and the current three-dimensional point coordinate set to obtain matched triangle pairs.
One triangle in the matched triangle pair is a triangle surrounded by the coordinates of the forward three-dimensional point, and the other triangle is a triangle surrounded by the coordinates of the current three-dimensional point. The triangles in the matched triangle pairs may in particular be congruent triangles. Triangles with three sides that are nearly equal within a certain error range can be considered congruent triangles.
Specifically, the computer device performs spatial neighbor search in the current three-dimensional point coordinate set according to the forward three-dimensional point coordinates in the forward three-dimensional point coordinate set to obtain matched triangle pairs.
Optionally, the computer device performs spatial neighbor search in the forward three-dimensional point coordinate set according to the current three-dimensional point coordinates in the current three-dimensional point coordinate set to obtain matched triangle pairs.
In the embodiment, the computer equipment performs space searching according to the forward three-dimensional point coordinate set and the current three-dimensional point coordinate set to obtain a space searching result; and matching the forward three-dimensional point coordinates in the space search result with the current three-dimensional point coordinates to obtain matched triangle pairs. The space searching result refers to the forward three-dimensional point coordinates and the current three-dimensional point coordinates which are obtained by searching in the similar or same space nodes. And the computer equipment calculates the forward three-dimensional point coordinates searched in the similar or same space nodes and matches the current three-dimensional point coordinates, and when the matching degree exceeds or equals to the matching degree threshold value, the forward three-dimensional point coordinates exceeding or equals to the matching degree threshold value and the corresponding current three-dimensional point coordinates are used as matched triangle pairs.
And step 216, performing point cloud stitching according to the matched triangle pairs.
Specifically, the computer device determines a target transformation parameter according to the matched triangle pairs; and performing point cloud splicing according to the target transformation parameters to obtain a point cloud image. The target transformation parameters may include a rigid transformation matrix and may also include a translation matrix.
According to the method for matching the mark points, different mark points are selected from the mark point set for multiple times, three-edge lengths of the constructed triangle are used as coordinate values of three-dimensional points, space searching is conducted based on the three-dimensional points, and therefore matched triangle pairs are obtained, and point cloud splicing is achieved; the traditional triangle matching mode is to select C from the mark points of a graph n 3 A point C is selected from the mark points of the other graph m 3 The points need to be matched with C n 3 ×C m 3 The time complexity of the sub-triangle is high; the principle that the triangles with equal side lengths are congruent is utilized, three sides of the triangle are changed into three points, so that a space searching mode can be combined, the complex triangle matching problem is simplified, the time complexity is reduced, more and effective triangle pairs can be reserved for matching, and the accuracy of point cloud splicing is improved.
In one embodiment, as shown in fig. 3, fig. 3 is a schematic flow chart of obtaining a matched triangle pair in one embodiment, and performing a spatial search according to a forward three-dimensional point coordinate and a current three-dimensional point coordinate to obtain the matched triangle pair, which includes:
step 302, for the forward three-dimensional point coordinates in the forward three-dimensional point coordinate set, storing the forward three-dimensional point coordinates according to a spatial index structure; the forward three-dimensional point coordinates are stored at the spatial nodes.
The spatial index structure may be a BSP (Binary Space Partitioning, binary space partition) tree, a KD (K-Dimensional) tree, a KDB (K-Dimensional B ) tree, an R tree, an R+ tree, a CELL tree, a quadtree, an octree, and the like.
Specifically, for forward three-dimensional point coordinates in the forward three-dimensional point coordinate set, the computer device stores each three-dimensional point coordinate in a spatial index structure, and the forward three-dimensional point coordinates are stored in each spatial node. I.e. the forward three-dimensional point coordinates have corresponding node indices.
In this embodiment, the octree is a special data structure of the KD tree in three dimensions. As shown in FIG. 4, FIG. 4 is a schematic diagram of octree partitioning in one embodiment. In the left diagram of fig. 4, a block represents a node, and when the block is divided, the divided block is a child node of the original block. As shown in the right-hand diagram of fig. 4, one circle represents one node. The octree has the advantages that the octree can be searched in the tree structure rapidly for post-processing, and new branches can be added or deleted rapidly, and the establishment process is as follows:
(1) Setting the maximum iteration times, the minimum space scale and the maximum number of points in each space node;
(2) taking a maximum bounding box (bounding box) of the point cloud as a first-layer father node;
(3) if the current condition is not met (1), and the current node cube contains points of the point cloud, equally dividing the current cube into 8 pieces, and updating the current node into divided nodes;
(4) if the child node cube does not contain the point cloud point or the points contained in the child node are identical to the points contained in the parent node cube, the division of the current branch is stopped; otherwise, executing (3);
(5) if all node divisions of the cube stop or the current condition meets any one of the conditions in (1), then octree building stops.
And step 304, determining a corresponding current spatial index according to the current three-dimensional point coordinates.
Specifically, the computer device calculates a current spatial index from the current three-dimensional point coordinates. For example, the current three-dimensional point coordinates are (x, y, z), then the corresponding current spatial index is (x/dx, y/dy, z/dz), where dx, dy, and dy are the minimum length, width, and height, respectively, of the spatial node.
And 306, searching the corresponding forward three-dimensional point coordinates in the space nodes according to the current space index, and obtaining the target forward three-dimensional point coordinates corresponding to the current three-dimensional point coordinates.
The forward three-dimensional point coordinates of the target are points adjacent to the forward three-dimensional point coordinates in the three-dimensional space nodes.
Specifically, the computer device may search for the forward three-dimensional point coordinates corresponding to the current spatial index in the spatial nodes corresponding to the current spatial index. Alternatively, the computer device may search for the forward three-dimensional point coordinates corresponding to the current spatial index in the spatial node corresponding to the current spatial index and the neighboring spatial nodes corresponding to the spatial node.
And 308, matching the current three-dimensional point coordinate with the corresponding target forward three-dimensional point coordinate, and taking the successfully matched current three-dimensional point coordinate and the corresponding target forward three-dimensional point coordinate as a matched triangle pair.
Specifically, the computer device matches the forward three-dimensional point coordinates with the corresponding target three-dimensional point coordinates, and when the matching degree exceeds or is equal to the matching degree threshold, the forward three-dimensional point coordinates which exceed or are equal to the matching degree threshold and the corresponding target current three-dimensional point coordinates are used as matched triangle pairs.
Or the computer equipment matches the forward three-dimensional point coordinate with the corresponding target three-dimensional point coordinate to obtain a corresponding distance value, and takes the forward three-dimensional point coordinate which is smaller than or equal to the distance threshold value and the corresponding target current three-dimensional point coordinate as a matched triangle pair under the condition that the distance value is smaller than or equal to the distance threshold value.
In this embodiment, the forward three-dimensional point coordinates are stored in the spatial nodes according to the spatial index structure, the corresponding spatial index is determined according to the current three-dimensional point coordinates, and the corresponding forward three-dimensional point coordinates are searched in the spatial nodes, so that matched triangle pairs are obtained, the matched triangle pairs can be quickly found by combining a fast spatial search algorithm, the cycle times are greatly reduced, and the time complexity is reduced.
In one embodiment, performing point cloud stitching according to matched triangle pairs includes:
and (a 1) determining candidate transformation parameters corresponding to the matched triangle pairs for each matched triangle pair.
Wherein the candidate transformation parameters include a candidate rigid transformation matrix and may further include a candidate translation matrix. By solving the rigid transformation matrix, the corresponding point coordinates of the points in the coordinate system of the current frame in the coordinate system of the forward frame can be calculated. Or the corresponding point coordinates of the points in the coordinate system of the forward frame in the coordinate system of the current frame may be calculated.
Specifically, the computer device calculates corresponding candidate transformation parameters from each pair of matched triangle pairs, respectively. I.e. each pair of matched triangle pairs has a corresponding candidate transformation parameter. The computer device finds candidate transformation parameters by rigid transformation and SVD decomposition (singular value decomposition).
And (a 2) transforming the current marking point set according to the candidate transformation parameters to obtain a transformed current marking point set corresponding to the candidate transformation parameters.
Specifically, for each candidate transformation parameter, the computer device transforms the current marking point set according to the candidate transformation parameter to obtain a transformed current marking point set corresponding to the candidate transformation parameter. The transformed current marker point set comprises the transformed current marker points.
And (a 3) matching the forward mark point set with the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter.
Specifically, the computer device may specifically match the forward set of landmark points with the transformed set of landmark points in a manner of calculating the matrix similarity, so as to obtain the similarity of landmark points corresponding to the candidate transformation parameter.
And (a 4) determining target transformation parameters according to the mark point matching result.
Specifically, the computer device may use the candidate transformation parameter with the highest matching similarity of the marker points as the target transformation parameter.
In this embodiment, the computer device may match the forward set of marker points with the transformed current set of marker points to obtain a matching point pair corresponding to the candidate transformation parameter. And the computer equipment re-calculates the target transformation parameters according to the matching points corresponding to the candidate transformation parameters.
And (a 5) performing point cloud splicing according to the target transformation parameters.
In this embodiment, since there may be many pairs of matched triangle pairs determined from the forward frame and the current frame, multiple candidate transformation parameters can be calculated based on the matched triangle pairs, and a best target transformation parameter needs to be obtained by screening the candidate transformation parameters; therefore, the current mark point set is transformed according to each candidate transformation parameter to obtain a transformed current mark point set corresponding to the candidate transformation parameter, the transformed current mark point set is matched with the forward mark point set, the target transformation parameter is determined according to the matching result, and the target transformation parameter with better matching can be selected from the transformed current mark point set, so that the accuracy of three-dimensional point cloud splicing is improved.
In one embodiment, matching the forward marker point set with the transformed current marker point set to obtain a marker point matching result corresponding to the candidate transformation parameter includes: matching the forward mark point set with the transformed current mark point set to obtain a matching point pair corresponding to the candidate transformation parameters; counting the number of matching point pairs;
determining target transformation parameters according to the mark point matching results corresponding to the candidate transformation parameters, including: determining the maximum number of matching point pairs from the number of matching point pairs corresponding to each candidate transformation parameter; the target transformation parameters are determined from the maximum number of matching point pairs.
Specifically, the computer device matches a forward marker point in the forward marker point set with a current marker point in the transformed current marker point set, and when the marker point matching degree is equal to or greater than a matching threshold value, uses a point pair equal to or greater than the matching threshold value as a matching point pair. The computer device counts the number of matching pairs. The computer device determines a maximum number of matching point pairs from the number of matching point pairs corresponding to each candidate transformation parameter.
The computer device takes the candidate transformation parameters corresponding to the maximum number of matching point pairs as target transformation parameters. Alternatively, the computer device uses the candidate transformation parameters corresponding to the maximum number of matching point pairs satisfying the number threshold condition as the target transformation parameters. Wherein the number threshold condition may be greater than 3. Alternatively, the computer device recalculates the target transformation parameters based on each of the maximum number of matching point pairs.
In this embodiment, the calculated candidate transformation parameters are not necessarily suitable for transformation of other marker points in the current frame through the matched triangle pairs, so that matching point pairs corresponding to the candidate transformation parameters are obtained by matching the forward marker point set with the transformed current marker point set, the number of the matching point pairs is counted, the number of the matching point pairs can reflect the accuracy of the candidate transformation parameters to a certain extent, and therefore, the target transformation parameters can be determined according to the maximum number of the matching point pairs, so that a better transformation parameter is determined, and the accuracy of point cloud splicing is improved.
In one embodiment, determining the target transformation parameters from the maximum number of matching point pairs includes: when at least two maximum numbers exist, obtaining an error value of a matching point pair corresponding to each maximum number; and determining the target transformation parameters according to the candidate transformation parameters with the minimum error values.
Wherein the error value of the matching point pair may be obtained by calculating the euclidean distance between two marker points, etc.
Specifically, when there are two or more than two of the maximum numbers, the computer device acquires an error value of a matching point pair corresponding to each maximum number, and takes a candidate transformation parameter with the minimum error value as a target transformation parameter.
In this embodiment, when there are at least two maximum numbers satisfying the number threshold condition, the computer device acquires an error of a matching point corresponding to each maximum number, and uses a candidate transformation parameter satisfying the error threshold condition and having the smallest error value as the target transformation parameter. Wherein the number threshold condition may be greater than 3 and the error threshold condition may be less than or equal to the error threshold.
In this embodiment, in the actual operation process, there may be the case that the maximum numbers are the same, so that it is necessary to obtain an error value of each matching point pair corresponding to the maximum number, determine the target transformation parameter according to the candidate transformation parameter with the minimum error value, and improve the accuracy of the target transformation parameter, thereby improving the accuracy of the point cloud stitching.
In one embodiment, determining the target transformation parameter from the candidate transformation parameter with the smallest error value comprises: obtaining a matching point pair corresponding to a candidate transformation parameter with the minimum error value; and determining target transformation parameters according to the matching point pairs.
Specifically, the computer equipment acquires a matching point pair corresponding to a candidate transformation parameter with the minimum error value; and re-calculating according to the matching points to obtain target transformation parameters. For example, if the candidate transformation parameter with the smallest error value is rt_pre, the matching point pair corresponding to rt_pre is obtained, and the target transformation parameter RT is recalculated by using n pairs of vertices in the points_pair.
In this embodiment, since the number of sample points for calculating the target transformation parameter is too small through the matched triangle pairs, the matching point pair corresponding to the candidate transformation parameter with the smallest error value is obtained, and the target transformation parameter is determined according to the matching point pair, so that more matching point pairs can be obtained, and a more accurate target transformation parameter is obtained.
In one embodiment, the set of forward marker points includes a set of forward marker point coordinates and a set of forward marker point normal vectors; the current marker point set comprises a current marker point coordinate set and a current marker point normal vector set.
Matching the forward mark point set with the transformed current mark point set to obtain a matching point pair corresponding to the candidate transformation parameters, wherein the matching point pair comprises:
matching the forward mark point coordinate set with the current mark point coordinate set to obtain a coordinate matching result of each mark point pair;
matching the forward marker point normal vector set with the current marker point normal vector set to obtain a normal vector matching result of each marker point pair;
and taking the mark point pair with the matched coordinate matching result and the matched normal vector matching result as the matching point pair corresponding to the candidate transformation parameter.
The normal vector of the forward marker point refers to the orientation of the forward marker point in the three-dimensional image. The coordinate matching result may be non-matching or matching, and may be specifically determined by similarity, difference value, or the like. The normal vector matching result may be a mismatch or a match, and may be specifically determined by a similarity, a difference value, or the like.
Specifically, the computer equipment matches the forward mark point coordinate set with the transformed current mark point coordinate set to obtain a coordinate matching result of each mark point pair. And matching the forward marker point coordinate normal vector set with the transformed current marker point normal vector set to obtain a normal vector matching result of each marker point pair. The computer equipment takes the mark point pair with the matched coordinate matching result and the matched normal vector matching result as the matching point pair corresponding to the candidate transformation parameters.
In this embodiment, since the forward marker point coordinate sets are all marker points in the three-dimensional space, there are corresponding normal vectors, and by matching the two parameters of the forward marker point coordinates and the forward marker point normal vector, the marker point pair with matched coordinates and matched normal vector is obtained as the matching point pair, so that the accuracy of the target transformation parameters can be improved.
In one embodiment, after performing the point cloud stitching according to the target transformation parameter, the method for matching the marker point further includes:
obtaining a transformed current mark point set obtained by transforming according to the target transformation parameters;
updating the forward mark point set according to the transformed current mark point set to obtain an updated forward mark point set;
taking the updated forward mark point set as a forward mark point set in a forward frame;
a backward mark point set of a backward frame is obtained, the backward frame is taken as the next current frame, the backward mark point set is taken as the current mark point set, and the target transformation parameter is taken as the unique candidate transformation parameter; and returning to the step of performing matching on the forward mark point set and the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter.
Specifically, after performing point cloud stitching according to the target transformation parameters, the computer device obtains a transformed current set of marker points obtained by transforming according to the target transformation parameters.
And averaging the coordinates of each transformed current marking point in the transformed current marking point set and the coordinates of the forward marking points in the forward marking point set to obtain an updated forward marking point set. And in the event that a new transformed current landmark is present in the transformed current landmark set, the computer device adds the new transformed current landmark to the forward landmark set.
The computer equipment takes the updated forward mark point set as a forward mark point set in a forward frame, acquires a backward mark point set of a backward frame, takes the backward frame as a next current frame, takes the backward mark point set as a current mark point set, and takes a target transformation parameter as a unique candidate transformation parameter; and the return execution carries out the step of matching the forward mark point set with the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameters until the computer equipment is shut down or until the last frame of the video is processed. Wherein, the forward frame may be the 1 st frame, the current frame may be the 2 nd frame, the backward frame may be the 3 rd frame, and the backward frame is processed as the current frame in the actual process.
Taking target transformation parameters as target_RT, a forward mark point set as first_space, a current mark point set as next_space, a transformed current mark point set as transform_space and an updated forward mark point set as update_space as an example for explanation. The next_space is transformed according to the target_rt to obtain a transform_space. The first_space is updated according to the transform_space, and the update_space is obtained. first_space=update_space, at which point a new first_space is obtained. The computer device reassigns the next_space to be a mark point set of a backward frame, the computer matches the first_space=update_space with the transform_space to obtain a matching point pair corresponding to the target_RT, and new target transformation parameters are calculated according to the matching point pair.
In this embodiment, after the target transformation parameters between the forward frame and the current frame are calculated, the target transformation parameters can be used to calculate the target transformation parameters between the next frame and the current frame, that is, the transformation relationship of the current frame can be deduced through the target transformation relationship of the previous frames, triangle matching can be omitted, time spent for point cloud splicing is greatly reduced, and point cloud splicing efficiency is improved.
In one embodiment, the step of taking a backward frame as a next current frame, taking a backward mark point set as a current mark point set, taking a target transformation parameter as a unique candidate transformation parameter, and performing matching on the forward mark point set and the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter comprises the following steps: when the frame number difference between the backward frame and the current frame is smaller than or equal to a frame number threshold, taking the backward frame as the next current frame, taking a backward mark point set as a current mark point set, taking a target transformation parameter as a unique candidate transformation parameter, and returning to the step of matching the forward mark point set with the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter; when the frame number difference between the backward frame and the current frame is larger than the frame number threshold, a backward mark point set of the backward frame is obtained, the backward frame is taken as the next current frame, the backward mark point is taken as the current mark point set, three different forward mark points are selected for multiple times from the forward mark point set, a forward point set is obtained, and three different current mark points are selected for multiple times from the current mark point set, so that a current point set is obtained.
In this embodiment, when the difference of the frame numbers between the backward frame and the current frame is smaller, the description time difference is shorter, so the derivation of the transformation relationship of the current frame can be performed through the target transformation relationship of the previous frames, thereby saving time; when the frame number difference between the backward frame and the current frame is larger, the matched triangle needs to be recalculated, so that the point cloud splicing is more accurately carried out.
In one embodiment, the method for matching the marker points further includes: acquiring the matching times of each mark point in a preset number of image frames; and deleting the mark points with the matching times smaller than the preset times from each image frame when the matching times are smaller than the preset times.
In this embodiment, the description of the marker point with the small matching frequency may be an error point, so that the marker point is deleted from the image frame, that is, the matching frequency of the coordinates of the subsequent three-dimensional point can be reduced, and the point cloud splicing efficiency is improved.
In one embodiment, because the congruent triangle is a very strict condition for measuring the topological structure of the marker points, the traditional marker point matching is divided into two types, one type is that the matching points are roughly calculated according to the attributes such as distance, normal vector and the like, and the matching points are screened by using the congruent triangle and other test attributes; the second is to screen out the exact matching point directly by triangle congruent, and then to determine the best transformation relation according to other test attributes. The first approach lacks significant points and the second approach creates a significant amount of time complexity. Therefore, the method for matching the mark points in the embodiments of the application is provided.
Meaning of each parameter:
forward landmark coordinate set: first_space
Forward landmark normal vector set: first_normal
Forward three-dimensional point coordinate set: tri_space
Current landmark coordinate set: next_space
The updated set of forward marker points: update_space
Target transformation parameters: target_RT
Spatial index structure: octree structure
The forward three-dimensional point coordinate set stored according to the space index result: octree_space
Current landmark normal vector set: next_normal
Current three-dimensional point coordinates: t is t 2i
Target forward three-dimensional point coordinates: s is S iK
Matched triangle pairs: tri_pair i
Distance between the current three-dimensional point coordinates and the target forward three-dimensional point coordinates: distance (distance) t2i-SiK
Distance threshold: distance_thresh
Candidate transformation parameters: candida_RT
Number of matching point pairs: n is n i (matching of Point coordinates and normal vectors is successful)
Average error of matching points: err (r) i
The existing RT is used and is denoted as RT_pre. Here, rt_pre may be the rough RT of (3), or may be the target_rt calculated in the previous frame.
The method for matching the mark points is described by taking the above parameters as an example and comprises the following steps:
step (1), selecting a point from the first_space to perform C n 3 3 points are a triangle, and all triangles form a forward point group set.
For a certain non-isosceles triangle triangulation i E, point group set, three side lengths l 1 <l 2 <l 3 , triangulation i =(l 1 ,l 2 ,l 3 ) Taking the triangle as a point, the triangle is obtained to obtain Tri_space= { (l) i1 ,l i2 ,l i3 ),i=1,2,3…n}。
The minimum size d of the cube is selected, the tri_space is constructed into octree_space according to the cube node data structure of the octree, each node cube in the octree has the size d, and different numbers of tri_space are contained in the octree.
Step (2), C is carried out on the next_space n 3 3 points are a triangle, and all triangles form the current point set. The side lengths of 3 sides of the triangle constructed by each point group in the current point group set are respectively taken as t 2i Is set in the above table.
Then for t 2i Searching in octree_space by KNN searching algorithm to obtain a sum t 2i Nearest forward three-dimensional point coordinates S iK ={t 1j ,j=1,2…K}。
At S iK If distance is searched t2i-SiK Distance_thresh, fetch tri_pair i ={t 2i ,S ik }。
Step (3), traversing the tri_pair i For each tri_pair i The vertex is subjected to rigid transformation and SVD decomposition to obtain candidate_RT.
next_space*candidate_RT=possible_space
next_normal*candidate_RT=possible_normal
Matching first_space with porous_space, and matching first_normal with porous_normal to obtain n corresponding to each candidate_RT i And err i
Selecting n i Maximum and err i Minimum tri_pair i If the tri_pair i N of (2) i≥ 4 and err i < err_thresh, then consider the tri_pair i Matching is effective. According to the tri_pair i Is calculated as a coarse RT for the three pairs of vertices.
And (4) calculating all matching point pairs of next_space and first_space according to the rough RT.
And precisely calculating target_RT by using n pairs of vertexes in the points_pair as RT of the next frame and the mark point.
And (5) updating the first_space, the first_normal and the octree according to the obtained target_RT, wherein the current target_RT is taken as the RT_pre of the previous frame. From the first frame, the number of matches for each marker point is called matched_time, and these parameters, such as first_space, first_normal, tri_space, octree_space, are all denoted as the structure pre_patterns.
Fig. 5 is a flow chart of a method for matching mark points in another embodiment. The acquisition of image frames is started and parameters pre_pamas are acquired. When pre_pamas is not constructed, it is necessary to construct pre_pamas according to (1) above. When pre_pamas has been constructed successfully, a parameter set next_pamas of the current frame is constructed, including next_space and next_normal. When the next_pamas is successfully constructed, judging whether RT_pre exists, and executing the step (4) and the step (5) when the RT_pre exists; when rt_pre is not present, step (2), step (3), step (4) and step (5) are performed, and the cycle is repeated until the scanning is stopped.
In this embodiment, a triangle is used as a point, three sides are used as coordinates of the point, an octree structure is constructed, an accurate matching point is determined by using the triangle, and quick search and addition are performed by using the octree, so that the time complexity is greatly reduced while an accurate matching point pair is obtained, meanwhile, the optimal transformation relation is screened according to other test attributes, the actual test result is good, and no mismatching is generated.
The difference between the embodiment of the application and the existing triangle matching algorithm is that:
a. in the embodiment of the application, the triangle is regarded as a point, three sides of the triangle are used as three-dimensional coordinate values of the point, and in the subsequent processing, the three sides are important, so that the complexity is greatly reduced;
b. in the embodiment of the application, most of time complexity of the triangle is applied to space establishment of the first frame, and the triangle point space is only required to be updated in the follow-up process;
c. in the embodiment of the application, a triangle space is established by adopting an octree or voxel method, and the number of times of circulation is greatly reduced in the subsequent congruent judgment;
d. according to the embodiment of the application, when the triangle corresponding relation is detected, error correction is introduced, and the more effective triangle corresponding relation is obtained by combining the existing method for judging the number of the matching points;
e. In the embodiment of the application, scanning is divided into continuous frames and broken frame scanning, the continuous frames deduce the change relation of the current frame through the rotation translation matrix of the previous frames, and the broken frames obtain the change relation through the triangle matching detection algorithm in the embodiment of the application.
In one embodiment, a method for matching a marker point includes:
step (b 1), a forward mark point set in a forward frame is acquired.
Step (b 2), selecting three different forward mark points from the forward mark point set for multiple times to obtain a forward point set; the forward marker point set comprises a forward marker point coordinate set and a forward marker point normal vector set.
And (b 3) taking the side lengths of three sides of the triangle constructed by each point group in the forward point group set as the coordinate values of the forward three-dimensional points respectively to obtain a forward three-dimensional point coordinate set.
And (b 4) acquiring a current mark point set in the current frame.
And (b 5) selecting three different current mark points from the current mark point set for multiple times to obtain a current point set.
And (b 6) taking the side lengths of three sides of the triangle constructed by each point group in the current point group set as the coordinate values of the current three-dimensional point respectively to obtain the current three-dimensional point coordinate set.
And (b 7) storing each forward three-dimensional point coordinate according to a spatial index structure for the forward three-dimensional point coordinates in the forward three-dimensional point coordinate set. The forward three-dimensional point coordinates are stored at the spatial nodes.
And (b 8) determining a corresponding current spatial index according to the current three-dimensional point coordinates.
And (b 9) searching the corresponding forward three-dimensional point coordinates in the space nodes according to the current space index, and obtaining the target forward three-dimensional point coordinates corresponding to the current three-dimensional point coordinates.
And (b 10) matching the current three-dimensional point coordinate with the corresponding target forward three-dimensional point coordinate, and taking the successfully matched current three-dimensional point coordinate and the corresponding target forward three-dimensional point coordinate as a matched triangle pair.
And (b 11) for each matched triangle pair, determining a candidate transformation parameter corresponding to the matched triangle pair.
And (b 12) transforming the current mark point set according to the candidate transformation parameters to obtain a transformed current mark point set corresponding to the candidate transformation parameters. The transformed current marking point set comprises a transformed current marking point coordinate set and a transformed current marking point normal vector set.
And (b 13) matching the forward mark point coordinate set with the transformed current mark point coordinate set to obtain a coordinate matching result of each mark point pair.
And (b 14) matching the forward marker point normal vector set with the transformed current marker point normal vector set to obtain a normal vector matching result of each marker point pair.
And (b 15) taking the mark point pair with the matched coordinate matching result and the matched normal vector matching result as the matching point pair corresponding to the candidate transformation parameters.
Step (b 16), counting the number of the matching point pairs.
And (b 17) determining the maximum number of matching point pairs from the number of matching point pairs corresponding to each candidate transformation parameter.
And (b 18) when at least two maximum numbers exist, acquiring an error value of a matching point pair corresponding to each maximum number.
And (b 19) obtaining a matching point pair corresponding to the candidate transformation parameter with the minimum error value.
And (b 20) determining target transformation parameters according to the matching point pairs.
And (b 21) performing point cloud splicing according to the target transformation parameters.
And (b 22) obtaining a transformed current mark point set obtained by transforming according to the target transformation parameters.
And (b 23) updating the forward marker point set according to the transformed current marker point set to obtain an updated forward marker point set.
And (b 24) taking the updated forward mark point set as the forward mark point set in the forward frame.
And (b 25) obtaining a backward mark point set of the backward frame, taking the backward frame as the next current frame, taking the backward mark point set as the current mark point set, taking the target transformation parameter as the unique candidate transformation parameter, and returning to the step of matching the forward mark point set with the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter.
It should be understood that, although the steps in the flowcharts of fig. 2, 3 and 5 are shown in sequence as indicated by the arrows, and the steps in steps (a 1) to (a 5) and steps (b 1) to (b 25) are shown in sequence as indicated by the reference numerals, these steps are not necessarily performed in sequence as indicated by the arrows or numerals. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in fig. 2, 3, and 5 may include a plurality of steps or stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the execution of the steps or stages is not necessarily sequential, but may be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps thereof.
In one embodiment, as shown in fig. 6, a block diagram of a device for matching a marker in one embodiment is shown, where the block diagram includes a first obtaining module 602, a first selecting module 604, a forward three-dimensional point coordinate set obtaining module 606, a second obtaining module 608, a second selecting module 610, a current three-dimensional point coordinate set obtaining module 612, a space searching module 614, and a stitching module 616, where:
a first obtaining module 602, configured to obtain a set of forward marker points in a forward frame;
a first selecting module 604, configured to select three different forward marker points from the forward marker point set multiple times, to obtain a forward point group set;
the forward three-dimensional point coordinate set obtaining module 606 is configured to obtain a forward three-dimensional point coordinate set by using side lengths of three sides of a triangle constructed by each point group in the forward point group set as each coordinate value of a forward three-dimensional point;
a second obtaining module 608, configured to obtain a current set of marker points in the current frame;
a second selecting module 610, configured to select three different current marker points from the current marker point set multiple times, to obtain a current point set;
the current three-dimensional point coordinate set obtaining module 612 is configured to obtain a current three-dimensional point coordinate set by using the side lengths of three sides of the triangle constructed by each point group in the current point group set as each coordinate value of the current three-dimensional point;
The space searching module 614 is configured to perform space searching according to the forward three-dimensional point coordinate set and the current three-dimensional point coordinate set, so as to obtain a matched triangle pair;
and a stitching module 616, configured to perform point cloud stitching according to the matched triangle pair.
The matching device of the mark points selects different mark points from the mark point set for a plurality of times, takes the three-edge length of the constructed triangle as each coordinate value of the three-dimensional point, and performs space search based on the three-dimensional point, thereby obtaining matched triangle pairs and realizing point cloud splicing; the traditional triangle matching mode is to select C from the mark points of a graph n 3 A point C is selected from the mark points of the other graph m 3 The points need to be matched with C n 3 ×C m 3 The time complexity of the sub-triangle is high; the method and the device have the advantages that the principle that the three sides and the length correspond to the same triangle and are congruent is utilized, three sides of the triangle are changed into three points, so that the complicated triangle matching problem can be simplified in a space searching mode, the time complexity is reduced, more and effective triangle pairs can be reserved for matching, and the accuracy of point cloud splicing is improved.
In one embodiment, the spatial search module 614 is configured to store, for forward three-dimensional point coordinates in the forward three-dimensional point coordinate set, the forward three-dimensional point coordinates in a spatial index structure; the forward three-dimensional point coordinates are stored in the space nodes; determining a corresponding current spatial index according to the current three-dimensional point coordinates; searching corresponding forward three-dimensional point coordinates in the space nodes according to the current space index, and obtaining target forward three-dimensional point coordinates corresponding to the current three-dimensional point coordinates; and matching the current three-dimensional point coordinate with the corresponding target forward three-dimensional point coordinate, and taking the successfully matched current three-dimensional point coordinate and the corresponding target forward three-dimensional point coordinate as a matched triangle pair.
In this embodiment, the forward three-dimensional point coordinates are stored in the spatial nodes according to the spatial index structure, the corresponding spatial index is determined according to the current three-dimensional point coordinates, and the corresponding forward three-dimensional point coordinates are searched in the spatial nodes, so that matched triangle pairs are obtained, the matched triangle pairs can be quickly found by combining a fast spatial search algorithm, the cycle times are greatly reduced, and the time complexity is reduced.
In one embodiment, the stitching module 616 is configured to determine, for each matched triangle pair, a candidate transformation parameter corresponding to the matched triangle pair; transforming the current mark point set according to the candidate transformation parameters to obtain a transformed current mark point set corresponding to the candidate transformation parameters; matching the forward mark point set with the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter; determining target transformation parameters according to the mark point matching result; and performing point cloud splicing according to the target transformation parameters.
In this embodiment, since there may be many pairs of matched triangle pairs determined from the forward frame and the current frame, multiple candidate transformation parameters can be calculated based on the matched triangle pairs, and a best target transformation parameter needs to be obtained by screening the candidate transformation parameters; therefore, the current mark point set is transformed according to each candidate transformation parameter to obtain a transformed current mark point set corresponding to the candidate transformation parameter, the transformed current mark point set is matched with the forward mark point set, the target transformation parameter is determined according to the matching result, and the target transformation parameter with better matching can be selected from the transformed current mark point set, so that the accuracy of three-dimensional point cloud splicing is improved.
In one embodiment, the stitching module 616 is further configured to match the forward set of landmark points with the transformed current set of landmark points to obtain a matching point pair corresponding to the candidate transformation parameter; counting the number of matching point pairs; determining the maximum number of matching point pairs from the number of matching point pairs corresponding to each candidate transformation parameter; the target transformation parameters are determined from the maximum number of matching point pairs.
In this embodiment, the calculated candidate transformation parameters are not necessarily suitable for transformation of other marker points in the current frame through the matched triangle pairs, so that matching point pairs corresponding to the candidate transformation parameters are obtained by matching the forward marker point set with the transformed current marker point set, the number of the matching point pairs is counted, the number of the matching point pairs can reflect the accuracy of the candidate transformation parameters to a certain extent, and therefore, the target transformation parameters can be determined according to the maximum number of the matching point pairs, so that a better transformation parameter is determined, and the accuracy of point cloud splicing is improved.
In one embodiment, the stitching module 616 is further configured to obtain, when there are at least two maximum numbers, an error value of a matching point pair corresponding to each maximum number; and determining the target transformation parameters according to the candidate transformation parameters with the minimum error values.
In this embodiment, in the actual operation process, there may be the case that the maximum numbers are the same, so that it is necessary to obtain an error value of each matching point pair corresponding to the maximum number, determine the target transformation parameter according to the candidate transformation parameter with the minimum error value, and improve the accuracy of the target transformation parameter, thereby improving the accuracy of the point cloud stitching.
In one embodiment, the stitching module 616 is further configured to obtain a matching point pair corresponding to a candidate transformation parameter with a minimum error value; and determining target transformation parameters according to the matching point pairs.
In this embodiment, since the number of sample points for calculating the target transformation parameter is too small through the matched triangle pairs, the matching point pair corresponding to the candidate transformation parameter with the smallest error value is obtained, and the target transformation parameter is determined according to the matching point pair, so that more matching point pairs can be obtained, and a more accurate target transformation parameter is obtained.
In one embodiment, the set of forward marker points includes a set of forward marker point coordinates and a set of forward marker point normal vectors; the current marker point set comprises a current marker point coordinate set and a current marker point normal vector set. The stitching module 616 is further configured to match the forward set of landmark coordinates with the current set of landmark coordinates, to obtain a coordinate matching result of each landmark pair;
Matching the forward marker point normal vector set with the current marker point normal vector set to obtain a normal vector matching result of each marker point pair;
and taking the mark point pair with the matched coordinate matching result and the matched normal vector matching result as the matching point pair corresponding to the candidate transformation parameter.
In this embodiment, since the forward marker point coordinate sets are all marker points in the three-dimensional space, there are corresponding normal vectors, and by matching the two parameters of the forward marker point coordinates and the forward marker point normal vector, the marker point pair with matched coordinates and matched normal vector is obtained as the matching point pair, so that the accuracy of the target transformation parameters can be improved.
In one embodiment, the stitching module 616 is further configured to obtain a transformed current set of landmark points obtained by transforming according to the target transformation parameter;
updating the forward mark point set according to the transformed current mark point set to obtain an updated forward mark point set;
taking the updated forward mark point set as a forward mark point set in a forward frame;
a backward mark point set of a backward frame is obtained, the backward frame is taken as the next current frame, the backward mark point set is taken as the current mark point set, and the target transformation parameter is taken as the unique candidate transformation parameter; and the return execution is carried out to match the forward mark point set with the transformed current mark point set, so as to obtain a mark point matching result corresponding to the candidate transformation parameter.
In this embodiment, after the target transformation parameters between the forward frame and the current frame are calculated, the target transformation parameters can be used to calculate the target transformation parameters between the next frame and the current frame, that is, the transformation relationship of the current frame can be deduced through the target transformation relationship of the previous frames, triangle matching can be omitted, time spent for point cloud splicing is greatly reduced, and point cloud splicing efficiency is improved.
In one embodiment, the stitching module 616 is further configured to, when the difference in frame number between the backward frame and the current frame is less than or equal to a frame number threshold, take the backward frame as a next current frame, take a backward landmark set as a current landmark set, take a target transformation parameter as a unique candidate transformation parameter, and return to perform matching between the forward landmark set and the transformed current landmark set to obtain a landmark matching result corresponding to the candidate transformation parameter; when the frame number difference between the backward frame and the current frame is larger than the frame number threshold, a backward mark point set of the backward frame is obtained, the backward frame is taken as the next current frame, the backward mark point is taken as the current mark point set, three different forward mark points are selected for multiple times from the forward mark point set, a forward point set is obtained, and three different current mark points are selected for multiple times from the current mark point set, so that a current point set is obtained.
In this embodiment, when the difference of the frame numbers between the backward frame and the current frame is smaller, the description time difference is shorter, so the derivation of the transformation relationship of the current frame can be performed through the target transformation relationship of the previous frames, thereby saving time; when the frame number difference between the backward frame and the current frame is larger, the matched triangle needs to be recalculated, so that the point cloud splicing is more accurately carried out.
In one embodiment, the device for matching the mark points further comprises an error point deleting module, wherein the error point deleting module is used for acquiring the matching times of each mark point in the preset number of image frames; and deleting the mark points with the matching times smaller than the preset times from each image frame when the matching times are smaller than the preset times.
In this embodiment, the description of the marker point with the small matching frequency may be an error point, so that the marker point is deleted from the image frame, that is, the matching frequency of the coordinates of the subsequent three-dimensional point can be reduced, and the point cloud splicing efficiency is improved.
For specific definition of the matching means of the marker points, reference may be made to the definition of the matching method of the marker points hereinabove, and the description thereof will not be repeated here. The above-mentioned respective modules in the matching means of the marker points may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal device, and the internal structure thereof may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method for testing connectivity of pins of a chip. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described embodiments of the method of matching marker points when the computer program is executed.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the above-described embodiments of the method of matching marker points.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the computer device to perform the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a non-transitory computer readable storage medium, which when executed may comprise the steps of the above described embodiments of the methods. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile asperities may include random access memory (Ramdom Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and drawings of the present invention or directly or indirectly applied to other related technical fields are included in the scope of the invention.

Claims (11)

1. A method for matching marker points, the method comprising:
acquiring a forward mark point set in a forward frame;
selecting three different forward mark points from the forward mark point set for multiple times to obtain a forward point group set;
the side lengths of three sides of the triangle constructed by each point group in the forward point group set are respectively used as each coordinate value of the forward three-dimensional point to obtain a forward three-dimensional point coordinate set;
acquiring a current mark point set in a current frame;
selecting three different current mark points from the current mark point set for multiple times to obtain a current point set;
the side lengths of three sides of the triangle constructed by each point group in the current point group set are respectively used as coordinate values of the current three-dimensional point to obtain a current three-dimensional point coordinate set;
performing space search according to the forward three-dimensional point coordinate set and the current three-dimensional point coordinate set to obtain matched triangle pairs;
and performing point cloud splicing according to the matched triangle pairs.
2. The method of claim 1, wherein the performing a spatial search based on the forward three-dimensional point coordinates and the current three-dimensional point coordinates to obtain matched triangle pairs comprises:
For the forward three-dimensional point coordinates in the forward three-dimensional point coordinate set, storing each forward three-dimensional point coordinate according to a spatial index structure; the forward three-dimensional point coordinates are stored in space nodes;
determining a corresponding current spatial index according to the current three-dimensional point coordinates;
searching corresponding forward three-dimensional point coordinates in the space nodes according to the current space index, and obtaining target forward three-dimensional point coordinates corresponding to the current three-dimensional point coordinates;
and matching the current three-dimensional point coordinate with the corresponding target forward three-dimensional point coordinate, and taking the successfully matched current three-dimensional point coordinate and the corresponding target forward three-dimensional point coordinate as a matched triangle pair.
3. The method of claim 1, wherein the performing point cloud stitching according to the matched triangle pairs comprises:
for each matched triangle pair, determining a candidate transformation parameter corresponding to the matched triangle pair;
transforming the current mark point set according to the candidate transformation parameters to obtain a transformed current mark point set corresponding to the candidate transformation parameters;
matching the forward mark point set with the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter;
Determining target transformation parameters according to the mark point matching results corresponding to the candidate transformation parameters;
and performing point cloud splicing according to the target transformation parameters.
4. The method of claim 3, wherein the matching the forward set of landmark points with the transformed current set of landmark points to obtain the landmark matching result corresponding to the candidate transformation parameter comprises:
matching the forward mark point set with the transformed current mark point set to obtain a matching point pair corresponding to the candidate transformation parameter;
counting the number of the matching point pairs;
the determining the target transformation parameters according to the marking point matching results corresponding to the candidate transformation parameters comprises the following steps:
determining the maximum number of matching point pairs from the number of matching point pairs corresponding to each candidate transformation parameter;
the target transformation parameters are determined from the maximum number of matching point pairs.
5. The method of claim 4, wherein determining the target transformation parameters from the maximum number of matching point pairs comprises:
when at least two maximum numbers exist, acquiring an error value of a matching point pair corresponding to each maximum number;
And determining the target transformation parameters according to the candidate transformation parameters with the minimum error values.
6. The method of claim 5, wherein determining the target transformation parameter based on the candidate transformation parameter having the smallest error value comprises:
obtaining a matching point pair corresponding to the candidate transformation parameter with the minimum error value;
and determining target transformation parameters according to the matching point pairs.
7. The method of claim 4, wherein the set of forward marker points comprises a set of forward marker point coordinates and a set of forward marker point normal vectors; the transformed current marking point set comprises a transformed current marking point coordinate set and a transformed current marking point normal vector set;
the step of matching the forward mark point set with the transformed current mark point set to obtain a matching point pair corresponding to the candidate transformation parameter comprises the following steps:
matching the forward mark point coordinate set with the transformed current mark point coordinate set to obtain a coordinate matching result of each mark point pair;
matching the forward marker point normal vector set with the transformed current marker point normal vector set to obtain a normal vector matching result of each marker point pair;
And taking the mark point pair with the matched coordinate matching result and the matched normal vector matching result as the matching point pair corresponding to the candidate transformation parameter.
8. A method according to claim 3, wherein after said point cloud stitching according to said target transformation parameters, the method further comprises:
obtaining a transformed current mark point set obtained by transforming according to the target transformation parameters;
updating the forward marker point set according to the transformed current marker point set to obtain an updated forward marker point set;
taking the updated forward mark point set as a forward mark point set in a forward frame;
and obtaining a backward mark point set of a backward frame, taking the backward frame as a next current frame, taking the backward mark point set as a current mark point set, taking the target transformation parameter as a unique candidate transformation parameter, and returning to execute the step of matching the forward mark point set with the transformed current mark point set to obtain a mark point matching result corresponding to the candidate transformation parameter.
9. A device for matching marker points, the device comprising:
The first acquisition module is used for acquiring a forward mark point set in a forward frame;
the first selecting module is used for selecting three different forward mark points from the forward mark point set for multiple times to obtain a forward point group set;
the forward three-dimensional point coordinate set acquisition module is used for respectively taking the side lengths of three sides of the triangle constructed by each point group in the forward point group set as each coordinate value of the forward three-dimensional point to acquire a forward three-dimensional point coordinate set;
the second acquisition module is used for acquiring a current mark point set in the current frame;
the second selecting module is used for selecting three different current mark points from the current mark point set for multiple times to obtain a current point set;
the current three-dimensional point coordinate set acquisition module is used for respectively taking the side lengths of three sides of the triangle constructed by each point group in the current point group set as each coordinate value of the current three-dimensional point to acquire the current three-dimensional point coordinate set;
the space searching module is used for carrying out space searching according to the forward three-dimensional point coordinate set and the current three-dimensional point coordinate set to obtain matched triangle pairs;
and the splicing module is used for carrying out point cloud splicing according to the matched triangle pairs.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
CN202110584315.5A 2021-05-27 2021-05-27 Mark point matching method, device, computer equipment and storage medium Active CN113223078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110584315.5A CN113223078B (en) 2021-05-27 2021-05-27 Mark point matching method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110584315.5A CN113223078B (en) 2021-05-27 2021-05-27 Mark point matching method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113223078A CN113223078A (en) 2021-08-06
CN113223078B true CN113223078B (en) 2024-04-16

Family

ID=77098758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110584315.5A Active CN113223078B (en) 2021-05-27 2021-05-27 Mark point matching method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113223078B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113592721B (en) * 2021-09-27 2021-12-17 天远三维(天津)科技有限公司 Photogrammetry method, apparatus, device and storage medium
CN113642681B (en) * 2021-10-13 2022-01-04 中国空气动力研究与发展中心低速空气动力研究所 Matching method of aircraft model surface mark points
CN114777668B (en) * 2022-04-12 2024-01-16 新拓三维技术(深圳)有限公司 Desktop type bent pipe measuring method and device
CN114593738B (en) * 2022-05-09 2022-07-26 山东大学 Robot global positioning method and system based on octree search reflective column

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996387A (en) * 2006-08-14 2007-07-11 东南大学 Mark point matching method for point-cloud registration in 3D scanning system
CN104406538A (en) * 2014-12-01 2015-03-11 南京航空航天大学 Three-dimensional mark point matching method for point cloud registration and three-dimensional scanning method
CN106228603A (en) * 2016-07-25 2016-12-14 武汉中观自动化科技有限公司 A kind of three-dimensional model reconfiguration system and method based on Euclidean distance statistics splicing
CN110322464A (en) * 2019-06-30 2019-10-11 华中科技大学 A kind of small curvature thin-walled parts boundary extraction method based on three-dimensional point cloud
CN111932565A (en) * 2019-05-13 2020-11-13 中国科学院沈阳自动化研究所 Multi-target identification tracking resolving method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7215810B2 (en) * 2003-07-23 2007-05-08 Orametrix, Inc. Method for creating single 3D surface model from a point cloud

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996387A (en) * 2006-08-14 2007-07-11 东南大学 Mark point matching method for point-cloud registration in 3D scanning system
CN104406538A (en) * 2014-12-01 2015-03-11 南京航空航天大学 Three-dimensional mark point matching method for point cloud registration and three-dimensional scanning method
CN106228603A (en) * 2016-07-25 2016-12-14 武汉中观自动化科技有限公司 A kind of three-dimensional model reconfiguration system and method based on Euclidean distance statistics splicing
CN111932565A (en) * 2019-05-13 2020-11-13 中国科学院沈阳自动化研究所 Multi-target identification tracking resolving method
CN110322464A (en) * 2019-06-30 2019-10-11 华中科技大学 A kind of small curvature thin-walled parts boundary extraction method based on three-dimensional point cloud

Also Published As

Publication number Publication date
CN113223078A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
CN113223078B (en) Mark point matching method, device, computer equipment and storage medium
Zhang et al. Reference pose generation for long-term visual localization via learned features and view synthesis
CN108537876B (en) Three-dimensional reconstruction method, device, equipment and storage medium
CN107749079B (en) Point cloud quality evaluation and track planning method for unmanned aerial vehicle scanning reconstruction
WO2022121640A1 (en) Robot relocalization method and apparatus, and robot and readable storage medium
JP7300550B2 (en) METHOD AND APPARATUS FOR CONSTRUCTING SIGNS MAP BASED ON VISUAL SIGNS
WO2018009473A1 (en) Motion capture and character synthesis
CN110648363A (en) Camera posture determining method and device, storage medium and electronic equipment
JP2014096152A (en) Backfilling points in point cloud
EP3326156B1 (en) Consistent tessellation via topology-aware surface tracking
US20190122429A1 (en) Method and device for three-dimensional modeling
Bellavia SIFT matching by context exposed
TW201344633A (en) System and method for measuring curved surfaces of objects
CN114427866A (en) Path planning method, electronic device and storage medium
JP2005228150A (en) Image verification device
JP2019105992A (en) Image processing device, image processing program and image processing method
Tushev et al. Parallel algorithms for effective correspondence problem solution in computer vision
KR20150002157A (en) Content-based 3d model retrieval method using a single depth image, 3d model retrieval server for performing the methods and computer readable recording medium thereof
CN116295031B (en) Sag measurement method, sag measurement device, computer equipment and storage medium
CN104615614B (en) The method for obtaining scalable global characteristics description
CN116824068B (en) Real-time reconstruction method, device and equipment for point cloud stream in complex dynamic scene
JP2019070898A (en) Estimation program, estimation device and estimation method
CN111461136B (en) Data processing method, device, system and computer readable storage medium
US20230401670A1 (en) Multi-scale autoencoder generation method, electronic device and readable storage medium
JP2016091391A (en) Correspondence point search device, correspondence point search program and correspondence point search method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant