Abstract

The existing surface reconstruction algorithms currently reconstruct large amounts of mesh data. Consequently, many of these algorithms cannot meet the efficiency requirements of real-time data transmission in a web environment. This paper proposes a lightweight surface reconstruction method for online 3D scanned point cloud data oriented toward 3D printing. The proposed online lightweight surface reconstruction algorithm is composed of a point cloud update algorithm (PCU), a rapid iterative closest point algorithm (RICP), and an improved Poisson surface reconstruction algorithm (IPSR). The generated lightweight point cloud data are pretreated using an updating and rapid registration method. The Poisson surface reconstruction is also accomplished by a pretreatment to recompute the point cloud normal vectors; this approach is based on a least squares method, and the postprocessing of the PDE patch generation was based on biharmonic-like fourth-order PDEs, which effectively reduces the amount of reconstructed mesh data and improves the efficiency of the algorithm. This method was verified using an online personalized customization system that was developed with WebGL and oriented toward 3D printing. The experimental results indicate that this method can generate a lightweight 3D scanning mesh rapidly and efficiently in a web environment.

1. Introduction

3D printing is a technology that manufacture solid parts through accumulating material layer by layer [1], and it can efficiently support the recent accomplishments in 3D digital-to-solid modeling [2]. 3D printing can produce customized objects [3, 4] that can be realized by any merchant to personalize products for a consumer, meet quality expectations, and add personal refinements [5]. With the development of the Internet, 3D printing cloud services platform can provide integrated 3D printing services [6] to serve customers at all levels: from cloud-based 3D scanning of a physical model to personalized and/or customized products [7]. However, cloud-based point cloud data surface reconstruction from 3D scanned point clouds requires not only a low-complexity reconstruction algorithm to meet the high concurrency requirements of cloud service platforms but also the reconstruction of a lightweight mesh to meet the requirements of efficient and real-time data transmission in web environments [8]. Most of the existing surface reconstruction algorithms use an accurate mesh as a reconstruction target without considering a reduction in the complexity of reconstruction algorithms or the lightweight nature of the 3D model data. In addition, a PC connected to a 3D scanner cannot receive the generated point cloud data directly from the cloud server due to Internet security requirements. Thus, real-time point cloud data transmission from the 3D scanner to the cloud service platform cannot be realized along with the process of 3D scanning [9].

To reduce the complexity of the algorithm and generate a lightweight 3D model, in this paper, an online lightweight surface reconstruction algorithm is proposed, which is composed of a point cloud update algorithm (PCU), a rapid iterative closest point algorithm (RICP), and an improved Poisson surface reconstruction algorithm (IPSR). The PCU is used to obtain the latest point cloud data generated by the 3D scanner in real time. It can remove part of the noise from the point cloud data and makes it lightweight using a filtration approach based on the center of gravity. The 3D scanner used in this research is called Ciclop, which independently generates two point cloud data sets through its two infrared laser modules. Rapid and accurate registration between the two sets of point cloud data is achieved using the RICP. The resulting modified point cloud set restores the outline of the scanned object more accurately. During the process of surface reconstruction by the IPSR, the normal vectors of the point cloud data are pretreated via a recomputation method based on the least squares method. To repair the mesh holes that can easily be generated by the Poisson surface reconstruction algorithm, an iterative postprocessing algorithm for PDE patch generation based on biharmonic-like fourth-order PDEs is executed successively in IPSR, which also reduces the amount of reconstructed mesh data.

To realize real-time point cloud data transmission, a dynamic visualization framework for point cloud data, based on WebSocket, is also proposed in this paper. The point cloud data generated by Ciclop in real-time can be encapsulated as a JSON file in the local server and dynamically displayed in the browser using WebSocket and WebGL. In addition, the fluency and high rendering effect of dynamic visualization of point cloud data is ensured by the Web Worker mechanism in high concurrency environments.

In sum, the novel contributions in this paper are as follows: (1) an online lightweight surface reconstruction algorithm, in which the lightweight operations are conducted at every step, from point cloud data acquisition to preprocessing and to surface reconstruction. This reconstruction ensures that a reduced data volume of the 3D model meets the requirement for web-based data transmission; (2) a dynamic visualization framework for point cloud data based on WebSocket, which achieves online dynamic visualization of point cloud data in high concurrency environments; (3) an online personalized customization system oriented toward 3D printing, which dynamically visualizes the point cloud data through the 3D scanning process and the efficient and rapid reconstruction of the lightweight mesh in the web environment.

