Surface approximation to point cloud data using ... - Extras Springer

4 downloads 0 Views 309KB Size Report
Given a collection of unorganised points in space, we present a new method of constructing a .... cube = find_cube(point); // find the 1/8 cube with point inside if(cube->InOut .... the cube. Therefore, there are 26 possible directions we can cast.
SURFACE APPROXIMATION TO POINT CLOUD DATA USING VOLUME MODELING

Adam Huang & Gregory M. Nielson Arizona State University, Tempe, AZ, USA

Abstract:

Given a collection of unorganised points in space, we present a new method of constructing a surface which approximates this point cloud. The surface is defined implicitly as the isosurface of a trivariate volume model. The volume model is piecewise linear and obtained as a least squares fit to data derived from the point cloud. The original point cloud input is assigned a zero value. Additional points are derived for the interior and exterior and assigned positive and negative values respectively.

Key words:

surface approximation, unorganised points, point clouds

1.

INTRODUCTION

We describe a new method for fitting an approximating surface to a point cloud of data. A point cloud simply consists of a collection of unorganized points ( x s , y s , z s ) s = 1, , S . We assume that these points are on or near a surface. We find an approximation to this surface as the isosurface of a trivariate, volume model, F ( x, y, z ) = 0 . The function F is a piecewise linear trivariate function and is obtained by using least squares fitting applied to the original data which are assigned zero values and certain additional data points which are interior and exterior to the surface and assigned positive and negative values respectively. Results of this approach are shown in Figures 1 and 2. The input for Figure 2 is the Stanford bunny data set which is obtained with a laser scanner. The data of Figure 1 is obtained by sampling a mathematical function of two linked tori. Once the sample points are obtained no additional information about the source or how the data was collected is used. This, linked tori example, points out that our 1

2

Adam Huang & Gregory M. Nielson

modelling technique can produce surface with disjoint, linked segments with non-trivial genus.

Figure 1. Point cloud input on the left and the resulting smooth shaded triangular mesh surface on the right.

Figure 2. Point cloud input on the left and the resulting triangular mesh surface approximation on the right.

Fitting surfaces that interpolate or approximate point clouds had been studied for over a dozen years. See [5], [3], [2] and [1] for example. A good survey on the subject is [6]. The current paper is based upon [4] and is organized as follows. In Section 2, we describe the details of the piece-wise linear volume model and discuss methods for computing optimal approximations. Section 3 is devoted to a description of the various methods

SURFACE APPROXIMATION TO POINT CLOUD DATA USING VOLUME MODELING

3

we use for obtaining the additional interior and exterior data points. More information on results is covered in Section 4.

2.

THE VOLUME MODEL FUNCTION AND THE FITTING PROCESS

We view the input data ( x s , y s , z s ) s = 1, , S as a collection of unorganized sample points on a surface of interest. We assume no other input information. All properties that are used in the creation of a surface which approximates this point cloud are derived from the original data. Our general approach is to compute a trivariate volume model, F ( x, y , z ) , so that the isosurface S = {( x, y, z ) such that F ( x, y, z ) = 0} approximates the point cloud input. The function F ( x, y , z ) is determined in a least squares fitting sense to be approximately 0 for surface points, -1 for interior points and +1 for exterior points. The three distinct function values correspond to points ( x r , y r , z r ) “interior to”, ( x s , y s , z s ) “on”, or ( xt , y t , z t ) “exterior to” the surfaces respectively. The “on” points are the given unorganized data while “exterior” and “interior” are derived from them. How we derive these additional points is covered in the next section. For the remainder of this section, we assume that these three types of data points are already available. The form of F is a piece-wise linear function. We write F in the form 

F ( x, y , z ) =

ai , j ,k bi , j ,k ( x, y, z ) i, j ,k

where bi , j ,k is +1 at a grid point with index (i, j, k ) and zero at all other grid points. The grid will consist of a regular, Cartesian grid, of size N × N × N and additionally the centers of these cells. See in Figure 3.

Figure 3. The grid points which serve to define the volume model.

4

Adam Huang & Gregory M. Nielson

