Multi-source point cloud fusion method, device, electronic device and storage medium

Through the multi-source point cloud fusion method, the target space is divided into multiple voxels and based on direction vector analysis, which solves the problem of low accuracy of three-dimensional reconstruction data in the existing technology and achieves a more efficient three-dimensional reconstruction effect.

CN118429551BActive Publication Date: 2024-09-03SHINING 3D TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410901848.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-09-03
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

When scanning objects across scales in large-scale scenes, it is difficult for existing technologies to achieve high accuracy in 3D reconstruction data, and problems such as excessive traces and broken mesh connections are prone to occur.

Method used

The multi-source point cloud fusion method is used to obtain a variety of point cloud data, divide the target space into multiple voxels, determine the point cloud data in the voxels according to the coordinates of the three-dimensional points, and obtain the target point and target normal vector based on direction vector analysis. , fuse multiple point cloud data to generate 3D reconstruction data.

Benefits of technology

It improves the accuracy of 3D reconstruction data, reduces the risk of excessive traces and broken mesh connections, and improves the processing efficiency of point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118429551B
    Figure CN118429551B
Patent Text Reader

Abstract

The present application proposes a multi-source point cloud fusion method, device, electronic device and storage medium. The multi-source point cloud fusion method includes: obtaining multiple point cloud data corresponding to the object to be scanned; wherein each point cloud data includes multiple three-dimensional points, each three-dimensional point corresponds to a three-dimensional coordinate and a parameter vector; determining multiple voxels in the target space where the object to be scanned is located; determining the point cloud data in each voxel according to the three-dimensional coordinates of the multiple three-dimensional points; determining the direction vector of each voxel according to the position of each voxel in the target space and the point cloud data in each voxel; parsing the point cloud data in the corresponding voxel based on the direction vector to obtain the target point and target normal vector corresponding to each voxel; fusing multiple point cloud data according to the target point and target normal vector corresponding to each voxel to obtain the three-dimensional reconstruction data of the object to be scanned. The present application relates to the field of three-dimensional reconstruction technology, and can improve the accuracy of three-dimensional reconstruction of the object to be scanned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional scanning technology, and in particular to a multi-source point cloud fusion method, device, electronic device and storage medium. Background Art

[0002] At present, when scanning objects across scales in large-scale scenes, handheld laser scanning devices are usually relied on to ensure the integrity of global data, and high-precision fixed devices are used to obtain high-precision detail data. Then, different point cloud data from multiple devices are used for splicing during point cloud reconstruction, and point cloud weights are used to merge point clouds in the same area. However, this method is prone to obvious excessive traces and mesh connection breakage risks after point cloud data reconstruction, resulting in low accuracy of 3D reconstruction data. Summary of the invention

[0003] In view of the above, it is necessary to propose a multi-source point cloud fusion method, device, electronic device and storage medium to solve the technical problem of low accuracy of three-dimensional reconstruction data.

[0004] The present application provides a multi-source point cloud fusion method, which is applied to electronic devices. The method includes: obtaining multiple point cloud data corresponding to an object to be scanned; wherein each type of point cloud data includes multiple three-dimensional points, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system; determining multiple voxels in a target space where the object to be scanned is located; determining the point cloud data in each voxel according to the three-dimensional coordinates of the multiple three-dimensional points; determining the direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel; parsing the point cloud data in the corresponding voxel based on the direction vector to obtain the target point and target normal vector corresponding to each voxel; fusing the multiple point cloud data according to the target point and target normal vector corresponding to each voxel to obtain three-dimensional reconstruction data of the object to be scanned.

[0005] In some embodiments, determining a plurality of voxels in the target space where the object to be scanned is located comprises: determining local feature parameters of the initial point cloud data according to the three-dimensional coordinates; and determining a plurality of voxels in the target space according to the local feature parameters.

[0006] In some embodiments, determining the multiple voxels in the target space based on the local feature parameters includes: determining the voxel size based on the curvature data in the local feature parameters, wherein the voxel size corresponding to the multiple voxels is smaller when the curvature data is larger, and the voxel size corresponding to the multiple voxels is larger when the curvature data is smaller; determining the multiple voxels in the target space based on the voxel size.

[0007] In some embodiments, determining the point cloud data in each voxel based on the three-dimensional coordinates of the multiple three-dimensional points includes: determining the coordinate range of each voxel in the preset coordinate system based on the position information; when the three-dimensional coordinates are within the coordinate range corresponding to any voxel, determining the three-dimensional point corresponding to the three-dimensional coordinates as the point cloud data in the any voxel.

[0008] In some embodiments, determining the direction vector of each voxel based on the position information of each voxel in the preset coordinate system and the point cloud data in each voxel includes: determining the center point coordinates of each voxel based on the position information of each voxel in the preset coordinate system; determining the three-dimensional coordinates closest to the center point coordinates; and determining the direction vector of the voxel based on the center point coordinates and the three-dimensional coordinates.