The remainder of this paper is organized as follows. Section 2 reviews prior relevant research concerning surface reconstruction. Section 3 elaborates the online lightweight surface reconstruction algorithm, which includes the PCU, the RICP, and the IPSR. Section 4 presents the experiments, which demonstrate the system framework and experimental platform, point cloud update and the results of dynamic visualization tests, point cloud registration tests, and online surface reconstruction tests, and Section 5 concludes the paper.

2.1. Surface Reconstruction

In the field of surface reconstruction, Zhang et al. [10] proposed a new approach to simultaneously denoise and parameterize unorganized point cloud data, in which the key ingredient was an “as-rigid-as-possible” meshless parameterization that maps a point cloud with disk topology to a 3D plane. Denoising and reconstruction of the point cloud are executed in the same process. Huang et al. [11] proposed a 3D reconstruction system that performs fast 3D modeling using a Kinect sensor and can automatically detect the face region and track head pose using an ICP algorithm. A volumetric integration method was used to fuse the resulting data. Finally, a marching cubes algorithm was used to reconstruct the face model used for display, which effectively improved the face model accuracy. Centin et al. [12] proposed a new Poisson reconstruction algorithm based on an interpolation method and exploited it to efficiently guide a restricted Delaunay framework protecting the input mesh and the boundary curves. The boundary of a repaired hole can be seamlessly integrated with the patch boundary. Garrett et al. [13] proposed an accurate object-tracking method based on an ICP algorithm. Reduced-density friendly point clouds can be reconstructed to create an accurate mesh through a Poisson surface reconstruction algorithm via object tracking. Peyrot et al. [14] proposed a framework to design semiregular meshes directly from stereoscopic images in which feature-preserving samples of the stereoscopic images were extracted to obtain a base mesh. Then, using iterative procedures, a semiregular mesh of the original surface was generated from the base mesh. Liu et al. [15] proposed a method for representing 3D outdoor scenes via 3D laser point clouds that used a fast optimal bearing angle (FOBA) approach to project the 3D laser point clouds to 2D images, which greatly reduced the computational cost of scene segmentation with little loss of accuracy, thus improving the efficiency of the reconstruction. Li et al. [16] proposed a Prominent Cross-Section algorithm embedded with a curvature constraint that can automatically identify the boundary of a damaged area, thereby eliminating any defective point clouds during the reconstruction process. They also proposed an improved iterative ICP algorithm to automatically identify and eliminate any unreliable corresponding pairs. Roth et al. [17] proposed a method for reconstructing the 3D surface model of an individual’s face along with albedo information. A 3D Morphable Model was fitted to form a personalized template, and a novel photometric stereo formulation was also developed. This formulation of an accurate 3D face model can be generated from low-quality photo collections and with fewer images based on the albedo information. Boltcheva and Lévy [18] proposed a method for reconstructing a 3D surface triangulation from an input point set based on a restricted Voronoi diagram. The properties of the restricted Voronoi cells were utilized to make an embarrassingly parallel implementation that could process 100 million vertices within a few minutes to achieve rapid mesh reconstruction.

2.2. Network Communications

In the field of network communication, Marion and Jomier [19] proposed a web-based system that focused on collaborative interaction. The system is composed of two innovative technologies: WebGL and WebSocket. The architecture of the proposed system was presented, and the operating process of the system was further elaborated in the field of telemedicine. Zimmer and Kerren [20] suggested a client/server-based visualization system for collaboratively exploring graphs in which the web application was rendered by WebGL, and the real-time visualization transmission was achieved by WebSocket. Mwalongo et al. [21] proposed an approach to visualize dynamic molecular data using WebGL. The approach exploits HTML5 technologies such as WebSocket and Web Workers and used efficient data encoding techniques to minimize the data transferred to the client. This approach allows scientists to perform analyses from dynamic visualizations of the molecular structure data via a browser. Renambot et al. [22] presented SAGE2, a software framework based on WebSocket that enables local and remote collaboration. 3D-rendering and cross-platform visualization and interaction were supported in this framework, which can be utilized in education, academic conferences, and so on.

2.3. Existing Problems in Current Research