The entire domain is decomposed into tetrahedra with edges joining each of the N × N × N grid (gray points in Figure 3) with the center points (black points in Figure 3). The function, F, is linear over each of these tetrahedra. The coefficients of the volume model are determined by mininmizing the quantity 2 

Φ (ai , j , k ) =

R

ai , j , k bi , j , k ( xr , yr , zr ) + 1 





r =1 i , j , k

2 

S

+ 



ai , j , k bi , j , k ( xs , ys , zs ) 

s =1 i , j , k

2 

T

+

ai , j , k bi , j , k ( xt , yt , zt ) − 1 





t =1

i, j,k

This is a quadratic form in the variables a i , j ,k . The values of the coeficients which minimize this quantity must be zeros of the gradient of Φ and so we have the linear system of normal equations,

∂Φ (ai , j , k ) = 0 ∂a , m , n 

This linear system is symmetric and sparse. With the grid system and basis functions we use, each row can have at most 9 non-zero elements. We use a data structure that is related to the grid over which the basis functions are defined and only keeps track of the non-zero entries of the coefficient matrix of the normal equations. The Gauss-Seidel iteration scheme is used to solve this sparse linear system. After solving for the a i , j ,k ’s, an approximation surface can be constructed by computing the isosurface F ( x, y , z ) = 0 . We use a simple marching tetrahedra approach where the tetrahedra are the same as used in the description of the volume model.

3.

SAMPLING

In this section we will discuss some schemes based on ray casting concepts to generate a good sample set of points from unorganized data. A good sample should be correct-valued and well-distributed. By the term of

SURFACE APPROXIMATION TO POINT CLOUD DATA USING VOLUME MODELING

5

correct-valued, we assure that the function values of “interior”, “on”, and “exterior” points err at most within the range of a grid unit. By the term of well-distributed, we require that there are a moderate number of sample points in every grid unit. An ill-distributed sample might result in some zero coefficients in the linear system and will result in an erroneous solution. In order to generate correct-valued and well-distribution sample points from unorganized surface data, we introduce a new instrument called oneeighth cubes. As the name suggests, one-eighth cubes are made by dividing basic cubes into eight equal sized cubes which have two grid points as their vertices as shown in Figure 4. These small cubes are named as one-eighth cubes or 1/8 cubes.

Figure 4. One-eighth cubes.

By dividing the grid system into 8 smaller cubes, we can generate sample points that satisfy the well-distribution property. We assign an InOut tag to each 1/8 cube to record the status within each 1/8 cube in the system. Before performing any sampling algorithm, a procedure is performed to initialize all InOut tags to be “inside”. The procedure then browses through 1/8 cubes to update the tags to be “on” for those 1/8 cubes with data points inside. The initialization procedure is: for each 1/8 cube cube->InOut = “inside”; //initialization for each data point { cube = find_cube(point); // find the 1/8 cube with point inside if(cube->InOut = = “inside”) cube->InOut = “on”; // set InOut tag to “on” for 1/8 cubes with // data points inside }

6

Adam Huang & Gregory M. Nielson

The result is shown in Figure 5 where dark gray areas are “inside” and light gray areas are “on”. In the rest of this section we will discuss three sampling methods based on casting rays on or away from surface data points. On

Inside

Outside

Figure 5. The beginning state where all non-surface points are initialised to “inside”.

3.1 Parallel Ray Casting The parallel ray casting algorithm casts a set of parallel rays toward objects to detect the possible surface existence. Although the direction of parallel rays can be randomly chosen, we will only use positive and negative x, y, and z direction rays for simplicity and efficiency. At this stage we assume that the initialization procedure has been performed and has resulted in a closed space by the “on” cubes without holes. We assert that "without holes" means a point inside the space enclosed by the “on” cubes cannot go outside without passing through any “on” cube's vertices, edges, or faces. (See Figure 5) The positive x direction rays are performed first as shown in Figure 6 from the left side. Before a ray hits any “on” cube, the cubes it travels through must be “outside.” The InOut tag is assigned by “outside” which is denoted by the white areas in Figure 6. At the same time, equally spaced “exterior” points are created with function values equal to 1. The ray advances from one cube to the next and repeats the same procedure until it hits an “on” cube or reaches the last cube. Repeat other directions in the same way except when it hits an “outside” cube it passes to the next cube without creating new sample points. Figure 6 shows the result after applying the six basic ray directions.