[0009] In some embodiments, parsing the point cloud data in the corresponding voxel based on the direction vector to obtain the target point and target normal vector corresponding to each voxel includes: screening each three-dimensional point in the corresponding voxel based on the direction vector and preset constraints to obtain the target point in the corresponding voxel; determining the normal vector of the target point as the target normal vector.

[0010] In some embodiments, the constraint conditions include: the projection of a line between the three-dimensional coordinates of the target point and the center point of the voxel on the direction vector is minimal, and the target normal vector is perpendicular to the tangential direction of the point cloud data.

[0011] The embodiment of the present application also provides a multi-source point cloud fusion device, which includes: an acquisition module, used to acquire multiple point cloud data corresponding to the object to be scanned; wherein each type of point cloud data includes multiple three-dimensional points, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system; a determination module, used to determine multiple voxels in the target space where the object to be scanned is located; the determination module is also used to determine the point cloud data in each voxel according to the three-dimensional coordinates of the multiple three-dimensional points; the determination module is also used to determine the direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel; a parsing module, used to parse the point cloud data in the corresponding voxel based on the direction vector, and obtain the target point and target normal vector corresponding to each voxel; a reconstruction module, used to fuse the multiple point cloud data according to the target point and target normal vector corresponding to each voxel, and obtain the three-dimensional reconstruction data of the object to be scanned.

[0012] An embodiment of the present application also provides an electronic device, comprising: a memory storing at least one instruction; and a processor executing the instruction stored in the memory to implement the multi-source point cloud fusion method.

[0013] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the multi-source point cloud fusion method.

[0014] It can be seen from the above technical solutions that the embodiment of the present application obtains a variety of point cloud data of the object to be scanned from different angles or different depths scanned by the scanning device, and determines a plurality of voxels in the target space where the object to be scanned is located, and determines the point cloud data in each voxel according to the three-dimensional coordinates of the plurality of three-dimensional points, which can provide data support for the subsequent three-dimensional reconstruction of the object to be scanned, and can improve the processing efficiency of the point cloud data. The direction vector of each voxel is determined according to the position information of each voxel and the point cloud data in each voxel, so as to determine the relative position relationship between each voxel and the object to be scanned, and then the point cloud data in the voxel is parsed based on the direction vector to obtain the target point and target normal vector corresponding to each voxel, and finally the approximate plane of the object to be scanned in each voxel is determined according to the target point and the target normal vector, and the approximate planes corresponding to all voxels are fused to obtain the three-dimensional reconstruction data of the object to be scanned. In this way, the accuracy of the three-dimensional reconstruction of the object to be scanned can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is an application scenario diagram of a multi-source point cloud fusion method provided in one embodiment of the present application.

[0016] Figure 2 This is a flowchart of a multi-source point cloud fusion method provided in one embodiment of the present application.

[0017] Figure 3 This is a flowchart of a method for determining multiple voxels provided by an embodiment of the present application.

[0018] Figure 4 This is a method for determining point cloud data in each voxel provided by an embodiment of the present application.

[0019] Figure 5 It is a flowchart of a method for determining a direction vector provided by an embodiment of the present application.

[0020] Figure 6 It is a flowchart of a method for determining a target point and a target normal vector provided by an embodiment of the present application.

[0021] Figure 7 It is a functional module diagram of a multi-source point cloud fusion device provided in one embodiment of the present application.

[0022] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to more clearly understand the purpose, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth to facilitate a full understanding of the present application, and the embodiments described are only a part of the embodiments of the present application, rather than all of the embodiments.

[0024] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0026] The embodiment of the present application provides a multi-source point cloud fusion method, which can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0027] An electronic device can be any electronic product that can interact with customers, such as personal computers, tablet computers, smart phones, personal digital assistants (PDAs), game consoles, Internet Protocol Television (IPTV), smart wearable devices, etc.

[0028] The electronic device may also include a network device and / or a client device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.

[0029] The networks where electronic devices are located include but are not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.

[0030] like Figure 1 As shown, a multi-source point cloud fusion method provided by the present application can be applied to an electronic device 100, and the electronic device 100 is connected to a database 200 for communication, and the database 200 is used to store a variety of point cloud data obtained when a scanning device 300 scans an object to be scanned 400. The database 200 can be a built-in storage device of the electronic device 100, or an external storage device connected to the electronic device 100 for communication, and the present application does not limit this.