Although any of the current surface reconstruction algorithms [1114] can reconstruct accurate meshes, the data volume of 3D meshes is larger; thus, the resulting average reconstruction time is also longer. As an example of this increased data volume, for Stanford Bunny point cloud data (1.89 MB), the reconstruction mesh was at least 20 MB and the average reconstruction time was at least 15 s. Although the quality of the point cloud and mesh improved while the reconstruction time decreased due to denoising and registration pretreatments, the surface reconstruction algorithms [10, 16] were not optimized, resulting in a insufficiently lightweight mesh. Consequently, the reconstruction was unable to meet the requirements for network transmission. While the methods of real-time data communication technologies, based on WebSocket [1922], were achieved only if the effects of the relevant data were stored in a database, the data could be visualized dynamically in the browser. Thus, the real-time data communication between device and cloud server was not achieved. Overall, dynamic visualization of point cloud data in a browser, processed by 3D scanning technology, is difficult to achieve.

3. Online Lightweight Surface Reconstruction Algorithm

The method proposed in this paper is achieved by using an open-source 3D scanner called Ciclop. The structure of Ciclop is shown in Figure 1. The two point cloud sets, denoted by and , are generated from infrared laser modules and , respectively.

To ensure the efficiency and speed of surface reconstruction and the reconstruction of a lightweight mesh, an online lightweight surface reconstruction algorithm is proposed in this paper. The algorithm includes the PCU, the RICP, and the IPSR. These three subalgorithms are executed in turn. A flow-chart of the online lightweight surface reconstruction algorithm is shown in Figure 2.

The process in the PCU can be described as two point cloud sets, and , which are generated by the infrared laser module and , respectively, from a set of depth images which are acquired continuously from Ciclop’s Logitech C270 camera. The point cloud data is updated during the process of 3D scanning. The determination of whether to terminate the process is executed after each iteration. The holonomic point cloud sets and should be generated over several iterations.

The RICP performs the registration between and . First, is selected as the benchmark, and a preregistration of and is executed based on the spatial relationship between the infrared laser modules and . Thus, is rotated to the position of . Then, the ICP algorithm transforms point cloud set , rotating it to a new position, . Finally, the solution of modified point cloud set is conducted using the spatial relationship between and .

The IPSR first executes a pretreatment step that reconstructs the normal vectors of the modified point cloud set based on the least squares method. Subsequently, the Poisson surface reconstruction and a postprocessing step that generates PDE patches based on a biharmonic-like fourth-order PDEs are conducted successively. The lightweight mesh is generated through the above procedures.

3.1. Point Cloud Update Algorithm

A point cloud update algorithm (PCU) is proposed in this paper. The updating process involves the following process: whenever the Ciclop turntable is rotated by 1.8 degrees, a new depth image is generated by the Logitech C270, adding the new feature points and to the point cloud sets and , respectively. and will be refined after several iterations.

To meet the requirements of efficient and real-time data transmission based on B/S, the new feature points generated from should be filtered before they are added into the existing point cloud sets. As shown in Figure 3, first, new feature points are selected. Then, new triangular structures are formed based on these new feature points and the base of a triangular structure. These new triangular structures are considered the base triangular structures that need further refinement.

The filtration approach is conducted based on a center of gravity approach that can be described as follows.

Step 1. Three feature points , , that are about to be reconstructed as mesh triangle are obtained from the depth image , and their 2D coordinates , , and are extracted. Their center of gravity is computed by .

Step 2. The 2D points obtained from the depth image are imported into the existing point cloud set. Any points located inside the triangle (ignoring the points on the boundary) are selected and collected as the point set .

Step 3. The variable is defined as the minimum distance. A bubble sort algorithm [23] is utilized to compute the point nearest to , which is determined using the distance formula .

Step 4. The new feature point is selected, and three subtriangles are generated from this new feature point with the other three existing feature points, after which the filtration process is complete.

Compared with the point cloud update approach that adds all the points into the point cloud set, our approach effectively achieves a denoised and lightweight point cloud to some extent.

3.2. Rapid Iterative Closest Point Algorithm

Fundamentally, the RICP can be regarded as a solution of a least squares problem. The method was proposed by Besl and McKay [24], who determined that this approach can accomplish registration between two point cloud sets and [25]. Let be the reference point cloud set and be the sample point cloud set. A translation vector and a rotation matrix which transform to can be computed by ICP.

