A projection-based 3D point cloud splicing method and computer device
By using a projection-based 3D point cloud stitching method, which utilizes AABB bounding boxes to detect and fuse vertices in overlapping regions, the problem of point cloud data redundancy in traditional methods is solved, and efficient point cloud stitching is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2026-03-20
AI Technical Summary
Traditional 3D point cloud stitching methods suffer from redundant point cloud data due to viewpoint limitations and overlapping fields of view, making it impossible to efficiently acquire complete point cloud data.
A projection-based 3D point cloud stitching method is adopted. Overlapping regions are detected by using AABB bounding boxes, an index set of overlapping point pairs is constructed, and vertex fusion is performed to reduce overlapping vertices and improve stitching speed.
It enables rapid detection of overlapping areas in point clouds, reduces residual overlapping vertices in the stitched point cloud, and improves the speed and efficiency of point cloud stitching.
Smart Images

Figure CN118941444B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image data processing, and more particularly, to a projection-based 3D point cloud splicing method, a computer device, and a computer readable storage medium. BACKGROUND
[0002] With the wide application of machine vision in various industries, there is an increasing demand for large-format high-precision positioning, measurement, and scene splicing. Traditional three-dimensional scanning devices can only obtain point cloud data within a certain range due to their limited viewing angle, and cannot obtain complete point cloud data for test objects exceeding their range.
[0003] To solve this problem, there are currently two methods for 3D point cloud splicing: one is to use a multi-camera vision system to obtain multiple sets of point cloud data, and then rotate and translate the multiple sets of point cloud data to a unified coordinate system to form complete target point cloud data; the other is to use a scanning device to take multiple photos at different angles, and then rotate and translate the multiple sets of point cloud data to a unified coordinate system.
[0004] Both methods can obtain complete target point cloud data, but the obtained point cloud data is excessively redundant due to the overlapping of the photo fields of view. SUMMARY
[0005] To solve the above problems, the present application provides a projection-based 3D point cloud splicing method, a computer device, a computer readable storage medium, and a computer program product, which will improve the speed of point cloud splicing and greatly reduce the residual overlapping vertices after splicing.
[0006] To achieve the above purpose, according to the first aspect of the present application, a projection-based 3D point cloud splicing method is provided, which comprises:
[0007] obtaining a source point cloud and a target point cloud;
[0008] performing straight-through filtering on the source point cloud and the target point cloud to obtain filtered source point cloud and target point cloud;
[0009] detecting the overlapping region of the filtered source point cloud and the target point cloud, projecting the vertices of the filtered source point cloud and the target point cloud falling into the bounding box of the overlapping region onto the xoy plane, and constructing an overlapping point pair index set;
[0010] fusing the overlapping vertices in the filtered source point cloud and the target point cloud according to the overlapping point pair index set;
[0011] splicing the source point cloud after vertex fusion to the target point cloud after vertex fusion.
[0012] Further, the vertices of the filtered source point cloud and the filtered target point cloud falling into the bounding box of the overlap region are projected onto the xoy plane, and an overlap point pair index set is constructed, including calculating the bounding box of the overlap region according to the minimum point coordinates and the maximum point coordinates of the bounding box of the filtered source point cloud, and the minimum point coordinates and the maximum point coordinates of the bounding box of the filtered target point cloud; the vertices of the filtered source point cloud and the filtered target point cloud falling into the bounding box of the overlap region are projected onto the xoy plane, and the overlap point pair index set is constructed.
[0013] Further, the vertices of the filtered source point cloud and the filtered target point cloud falling into the bounding box of the overlap region are projected onto the xoy plane, and an overlap point pair index set is constructed, including respectively detecting the vertices of the filtered source point cloud and the filtered target point cloud falling into the bounding box of the overlap region, and recording the sequence numbers of the vertices as a source vertex set and a target vertex set respectively; the vertices of the filtered target point cloud falling into the bounding box of the overlap region are projected onto the xoy plane, a target overlap region point cloud is constructed, and a kd-tree search tree is constructed based on the target overlap region point cloud; a set of overlap point pairs is obtained through the source vertex set and the kd-tree search tree; the overlap point pair index set is constructed according to the correspondence between the sequence numbers of the vertices in the target overlap region point cloud and the sequence numbers of the vertices in the target vertex set, and the overlap point pairs.
[0014] Further, the vertices of the filtered target point cloud falling into the bounding box of the overlap region are projected onto the xoy plane, a target overlap region point cloud is constructed, and a kd-tree search tree is constructed based on the target overlap region point cloud, including projecting the vertices of the filtered target point cloud falling into the bounding box of the overlap region onto the xoy plane, constructing the target overlap region point cloud, and recording the correspondence between the sequence numbers of the vertices in the target overlap region point cloud and the sequence numbers of the vertices in the target vertex set; the kd-tree search tree is constructed according to the target overlap region point cloud.
[0015] Further, a set of overlap point pairs is obtained through the source vertex set and the kd-tree search tree, including traversing the vertices of the filtered source point cloud belonging to the source vertex set, and projecting the vertices of the filtered source point cloud belonging to the source vertex set onto the xoy plane; the nearest point between the projection points of the vertices of the filtered source point cloud belonging to the source vertex set on the xoy plane and the vertices of the target overlap region point cloud is found through the kd-tree search tree, and is recorded as the nearest point; if the distance is less than a set distance threshold, the nearest point and the sequence number of the corresponding vertices of the filtered source point cloud belonging to the source vertex set are recorded, and a set of overlap point pairs is obtained.
[0016] Further, the overlapping region of the filtered source point cloud and the filtered target point cloud is detected, including detecting the bounding box of the filtered source point cloud and the bounding box of the filtered target point cloud; the intersection of the bounding box of the filtered source point cloud and the bounding box of the filtered target point cloud is detected, if the two bounding boxes intersect, it is determined that the filtered source point cloud and the filtered target point cloud have an overlapping region.
[0017] Further, the overlapping vertices in the filtered source point cloud and the filtered target point cloud are fused according to the overlapping point pair index set, including taking the vertex of the filtered source point cloud falling into the bounding box of the overlapping region as a first vertex, taking the vertex of the filtered target point cloud falling into the bounding box of the overlapping region as a second vertex, the sequence number of the first vertex and the second vertex belonging to a pair of overlapping point pairs in the overlapping point pair index set; the coordinate value of the fused vertex is calculated according to the coordinate value of the first vertex and the coordinate value of the second vertex; the coordinate value of the first vertex and the coordinate value of the second vertex are replaced by the coordinate value of the fused vertex, and the source point cloud and the target point cloud after vertex fusion are obtained.
[0018] Further, the source point cloud after vertex fusion is spliced to the target point cloud after vertex fusion to obtain a spliced point cloud, including traversing each vertex in the source point cloud after vertex fusion, if the index of the vertex belongs to the overlapping point pair index set, no processing is performed; otherwise, the vertex is added to the sequence number set of the vertex of the filtered target point cloud falling into the bounding box of the overlapping region, and the spliced point cloud is obtained.
[0019] According to the second aspect of the present application, a computer device is also provided, which includes a memory, a processor and a computer program stored in the memory, the processor executes the computer program to realize the steps of any one of the above methods.
[0020] According to the third aspect of the present application, a computer readable storage medium is also provided, which stores a computer program, the computer program is executed by a processor to realize the steps of any one of the above methods.
[0021] According to the fourth aspect of the present application, a computer program product is also provided, which includes a computer program, the computer program is executed by a processor to realize the steps of any one of the above methods.
[0022] Overall, compared with the prior art, the above technical solutions conceived by the present application can achieve the following beneficial effects:
[0023] The application provides a projection-based 3D point cloud splicing method, which can quickly detect the overlapping area of source point cloud and target point cloud through an AABB bounding box; projects the vertices of the filtered source point cloud and target point cloud falling into the bounding box in the overlapping area to an xoy plane, and constructs an overlapping point pair index set, thereby overcoming the influence of the z-direction accuracy of the point cloud itself and improving the speed of point cloud splicing; fuses the overlapping vertices in the filtered source point cloud and target point cloud according to the overlapping point pair index set, splices the source point cloud after vertex fusion to the target point cloud after vertex fusion, and obtains the spliced point cloud, thereby improving the speed of point cloud splicing and realizing the deduplication of the overlapping vertices in the overlapping area of the point cloud, and the residual overlapping vertices in the spliced point cloud are greatly reduced. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0025] Figure 1 A flowchart of a projection-based 3D point cloud splicing method provided by the embodiments of the present application is shown in the figure.
[0026] Figure 2 A flowchart of the step of constructing an overlapping point pair index set provided by the embodiments of the present application is shown in the figure.
[0027] Figure 3 A schematic diagram of the bounding box of the overlapping area provided by the embodiments of the present application is shown in the figure.
[0028] Figure 4 An effect diagram of the projection-based 3D point cloud splicing method provided by the embodiments of the present application is shown in the figure.
[0029] Figure 5 A comparison diagram of the effect of the traditional point cloud splicing method and the effect of the projection-based 3D point cloud splicing method provided by the embodiments of the present application is shown in the figure.
[0030] Figure 6 An internal structure diagram of a computer device provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0032] The terms "first", "second", "third", and the like in the description and claims of the present application and above figures are used for distinguishing between similar objects, not necessarily for describing a specific sequential or chronological order. The terms "comprises", "comprising", "includes", "including" and the like are to be construed open- ended, meaning that they include the listed steps or elements, but not excluding other steps or elements. For example, a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to only those steps or elements, but can include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
[0033] As shown in Figure 1 , a projection-based 3D point cloud stitching method is provided, which can be executed by a terminal or a server in communication with the terminal through a network. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, etc. The server can be a stand-alone server or a server cluster composed of multiple servers. Taking the method applied to the terminal as an example, the following steps are included:
[0034] Step S1, obtaining a source point cloud and a target point cloud.
[0035] The source point cloud and the target point cloud are both 3D point clouds, each including a plurality of vertices.
[0036] Exemplarily, the terminal obtains a source point cloud C src and a target point cloud C dest under the same coordinate system through a 3D scanning device.
[0037] Step S2, performing straight-through filtering on the source point cloud and the target point cloud to obtain filtered source point cloud and target point cloud.
[0038] Exemplarily, the terminal performs straight-through filtering on the source point cloud C src and the target point cloud C dest to remove background point clouds. The filtering axis is set to z direction, and the threshold range is set to (z min , z max ). Points with z coordinates not falling within the threshold range are cropped, and points with z coordinates falling within the threshold range are retained, to obtain filtered point clouds. The filtered source point cloud is denoted as B src , and the filtered target point cloud is denoted as B dest .
[0039] Step S3, detecting the overlapping area of the filtered source point cloud and the target point cloud, projecting the vertices of the filtered source point cloud and the target point cloud falling within the bounding box of the overlapping area into the xoy plane, and constructing an overlapping point pair index set.
[0040] The bounding box of the overlapping region is an AABB bounding box of the overlapping region.
[0041] Exemplarily, the terminal detects the filtered source point cloud B src and the target point cloud B dest whether there is an overlapping region, in the case of detecting that there is an overlapping region, determining a bounding box of the overlapping region; projecting the vertices of the filtered source point cloud and the target point cloud falling into the bounding box of the overlapping region to the xoy plane, and constructing an overlapping point pair index set O I .
[0042] Step S4, according to the overlapping point pair index set, fusing the overlapping vertices in the filtered source point cloud and the target point cloud.
[0043] Step S5, splicing the vertex fused source point cloud to the vertex fused target point cloud.
[0044] In the above projection-based 3D point cloud splicing method, the overlapping region of the source point cloud and the target point cloud can be quickly detected through the AABB bounding box; the vertices of the filtered source point cloud and the target point cloud falling into the bounding box of the overlapping region are projected to the xoy plane, and the overlapping point pair index set is constructed, which overcomes the influence of the z-direction accuracy of the point cloud itself and also improves the speed of point cloud splicing; according to the overlapping point pair index set, the overlapping vertices in the filtered source point cloud and the target point cloud are fused, and the vertex fused source point cloud is spliced to the vertex fused target point cloud to obtain the spliced point cloud, which improves the speed of point cloud splicing and realizes the de-duplication of the overlapping vertices in the overlapping region of the point cloud, reducing the residual overlapping vertices in the spliced point cloud.
[0045] In one embodiment, as shown in Figure 2 the above step S3 of detecting the overlapping region of the filtered source point cloud and the target point cloud, projecting the vertices of the filtered source point cloud and the target point cloud falling into the bounding box of the overlapping region to the xoy plane, and constructing the overlapping point pair index set, comprises:
[0046] Step S301, detecting the bounding box of the filtered source point cloud and the bounding box of the filtered target point cloud.
[0047] The bounding box of the filtered source point cloud is an AABB bounding box of the filtered source point cloud, and the bounding box of the filtered target point cloud is an AABB bounding box of the filtered target point cloud.
[0048] Exemplarily, the terminal detects the bounding box S src of the filtered source point cloud B src and the bounding box S dest of the filtered target point cloud B dest , records the minimum point coordinates of the bounding box S src . Maximum point coordinates and enclosed box S dest minimum point coordinates Maximum point coordinates
[0049] Step S302: Perform intersection detection on the bounding boxes of the filtered source point cloud and the filtered target point cloud. If the two bounding boxes intersect, it is determined that there is an overlapping region between the filtered source point cloud and the target point cloud.
[0050] For example, the terminal enclosure S src and enclosed box S dest Perform an intersection test; if the center distance d between the two bounding boxes is... c In a certain coordinate axis direction, less than the sum of the radii of the two bounding boxes, d. R This determines the intersection of the two bounding boxes, thus determining the filtered source point cloud B. src and target point cloud B dest There are overlapping regions.
[0051] The following explains the bounding box S. src and enclosed box S dest The calculation steps for performing intersection detection.
[0052] Step S30201: Calculate the bounding box S respectively. src and enclosed box S dest Center coordinates:
[0053]
[0054] Step S30202: Calculate the bounding box S respectively. src and enclosed box S dest radius:
[0055]
[0056] Step S30203, calculate the bounding box S src and enclosed box S dest center distance d c :
[0057]
[0058] Step S30204, calculate the bounding box S src and enclosed box S dest The sum of radii d R :
[0059]
[0060] Step S30205, if dc Less than d in a certain coordinate axis direction R Then it is determined that the two bounding boxes intersect, i.e., B. src and B dest If there is an overlapping area, continue to step S303; otherwise, determine that the two bounding boxes do not intersect and proceed to step S5.
[0061] In this embodiment, by detecting the bounding boxes of the filtered source point cloud and the filtered target point cloud, and performing intersection detection on these two bounding boxes, the overlapping region of the filtered source point cloud and target point cloud is quickly detected.
[0062] Step S303: Calculate the bounding box of the overlapping region based on the minimum and maximum point coordinates of the bounding box of the filtered source point cloud and the minimum and maximum point coordinates of the bounding box of the filtered target point cloud.
[0063] For example, step S303 includes step S30301, determining the minimum value of the bounding box of the overlapping region, that is, determining the bounding box S. src minimum point coordinates and enclosed box S dest minimum point coordinates The larger value of the x, y, z coordinates is denoted as Step S30302: Determine the maximum value of the bounding box of the overlapping region, that is, determine the bounding box S. src Maximum point coordinates and enclosed box S dest Maximum point coordinates The smaller value in the x, y, z coordinates is denoted as Step S30303: Set the threshold γ and determine the threshold value. and The bounding box of the overlapping region of the vertices can be used to divide B. src and B dest The overlapping area. For example... Figure 3 As shown, the AABB bounding box of the overlapping area is the square marked by the purple frame in the figure, and Figure 3 The left side shows the original AABB bounding box of the overlapping area, and the right side shows the magnified AABB bounding box of the overlapping area.
[0064] Step S304: Project the vertices of the filtered source point cloud and target point cloud that fall within the bounding box of the overlapping region onto the xoy plane, and construct the overlapping point pair index set.
[0065] In one embodiment, step S304 above, which projects the vertices of the filtered source point cloud and target point cloud that fall within the bounding box of the overlapping region onto the xoy plane and constructs an overlapping point pair index set, includes the following steps:
[0066] Step S30401, respectively detecting the filtered source point cloud B src and the filtered target point cloud B dest falling into the bounding box of the overlapping region, and recording the serial numbers (referred to as ids) of the vertices, and recording the set of vertex ids as the source vertex set and the target vertex set
[0067] Step S30402, projecting the vertices of the filtered target point cloud B dest falling into the bounding box of the overlapping region to the xoy plane, constructing a target overlapping region point cloud, and constructing a kd-tree search tree based on the target overlapping region point cloud.
[0068] Exemplarily, step S30402 includes step S3040201, taking out the vertices corresponding to the vertex ids in the target vertex set and projecting them to the xoy plane (that is, projecting the vertices of the filtered target point cloud B dest falling into the bounding box of the overlapping region to the xoy plane), that is, taking the z coordinate of the vertex as 0, and constructing a target overlapping region point cloud recorded the correspondence between the vertex ids in the target vertex set and the vertex ids in the target vertex set Step S3040202, constructing a kd-tree search tree according to the target overlapping region point cloud .
[0069] Step S30403, setting a distance threshold λ, traversing the vertices in B src belonging to the source vertex set (or referred to as the vertices of the filtered source point cloud B src falling into the bounding box of the overlapping region) projecting the vertex to the xoy plane (that is, projecting the vertices of the filtered source point cloud B src falling into the bounding box of the overlapping region to the xoy plane), that is, taking the z coordinate of the vertex as 0; finding the point in the target overlapping region point cloud closest (referred to as the shortest distance d) to the projection point of the vertex in the xoy plane through the kd-tree search tree, and recording the point as the closest point If the shortest distance d < λ, record the closest point and the serial number of the vertex of the filtered source point cloud B src falling into the bounding box of the overlapping region, and the two serial numbers constitute a set of overlapping point pairs
[0070] according to and Obtain the filtered source point cloud B src and target point cloud B dest All overlapping points All overlapping point pairs constitute the overlapping point pair index set O I .
[0071] In one embodiment, step S4 above, which involves fusing overlapping vertices in the filtered source point cloud and target point cloud based on the overlapping point pair index set, includes:
[0072] Step S401: The vertices of the source point cloud that fall into the bounding box of the overlapping region are taken as the first vertex, and the vertices of the target point cloud that fall into the bounding box of the overlapping region are taken as the second vertex. The sequence numbers of the first vertex and the second vertex belong to a pair of overlapping point pairs in the overlapping point pair index set. The coordinate values of the fused vertex are calculated based on the coordinate values of the first vertex and the second vertex.
[0073] For example, the coordinates of the merged vertex are calculated based on the coordinates of the first vertex and the second vertex. This can be done by calculating a weighted average or arithmetic mean of the coordinates of the first vertex and the second vertex, and using the weighted average or arithmetic mean as the coordinates of the merged vertex.
[0074] In other embodiments, step S401 may also involve obtaining several vertices in the neighborhood of the overlapping point pair, calculating a weighted average or arithmetic average based on the several vertices, and using the weighted average or arithmetic average as the coordinate value of the fused vertex.
[0075] The following example illustrates the specific steps for calculating the coordinates of the merged vertex, using the arithmetic mean of the coordinates of the first and second vertices as the coordinates of the merged vertex.
[0076] Calculate the coordinates of the merged vertices using the following formula.
[0077]
[0078] in, and For the index of a pair of overlapping vertices, Source point cloud B after filtering src The middle belongs to the source vertex set Vertex (filtered source point cloud B) src The coordinates of the vertex that falls within the bounding box of the overlapping region (i.e., the first vertex). The filtered target point cloud Bdest The vertex (the filtered target point cloud B belongs to the target vertex set dest The coordinate value of the vertex (the second vertex) falling into the bounding box of the overlapping region.
[0079] Step S402, the coordinate value of the first vertex and the coordinate value of the second vertex are replaced by the coordinate value of the fused vertex, and the source point cloud and the target point cloud after vertex fusion are obtained, that is:
[0080] In one embodiment, the above step S5, the source point cloud after vertex fusion is spliced to the target point cloud after vertex fusion, to obtain the spliced point cloud, comprising the following steps:
[0081] Step S501, each vertex v src in the source point cloud B i after vertex fusion is traversed, if the index i of the vertex v i belongs to the overlapping point pair index set O I (i.e. satisfies i∈O I ), no processing is performed; otherwise, step S502 is executed;
[0082] Step S502, if the index i of the vertex v i does not belong to the overlapping point pair index set O I (i.e. satisfies ), the vertex v i is added to the target vertex set to obtain the spliced point cloud as shown in Figure 4 .
[0083] Figure 5 The comparison chart of the effect of the traditional point cloud splicing method and the effect of the projection-based 3D point cloud splicing method provided by the embodiment of the application. In one embodiment, two groups of point clouds to be spliced are provided, the number of vertices of the source point cloud C src is 1518487, the number of vertices of the target point cloud C dest is 2279614, the source point cloud C src and the target point cloud C dest are searched for overlapping point pairs based on three-dimensional coordinates as a whole and spliced, to obtain the splicing effect shown on the left of Figure 5 , and the total time is 2.2s. The source point cloud C src and the target point cloud C dest are spliced based on the projection-based 3D point cloud splicing method provided by the embodiment, to obtain the splicing effect shown on the right of Figure 5 , and the total time is 0.38s. It can be seen that, compared with the traditional point cloud splicing method, the splicing speed of the method is improved by nearly 6 times, and the efficiency is improved significantly.
[0084] This application also provides a computer device, the internal structure diagram of which can be shown as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a projection-based 3D point cloud stitching method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0085] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0086] like Figure 6 As shown, this application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps in the above-described method embodiments.
[0087] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0088] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.
[0089] It should be noted that, for the above-mentioned method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the application is not limited to the action sequence described, because according to the application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the application.
[0090] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0091] The above is only exemplary embodiments of the present disclosure, which cannot limit the scope of the present disclosure. Any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will easily think of the embodiments of the present disclosure after considering the specification and practicing the disclosure herein. The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or conventional technical means in the art not described in the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
[0092] The technical features of the above embodiments can be combined in any way, and in order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present disclosure.
[0093] Those skilled in the art can easily understand that the above only describes the preferred embodiments of the present application and is not intended to limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A 3D point cloud stitching method based on projection, characterized in that, include: Obtain the source point cloud and the target point cloud; The source point cloud and the target point cloud are subjected to a pass-through filter to obtain the filtered source point cloud and target point cloud, wherein the filtering axis of the pass-through filter is the z-direction; The overlapping region of the filtered source point cloud and target point cloud is detected, and the vertices of the filtered source point cloud and target point cloud that fall within the bounding box of the overlapping region are projected onto the xoy plane, and an overlapping point pair index set is constructed. Based on the set of overlapping point pairs indexes, the overlapping vertices in the filtered source point cloud and target point cloud are fused; The source point cloud after vertex fusion is stitched onto the target point cloud after vertex fusion to obtain the stitched point cloud.
2. The method as described in claim 1, characterized in that, The step of projecting the vertices of the filtered source point cloud and target point cloud that fall within the bounding box of the overlapping region onto the xoy plane and constructing an overlapping point pair index set includes: The bounding box of the overlapping region is calculated based on the minimum and maximum point coordinates of the bounding box of the filtered source point cloud and the minimum and maximum point coordinates of the bounding box of the filtered target point cloud. The vertices of the filtered source point cloud and target point cloud that fall within the bounding box of the overlapping region are projected onto the xoy plane, and an overlapping point pair index set is constructed.
3. The method as described in claim 1, characterized in that, The step of projecting the vertices of the filtered source point cloud and target point cloud that fall within the bounding box of the overlapping region onto the xoy plane and constructing an overlapping point pair index set includes: Detect the vertices in the overlapping region of the filtered source point cloud and target point cloud respectively, and denote the sets of vertex sequence numbers as the source vertex set and the target vertex set respectively; The vertices of the filtered target point cloud that fall within the bounding box of the overlapping region are projected onto the xoy plane to construct the target overlapping region point cloud, and a kd-tree search tree is constructed based on the target overlapping region point cloud. A set of overlapping point pairs is obtained using the source vertex set and the kd-tree search tree; an overlapping point pair index set is constructed based on the correspondence between the vertex sequence numbers in the target overlapping region point cloud and the vertex sequence numbers in the target vertex set, as well as the overlapping point pairs.
4. The method as described in claim 3, characterized in that, The step of projecting the vertices of the filtered target point cloud that fall within the bounding box of the overlapping region onto the xoy plane to construct the target overlapping region point cloud, and constructing a kd-tree search tree based on the target overlapping region point cloud, includes: The vertices of the target point cloud that fall within the bounding box of the overlapping region are projected onto the xoy plane to construct the target overlapping region point cloud, and the correspondence between the vertex sequence number in the target overlapping region point cloud and the vertex sequence number in the target vertex set is recorded. Based on the point cloud of the overlapping target region, construct a kd-tree search tree.
5. The method as described in claim 3, characterized in that, The process of obtaining a set of overlapping point pairs through the source vertex set and the kd-tree search tree includes: Traverse the vertices in the filtered source point cloud that belong to the source vertex set, and project the vertices in the filtered source point cloud that belong to the source vertex set onto the xoy plane; The kd-tree search tree is used to find the point in the target overlapping region point cloud that is closest to the projection point of the vertex belonging to the source vertex set in the filtered source point cloud on the xoy plane, and this point is denoted as the closest point. If the distance is less than a set distance threshold, the sequence number of the nearest point and the corresponding vertex belonging to the source vertex set in the filtered source point cloud is recorded to obtain a pair of overlapping points.
6. The method as described in claim 1, characterized in that, The detection of the overlapping region between the filtered source point cloud and the target point cloud includes: Detect the bounding box of the filtered source point cloud and the bounding box of the filtered target point cloud; Intersection detection is performed on the bounding boxes of the filtered source point cloud and the filtered target point cloud. If the two bounding boxes intersect, it is determined that there is an overlapping region between the filtered source point cloud and the target point cloud.
7. The method as described in claim 1, characterized in that, The step of fusing overlapping vertices in the filtered source point cloud and target point cloud based on the overlapping point pair index set includes: The vertices of the source point cloud that fall into the bounding box of the overlapping region are taken as the first vertex, and the vertices of the target point cloud that fall into the bounding box of the overlapping region are taken as the second vertex. The sequence numbers of the first vertex and the second vertex belong to a pair of overlapping point pairs in the overlapping point pair index set. Calculate the coordinates of the merged vertex based on the coordinates of the first vertex and the second vertex; Replace the coordinates of the first vertex and the second vertex with the coordinates of the fused vertex to obtain the source point cloud and the target point cloud after vertex fusion.
8. The method as described in claim 7, characterized in that, The step of stitching the source point cloud after vertex fusion onto the target point cloud after vertex fusion to obtain the stitched point cloud includes: Traverse each vertex in the source point cloud after vertex fusion. If the vertex index belongs to the set of overlapping point pair indices, no processing is performed; otherwise, add the vertex to the set of sequence numbers of vertices in the filtered target point cloud that fall within the bounding box of the overlapping region to obtain the stitched point cloud.
9. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the steps of the method according to any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-8.
Citation Information
Patent Citations
Overlapped point cloud fusion method
CN110415362A
Splicing method and device for three-dimensional point cloud data
CN113706381A