[0031] In one embodiment of the present application, the electronic device 100 is used to obtain from the database 200 a variety of point cloud data obtained when different scanning devices 300 scan the object to be scanned 400 from different angles or different depths, and determine a plurality of voxels in the target space where the object to be scanned 400 is located, and determine the point cloud data in each voxel according to the three-dimensional coordinates of the plurality of three-dimensional points in the point cloud data. The electronic device 100 also determines the direction vector of each voxel according to the position information of each voxel and the point cloud data in each voxel, and then parses the point cloud data in the voxel based on the direction vector to obtain the target point and target normal vector corresponding to each voxel, and finally determines the approximate plane of the object to be scanned in each voxel according to the target point and the target normal vector, and fuses the approximate planes corresponding to all voxels to obtain the three-dimensional reconstruction data of the object to be scanned. In this way, the accuracy of the three-dimensional reconstruction of the object to be scanned can be improved.

[0032] like Figure 2 , is a flowchart of a multi-source point cloud fusion method provided in an embodiment of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. A multi-source point cloud fusion method provided in an embodiment of the present application includes the following steps.

[0033] S20, obtaining a plurality of point cloud data corresponding to the object to be scanned; wherein each type of point cloud data includes a plurality of three-dimensional points, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system.

[0034] In one embodiment of the present application, the object to be scanned may be any object whose geometric shape needs to be measured, such as a car, a medical device, or a product part, etc. The present application does not limit the properties and shape of the object to be scanned. Before measuring the object to be scanned, a small number of object marker points may be attached to the object to be scanned, and the object marker points may be reflective marker points or reflective textures.

[0035] In one embodiment of the present application, a camera and a light source transmitter are provided in the scanning device, including but not limited to a laser transmitter, a raster projector, etc. The camera is used to capture the surface image of the object to be scanned, and determine the point cloud data corresponding to the object to be scanned based on the image. In order to ensure the integrity of the point cloud data, the point cloud data of different depths and angles of the object to be scanned can be obtained by changing the scanning device and the scanning position, wherein the specific scanning device, the specific scanning posture and the changed scanning position can be determined according to the number of marking points on the surface of the object to be scanned and the size of the object to be scanned, and the present application does not limit this.

[0036] In one embodiment of the present application, the multiple point cloud data may be a collection of point cloud data obtained by scanning the object to be scanned by different scanning devices and scanning devices at different depths and angles. The multiple point cloud data include initial point cloud data, and the initial point cloud data may be point cloud data with lower resolution obtained when a scanning device with lower physical resolution scans the object to be scanned. The resolution of the point cloud data is used to characterize the distribution of three-dimensional points in the point cloud data in the target space where the object to be scanned is located. Specifically, the resolution of the point cloud data can be used to characterize the average spacing or density of the three-dimensional points. The lower the resolution of the point cloud data, the sparser the point cloud data in the unit space; the higher the physical resolution of the point cloud data, the denser the point cloud data in the unit space.

[0037] In one embodiment of the present application, the point cloud data includes a plurality of three-dimensional points in the target space where the object to be scanned is located, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system and a parameter vector. The coordinate origin of the preset coordinate system may be the position of the scanning device in the target space, or may be a pre-set point in the target space, and the present application does not limit this. The three-dimensional coordinates are used to characterize the position of the corresponding three-dimensional point in the preset coordinate system, and the parameter vector is used to characterize the normal component of the three-dimensional point in the three coordinate axis directions of the preset coordinate system. The modulus of the normal vector may be 1, which is used to characterize the unit length of the normal vector.

[0038] Specifically, the method for determining the normal vector of point cloud data includes any of the following: the nearest neighbor method (Nearest Neighbor), for each three-dimensional point P in the point cloud data, select a neighborhood set N(P) within a radius r; for each point Q in the neighborhood set N(P), calculate the vector V=QP between the three-dimensional point P and the three-dimensional point Q; determine the mean of all vectors V to obtain the average vector M; normalize the average vector M to obtain the normal vector of the point cloud data. It can also be a surface fitting method, which estimates the normal vector by fitting a local surface in the point cloud data. It can also be a method based on the nearest neighbor search and the covariance matrix, which selects the k nearest neighbor points of each point and calculates its covariance matrix to estimate the normal vector. This application does not limit the specific method for determining the normal vector of point cloud data.

[0039] S21, determining a plurality of voxels in the target space where the object to be scanned is located.

[0040] In one embodiment of the present application, in order to fuse multiple point cloud data to improve the accuracy of three-dimensional reconstruction, the target space can be pre-divided into multiple voxels to provide data support for the voxelization of point cloud data. Subsequently, multiple point cloud data can be divided based on multiple voxels to obtain point cloud data corresponding to each voxel, and the point cloud data corresponding to each voxel can be fused to improve the accuracy of three-dimensional reconstruction. Exemplarily, the size of the voxel can be 1mm*1mm*1mm, or 0.3mm*0.3mm*0.3mm, which is not limited in the present application.