To achieve rapid registration between different point cloud sets and reduce the number of iterations, a preregistration process is conducted between and , i.e., the rotation matrix and translation vector forming a rigid transformation from the position to the position of the respective infrared laser modules, and , are computed in a world-coordinate system. Then, is preassociated with and , which greatly reduces the time to find the nearest points between two point cloud sets and number of ICP iterations.

(1) Preregistration. Translation vector is computed from , and formulated as follows:where and should be expressed as pure quaternions (i.e., and ). Let the origin of the world-coordinate system be ; then, the rotation unit quaternion from to can be computed as . According to [26],where is the conjugate quaternion of and expressed as . Thus, can be solved from (2), and can be transformed to the rotation matrix , which is formulated as follows:

Thus, the rigid transformation of based on and is implemented to transform to the point cloud set , which is formulated as follows:

(2) The Transformation of the Point Cloud Set. The ICP relies on identifying the nearest neighbors between both point sets. To find the matches between and , a -nearest neighbors search [27] is used that adopts Euclidean distance as the distance measure:

Only one neighbor is returned when and are in exact spatial correspondence. When too many points are close (relative to an algorithmic threshold), the match is rejected in the current frame and not considered further. Therefore, a kd-tree data structure is used for all points, and an approximate nearest neighbor search [28] is implemented to accelerate the search.

All the associated points should be weighted. The weight value is based on the comparability of normal vectors and formulated as follows:

The normal vectors of two matching points must be aligned in a similar direction after the two point clouds are approximately aligned. The output of this step is a point cloud set consisting of the corresponding points in and , along with the weight values for each match .

To transform the point sets, the translation vector and rotation matrix are computed from to . The translation vector can be computed as the difference between the corresponding centroids of and , which can be formulated as follows:

The translation in step is given as a rotation from the previous step, . Assume that total number of iterations is ; then, the final translation vector is

To calculate the rotation matrix , all the points must be first moved to their centroids and formulated as

According to [29], the incremental rotation matrix is computed bywhere and are orthogonal matrices that result from a singular value decomposition where

Here, is the orientation increment between the matching points in and , which stem from and , respectively. The final rotation matrix is formulated as follows:

ICP aligns the two point clouds by solving a least squares problem [30] with an error function formulated aswhere represents the number of points in . Points that do not meet the error metric (such as a set Euclidean distance between and for outlier removal) have a weight of 0 so that they do not contribute to the error function. The termination criterion is checked after all the iteration steps have been processed. The iteration continues until the termination criterion is reached in step , meaning that the error delta between two subsequent frames is below the termination criterion . The resulting translation vector and the rotation matrix are generated in step .

(3) Solution of the Modified Point Cloud Set. After transforming the point cloud set from to the position registered with , a new point cloud set is generated. The modified point cloud set , for arbitrary , is computed as shown in the following:

3.3. Improved Poisson Surface Reconstruction Algorithm

Surface reconstruction can be accomplished by a Poisson surface reconstruction algorithm. Typical PDE Poisson equations are constructed and solved iteratively to extract the isosurface and realize surface reconstruction. However, there are several disadvantages to this algorithm: it is strongly dependent on normal vectors and tends to form mesh holes. Therefore, the IPSR is proposed in this paper. The point cloud pretreatment, including recomputing the normal vectors based on the least squares method and postprocessing a generated PDE patch based on biharmonic-like fourth-order PDEs, is conducted successively to generate an accurate, connected, and lightweight mesh.

3.3.1. Recomputation of Point Clouds Normal Vectors

The recomputation of the normal vectors of a point cloud proposed in this paper is based on the least squares method. Then, the computational complexity of the surface reconstruction algorithm is reduced based on the accuracy of the normal vectors [31].

An arbitrary coordinate point , in a point cloud set , and all the neighbor points of can be regarded as being on approximately the same plane, , which is formulated as follows:

The residual sum of squares between all the -neighbor points and is

The best fit can be regarded as the minimum ; therefore, we take the partial derivative of with , , and . Then, the equations are

Let , , and . Finally, the result can be formulated as follows:

The coefficients , , and can be solved via (18) to generate the normal vector of . Moreover, the vector orientations are processed for consistency; that is, an arbitrary normal vector of point , which is near point , is selected. Transvection of and is conducted. If , the orientation of is kept; otherwise, is adjusted to the opposite orientation: .

3.3.2. Poisson Surface Reconstruction

