This application claims priority to Chinese Patent Application No. 201410460697.0 filed on Sep. 11, 2014 in the China Intellectual Property Office, the contents of which are incorporated by reference herein.
The subject matter herein generally relates to point cloud processing.
When a measuring device scans an object with defects for a point cloud, there is no data for points within the defects. In addition, when the point cloud loses some data, there are defects in the data point.
Implementations of the present technology will now be described, by way of example only, with reference to the attached figures, wherein:
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
Several definitions that apply throughout this disclosure will now be presented.
The term “coupled” is defined as connected, whether directly or indirectly through intervening components, and is not necessarily limited to physical connections. The connection can be such that the objects are permanently connected or releasably connected. The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
A “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, JAVA, C, or assembly. One or more software instructions in the modules can be embedded in firmware, such as in an EPROM. The modules described herein can be implemented as either software and/or hardware modules and can be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable medium include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
In at least one embodiment, the processing unit 14 receives a point cloud and converts the point cloud into a mesh model having a plurality of mesh surfaces including the first surface and the second surface. In at least one embodiment, the first surface is engaged with and perpendicular to the second surface. In at least one embodiment, the mesh model can include a plurality of triangle meshes formed by the plurality of points. In at least one embodiment, the processing unit 14 can arbitrarily select two neighboring points from the plurality of points in the point cloud and connect the two neighboring points together as a specific edge of a triangle mesh. The processing unit 14 can select a specific point for the specific edge based on a rule that no point in the point cloud is inside a circumscribed circle of the triangle mesh.
In at least one embodiment, when the processing unit 14 determines whether one of the points in the point cloud is a mesh boundary point, the processing unit 14 selects a plurality of specific triangle meshes from the triangle meshes in the mesh model. The point to be determined is a vertex in each of the plurality of specific triangle meshes.
Then, the processing unit 14 measures each of the plurality of included angles around the vertex and computes the sum of the plurality of included angles around the vertex. When the sum of the plurality of included angles is less than 360 degrees, the point is determined to be a mesh boundary point.
In at least one embodiment, the processing unit 14 can compute a first virtual plane and a first normal vector based on a specific algorithm. In at least one embodiment, the specific algorithm can include the least squares method and the quasi-Newton algorithm. Thus, the processing unit 14 can estimate a first initial plane through the plurality of points on the first surface based on the least squares method, and generate the first normal vector and the first virtual plane through the first initial plane based on the quasi-Newton algorithm. The processing unit 14 can select the first boundary points from the mesh boundary points based on the first virtual plane. In at least one embodiment, the first virtual plane can be a formula of the first surface. In at least one embodiment, the processing unit 14 can compute a second virtual plane and a second normal vector based on the specific algorithm. The processing unit 14 can select the second boundary points from the mesh boundary points based on the second virtual plane. In at least one embodiment, the second virtual plane can be a formula of the second surface.
The processing unit 14 generates first projection points for the first boundary points on the second surface, and generates a first fixed area based on the first projection points. Since the first surface is perpendicular to the second surface, the first projection points formed by projecting the first boundary points on the second surface are still on the first surface. The first fixed area is a first closed area surrounded by the plurality of first boundary points and the plurality of first projection points. In at least one embodiment, the processing unit 14 generates second projection points for the second boundary points on the first surface, and generates a second fixed area based on the second projection points. The second fixed area is a second closed area surrounded by the plurality of second boundary points and the plurality of second projection points.
The processing unit 14 divides the first fixed area into first sub-areas and the second fixed area into second sub-areas. The processing unit 14 arbitrarily adds a first additional point into each of the first sub-areas, and adds a second additional point into each of the second sub-areas.
In at least one embodiment, the processing unit 14 can fix defects on two mesh surfaces for the point cloud. In at least one embodiment, when the defects to be fixed are located on the engaged area of the two mesh surfaces perpendicular to each other, the processing unit 14 can fix the point cloud by the point cloud fixing method.
The storage device 12 can be a non-volatile computer readable storage medium that can be electrically erased and reprogrammed, such as read-only memory (ROM), random-access memory (RAM), erasable programmable ROM (EPROM), electrically EPROM (EEPROM), hard disk, solid state drive, or other forms of electronic, electromagnetic, or optical recording medium. In at least one embodiment, the storage device 12 can include interfaces that can access the aforementioned computer readable storage medium to enable the electronic device 1 to connect to and access such computer readable storage medium. In another embodiment, the storage device 12 can include network accessing device to enable the electronic device 1 to connect and access data stored in a remote server or a network-attached storage.
The processing unit 14 can be a processor, a central processing unit (CPU), a graphic processing unit (GPU), a system on chip (SoC), a field-programmable gate array (FPGA), or a controller for executing the program instruction in the storage device 12. The storage device 12 can be static RAM (SRAM), dynamic RAM (DRAM), EPROM, EEPROM, flash memory or other types of computer memory. The processing unit 14 can further include an embedded system or an application specific integrated circuit (ASIC) having embedded program instructions.
In at least one embodiment, the electronic device 1 can be a server, a desktop computer, a laptop computer, or other electronic devices. Moreover,
The display device 2 can display the measured information. Thus, the display device 2 can include a display device using liquid crystal display (LCD) technology, or light emitting polymer display (LPD) technology, although other display technologies can be used in other embodiments.
The input device 3 can input data, command, and information into the electronic device 1. Thus, the input device 3 can include a keyboard, a mouse, and a wired or wireless input device for providing an input to the electronic device 1.
The measuring device 4 can scan an object located in the measuring device 4 by an electronic coupler in a plurality of directions and measure data of a plurality of points for the object to generate a point cloud. The data can be stored in the storage device 12. The form of the data can be a TXT form, and the data can store three coordinates of each of the points in the point cloud.
The converting module 100 can receive a point cloud, and convert the point cloud into a mesh model. The mesh model includes a first surface and a second surface engaged with the first surface. The determination module 102 determines a plurality of mesh boundary points of the mesh model. Then, the obtaining module 104 obtains a plurality of first boundary points on the first surface from the plurality mesh boundary points. The establishing module 106 generates a plurality of first projection points for the plurality of first boundary points on the second surface, and generates a first fixed area based on the plurality of first projection points. The fixing module 108 divides the first fixed area into a plurality of first sub-areas and adds a first additional point into each of the plurality of first sub-areas.
At block 31, the converting module 100 receives a point cloud and converts the point cloud into a mesh model having a first surface and a second surface. In at least one embodiment, the mesh model can have a plurality of mesh surfaces including the first surface and the second surface. In at least one embodiment, the first surface is perpendicular to the second surface.
In at least one embodiment, the converting module 100 can receive the point cloud from the input device 3, the measuring device 4, or the storage device 12. In at least one embodiment, the point cloud can include data of a plurality of points. The mesh model can include a plurality of triangle meshes formed by the plurality of points.
In at least one embodiment, the converting module 100 can arbitrarily select two neighboring points from the plurality of points in the point cloud and connect the two neighboring points together as a specific edge of a triangle mesh. The converting module 100 can select a specific point for the specific edge based on a rule that no point in the point cloud is inside a circumscribed circle of the triangle mesh. When the circumscribed circle of the triangle mesh includes another point of the point cloud, the selection by the converting module 100 is wrong. Thus, the converting module 100 can make the selection again to generate another triangle mesh. When each of the points in the point cloud is used to establish the triangle meshes, the plurality of mesh surfaces including the first surface and the second surface are formed.
At block 32, the determination module 102 determines mesh boundary points of the mesh model. In at least one embodiment, the determination module 102 can determine whether each of the plurality of points in the point cloud is a mesh boundary point.
When the determination module 102 determines whether one of the points in the point cloud is a mesh boundary point, the determination module 102 selects a plurality of specific triangle meshes. The point to be determined is a vertex in each of the plurality of specific triangle meshes. Then, the determination module 102 measures each of the plurality of included angles around the vertex, and computes the sum of the plurality of included angles around the vertex. When the sum of the plurality of included angles is equal to 360 degrees, the point is determined not to be a mesh boundary point. When the sum of the plurality of included angles is less than 360 degrees, the point is determined to be a mesh boundary point.
At block 33, the obtaining module 104 determines a plurality of first boundary points on the first surface from the mesh boundary points. In at least one embodiment, the obtaining module 104 determines a plurality of second boundary points on the second surface from the mesh boundary points.
In at least one embodiment, the obtaining module 104 can compute a first virtual plane and a first normal vector based on a specific algorithm. In at least one embodiment, the specific algorithm can include the generalized least squares method and the quasi-Newton algorithm. Thus, the obtaining module 104 can estimate a first initial plane through the plurality of points on the first surface based on the generalized least squares method, and generate the first normal vector and the first virtual plane through the first initial plane based on the quasi-Newton algorithm. In at least one embodiment, the quasi-Newton iterative algorithm can be executed based on a formula,
wherein (x1, y1, z1) is the coordinates of the plurality of points on the first surface, (x2, y2, z2) is the coordinates of a point on the virtual plane, and “n” is the number of the points on the first surface. The obtaining module 104 can select the first boundary points from the mesh boundary points based on the first virtual plane. In at least one embodiment, the first virtual plane can be a formula of the first surface.
In at least one embodiment, the obtaining module 104 can estimate a second initial plane through the plurality of points on the second surface based on the generalized least squares method, and generate a second normal vector and a second virtual plane through the second initial plane based on the quasi-Newton algorithm. The obtaining module 104 can select the second boundary points from the mesh boundary points based on the second virtual plane. In at least one embodiment, the second virtual plane can be a formula of the second surface.
At block 34, the establishing module 106 generates first projection points for the first boundary points on the second surface, and generates a first fixed area based on the first projection points. In at least one embodiment, the establishing module 106 generates second projection points for the second boundary points on the first surface, and generates a second fixed area based on the second projection points.
In at least one embodiment, the first fixed area and the second fixed area determined by the establishing module 106 are formed by defects between the first surface and the second surface in the point cloud.
In at least one embodiment, when the establishing module 106 measures one of the first projection points for one of the first boundary points P1 (X11, Y11, Z11), the establishing module 106 will set the first projection point as P2 (X12, Y12, Z12). If the second virtual plane is A2X+B2Y+C2Z+D2=0, X12 is equal to X11+A2T, Y12 is equal to Y11+B2T, and Z12 is equal to Z11+C2T. In the embodiment, T is equal to −(A2X11+B2Y11+C2Z11+D2)/(A22+B22+C22). Thus, the establishing module 106 can measure each of the first projection points for the first boundary points, and generate the first fixed area based on the plurality of first projection points. In at least one embodiment, since the first surface is perpendicular to the second surface, the first projection points formed by projecting the first boundary points on the second surface are still on the first surface. Thus, the first fixed area can be a first closed area surrounded by the plurality of first boundary points and the plurality of first projection points.
In at least one embodiment, when the establishing module 106 measures one of the second projection points for one of the second boundary points M11 (X13, Y13, Z13), the establishing module 106 will set the second projection point as M12 (X14, Y14, Z14). If the first virtual plane is A1X+B1Y+C1Z+D1=0, X14 is equal to X13+A1T, Y14 is equal to Y13+B1T, and Z14 is equal to Z13+C2T. In the embodiment, T is equal to −(A1X13+B1Y13+C1Z13+D2)/(A12+B12+C12). Thus, the establishing module 106 can measure each of the second projection points for the second boundary points, and generate the second fixed area based on the plurality of second projection points. In at least one embodiment, since the second surface is perpendicular to the first surface, the second projection points formed by projecting the second boundary points on the first surface are still on the second surface. In at least one embodiment, the second fixed area is a second closed area surrounded by the plurality of second boundary points and the plurality of second projection points.
At block 35, the fixing module 108 divides the first fixed area into first sub-areas and adds a first additional point into each of the first sub-areas. In at least one embodiment, the fixing module 108 divides the second fixed area into second sub-areas and adds a second additional point into each of the second sub-areas.
In at least one embodiment, the fixing module 108 divides the second fixed area into a plurality of second sub-areas. The number of the second sub-areas can be set by user or set according to the density of the points in the point cloud. The fixing module 108 can arbitrarily add a second additional point into each of the second sub-areas to fix the second surface of the point cloud.
The embodiments shown and described above are only examples. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes can be made in the detail, including in matters of shape, size, and arrangement of the parts within the principles of the present disclosure, up to and including, the full extent established by the broad general meaning of the terms used in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201410460697.0 | Sep 2014 | CN | national |