[0041] In one embodiment of the present application, in the process of three-dimensional reconstruction of the scanned object based on multi-source three-dimensional data, if the voxel size is too high, it will lead to insufficient granularity in segmenting the target space, thereby causing information loss; if the voxel size is too low, it will lead to an excessive number of voxels in the target space, which will lead to the problem that the three-dimensional reconstruction takes a long time and the computing resource occupancy rate of the electronic device is high. In order to circumvent the above problems, the local feature parameters of the initial point cloud data can be determined according to the three-dimensional coordinates; and the multiple voxels in the target space are determined according to the local feature parameters. Specifically, the initial point cloud data can be point cloud data with a lower resolution. Among them, the local feature parameters include at least curvature data of the point cloud data. Specifically, the method for determining multiple voxels, please refer to Figure 3 The corresponding detailed description.

[0042] S22, determining point cloud data in each voxel according to the three-dimensional coordinates of the plurality of three-dimensional points.

[0043] In one embodiment of the present application, in order to determine the point cloud data in each voxel, the position of each voxel in the target space can be determined first, and then multiple three-dimensional points in each voxel can be determined based on the position of each voxel and the three-dimensional coordinates of the point cloud data. Specifically, the position information of the corresponding voxel in the preset coordinate system can be determined based on the three-dimensional coordinates of the vertices of each voxel in the preset coordinate system. For a specific method of determining the point cloud data in each voxel, please refer to Figure 4 The corresponding detailed description.

[0044] This ensures that during the three-dimensional reconstruction of the scanned object, the point cloud data in each voxel can be stored in an orderly manner in the memory of the electronic device, which can reduce random memory access and improve the computing efficiency of the point cloud data. And because the point cloud data in each voxel is determined, the downsampling effect of the point cloud data can be achieved, thereby further improving the computing efficiency of the point cloud data.

[0045] S23, determining a direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel.

[0046] In one embodiment of the present application, in order to determine the relative position of each voxel and the object to be scanned to improve the accuracy of subsequent three-dimensional reconstruction, the direction vector corresponding to each voxel can be first determined based on the position information of each voxel in the preset coordinate system and the point cloud data in each voxel. The direction vector is used to characterize the relative position between the center point of the voxel and the object to be scanned. Specifically, the modulus of the direction vector is used to characterize the vertical distance from the center point of the corresponding voxel to the surface of the object to be scanned; the direction vector always points to the outside of the scanned object. When the center point of the voxel is inside the object to be scanned, the distance from the center of the voxel to the surface of the object to be scanned is a negative value. When the center point of the voxel is outside the object to be scanned, the distance from the center of the voxel to the surface of the object to be scanned is a positive value. When the center point of the corresponding voxel is on the surface of the object to be scanned, the resulting distance value from the center of the voxel to the surface of the object to be scanned is 0.

[0047] In one embodiment of the present application, firstly, the coordinates of the center point of any voxel in the target space can be determined according to the position information of the voxel in the preset coordinate system, and the 3D point in the voxel closest to the coordinates can be determined, and the direction vector of the voxel can be determined according to the 3D coordinates of the 3D point and the coordinates of the center point, and then the approximate plane corresponding to the object to be scanned in the voxel can be determined according to the direction vector. For a specific method of determining the direction vector corresponding to each voxel, please refer to Figure 5 The corresponding detailed description is not limited to this application.

[0048] In this way, the relative position relationship between each voxel in the target space and the surface of the object to be scanned can be determined, providing data support for the subsequent fitting of the approximate surface corresponding to each voxel.

[0049] S24, analyzing the point cloud data in the voxel corresponding to the direction vector to obtain the target point and target normal vector corresponding to each voxel.

[0050] In one embodiment of the present application, the direction vector is used to characterize the relative position between the center point of the voxel and the object to be scanned. Specifically, the absolute value of the direction vector is used to characterize the vertical distance from the center point of the corresponding voxel to the surface of the object to be scanned. In order to fit the approximate plane of the surface of the object to be scanned in each voxel according to the point cloud data in each voxel, the point cloud data in the corresponding voxel can be parsed according to the direction vector to obtain the target point and target normal vector corresponding to each voxel, and then the approximate plane of the surface of the object to be scanned in each voxel can be determined according to the target point and the target normal vector. For specific methods of determining the target point and the target normal vector, please refer to Figure 6 The corresponding detailed description.

[0051] S25, fusing the multiple point cloud data according to the target point and target normal vector corresponding to each voxel to obtain three-dimensional reconstruction data of the object to be scanned.

[0052] In one embodiment of the present application, after obtaining the target point and target normal vector corresponding to each voxel, the approximate plane of the object to be scanned in the voxel can be determined based on the target point and the corresponding target normal vector, and then the approximate plane of each voxel can be fused to obtain the three-dimensional reconstruction data of the object to be scanned.

