Reverse Engineering Point Clouds to Obtain Trimmed NURBS

download Reverse Engineering Point Clouds to Obtain  Trimmed NURBS

of 13

Transcript of Reverse Engineering Point Clouds to Obtain Trimmed NURBS

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    1/13

    Reverse Engineering Point Clouds to Obtain

    Trimmed NURBS

    Lavanya Sita Tekumalla, Elaine Cohen

    Abstract. Digitizing 3D data and reverse engineering data to ob-

    tain 3D models is an important problem in CAD modeling. We

    present a new method to obtain tensor product b-spline represen-

    tation from point cloud data by fitting surfaces to segments of the

    data. Point cloud data obtained by digitizing 3D data, typically

    presents many associated complications like noise and missing data.

    Our method addresses all these issues, works robustly in the pres-

    ence of holes in the data and is straightforward to implement.

    1. INTRODUCTION

    Digitizing 3D data and reverse engineering data to obtain 3D tensor prod-uct spline models has numerous applications in the field of CAD modelingand entertainment. Hence, the problem of automating design for man-ufacture and production by converting real world objects into computermodels is extremely important. This paper focuses on processing pointclouds obtained from scanners and converting them to a tensor productspline representation that can be handled by CAD software.

    3D data from real world objects obtained by scanning models is nor-mally associated with several problems like noise in the data, missing dataand holes. Incomplete data and holes in the data might typically lead toill-behaved surfaces. Though the holes are finally trimmed away after fit-

    ting, the area around holes might be affected and rank deficiencies mightbe encountered in the fitting phase. Further, most of the parameteriza-tion techniques do not deal with data with holes In this paper we attemptto give a framework to reverse engineer point clouds and fit tensor prod-uct B-Spline surfaces. In doing so, we hope to deal with noisy data anddata with holes. Further, we address issues such as an automated knotplacement strategy and an efficient fitting method.

    XXX 1xxx and xxx (eds.), pp. 14.

    Copyright c 200x by Nashboro Press, Brentwood, TN.ISBN 0-9728482-x-x

    All rights of reproduction in any form reserved.

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    2/13

    2 Lavanya Sita Tekumalla, Elaine Cohen

    We assume that an underlying mesh structure is available with thedata. This information is used primarily for the purpose of obtaining abetter parameterization. We consider models with an with an arbitrarynumber of holes. However, we assume that there is a reasonable samplingdensity whereever the traingulation data is available. We deal with asingle patch of a segmented model that is homomorphic to a disc, withan arbitrary number of holes. Hence we do not aim to deal with issues

    such as approximating sharp features in the input and assume that suchfeatures do not exist in the input.

    2. BACKGROUND

    Though several aspects of the reverse engineering problem such as dataparameterization, data fitting and knot selection have been extensivelyexplored, there has not been significant work dealing with an entire frame-work for such a process for ill-conditioned input and data with holes inthe input. B-Spline surface fitting can be broadly decomposed into para-meterization, knot placement and fitting.

    The task of parameterization involves finding a mapping from everypoint on the surface to a point in a parametric domain. A lot of work hasbeen done in this area to obtain plannar maps for triangular meshes. Adetailed discussion on these methods can be found in [23]. On obtainigan initial mapping, improvement in the parameterization can be obtainedbased on various criteria. [19, 21, 10]use iterative parameter correctionfor reparameterizing the surface. [17] reparameterize the surface based onstretch metric which measures the distortion in scale.

    The traditional criterion for approximating data when there is moredata than the degrees of freedom is the linear least squares method thatminimizes the L2 norm of the residual. The weighted least squares tech-nique is a related method that tries to minimize the least squares errorand at the same time associates a weight with each error term based onits relative importance. One way of assigning weights while performing

    weighted least squares, is to define the weighting function with respectto a specific point . Therefore a different fit is obtained every time thispoint is changed. This method of weighing points is the basis for the MLSprojection method described in the section 3.

    Several methods have attempted to address the additional problem ofnoise while fitting scattered data. One way to deal with scattered datais to minimize a combination of the L2 norm and the smoothing norm[16, 22].

    Knot placement has a significant effect on the quality of the resultingsurface during fitting. Several attempts [13, 12, 20] have been made anattempt to consider the least squares problem as a nonlinear optimizationproblem where the position of the knots is also optimized along with the

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    3/13

    From Point Clouds to Trimmed NURBS 3

    control points. [11], describe an iterative procedure to insert and deleteknots adaptively. Howver all these methods are computationally expensiveand take significant execution time.

    Some work has been in outlining a framework for fitting b-Bpline sur-faces to point clouds. [51] present a method to approximate scattered datathat is triangulated using a single tensor product B-spline patch or hierar-chical B-Splines. They minimize a functional that is a combination of the

    least squares distance and a fairing term based on data dependent thinplate energy [59] in the fitting step. Hoschek et al [22] give a frameworkfor reverse engineering point clouds to get trimmed NURBS in which theytoo use a fairness term while minimizing error for fitting. However theyparameterize data by projection and hence are not garunteed to find a oneto one mapping for all geometry.

    Work has been done that attempts to deal with the entire model bymaking a network of B-spline patches. [18] have described a method toconstruct B-spline models of arbitrary topology, by constructing a networkof b-spline patches and a method of joining them with G1 continuity. [5]have described another procedure, in which the user interactively segmentsthe data into several patches by painting the patch boundaries. [8] describea method in which they initially approximate the model using K-meansclustering and then construct a NURBS patch network using a hierarchicalgraph representation. [4] decompose the given point set into a quad tree-like data structure known as a strip tree. They use the strip tree to fit aset of least squares quadratic surfaces to the data points at the lowest levelin the tree, degree elevate them them to bi-cubic surfaces and blend themtogether to form a set of b-spline surfaces that approximate the given pointset. They however uniformly divide their domain and hence introduceunnecessarily degrees of freedom. Their method fails for complex geometryas they parameterize data by projection.

    Though some of these methods deal with the more difficult problemof handling the entire model, unlike this paper which deals with a singlepatch, none of these methods deal with holes and missing data.

    [9] attempt to fill holes by finding the best fit plane in the vicinity ofthe hole, parameterizing the points by projecting them orthographically,fitting a surface to these points and resampling to fill the hole. Howeverthis approach cannot handle holes of arbitrary geometry since it relies onparameterizing the vicinity of the hole by orthographic projection onto aplane.

    2.1. MLS PROJECTION PROCEDURE

    [7] proposed the MLS projection procedure to deal with meshless sur-faces. The MLS projection operator projects a point r near the surfaceonto the surface. This method proceeds in two steps. The first stepinvolves finding a local reference plane for the neighborhood of p by min-

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    4/13

    4 Lavanya Sita Tekumalla, Elaine Cohen

    imizing the perpendicular distance of each point in the neighborhood,N

    i=1

    n, pi r tn2(||pi r tn||) using a non linear process (refer fig-

    ure 1). A local parameterization is found by projecting the neighborhoodonto this reference plane. The next step involves fitting a bi-quadratic

    polynomial g,N

    i=1

    (g(xi, yi) fi)2(||pi q||) to approximate the surface

    locally using the moving least squares technique. This polynomial whenevaluated at the parameter value of p, gives the desired MLS projection.

    Fig. 1. MLS Projection procedure: r is a point on the surface, and q isthe projection on the best fit plane. Then q = r + tn for some t and n

    3. OUR METHOD

    The aim of this paper is to give a framework to make a tensor product B-spline surface trimmed NURBS surfaces from triangulatd point clouds byputting together the work of numerous people who worked on individual

    aspects of this problem. Further, this paper gives a new hole filling algo-rithm for triangular meshes, a curve smoothing algorithm, a knot selectionstrategy and a new b-spline surface fitting algorithm based on blending lo-cal fits. We make a comparison of this method with the traditional globalleast squares fit in terms of quality of fit and computation speed. Also, theeffects of certain parameters of our method on the quality of the resultingfit, such as the choice of neighborhood size and the weighting function,are discussed.

    In order to deal with the various issues in the reverse engineeringprocess discussed above, we take a multi-stage approach of smoothing,hole filling, parameterization, knot selection and fitting. Each of thesesteps is elaborated in the following sections.

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    5/13

    From Point Clouds to Trimmed NURBS 5

    3.1. SMOOTHING

    The smoothing step removes the noise and outliers in the data. Smoothingis achieved by projecting each point in the point cloud onto the MLSsurface computed at that point. The boundary of the point cloud, howevermight not smoothed effectively by this process as the normals of the pointsin the boundary curve do not lie along the surface normals at these points.

    Hence, normal smoothing of the surface alone does not suffice.We introduce an additional step of smoothing the boundary by project-ing each point in the boundary onto the MLS curve computed locally at thepoint by a non-linear minimization process. Suppose r is a noisy point nearthe curve, and q is its projection onto the line with direction vector u, we

    find the optimal q and u such thatN

    i=1

    ||(pi q) pi q, uu||2(||piq||)

    is minimized.

    The data is parameterized locally by projecting it onto the line q+ut.In the next step we project the point pi onto a local quadratic approxima-tion of the curve, in a process similar to [2]. In order to handle 3D data,we treat the local curve as a parametric quadratic and the MLS projec-tion procedure is carried out for the parametric curve independantly in

    the three dimensions.

    3.2. FILLING HOLES

    The technique of MLS projection technique is used to fill holes in theinput. Filling holes ensures that lack of data at holes does not affect thefit. Further, since a global parameterization of the data is not yet available,the filling procedure needs to be local in nature to handle holes of arbitrarygeometry. Hence we use the following method that is efficient and flexible.For every point in the boundary of the hole, the local neighborhood isobtained. Then a local parameterization is obtained by projecting thepoints onto the local best fit plane. New points are introduced in the localparametric domain by going radially inward from the boundary and thesepoints are projected onto the surface by approximating the surface usinga weighted least squares quadratic approximation. In this process, caremust be taken that the introduced points lie within the polygon definedby the boundary of the hole in the parametric domain to ensure that thereare no overlaps in the actual model. Since a global parameterization isnot available , a check is made with the available information locally foreach point.

    Also, the procedure used to introduce points must ensure that theright point density is maintained at the holes. To do this, for every edgein the boundary of the hole, we place a new vertex on the perpendicularbisector of the edge and at a distance of e/sqrt(3) where 3 is the averageedge-length.

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    6/13

    6 Lavanya Sita Tekumalla, Elaine Cohen

    Fig. 2. A close up view of the un-filled hole

    Fig. 3. A closeup of the filled region

    3.3. PARAMETERIZATION

    We use Mean Value coordinates [3] to parameterize data. An important is-

    sue that arises while using convex combination maps for parameterizationis fixing the parameter values of the boundary to a convex polygon. Whendealing with rectangle shaped objects, in order to obtain an intuitive pa-rameterization, we let the user specify the boundary points that are fixedto the boundary of a rectangle. In other cases, we map the boundary ofthe object directly to a square by chord length.

    3.4. KNOT PLACEMENT STRATEGY

    Hierarchical Domain Decomposition An important aspect of the fittingprocess is placing the adequate number of knots at the right locations.The knot placement strategy we use, is to recursively subdivide the domainat the center. Every new patch is recursively subdivided until it is flatenough locally.The decision whether to sibdivide a patch further is made

    based on the least square error obtained when fitting the patch or untilthe recursion reaches a maximum specified depth.

    3.5. FITTING

    The aim of the fitting step is to produce a tensor product b-spline surfacethat can adequately represent the shape of the input, given its parameter-ization over a rectangular domain. We propose a new method based onblending local fits to obtain a global fit.

    The local fit is done using local weighted least squares with respectto the mid point of each patch in the parametric domain . The basisfunctions used for the local fit are cubic b-spline basis functions that arenon-zero in the interval under consideration. Since 16 basis functions

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    7/13

    From Point Clouds to Trimmed NURBS 7

    are non-zero for a given knot interval, upon performing the local fit, 16coefficients are obtained. These are the 16 control points of a local patch.In order to obtain the control points that constitute the global controlmesh, the control points of four adjoining patches corresponding to thesame location in the parametric domain, are blended. At the boundaries,the control points of each pair of adjoining patches are blended.

    A good choice of weighting function to use in this process would be

    one that gives more weight to the interval under consideration and par-tial weight to the neighbouring patches so that the local surface blendssmoothly into the neighbouring patches. Hence, we give full weightageto the interval under consideration and decrease the weight exponentiallybeyond the interval.

    3.5.1 ANALYSIS OF BLENDING LOCAL FITS

    The preferred method for solving the linear least squares problem for datathat is not well conditioned is the technique of Singular Value decomposi-tion. This method takes a running time of the order 4mn2 4n3 + O(n2)where there are m data points and n control points to solve for. Theblending local fits method provides substantial speed up computationally

    by using a constant n of 16. Hence, if a is the number of rows and bthe number of columns in the global control mesh, the blending local fitsmethod solves (ab 2a 2b + 2) local systems and each local system hasapproximately 9m/ab points. In effect the Blending local fits method re-duces the runtime complexity of b-spline surface fitting from O(mn2) toO(m). Hence the size of the control mesh does not have much effect onthe complexity of the fitting algorithm and considerable speedup can berealized for large control meshes.

    The quality of fit obtained using the blending local fits method largelydepends on size of the neighbourhood chosen and the weighting functionused. The figure below shows the error obtained when approximating thedata using the blending local fits method with a 15x15 control grid.

    4. RESULTS

    5. CONCLUSION

    This work outlines a complete framework to convert point cloud data withmoderate complexity with associated traingulation information into tensorproduct b-spline surfaces or to fit a patch of the original segmented dataset. This includes the multi-step approach of smoothing, hole filling, pa-rameterization and finally fitting the surface. Though several patch-basedmethods and softwares already exist to solve the reverse engineering prob-lem, this method aims to deal with point clouds that have problems like

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    8/13

    8 Lavanya Sita Tekumalla, Elaine Cohen

    Fig. 4. A close up view of the unfilled hole Fig. 5. A closeup ofthe filled region

    Fig. 6. A close up view of the unfilled hole

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    9/13

    From Point Clouds to Trimmed NURBS 9

    Fig. 7. Noisy and incomplete data

    Fig. 8. Smoothed Data, without the boundaries smoothed

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    10/13

    10 Lavanya Sita Tekumalla, Elaine Cohen

    Fig. 10. Hole filled

    Fig. 11. B-spline surface fit

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    11/13

    From Point Clouds to Trimmed NURBS 11

    noise, holes in the geometry and missing data. Also this method aims tocapture more detail in a single patch by deciding where to place the knotsusing a hierarchical subdivision of the domain and uses a combinationof local weighted least squares approximations to find the control pointsof the tensor product surface as a whole. Finally this work presents anindependant algorithm to fill holes in trianguar meshes constructed fromscanned data.

    6. References

    1. Elaine Cohen, Richard F Riesenfeld Greshon Elber, Geometric Mod-elling with Splines, An introduction

    2. Marc Alexa, Johannes Behr, Daniel Cohen-Or, Shachar Fleishman,David Levin and Claudio T. Silva, Computing and Rendering PointSet Surfaces, IEEE Transactions on Computer Graphics and Visualiza-tion V9, No.1 - 2003

    3. Michael S. Floater, Mean value coordinates, Computer Aided Geomet-ric Design 2003

    4. Benjamin F. Gregorski, Bernd Hamann, Kenneth I. Joy , Reconstruc-tion of B-spline Surfaces from Scattered Data Points, Computer Graph-ics International 2000. pp. 163-172.

    5. Venkat Krishnamurthy , Marc Levoy, Fitting Smooth Surfaces toDense Polygon Meshes, Proceedings of the 23rd annual conferenceon Computer graphics and interactive techniques, p.313-324, August1996

    6. [13] H. Hoppe, T. DeRose, T. Duchamp, M. Halstead, H. Jin,J. Mc-Donald, J. Scheweitzer, and W. Stuetzle, Piecewise Smooth SurfaceReconstruction, Proc. ACM SIGGRAPH, pp. 295-302, July 1994.

    7. [22] Levin, D., Mesh-independent surface interpolation . In GeometricModeling for Scientific Visualization

    8. [26] I.K. Park, I.D. Yun, S.U. Lee, Constructing NURBS SurfaceModel from Scattered and Unorganized Range Data, Proc. 2nd In-ternational Conference on 3-D Digital Imaging and Modeling . Ottawa,Canada, October 1999

    9. [29] Jianning Wang and Manuel M. Oliveira. A Hole Filling Strategyfor Reconstruction of Smooth Surfaces in Range Images, XVI BrazilianSymposium on Computer Graphics and Image Processing. So Carlos,SP. October 12-15, 2003.

    10. [31] Cohen, E. and ODell, C. L., A Data Dependent Parametrizationfor Spline Approximation,Mathematical Methods in Computer AidedGeometric Design (Lyche/Schumaker), Academic Press, 1989.

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    12/13

    12 Lavanya Sita Tekumalla, Elaine Cohen

    11. Baussard A.; Miller E.L.; Prmel D., Adaptive B-spline scheme forsolving an inverse scattering problem, 2004 Inverse Problems 20 347-365

    12. David L. B. Jupp, Approximation to Data by Splines with FreeKnots, SIAM Journal on Numerical Analysis, Vol. 15, No. 2. (Apr.,1978), pp. 328-343.

    13. [38] de Boor, C. and Rice, J. R, Least Squares cubic Spline Ap-proximation II- Variable Knots, Tech Report, CSD TR 21, PurdueUniversity, April 1968.

    14. [39] Dierckx P. , Curve and Surface Fitting with Splines, OxfordScience Publications.

    15. [42] M. S. Floater, Meshless parameterization and B-spline surfaceapproximation in The Mathematics of Surfaces IX, R. Cipolla and R.Martin (eds.), Springer-Verlag (2000), 1-18.

    16. G. Greiner, K. Hormann, Interpolating and approximating scattered3D data with hierarchical tensor product splines, in: A. Le Mhaut,C. Rabut, L.L. Schumaker (Eds.), Surface Fitting and MultiresolutionMethods, 1996, pp. 163-172 alos has parameterization based on springsystem - minimum potential energy- spring shosen as 1/chord length

    17. P. V. Sander, S. J. Gortler, J. Snyder, H. Hoppe, Signal-SpecializedParametrization, Eurographics Workshop on Rendering 2002.

    18. M. Eck, T. DeRose, T. Duchamp, H. Hoppe, M. Lounsbery, W. Stuet-zle, Multiresolution Analysis of Arbitrary Meshes, ACM SIGGRAPH1995, pages 173-182.

    19. Josef Hoschek, Dieter Lasser The Fundamentals of Computer AidedGeometrical Desing, A K Peters, (1993)

    20. Dierckx, P., An improved algorithm for curve fitting with paramet-ric functions, Tech report TW54, Department of Computer Science,Katholieke University Leuven, Belgium 1981.

    21. [35] Michael Plass, Maureen Stone, Curve-fitting with piecewise para-metric cubics ,ACM SIGGRAPH Computer Graphics , Proceedingsof the 10th annual conference, on Computer graphics and interactivetechniques, Volume 17 Issue 3

    22. [60] Dietz, U. and J. Hoschek, Smooth B-spline surface approxima-tion to scattered data, in Reverse Engineering, J. Hoschek and W.Dankwort (eds.), B. G. Teubner, Stuttgart, 1996, 143-151

    23. M. S. Floater and K. Hormann, Advances on Multiresolution in Geo-metric Modelling, N. Dodgson, M. S. Floater, and M. Sabin (eds.),Springer-Verlag, Heidelberg.

  • 8/22/2019 Reverse Engineering Point Clouds to Obtain Trimmed NURBS

    13/13

    From Point Clouds to Trimmed NURBS 13

    School of Computing, University of Utah,Salt Lake City, [email protected]