In a Poisson surface reconstruction, the solution of the surface to be reconstructed is regarded as the solution of a 3D indicator function . The reconstructed surface is then obtained by extracting the appropriate isosurface [32]. This process is depicted in Figure 4.

To solve the Poisson equation, the 3D space should be discretized. Therefore, an adaptive octree is built. The closer the border is, the larger the density of the octree is [32]. Based on the octree, the base function is defined aswhere represents the th convolution. Every point sample becomes a leaf node in a depth D octree; therefore, the unit-integral “node function” centered around node is formulated as where represents the center of and represents the width of .

The vector field is determined from the normal vector of in a point cloud set . The gradient field of the indicator function can be expressed as . The purpose of the Poisson surface reconstruction is to solve a function whose gradient best approximates a vector field defined by . This can be formulated as follows:

The problem shown in (21) can be solved by the Poisson equation . A vector field can be approximately formulated aswhere are the eight depth- nodes closest to and represents the trilinear interpolation weights. To solve the problem that and are not in the function space, the equation can be simplified by solving for the function by minimizing

Given a vector , whose th coordinate is , the goal is to solve for the function . The vector can be obtained by projecting the Laplacian of onto each , ensuring that it is as close to as possible. To express (23) in matrix form, let ; then, the problem is transformed into one of solving for the vector .

Let the matrix be contributed as the dot product of the Laplacian with each of the values; for all , ; the th entry of is set to

Thus, the solution of the indicator function can be regarded as finding

The isosurface from the indicator function can be extracted to octree representations through the method used in previous adaptations of the marching cubes [33].

3.3.3. Generation of PDE Patches

The lightweight methods are implemented in the abovementioned algorithms (i.e., PCU in Section 3.1, RICP in Section 3.2, and the recomputation of point clouds normal vectors in Section 3.3.1). Because of the highly lightweight point cloud data, it is easy to generate mesh holes near areas with complex curvature variations, which could influence the visualization of the reconstructed 3D model. Thus, in this paper, an alternative approach to PDE patch generation based on biharmonic-like fourth-order PDEs is proposed. The algorithm is utilized to repair mesh holes on the reconstructed surface according to Section 3.3.2. Each hole is represented by patches with their own coordinate system. The preservation of irregular and sharp details on the surface will be found by matching the respective patches to the surface at various sizes and orientations. According to [34], a biharmonic-like fourth-order PDE is formulated as follows:where is regarded as the hole to be repaired, and , . Additionally, the PDE patch can be formulated by (27). The analytic solution of (27) can be computed by of separating the variables and formulating the problem aswhere , , are, respectively, formulated as follows:

The PDE coefficients and are vectors valued by the boundary conditions. is regarded as the “spine” of the surface, and is an -order “radius” vector. The amplitude of the “radius” term decays as the frequency increases (if ), so that the solution of the PDE patch is mostly determined by a first-order “radius” vector and a second-order “radius” vector . Therefore, (28) can be approximately reformulated as follows:

The number of vector-valued PDE coefficients is . The higher is, the higher the complexity of the reconstruction is. To generate a lightweight mesh, we let . Then, the boundary conditions that fit (27) are formulated as follows:where the conditions , , , and are isoparm boundary curves on the surface patch at , respectively, where . To precisely approach the mesh representation of complex geometric shapes, this method needs to use sufficient PDE boundary curves, which must be extracted from the vertices of the original polygon mesh representation. Figure 5 illustrates the layout of the various PDE boundary curves for an individual PDE patch, where degenerates into a single point.

4. Experiment and Analysis

4.1. System Framework and Establishment of Experimental Platform

To verify the feasibility of the proposed lightweight surface reconstruction method proposed in this paper, an online personalized customization system oriented toward 3D printing was developed and used as the experimental environment. The system framework is shown in Figure 6 and can be divided into 4 units: Central Control Unit; Online Personalized Customization Unit; 3D Scanning Unit; and 3D Printing Unit. The Central Control Unit runs on a PC and a cloud server, and the collaborative operation of the other 3 units is controlled by the Central Control Unit, which is the core of the whole system. The Online Personalized Customization Unit runs in Google Chrome directly. The dynamic visualization of the point cloud generated by the 3D Scanning Unit can be rendered; that is, the point cloud generated in real-time can be displayed to users. Moreover, the point clouds are reconstructed as meshes. Modifications of color, texture, dimension, slicing of the STL model, and generation of G codes are also supported in the Online Personalized Customization Unit. G codes can be imported by the 3D Printing Unit for the 3D printing tasks.