[0053] Exemplarily, when there are curves C1 and C2 on the surface of the object to be scanned, and curves C1 and C2 intersect at a three-dimensional point P, if the tangent vector of curve C1 at the three-dimensional point P is T1, and the tangent vector of curve C2 at the three-dimensional point P is T2, then both tangent vector T1 and tangent vector T2 are on the tangent plane of the surface at the three-dimensional point P. The normal vector of the three-dimensional point P can be determined based on vectors T1 and T2, and the direction of the tangent plane can be determined by the three-dimensional coordinates of the three-dimensional point P and the normal vector, and the surface of the object to be scanned at the three-dimensional point P can be characterized based on the tangent plane. In order to obtain the approximate plane corresponding to the plane of the object to be scanned, the local approximate plane of each voxel can be determined according to the above method, and the plane of the object to be scanned can be constructed based on the local approximate plane of each voxel.

[0054] In one embodiment of the present application, when the three-dimensional coordinates of the three-dimensional point P in the preset coordinate system are (x0, y0, z0), and the target normal vector n is (A, B, C), the plane equation of the three-dimensional point P can be determined according to the following relationship:

[0055] ; Among them, (A, B, C) represents the normal vector of the plane where the three-dimensional point P is located, and (x0, y0, z0) represents the three-dimensional coordinates of the three-dimensional point P.

[0056] It can be seen from the above technical solutions that the embodiment of the present application obtains a variety of point cloud data of the object to be scanned from different scanning devices, at different angles or at different depths, and determines a plurality of voxels in the target space where the object to be scanned is located, and determines the point cloud data in each voxel according to the three-dimensional coordinates of the multiple three-dimensional points, which can provide data support for the subsequent three-dimensional reconstruction of the object to be scanned, and can improve the processing efficiency of the point cloud data. The direction vector of each voxel is determined according to the position information of each voxel and the point cloud data in each voxel, so as to determine the relative position relationship between each voxel and the object to be scanned, and then the point cloud data in the voxel is parsed based on the direction vector to obtain the target point and target normal vector corresponding to each voxel, and finally the approximate plane of the object to be scanned in each voxel is determined according to the target point and the target normal vector, and the approximate planes corresponding to all voxels are fused to obtain the three-dimensional reconstruction data of the object to be scanned. In this way, the accuracy of the three-dimensional reconstruction of the object to be scanned can be improved.

[0057] like Figure 3 , is a flow chart of a method for determining multiple voxels provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining multiple voxels provided in an embodiment of the present application includes the following steps.

[0058] S30: Determine a voxel size according to the curvature data in the local feature parameters.

[0059] In one embodiment of the present application, the local feature parameters of the point cloud data are used to describe the local properties of each three-dimensional point in the point cloud data. Exemplarily, the local feature parameters include: a normal vector, which is used to characterize the normal direction of the surface where each three-dimensional point is located; curvature data, which is used to characterize the degree of curvature of the point cloud data surface, and can be used to identify and distinguish the surface structures of different objects or different surface types; surface roughness, which is used to characterize the smoothness or roughness of the point cloud surface, and can be used to analyze the texture of the object surface. In addition, the local feature parameters also include the color value, intensity value, incident direction of the laser line, etc. of the point cloud data.

[0060] In one embodiment of the present application, in order to adaptively adjust the voxel size of the voxels in the target space according to the structure of the surface of the object to be scanned, the curvature data can be determined according to the three-dimensional coordinates corresponding to the three-dimensional points in the point cloud data, and the voxel size can be determined according to the curvature data. When the curvature data is larger, the voxel size corresponding to multiple voxels is smaller, and when the curvature data is smaller, the voxel size corresponding to multiple voxels is larger. Specifically, when the curvature data is larger, it indicates that the structure of the surface of the object to be scanned is more complex, and the voxel size can be determined to be smaller, so that the granularity of voxelization processing of the point cloud data can be improved, thereby improving the accuracy of three-dimensional reconstruction; when the curvature data is smaller, it indicates that the surface of the object to be scanned is smoother, and the voxel size can be determined to be larger, so that the number of voxels can be reduced, thereby improving the efficiency of point cloud data processing.

[0061] Exemplarily, the method for determining curvature data includes: least squares fitting, for each three-dimensional point P, select the neighborhood point set N(P) around it; for the neighborhood point set N(P), calculate its centroid z; construct a covariance matrix Z according to the centroid z; perform eigenvalue decomposition on the covariance matrix Z to obtain eigenvalues ​​λ1 and λ2; determine the mean of the eigenvalues ​​λ1 and λ2 as the curvature data of the point cloud data. It can also be a quadratic surface fitting algorithm, randomly select a three-dimensional point in the point cloud data, uniformly select multiple three-dimensional points in the point cloud data with the three-dimensional point as the center, and based on the multiple three-dimensional points, use the least squares method to fit the quadratic surface equation, and determine the curvature data according to the coefficients of the quadratic surface equation. The curvature data of the point cloud data can also be determined by calculating the change in the normal vector of the three-dimensional point. The present application does not limit the specific method of determining the curvature data.