SURFACE APPROXIMATION TO POINT CLOUD DATA USING VOLUME MODELING

7

The order of performing these six basic directions will not change the result. For special cases such as the bunny data set that has holes in the bottom, the initialized space is no longer a close space. To prevent the ray casting and marking system from mistakenly eroding the “inside” cubes, the positive z direction rays are omitted. Similarly for any data set that misses part of data from a particular view angle, a carefully chosen set of ray directions is necessary. On

Inside

Outside

On

Inside

Figure 6. The results of the Parallel Ray Casting to find exterior points.

3.2 An Optional Mobile Ray Source On

Inside

Outside

Figure 7. Illustrating the results of the Mobile Ray Source.

Outside

8

Adam Huang & Gregory M. Nielson

For objects with concave shapes, parallel rays in x, y, and z directions may not detect their hidden contours. To improve the process, an optional mobile ray source can travel each “outside” cube and from its current cube location it again can cast the six basic direction rays (positive and negative x, y, and z) to find the hidden cubes. The same process is repeated until no more hidden cubes can be found. Figure 7 shows how the mobile ray source finds the hidden cubes. The reason that this process is suggested as an option is because some data sets such as the bunny data may miss some data from certain angles. Without modifying the marking system we use so far, the mobile ray source will erode the “inside” body by going inside the object and marking every “inside” cube as an “outside” cube. There will be only “on” and “outside” cubes left at the end. A possible remedy to prevent this problem is to add one type of cubes, call “reserved” cubes, which are assigned by the user to seal the holes where data points are missing. Therefore, the new mobile ray source cannot pass through both “on” and “reserved” cubes. This method will require human manipulation and the result will depend on how the “reserved” cubes are chosen. Although we treat this mobile ray source algorithm as a secondary method, it actually can find all correct “outside” cubes alone without performing any parallel ray casting. We can choose a seed as the beginning point, say the cube at (0,0,0), and apply the algorithm continually until no more new “outside” cubes are found. The reason we did not choose this method is that the parallel ray casting provides more flexibility in dealing with missing data. Combining both parallel ray casting and mobile ray source provides a more versatile solution than mobile ray source itself. The “inside” cubes which remain untouched by parallel ray casting and mobile ray source can be filled with equally spaced “interior” points with function value equal to −1. The procedure is similar to the one for creating exterior points except for the opposite function value. So far, we have succeeded in identifying the correct types of all 1/8 cubes by applying parallel ray casting and mobile ray source algorithms combined with the tag checking system. A simple function that generates equalspaced, single-typed sample points is available for both “inside” and “outside” cubes. The only task left is how to generate correct interior/exterior sample points within “on” cubes. In the next section we will introduce another algorithm, local scattered spherical ray casting, and show how to generate multiple-typed sample points within “on” cubes correctly by casting rays from data points to neighboring cubes.

SURFACE APPROXIMATION TO POINT CLOUD DATA USING VOLUME MODELING

9