(1) Hardware Framework of 3D Scanning Unit. The 3D Scanning Unit is composed of the open source 3D scanner Ciclop, whose hardware framework is shown in Figure 7. The Ciclop is composed of an Arduino UNO Motherboard (control core), a Logitech C270 (camera), two infrared laser modules, and other mechanical structures. Its turn table is driven by a NEMA 17 stepper motor which rotates the object undergoing scanning at 1.8°/s around its central axis. Simultaneously, two sets of 5 mW infrared laser modules, set at an angle of 135°, are coordinated with the Logitech C270 to generate depth data at different angles. Thus, the point cloud data of the scanned object can be generated as well [35].

(2) Dynamic Visualization of Point Cloud Data. To achieve the dynamic visualization, the point cloud data from the 3D Scanning Unit to the Online Personalized Customization Unit needs to be transmitted in real time. A proposed dynamic visualization framework for point clouds based on WebSocket is shown in Figure 8. The thin arrows represent the control flow within the server or browser, while the wide arrows represent the data flow between memory spaces. WebSocket is a real-time communication protocol for HTML5 that can achieve real-time data transmission between a browser and a cloud server [36]. Thus, the point cloud data that are generated by Ciclop in real time can be dynamically displayed in the browser by WebSocket and WebGL. The framework is divided into three parts: cloud server, local server, and browser.

The interaction is initiated by the browser, which sends a request URI to the cloud server. The cloud server parses the request and sends the appropriate JavaScript code back to the browser, which dynamically visualizes and renders the point cloud. Meanwhile, a request is also sent to Ciclop. The point clouds generated by Ciclop are extracted by its underlying computer software, Horus, and encapsulated as JSON files by the local server. A socket connection can be established between a local server and cloud server to upload JSON files. Subsequently, a WebSocket connection will also be established through JavaScript code running in the Browser to fetch and parse the JSON files. After the request URI is sent from the browser to the cloud server, a monitor is established to determine whether the latest JSON file to be parsed in the browser through WebSocket connection exists. The point cloud data will be dynamically updated by WebGL when the JSON file exists.

JavaScript is generally single-threaded; consequently, the performance requirements of the computer hardware are higher. To allow the user-interface to remain responsive, the browser fetches and renders the JSON files. The fetching operation runs in a separate Web Worker tread, while the rendering runs in the main JavaScript thread. All long-running code paths need to run outside the main thread [37]. Moreover, to avoid browser congestion by too many messages, the next time step of a JSON file is always requested explicitly by the browser. That is, only when the browser acquires a new rendering request for the current point cloud data to GPU does it send the cloud server a new request for new JSON files. Thus, this framework ensures that each frame will be rendered at least once.

(3) Establishment of the Experimental Platform. The hardware configuration of the Central Control Unit is shown in Table 1.

The environmental calibration parameters of the 3D scanning operation to meet the requirements of the experimental environment are configured in Horus, the computer software underlying Ciclop, as shown in Table 2.

4.2. Point Cloud Update and Dynamic Visualization Experiments

Using the dynamic point cloud visualization framework and the PCU as proposed in Section 3.1, experiments assessing the online 3D scanning were performed on the “Huba” and “Totoro” models to verify the effect of point cloud dynamic visualization and the lightweight effect of the PCU. The experimental environment is shown in Figure 9, and the dynamic visualization processes in Google Chrome are shown in Figure 10. To optimize the visualization effects, the background color of Google Chrome was set to black.

The generation time and amount of data of the two sets of point clouds (representing the two models “Huba” and “Totoro”) were recorded. For comparison purposes, the two circumstances were implemented both with and without the PCU. The results are shown in Table 3.

As listed in Table 3, with the PCU, the size of the point cloud data of the “Huba” model decreases by 69.2% (from 5.19 MB to 1.60 MB), while the size of the point cloud data of the “Totoro” model decreases by 71.1% (from 6.54 MB to 1.89 MB) during the point cloud dynamic visualization process. Although the load time of each model increases by approximately 15% with the PCU, the growth is not substantial compared to the lightweight point cloud data. Experimental analysis shows that lightweight dynamic visualization of point cloud data in a web environment can be accomplished by the PCU in conjunction with the dynamic visualization framework for point clouds based on WebSocket as proposed in this paper.

4.3. Point Cloud Registration Experiments