[0062] S31, determining a plurality of voxels in the target space according to the voxel size.

[0063] In one embodiment of the present application, a plurality of voxels may be divided in the target space according to the voxel size. For example, when the voxel size is 1 mm*1 mm*1 mm, the target space may be divided into a plurality of cubes with a length, width and height of 1 mm respectively, and each cube is determined as a voxel.

[0064] like Figure 4 As shown, it is a flow chart of a method for determining point cloud data in each voxel provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining point cloud data in each voxel provided in an embodiment of the present application includes the following steps.

[0065] S40: Determine a coordinate range of each voxel in the preset coordinate system according to the position information.

[0066] In an embodiment of the present application, the three-dimensional coordinates of the vertex of each voxel in a preset coordinate system may be determined, and the coordinate range of the voxel may be determined according to the three-dimensional coordinates of the vertex.

[0067] S41, when the three-dimensional coordinates are within a coordinate range corresponding to any voxel, determining that the three-dimensional point corresponding to the three-dimensional coordinates is point cloud data in the any voxel.

[0068] like Figure 5 , is a flow chart of a method for determining a direction vector corresponding to each voxel provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining a direction vector corresponding to each voxel provided in an embodiment of the present application includes the following steps.

[0069] S50: Determine the center point coordinates of each voxel according to the position information of each voxel in the preset coordinate system.

[0070] In an embodiment of the present application, the position information of the voxel may be the three-dimensional coordinates of the vertices of the voxel in a preset coordinate system, and the three-dimensional coordinates of the center point of the voxel may be determined according to the three-dimensional coordinates of the voxel vertices.

[0071] S51, determining the three-dimensional coordinates closest to the center point coordinates.

[0072] In one embodiment of the present application, each 3D point in the voxel may be traversed, the distance between the traversed 3D point and the center point may be determined, and the 3D coordinates of the 3D point corresponding to the shortest distance may be obtained.

[0073] S52: Determine the direction vector of the voxel according to the center point coordinates and the three-dimensional coordinates.

[0074] In one embodiment of the present application, the difference between the center point coordinates and the three-dimensional coordinates in each coordinate dimension may be determined, and the direction vector of the voxel may be determined according to the difference corresponding to each dimension.

[0075] For example, the coordinates of the center point of the voxel are (x s ,y s , z s ), the three-dimensional coordinates of the output point closest to the center point are (x r ,y r , z r ), the unit normal is (x n ,y n , z n ). Then the direction vector of the voxel can be (((x s ,y s , z s )-(x r ,yr , z r )) (x n ,y n , z n ))(x n ,y n , z n ).

[0076] like Figure 6 , is a flow chart of a method for determining a target point and a target normal vector provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining a target point and a target normal vector provided in an embodiment of the present application includes the following steps.

[0077] S60, screening each three-dimensional point in the corresponding voxel based on the direction vector and the preset constraint condition to obtain the target point in the corresponding voxel.

[0078] In one embodiment of the present application, constraints can be determined based on a direction vector, and the constraints include: the projection of a line between the three-dimensional coordinates of the target point and the center point of the voxel on the direction vector is the smallest, and the target normal vector is perpendicular to the tangential direction of the point cloud data.

[0079] In one embodiment of the present application, for any voxel, the least square method and constraint conditions can be used to screen all three-dimensional points in the voxel to obtain the target point and the corresponding three-dimensional coordinates.

[0080] S61, determining the normal vector of the target point as a target normal vector.

[0081] In one embodiment of the present application, after the target point and the target normal vector are determined, the approximate plane of the object to be scanned in the voxel can be determined according to the target point and the corresponding target normal vector.

[0082] See also Figure 7 , Figure 7 7 is a functional module diagram of a multi-source point cloud fusion device provided in an embodiment of the present application. A multi-source point cloud fusion device 71 includes an acquisition module 710, a determination module 711, a parsing module 712 and a reconstruction module 713. The module / unit referred to in the present application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and can complete fixed functions, which are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0083] The acquisition module 710 is used to acquire a variety of point cloud data corresponding to the object to be scanned; wherein each type of point cloud data includes a plurality of three-dimensional points, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system.

[0084] The determination module 711 is used to determine a plurality of voxels in the target space where the object to be scanned is located.

[0085] The determination module 711 is further configured to determine point cloud data in each voxel according to the three-dimensional coordinates of the multiple three-dimensional points.