3.3 Local Scattered Spherical Ray Casting The idea of casting rays from data points is borrowed from wave theory. Local scattered spherical ray casting is a simplified example of the point light source model which sends out light in sphere-shaped wave fronts shown in Figure 8. Every “on” point will be a spherical light source. These spherical wave fronts will propagate away from their origin. As we gradually increase the radius of a sphere, the wave front will eventually hit all its neighbor cubes and return their types to help us generate sample points with correct function values. Although the idea of a wave front will work for any direction and to any distance until stopped by other “on” cubes, we do not want to over-sample within a 1/8 cube. Therefore, as the term “local” suggests, the wave front will travel for only a short distance within the light source's own “on” cube. The other term “scattered” suggests that the spherical wave front will be replaced by moderately few rays in certain directions only. There are 26 possible neighbors a cube can have. They include 12 cubes which share an edge, 8 which share a vertex, and 6 which share a face with the cube. Therefore, there are 26 possible directions we can cast. If we consider the positive and negative directions as the same, the number direction can be reduced to 13. After performing parallel ray casting and mobile ray source algorithms, we have marked all 1/8 cubes into three types, “inside”, “outside”, and “on”. We name “on” cubes as ambiguous neighbors because we cannot tell whether the trace along this particular direction is inside or outside of the object. In addition, the cube in which the light source is located is also ambiguous itself. If the details of the surface have fine shapes within the cube, they are beyond the current grid size ability to capture them. As we have 13 directions to cast rays, each direction has a pair of neighbors on the opposite sides. As we mark 1/8 cubes into three types, there are 6 possible combinations of a pair of neighbors. The 6 cases can be divided into two groups. The first group includes + 0, − 0, and + −, where +, −, and 0 are short notes for “inside”, “outside”, and “on”. Sample points can be generated in these three cases from data points along the particular direction to the cubes' boundary. From each “on” point to its positive ( negative) neighbor we create equally spaced exterior (interior) points. The second group includes + +, − −, and 0 0. The cases of + + and − − are the result of fine shapes or possible hole problems. The case of 0 0 is the result of fine shapes or simply indicates that the ray in this particular direction does not have enough information to generate correct sample points.

10

Adam Huang & Gregory M. Nielson

If at least 1 of these 13 pairs belongs to first group, the cube can be correctly sampled. For the cubes that have a pair of neighbors belonging to the second group, we only take the given data points as “on” sample points

On

Inside

Outside

Figure 8. Illustrating Spherical Ray Casting

4.

EXAMPLES

The bunny data set of Figure 2 is gathered from 10 range images which we register into a set of 362,272 unorganized points. Additional interior and exterior points were added by using a combination of parallel ray casting and local spherical ray casting. The volume model is based upon a 36 × 36 × 36 grid and has 97,309 unknown parameters. We used an iterative method to solve the 97,309 × 97,309 system of equations in 8.9 minutes on 200MHz PC. For the example of Figure 1, we randomly sampled two parametric tori to produce 200,000 points. A combination of parallel ray casting, mobile ray source and local spherical ray casting was used to obtain the additional interior and exterior points. The grid size for the volume model is 24 × 24 × 24 and the linear system of equations with 29,449 unknowns was solved in 4.1 minutes.

ACKNOWLEDGEMENTS The bunny data set of Figure 2 is from the Computer Graphics Group, Stanford University. The tori data sets were suggested by Gerald Farin.

SURFACE APPROXIMATION TO POINT CLOUD DATA USING VOLUME MODELING

11

This research was supported by NSF IIS-9980166 & ACI-0083609, ONR N00014-00-1-0281 and DARPA MDA972-00-1-0027.

REFERENCES [1] U. Adamy, J. Giesen and M. John, “New Techniques for Topologically Correct Surface Reconstruction”, Proceedings of IEEE Visualization 2000, IEEE Computer Society Press, 2000. [2] N. Amenta, M. Bern, and M. Kamvysselis, "A New Voronoi-based surface reconstruction algorithm," SIGGRAPH 98 Conference Proceedings, pp. 415-422, 1998. [3] B. Curless and M. Levoy, "A Volumetric Method for Building Complex Models from Range Images," SIGGRAPH '96 Proceedings, pp. 303-312, July 1996. [4] A. Huang, “A Piecewise-linear Approximation Contour for Unorganized Points", MS Thesis, Arizona State University, 1999. [5] H. Hoppe, T. DeRose, T. Duchamp, J. McDonald, and W. Stuetzle, "Surface Reconstruction from Unorganized points," Proceedings of SIGGRAPH '92, pp. 71-78, July 1992. [6] R. Mencl and H. Mueller, “Interpolation and Approximation of Surfaces from Three-Dimensional Scattered Data Points”, Proceedings of Scientific Visualization – Dagstuhl ’97, H. Hagen, G. M. Nielson & F. Post eds., IEEE Computer Society Press, pp. 223-232, 2000.