Experiments on the registration of two sets of point clouds, and , which belong to the “Huba” and “Totoro” models, were conducted by RICP and ICP, respectively, to generate a modified point cloud set . The termination criteria of the MSE threshold was set to  mm, and the number of iterations and the registration time of the two point cloud sets by RICP and ICP were recorded and are listed in Table 4, and the convergence curves of the registration error with the two sets of point clouds are shown in Figure 11.

The registration effects of the two sets of point clouds calculated by the different algorithms are shown in Figure 12.

With the RICP, the number of iterations decreased from 12 to 7, and the time decreased by 45.8% from 59 s to 32 s for the “Huba” model, while the number of iterations decreased from 15 to 8, and the time decreased by 46.8% from 77 s to 41 s for the “Totoro” model. These results are listed in Table 4. Figure 11 shows that the MSEs of the two models decrease by 0.039 mm and 0.036 mm after one iteration. The experimental analysis shows the increase in algorithmic efficiency from preregistering the point cloud data in the RICP. The visualization effects of the registrations by the RICP and ICP are shown in Figure 12.

4.4. Online Surface Reconstruction Experiments

Using the IPSR proposed in Section 3.3, modified point cloud data sets of the “Huba” and “Totoro” were reconstructed by both IPSR and Poisson surface reconstruction (PSR) algorithm in the web environment. The online surface reconstructions by both algorithms are shown in Figure 13.

Relevant indicator values were recorded during the process of surface reconstruction to assess IPSR and PSR, including triangular facets, size, reconstruction time, average frames per second (FPS), and occupied CPU percentage [38]. The specific values of these metrics are listed in Table 5, while four histograms of the triangular facets, size, reconstruction time, and average FPS are shown in Figure 14.

As Figure 13 shows, several single-point spikes and holes exist on the polygon mesh reconstructed by PSR. In contrast, the polygon meshes reconstructed by IPSR are accurate, connected, and lightweight. In fact, the surface is relatively smooth, without any obvious single-point spikes on the hole boundaries.

In addition to the differences in Table 5 and Figure 14, compared with PSR, the triangular facets of the “Huba” mesh created by IPSR decreased by 16.6%, while the size and reconstruction time decreased by 27.1% and 14.7%, respectively. The triangular facets of the “Totoro” mesh decreased by 12.1%, while the size and reconstruction time decreased by 14.4% and 17.7%, respectively. The lightweight extent of each mesh produced by IPSR is relatively obvious. Although the decrease in average FPS is barely noticeable (1.6% and 2.6% for the “Huba” mesh and “Totoro” mesh, resp.) both are still relatively acceptable with tiny fluctuations around a median value of approximately 70. Users reported that the system ran smoothly without any obvious decrease in rendering speed.

The experimental analysis shows that the reconstruction efficiency, the accuracy, and the absence of obvious spikes in the mesh reconstructed by IPSR are more desirable given the lightweight data requirements of a web environment. Additionally, meshes on a 3D printing cloud server platform can be personalized and customized using this method.

5. Conclusions

In this paper, a lightweight surface reconstruction method for online 3D scanning point cloud data oriented toward 3D printing is proposed. To achieve low algorithmic complexity and generate a lightweight 3D model, an online lightweight surface reconstruction algorithm is proposed, which is composed of a point cloud update algorithm (PCU), a rapid iterative closest point algorithm (RICP), and the improved Poisson surface reconstruction algorithm (IPSR). The PCU is used to denoise the point cloud data to create a lightweight version in real time. The RICP is used to perform rapid and accurate registration between two sets of point cloud data. The IPSR is used to generate the lightweight mesh, and the postprocessing of the PDE patch generation based on biharmonic-like fourth-order PDEs is executed to repair the mesh holes on the reconstructed lightweight mesh, which improves the 3D model visualization. In addition, to achieve real-time point cloud data transmission in conjunction with the 3D scanning process in a web environment, a dynamic visualization framework for point cloud data based on WebSocket is also proposed. This approach achieves comprehensive dynamic visualization of the point cloud data in the browser. The fluency and high rendering effect are ensured through the Web Worker mechanism in the high concurrency environment. Finally, an online personalized customization system oriented toward 3D printing is developed based on the proposed method.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This work is supported by the National Key Technology Research and Development Program of China (no. 2016YFB1101700) and Nature Science Foundation of Hubei Province, China (no. 2015CFA115).