[0086] The determination module 711 is further configured to determine the direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel.

[0087] The parsing module 712 is used to parse the point cloud data in the corresponding voxel based on the direction vector to obtain the target point and target normal vector corresponding to each voxel.

[0088] The reconstruction module 713 is used to fuse the multiple point cloud data according to the target point and target normal vector corresponding to each voxel to obtain the three-dimensional reconstruction data of the object to be scanned.

[0089] In some embodiments, the determination module 711 is further used to determine local feature parameters of the initial point cloud data according to the three-dimensional coordinates; and determine a plurality of voxels in the target space according to the local feature parameters.

[0090] In some embodiments, the determination module 711 is also used to determine the voxel size based on the curvature data in the local feature parameters, wherein when the curvature data is larger, the voxel size corresponding to the multiple voxels is smaller, and when the curvature data is smaller, the voxel size corresponding to the multiple voxels is larger; and determine the multiple voxels in the target space based on the voxel size.

[0091] In some embodiments, the determination module 711 is also used to determine the coordinate range of each voxel in the preset coordinate system based on the position information; when the three-dimensional coordinate is within the coordinate range corresponding to any voxel, the three-dimensional point corresponding to the three-dimensional coordinate is determined to be the point cloud data in any voxel.

[0092] In some embodiments, the determination module 711 is also used to determine the center point coordinates of each voxel based on the position information of each voxel in the preset coordinate system; determine the three-dimensional coordinates closest to the center point coordinates; and determine the direction vector of the voxel based on the center point coordinates and the three-dimensional coordinates.

[0093] In some embodiments, the analysis module 712 is further used to screen each three-dimensional point in the corresponding voxel based on the direction vector and preset constraints to obtain a target point in the corresponding voxel; and determine the normal vector of the target point as a target normal vector.

[0094] See also Figure 8 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 is used to execute the computer-readable instructions stored in the memory to implement a multi-source point cloud fusion method described in any of the above embodiments.

[0095] In an embodiment of the present application, the electronic device 100 further includes a bus, a computer program stored in the memory 12 and executable on the processor 13, such as a multi-source point cloud fusion program.

[0096] Figure 8 Only the electronic device 100 having the memory 12 and the processor 13 is shown, and those skilled in the art can understand that Figure 4 The structure shown does not constitute a limitation on the electronic device 100 , and the electronic device 100 may include fewer or more components than shown in the figure, or combine some components, or arrange the components differently.

[0097] Combination Figure 2 The memory 12 in the electronic device 100 stores a plurality of computer-readable instructions to implement a multi-source point cloud fusion method, and the processor 13 can execute the plurality of instructions to implement: obtaining a plurality of point cloud data corresponding to the object to be scanned; wherein each type of point cloud data includes a plurality of three-dimensional points, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system; determining a plurality of voxels in the target space where the object to be scanned is located; determining the point cloud data in each voxel according to the three-dimensional coordinates of the plurality of three-dimensional points; determining the direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel; resolving the point cloud data in the corresponding voxel based on the direction vector to obtain the target point and target normal vector corresponding to each voxel; fusing the plurality of point cloud data according to the target point and target normal vector corresponding to each voxel to obtain the three-dimensional reconstruction data of the object to be scanned.

[0098] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0099] Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. The electronic device 100 may be a bus-type structure or a star-type structure. The electronic device 100 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the electronic device 100 may also include input and output devices, network access devices, etc.

[0100] It should be noted that the electronic device 100 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.

[0101] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium may be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 may be an internal storage unit of the electronic device 100, such as a mobile hard disk of the electronic device 100. In other embodiments, the memory 12 may also be an external storage device of the electronic device 100, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 100. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 100, such as a code of a multi-source point cloud fusion program, etc., but also can be used to temporarily store data that has been output or is to be output.

[0102] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 100, and uses various interfaces and lines to connect various components of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing programs or modules stored in the memory 12 (for example, executing a multi-source point cloud fusion program, etc.), and calling data stored in the memory 12.

[0103] The processor 13 executes the operating system of the electronic device 100 and various installed applications. The processor 13 executes the applications to implement the steps in each of the above-mentioned multi-source point cloud fusion method embodiments, for example Figure 2 Steps shown.

[0104] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 100. For example, the computer program may be divided into an acquisition module 710, a determination module 711, a parsing module 712, and a reconstruction module 713.

[0105] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of a multi-source point cloud fusion method described in various embodiments of the present application.

[0106] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware devices to complete through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.

[0107] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory and other memory, etc.

[0108] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0109] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. Figure 8 Only one arrow is used in the figure, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.

[0110] An embodiment of the present application also provides a computer-readable storage medium (not shown), in which computer-readable storage medium is stored computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement a multi-source point cloud fusion method described in any of the above embodiments.

[0111] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0112] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0113] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0114] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A multi-source point cloud fusion method, applied to electronic equipment, It is characterized in that The method comprises: Acquire a plurality of point cloud data corresponding to the object to be scanned; wherein each type of point cloud data includes a plurality of three-dimensional points, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system; Determine a plurality of voxels in a target space where the object to be scanned is located; Determine point cloud data in each voxel according to the three-dimensional coordinates of the plurality of three-dimensional points; Determine the direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel; wherein the direction vector is used to represent the relative position between the center point of the voxel and the object to be scanned; Analyzing the point cloud data in the voxel corresponding to the direction vector, obtaining the target point and target normal vector corresponding to each voxel; The corresponding approximate plane is determined according to the target point and the target normal vector corresponding to each voxel, and the three-dimensional reconstruction data of the object to be scanned is obtained by fusing the approximate plane corresponding to each voxel to fuse the multiple point cloud data.

2. The multi-source point cloud fusion method according to claim 1, It is characterized in that The plurality of point cloud data include initial point cloud data, and the determining of a plurality of voxels in a target space where the object to be scanned is located includes: Determine local feature parameters of the initial point cloud data according to the three-dimensional coordinates; A plurality of voxels in the target space are determined according to the local feature parameters.

3. The multi-source point cloud fusion method according to claim 2, It is characterized in that Determining a plurality of voxels in the target space according to the local feature parameters comprises: Determine the voxel size according to the curvature data in the local feature parameter, wherein the voxel size corresponding to the plurality of voxels is smaller when the curvature data is larger, and the voxel size corresponding to the plurality of voxels is larger when the curvature data is smaller; A plurality of voxels in the target space is determined according to the voxel size.

4. The multi-source point cloud fusion method according to claim 1, It is characterized in that Determining the point cloud data in each voxel according to the three-dimensional coordinates of the plurality of three-dimensional points comprises: Determine the coordinate range of each voxel in the preset coordinate system according to the position information; When the three-dimensional coordinates are within the coordinate range corresponding to any voxel, the three-dimensional point corresponding to the three-dimensional coordinates is determined to be the point cloud data in the any voxel.

5. The multi-source point cloud fusion method according to claim 1, It is characterized in that Determining the direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel comprises: Determine the center point coordinates of each voxel according to the position information of each voxel in the preset coordinate system; Determine the three-dimensional coordinates closest to the center point coordinates; The direction vector of the voxel is determined according to the center point coordinates and the three-dimensional coordinates.

6. The multi-source point cloud fusion method according to claim 1, It is characterized in that The step of parsing the point cloud data in the voxel corresponding to the direction vector to obtain the target point and the target normal vector corresponding to each voxel comprises: Based on the direction vector and the preset constraint condition, each three-dimensional point in the corresponding voxel is selected to obtain the target point in the corresponding voxel; The normal vector of the target point is determined as the target normal vector.

7. The multi-source point cloud fusion method according to claim 6, It is characterized in that The constraint conditions include: the projection of the line between the three-dimensional coordinates of the target point and the center point of the voxel on the direction vector is the smallest, and the target normal vector is perpendicular to the tangential direction of the point cloud data.

8. A multi-source point cloud fusion device, It is characterized in that The device is used to implement the multi-source point cloud fusion method according to any one of claims 1 to 7, and the device includes: An acquisition module, used to acquire a plurality of point cloud data corresponding to the object to be scanned; wherein each type of point cloud data includes a plurality of three-dimensional points, and each three-dimensional point corresponds to a three-dimensional coordinate in a preset coordinate system; A determination module, used for determining a plurality of voxels in a target space where the object to be scanned is located; The determination module is further used to determine the point cloud data in each voxel according to the three-dimensional coordinates of the multiple three-dimensional points; The determination module is further used to determine the direction vector of each voxel according to the position information of each voxel in the preset coordinate system and the point cloud data in each voxel; wherein the direction vector is used to represent the relative position between the center point of the voxel and the object to be scanned; A parsing module, used for parsing the point cloud data in the corresponding voxel based on the direction vector, to obtain the target point and target normal vector corresponding to each voxel; The reconstruction module is used to determine the corresponding approximate plane according to the target point and the target normal vector corresponding to each voxel, and obtain the three-dimensional reconstruction data of the object to be scanned by fusing the approximate plane corresponding to each voxel to fuse the multiple point cloud data.

9. An electronic device, It is characterized in that The electronic device includes a processor and a memory, and the processor is used to implement the multi-source point cloud fusion method as described in any one of claims 1 to 7 when executing a computer program stored in the memory.

10. A computer storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the multi-source point cloud fusion method according to any one of claims 1 to 7 is implemented.