großer beleg surface reconstruction from point clouds ... · 4 1. introduction figure 1.1: the...

54
T ECHNICAL U NIVERSITY D RESDEN DEPARTMENT FOR C OMPUTER S CIENCE I NSTITUTE FOR S OFTWARE AND MULTIMEDIA T ECHNOLOGY C HAIR FOR C OMPUTER GRAPHICS AND VISUALIZATION P ROF.DR .S TEFAN GUMHOLD Großer Beleg Surface Reconstruction from Point Clouds using Hierarchical Clustering Thomas Räckel (Mat.-No.: 2845749) Tutor: Dipl.-Medieninf. Sören König Dresden, May 25, 2007

Upload: lamliem

Post on 30-Apr-2019

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

TECHNICAL UNIVERSITY DRESDEN

DEPARTMENT FOR COMPUTER SCIENCE

INSTITUTE FOR SOFTWARE AND MULTIMEDIA TECHNOLOGY

CHAIR FOR COMPUTER GRAPHICS AND VISUALIZATION

PROF. DR. STEFAN GUMHOLD

Großer Beleg

Surface Reconstruction from Point Clouds usingHierarchical Clustering

Thomas Räckel(Mat.-No.: 2845749)

Tutor: Dipl.-Medieninf. Sören König

Dresden, May 25, 2007

Page 2: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]
Page 3: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

Aufgabenstellung

Thema:

Oberflächenrekonstruktion aus Punktwolken über hierarchisches Clustering

Zielstellung:

Bei der Akquisition von 3D-Geometrie realer Objekte mittels heutiger Scannertechnologie entstehenin der Regel Punktwolken, welche die Oberfläche des digitalisierten Gegenstandes lediglich als Mengevon Punktpositionen mit weiteren Attributen, wie z.B. Normale, Farbe usw. repräsentiert. Aus diesenAbtastwerten/Rohdaten kann eine für spätere Zwecke (wie z.B. Rendering,...) besser geeignete Ober-flächenbeschreibung erstellt werden. Dieser als Oberflächenrekonstruktion bezeichnete Verarbeitungss-chritt ist Thema dieses Belegs.

• Erstellung einer Übersicht bekannter Verfahren zur Erstellung von Oberflächen aus Punktwolken

• Erstellung einer hierarchischen Punktwolkendatenstruktur für die Repräsentation von Punktclus-tern

• Implementierung eines hierarchischen Clusterings nach dem Lloyd-Algorithmus

• Untersuchung des Einsatzes von verschiedenen Clusterrepräsentanten, wie z.B. Ebenen oder bi-variaten Polynomen

• Visualisierung der hierarchischen Clusterstruktur und der Clusterrepräsentanten

• Raytracing der rekonstruierten Oberfläche

• Einsatz der Methode an Beispielscans des Lehrstuhl CGV und Entwicklung eines Dateiformatszum Speichern und Einlesen der Rekonstruktionen

Page 4: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]
Page 5: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

1

Contents

1 Introduction 31.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Related Work 72.1 Delaunay-based Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.1 Crust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.1.2 Cocone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Volumetric Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.1 Multi-level Partition of Unity Implicits . . . . . . . . . . . . . . . . . . . . . . 112.2.2 Sparse Low-degree Implicits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Clustering 153.1 Spatial Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1.1 Octree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.1.2 BSP-Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.1.3 kD-Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2 Data-driven Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.2.1 Lloyd Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.2.2 The Proxy Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2.3 Split Plane Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.3 Cluster Tree Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4 Fitting 274.1 Fitting a Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.2 Fitting a Bivariate Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.3 Creation of the Final Surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5 Rendering and Serialization 335.1 Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.2 Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6 Implementation and Results 376.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7 Summary and Future Work 45

Bibliography 47

Page 6: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

2

Page 7: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

3

1 Introduction

The creation of accurate three dimensional models is important for many research areas, e.g.

• sculptures or other 3d art,

• prototyping,

• archaeological artifacts, or

• terrain data.

Besides that, three dimensional content is an essential part of modern films and video games. Today,there is even a need for 3D content in the field of e-commerce, e.g. to integrate your products intoSecond Life. While the traditional way to create 3D models usually is a time consuming process whichis done by artists and animators, modern techniques make it possible to digitize real world objects usinge.g. laser rangefinding, mechanical touch probes, depth from stereo images or structural light approaches.

This changes the classical content creation pipeline to the one described by Figure 1.1, while the classicalapproach involves only the modeling step. The benefit should be clear: The artist does not have tostart from scratch, but has a detailed model where he can start from. In some years, scanners for threedimensional objects might be as common as today’s document scanners for scanning "2D objects" like aphotograph.As describes in Figure 1.1, the acquisition stage leads to a set of points referred to as point cloud, whichusually consist of several hundred thousand points. Reconstructing a surface from those points is not atrivial task and the topic of this thesis.In this chapter we briefly introduce the field of surface reconstruction from point clouds and demonstratethe necessity to compile a surface from acquired point cloud data. Afterwards we will describe ourapproach to the problem. The last section provides an outline for the rest of the thesis.

1.1 Motivation

Technology for the acquisition of a 3D model gets cheaper each day. In [WMW06], a 3D scanner isdescribed that merely needs a standard commercial hand-held laser and a camera, e.g. an off-the-shelfwebcam. Hence, having your own 3D scanner at home might be as common in the near future ashaving a document scanner today. Therefore, the need to process the acquired data increases. Since3D scanners typically produce point clouds, the acquired data must be processed further for efficientrepresentation, rendering, and computations. One task is the reconstruction of a surface from the acquiredpoints. Reconstructing such a surface is a challenging problem because the data produced by 3D scannersis always noisy and a point cloud can consist of a few hundred thousand up to more than one millionpoints. Other issues for reconstruction are holes that might be found in the data, along with outliers andundersampled areas.

The described problem may be stated more formally as follows: Given a set of points P = p1, . . . , pnin R3 that is sampled from an unknown surface S (e.g. obtained by a 3D scanner). It is our goal to usethe point set P to find a reconstructed surface S that approximates S best.

A software system that performs such a surface reconstruction must fulfill several requirements. In par-ticular, it should be easy to use and should not require any user interaction other than specifying some

Page 8: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

4 1. INTRODUCTION

Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from[PvGS+03].

intuitive parameters which drive the reconstruction. Such parameters may vary the following character-istics of the program:

• Reproduction of details

• Computation time

• Memory consumption

Besides the task of surface reconstruction that is described in this thesis, several other issues need at-tention, e.g. point cloud rendering and the development of a suitable data structure. Another commonproblem is the fact, that you usually cannot scan a 3D object in one pass. Mostly, the result of the scan-ning process are several scans of the object from different view points. The problem of matching thosedifferent scans to a whole 3D model has been addressed in detail in [Jäh06].

1.2 Objectives

The objective of this thesis is the development of a software system that is capable of the reconstructionof the surface S and that meets the requirements mentioned above. The implementation language is C#,using the .NET 2.0 framework.

The data for a point cloud is acquired by the 3D scanner at the chair of Computer Graphics and Vi-sualization at the Dresden University of Technology. The scanner uses a structured light approach toacquire the data of an object. It consists of a highspeed camera together with a projector and is capableof scanning objects with up to 30 reconstructions per second. Even though the scanner itself may pro-duce dynamic scans, this thesis will focus on the reconstruction of static scans. However, the scan whichis reconstructed may be based on several scans of one and the same object joined together by the tooldeveloped in [Jäh06]. For a description of the scanner itself and the acquisition of the data please referto [Kön06]. Because of the high amount of data contained in a point cloud (it can consist of up to onemillion points), it is necessary to split the problem into smaller parts and pursue a divide and conquerstrategy. To accomplish this, the initial data is clustered hierarchically into smaller parts. This yields toa tree of clusters that can also be helpful for a level of detail representation of the reconstructed surface.Each cluster gets a proxy associated with it. This proxy serves as a representative, i.e. an approximant,for the points in the cluster and captures the local shape of the surface. Among others, suitable proxiesinclude:

Page 9: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

1.3. OUTLINE 5

Figure 1.2: The 3D scanner setup.

• Planes

• Bivariate polynomials

• Quadrics

To assemble a global, final surface, the proxies of all leafs in the tree are blended together using apartition of unity approach. This global surface is visualized using standard raytracing techniques andthe computed cluster tree can be written to a file for further usage.

1.3 Outline

The next chapter describes what has already been achieved in this field by explaining the most importantstate-of-the-art techniques in surface reconstruction. Although there are other concepts like learningbased methods [IJS03], we restrict ourselves to the two main approaches: Delaunay based methods insection 2.1 and volumetric methods in section 2.2. As described earlier, point clouds usually consist ofa few hundred thousand points. To handle this amount of data efficiently, we use a divide and conquerstrategy and split the data into smaller, manageable pieces. This process, referred to as Clustering, maybe realized using different strategies. We distinguish two main approaches, spatial clustering and data-driven clustering, which are both explained in chapter 3. Since our main goal is to find a surface for agiven set of points, we have to find local approximants for the created clusters. The proxy concept whichis introduced in section 3.2.2 helps us to accomplish this task and the concept is also the basis for thesplit plane clustering approach presented in section 3.2.3. The proxy objects and how they may be usedto represent the local shape of the points in a cluster is the topic of chapter 4. There we also point out howwe get a global surface from the set of local approximants. Chapter 5 gives a short overview of renderingtechniques for implicit surfaces and describes our approach of the serialization to make the reconstructedsurface available for other applications. In addition to that, implementation details and results follow inchapter 6. This thesis concludes with a summary and a brief discussion about possible extensions to ourwork.

Page 10: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

6 1. INTRODUCTION

Page 11: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

7

2 Related Work

According to [SS05], Boissonnat was the first who dealt with the problem of surface reconstruction fromscattered data [Boi84]. Later, Hoppe et al. presented a method for the reconstruction of a surface froman arbitrary point cloud without relying on prior knowledge about the topology of the intended surface[HDD+92]. They approximated a signed distance function f by associating an oriented tangent planewith each data point. The output surface is then generated using a modified marching cubes algorithm.Since that time, a variety of research has been conducted in the field of surface reconstruction.

Generally speaking, we can distinguish between two major approaches. One technique are Delaunay-based methods, that usually lead to a polygonal representation of the given data. Such techniques areexplained in section 2.1. An other possibility to reconstruct a surface are volumetric methods in whichan implicit function is used to describe the data. The zero-level set of this function then represents thesurface. We take a detailed look at implicit methods in section 2.2. Which technique is chosen highlydepends on the intended use of the reconstructed data. In fact, a polygonal representation is most suitablefor the usage in existing 3D engines, e.g. in a computer game. The produced result can instantly berendered with modern graphics cards since they rely completely on polygons for rendering. An implicitrepresentation of the surface may be used to derive additional surface properties like curvature, but cannot be rendered instantly. To display the surface we have to perform extra computations.

2.1 Delaunay-based Methods

If the goal of the surface reconstruction is a polygonal representation of the data, finding the surface canbe regarded as the problem of finding connections between neighboring samples. Boissonnat pointedout that the Delaunay triangulation represents an appropriate choice for an auxiliary data structure tofind such connections [Boi84]. The dual of the Delaunay triangulation, the Voronoi diagram, is anotherimportant data structure as we see shortly.

Voronoi Diagram

Let P := p1, p2, . . . , pn be a set of n distinct points in R3. The Voronoi diagram V (P ) of P is a celldecomposition of P into convex polyhedra. Each of the Voronoi cells contains exactly one point pi ∈ P ,and all points of R3 that are closer to pi than to any other point pj ∈ P, i 6= j.

Vpi = x ∈ R3 | ∀q ∈ P : ‖ x− pi ‖≤‖ x− q ‖. (2.1)

The Voronoi cell of a point pi ∈ P is denoted as Vpi and the points, shared by four of those Voronoi cells(three in the two dimensional case) are called Voronoi vertices. Figure 2.1 depicts a Voronoi diagram fora 2D example.

Delaunay triangulation

The Delaunay triangulation D(P ) of a set of points P in R3 is a triangulation that maximizes the min-imal inner angle over all triangles. It is dual to the Voronoi diagram V (P ) of P , i.e. for any nonemptyintersection between two Voronoi cells Vpi and Vpj , the line connecting pi and pj is part of the Delau-nay triangulation. If you compute the Voronoi diagram of a Voronoi diagram, you get the Delaunaytriangulation:

D(P ) = V (V (P )) (2.2)

Page 12: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

8 2. RELATED WORK

As a criteria for validating the correctness of the Delaunay triangulation in R3, we can use the circumsphere of each Delaunay triangle. If there is any point p ∈ P inside the circum sphere, the triangulationis not a Delaunay triangulation. Furthermore, if there are more points on the circum sphere than thethree points of the triangle, the triangulation is not unique, i.e. there are more than one valid Delaunaytriangulations. Please refer to Figure 2.1 for a 2D example of a Delaunay triangulation.

Figure 2.1: A 2D example for a Voronoi diagram (orange) and the dual Delaunay triangulation (black)

Restricted Voronoi Diagram and Restricted Delaunay Triangulation

For a Voronoi cell Vpi we may also define a Voronoi cell Vpi|S restricted to the surface S in the followingsense:

Definition 2.1 The restricted Voronoi cell Vpi|S is the intersection of the Voronoi cell Vpi in V (P ) withS, that is Vpi|S = Vpi ∩ S where p ∈ P .

Thus, the dual to the restricted Voronoi diagram V (P|S) is the restricted Delaunay triangulation:

Definition 2.2 Given two points pi ∈ P and pj ∈ P . The line that connects pi and pj is part of therestricted Delaunay triangulation D(P|S) if and only if

Vpi|S ∩ Vpj |S 6= ∅.

In other words, the restricted Delaunay triangulation D(P|S) contains all triangles whose dual Voronoicells intersect S.

Poles and Medial Axis

Given the Voronoi cell Vpi of the point pi ∈ P , the positive pole p+ of Vpi is the Voronoi vertex of Vpi ,which is the farthest away from pi. Then, we may define the pole vector np pointing from pi to p+. Thepole vector is a sufficient accurate approximation for the surface normal at pi [SS05]. The negative poleof the Voronoi cell Vpi , denoted as p−, is the Voronoi vertex in Vpi , which is the farthest away from p and

Page 13: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

2.1. DELAUNAY-BASED METHODS 9

lies in the opposite direction of p+. Hence, the angle between the vectors np and−−→pp− must be greater

than π2 [Dey06]. For an illustration of the poles, refer to Figure 2.1. The poles of all Voronoi cells of

V (P ) provide an approximation for the medial axis of the surface sampled by P .

Definition 2.3 The medial axis M of a surface S ⊂ R3 is the closure of the set of points in R3 that haveat least two closest points in S.

Figure 2.2: Left: For the Voronoi cell Vp, the positive pole p+, the negative pole p− and the pole vectornp are illustrated. Right: A 2D example of a medial axis of a smooth curve.

The medial axis in 3D is generally a 2-dimensional surface that captures the shape of S.

Local Feature Size and ε-Sampling

The explained algorithms of section 2.1 require a certain sampling density to hold the given guarantees.Therefore, we need two other definitions:

Definition 2.4 The local feature size LFS(x) at a point x ∈ S is the Euclidean distance from x to (thenearest point of) the medial axis M of S.

Since the local feature size LFS(x) represents the distance of a point x to the medial axis, it is a measurefor the local thickness of the object. When sampling a surface, we require a denser sampling in regionswith smaller feature size than in regions with larger feature size [AB98].

Definition 2.5 A sampling P of the surface S is an ε-sampling if for each point x ∈ S exists a samplepoint p ∈ P so that ‖ x− p ‖≤ ε · LFS(x).

With this definition, we can estimate whether the sampling is dense enough or not.

Equipped with the above mentioned fundamentals we will now explain two sample Delaunay-basedalgorithms. Both examples, the Crust algorithm as well as the Cocone algorithm, are representativesof restricted Delaunay triangulation methods. For more detailed information on the classification ofDelaunay-based methods see [CG04]. Additional information on the mathematical fundamentals can befound in [Dey06].

Page 14: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

10 2. RELATED WORK

2.1.1 Crust

The Crust algorithm was developed by Amenta and Bern [AB98], and it was the first algorithm forsurface reconstruction that gives guarantees about the correctness of the reconstructed surface. Assuminga sampling P of an unknown surface S, the algorithm works as follows:First, the Voronoi diagram V (P ) of P is computed. After that, the set Q of poles of the Voronoi diagramis determined. Subsequently, the Delaunay triangulation D(P ∪Q) of the united set of sampling points Pand poles Q is computed. Now, candidate triangles of the surface must be extracted from this Delaunaytriangulation. All triangles that do not have all three vertices in P are dismissed, which is called Voronoifiltering and removes all triangles that cross the approximated medial axis of the unknown surface S. Tooptimize the result, post processing steps are applied, where e.g. additional triangles are removed basedon their surface normals. Finally, the resulting surface referred to as the Crust, is obtained by applying amanifold extraction. That is, remove all triangles that do not form a manifold.The authors showed that if the sampling P of the unknown surface S is an ε-sampling for ε ≤ 0.06, thenthe restricted Delaunay triangulation D(P|S) to the unknown surface S is contained within the computedDelaunay triangulation D(P∪Q). However, as explained in [SS05], the runtime and memory complexityis O(‖ P ∪ Q ‖2) since the Crust algorithm requires the computation of two Delaunay triangulationsD(P ) and D(P ∪Q).The Crust algorithm has been improved in various fashions. Amenta, Choi, and Kolluri developed thePower Crust algorithm [ACK01], which is able to produce watertight 1 surfaces and which belongs tothe class of inside/outside labeling algorithms. In 2004, Kolluri et al. [KSO04] introduced the EigenCrust algorithm to deal with noisy data.

2.1.2 Cocone

Based on the Crust algorithm, Amenta et al. developed a new algorithm called Cocone [ACDL00].Similar to Crust, this algorithm computes a set of candidate triangles that contain the restricted Delaunaytriangulation D(P|S). The sampling criteria mentioned in the section above apply here too. As proposedin the Crust algorithm, the first step is to compute the Voronoi diagram V (P ). Using this diagram, thepole vectors for every sample point may be computed. After that, a Cocone Cp for each point p ∈ Pis estimated. A Cocone is defined as the complement of a double cone. The apex of the double cone isthe point p and the axis is the estimated normal np. The opening angle is 3π

4 and the cocone is clippedinside the Voronoi cell Vp. Since the double cone is built using the estimated normal np as axis, thecocone determines a neighborhood along the tangent plane of p. The algorithm now determines theedges of the Voronoi cell Vp, which are intersected by Cp. This is done for every point p ∈ P . The dualDelaunay triangles to the determined Voronoi edges form the set of candidate triangles for the subsequentmanifold extraction stage. The algorithm provides the same guarantees as the Crust algorithm, althoughit only needs the computation of one Delaunay triangulation and, therefore, only has a complexity ofO(‖ D(P ) ‖2). In the same way as the Crust algorithm, the Cocone algorithm has also been improvedseveral times. One version, called Tight Cocone [DG03], reconstructs watertight surfaces, while anothervariant, the "Robust Cocone" [DG04], handles noisy input data.

2.2 Volumetric Methods

Usually, the goal of volumetric methods is to find a function y = f(x) : R3 → R. A surface S for givenset of sample points P := p1, p2, . . . , pn ⊂ R3, sampled from an unknown surface S, is then given bythe zero level set Z(f) of the function f(x):

Z(f) = x : f(x) = 0 (2.3)1 Watertight in this context means that virtually no water can flow out of the polygonal model, thus the surface is closed

Page 15: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

2.2. VOLUMETRIC METHODS 11

The function f(x) not only describes the surface S for f(x) = 0, we may also label points accordingto there location. The points which satisfy f(x) < 0 are "inside" the surface and the ones satisfyingf(x) > 0 are "outside". That is why these methods are called volumetric methods. Furthermore, becausethe function f(x) not explicitly describes the surface S but implies its existence, those functions f(x) arecalled implicit functions. Depending on the way the function f(x) is computed, the surface S interpolatesor approximates P .Implicit shape representations offer some attractive properties. It is an easy task to decide whether apoint p is inside or outside relating to the surface S by just putting the point p into the equation f(x).The surface normal for any point p can be evaluated by simply calculating the gradient ∇f(p) at thatposition. When it comes to surface intersections, it is not hard to calculate the intersection betweenthe implicitly defined surface S and e.g. a ray. Finally, those representations provide an easy accessto boolean operations (constructive solid geometry - CSG). Another nice property of implicit surfacesis the natural hole filling and denoising ability. For a detailed introduction to implicit surfaces refer to[RBW97].There are two main approaches, using implicit surface representations. The first is to find a globalimplicit function which approximates the whole point set P . Such attempts lack local shape control andare usually not a good choice when dealing with the great amount of data points produced by today’sacquisition technology. State of the art methods use a divide and conquer strategy by splitting the initialdata set P into n subsets Pi ⊂ P, i = 1, . . . , n. For each subset Pi an implicit function fi(x) iscomputed. The final implicit surface is then given as a weighted sum of those local functions. Blinn wasthe first who came up with this idea [Bli82].

Partition of Unity

In general, a partition of unity is a set of continuous functions wi : Rd → [0, 1] with the importantproperty ∑

i

wi(x) = 1 ∀x ∈ Rd, (2.4)

which means they sum up to one everywhere in the domain. A set of functions fulfilling this criteria maybe generated by any set of continuous functions Ci using a normalization process:

wi(x) =Ci(x)∑n

j=1 Cj(x)(2.5)

For our purpose we demand furthermore that the functions wi are nonnegative and compactly supported.A functions has compact support if it is zero outside of a compact set. The partition of unity is animportant concept when you want to blend local implicit functions to a global implicit surface.

2.2.1 Multi-level Partition of Unity Implicits

A new shape representation called Multi-level Partition of Unity Implicits (MPU) was proposed in[OBA+03]. The authors point out that their representation provides nice features like high quality im-plicit surfaces from very large point datasets, the accurate reconstruction of sharp features and fast andeasy local shape access.The MPU algorithm uses local implicit shape functions together with a partition of unity approach tocompute the surface based on the set of sampled points P . Assume you have an open bounded domainΩ ⊆ Rd. This domain is the region of interest where the global implicit surface will be defined andshould cover the set of sampled points: P ⊆ Ω. There are also a finite number of subdomains ΩjM

j=1.The union of those subdomains has to contain the domain itself:

Ω ⊆M⋃

j=1

Ωj (2.6)

Page 16: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

12 2. RELATED WORK

Figure 2.3: The MPU surface reconstruction scheme. The final global surface is green, while the localapproximants are colored red. The blue circles represent the area of influence for the localfunctions. Image adopted from [OBA+03].

For each cell defined by the subdomain Ωi a set Pi = p ∈ P, p ∈ Ωi of points is build. Each set ofpoints is then approximated by a local shape function Qi. To build the final surface, the set of nonnegativecompactly supported functions ϕi is needed. They are a partition of unity and the individual functionsϕi of this set serve as weighting functions for the local shape functions Qi, consequently Supp(ϕi) ⊆ Ωi

is demanded. The final global implicit surface is then given by:

f(x) =n∑

i=1

ϕi(x)Qi(x) (2.7)

For the building of the subdomains, Ohtake et al. start with an octree based spatial subdivision scheme,to receive an initial clustering of the data. The subdomains are then defined by spheres, centered at theircorresponding octree cell. The radius of the sphere is set to at least 0.75 · d, where d denotes the lengthof the diagonal of the octree cell, depending on the number of points in the resulting subdomain. Thisapproach ensures an overlapping area between the individual subdomains which in turn will lead to asmooth, global surface. Their starting point is the axis-aligned bounding box of the given point set P anda cell is subdivided if the error ε for the local approximant fi exceeds a certain user-defined threshold ε0.To determine the error ε they use the Taubin distance [Tau91]. Since the problem of clustering the datainto manageable pieces is crucial, it is discussed in detail in chapter 3.

What type of function Qi to approximate the points Pi in the domain Ωi is chosen, depends on the pointsPi themselves:

• a general 3D quadric is used for larger parts of the surfaces

• a bivariate quadratic polynomial in local coordinates approximates local smooth patches, and

• sharp features are covered by piecewise quadric surfaces that fit an edge or a corner

Having computed all local shape functions Qi, the final surface can be computed according to equation2.7. For rendering, Ohtake et al. rely on Bloomenthals polygonizer [Blo94] and the Hart sphere tracingmethod [Har96].

Page 17: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

2.2. VOLUMETRIC METHODS 13

2.2.2 Sparse Low-degree Implicits

Sparse Low-degree Implicits, or SLIM as the authors propose, use a surfel approach [PZvBG00] torepresent the surface. They define a surfel s as the triplet

s = (c, ρ, f(x)). (2.8)

The surfel s describes a ball with center at c and radius ρ. The points pi from our set of samples P thatlie inside the ball c are approximated locally by the function f(x). The function f(x) is chosen to below-degree polynomials to enable an interactive realtime rendering.The error which is caused by the approximation of the points inside the ball is expressed in terms of theball radius ρ and given by the following equation:

E(ρ) = ε(ρ)2 + λ(TMDL/ρ)2 (2.9)

The term ε(ρ) is a local L2 error metric for the evaluation of the difference between the points and thelocal approximant fi(x). The second part of the right-hand side of equation 2.9 ensures that not too manyprimitives are used to approximate the points P . It consists of a constant λ and a user defined thresholdTMDL which controls the approximation quality. An initial set of balls B1 is generated rather randomly.

Figure 2.4: The balls of the surfels at different levels of the reconstruction process. The internal surfelsare colored blue, while the leaf surfels are colored pink. Image adopted from [OBA05].

Each point p ∈ P is marked as uncovered. From this set of uncovered points a random point p is chosenand taken as center c of a ball. The radius ρ0 for this ball is set to L/10 where L is the length of themain diagonal of the bounding box of the point set P . Now those points pi are removed from the set ofuncovered points, that fulfill the inequality ‖ pi−c ‖< ρ0. These are the points which are inside the ball.This procedure is repeated until no point p ∈ P is marked uncovered. Now surfels are created for eachselected point p and the ideal surfel radius is computed using Brent’s method [Bre72] to find essentialminimums of equation 2.9. Depending on the result, the surfel si is either considered being a leaf surfelor an internal surfel (see Figure 2.4). Only the balls bi associated with the leaf surfels are put into theset B1. Finally, the points pi ∈ P which are not covered by the balls from B1 are marked as uncovered.Then the procedure starts again, building a set of balls B2. This is repeated until all points P are coveredby B = ∪kBk.At the end, a tree-like structure for rendering is build.

Page 18: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

14 2. RELATED WORK

Page 19: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

15

3 Clustering

Having a point cloud which consists of a few hundred thousand or even a million points makes it neces-sary to follow a divide and conquer strategy for the surface reconstruction. Dividing the point cloud intosmaller parts can be achieved in different ways. We will take a look at two different approaches: Spa-tial clustering in section 3.1 and data-driven clustering in section 3.2. Schemes that offer a hierarchicalsubdivision of the input data should be referred, because the generated hierarchy may be used to easilyrealize a level of detail representation of the reconstructed surface. As mentioned in section 1.2 we wantto reconstruct an implicit surface from our input data. It should be clear that the clustering of the datamakes it impossible to find one global surface. Instead, our final surface will consist of many locallyfitted surfaces which are blended together.

3.1 Spatial Clustering

One possibility is to just divide space into subspaces, establishing certain volumes. With spatial subdivi-sion the data points of the point cloud are associated with such a volume and each volume should at leastcontain N data points. Such methods are widely used in computer graphics, e.g. in raytracing, to reducethe number of ray-object intersection tests, or for collision detection. For our surface reconstructionproblem N > 15 is a preferable value since we must ensure to have enough data points in each volumeto estimate a local surface (see chapter 3.3). A good starting point for such a spatial method would bethe bounding box of the point cloud. Because we want to build a hierarchy, just setting up a regular grid,i.e. a voxel grid, or related approaches are not sufficient.

For clustering purposes, none of the schemes mentioned below have been implemented since we believethat taking the point cloud data into account when building the clusters yields to better results. However,we use a kd-tree data structure to handle the problem of finding neighboring points efficiently.

3.1.1 Octree

An octree is a hierarchical data structure. It starts with a rectangular box, usually the bounding box of anobject or an entire scene. This bounding box is then divided into eight smaller rectangular boxes, whichall have the same size. Now, each of those eight child cells may be divided themselves into eight newcells if an application specific criteria is not met. Such criteria may be among others:• Number of objects/primitives in a cell (e.g. in raytracing)

• Depth of the tree exceeds a maximum value

• A local surface approximation error (e.g. the error for a plane fit to the data points in the cell)

This iterative process continues until no more subdivision is required. The 2D analog of the octree, theso-called quadtree is illustrated in Figure 3.1. The octree is a very fast and memory efficient spatialsubdivision scheme. Starting from the bounding box, we just have to save for each cell whether it hasbeen divided or not since each cell is divided in the same way. However, the fixed position and count ofthe subdivisions in each step turns out to also be a disadvantage of octrees. If the cell is subdivided, it isdivided in eight equal child cells, even if it would be enough to divided into two non-equal cells, whichmay lead to a very unbalanced tree. To overcome this problem, other spatial subdivision schemes havebeen developed.

Page 20: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

16 3. CLUSTERING

Figure 3.1: Left: A quadtree, the 2D analog for the 3D octree, containing at most one object per cell.Right: The data structure as a tree.

3.1.2 BSP-Tree

The BSP-tree was introduced by Fuchs in 1980 [FKN80]. In contrast to the octree, the BSP-tree usesonly one plane at a time to divide space resulting in a much more flexible, binary, data structure. Inaddition, the plane which splits space does not have to be parallel to any of the coordinate axis but canbe oriented arbitrarily. Formally, a space Rn is partitioned by any hyperplane H ∈ Rn−1 into two half-spaces h+ and h−, sometimes called front and back node. The two half-spaces are distinguished by thenormal of the hyperplane H and may be subdivided separately if necessary. This procedure is continuedrecursively until a defined break criteria is fulfilled (see section 3.1.1). The pseudocode in Figure 3.2describes the algorithm.

Input: A set P = p1, p2, . . . , pn of points.Output: A BSP tree for P.BuildBSPTree(P)

if |P | ≤ 1 thenT ← a leaf node, storing P

elseH ← splitting plane containing point p(H) with normal n(H).P+ ← p ∈ P | (p− p(H)) · n(H) ≥ 0P− ← p ∈ P | (p− p(H)) · n(H) < 0L← BuildBSPTree(P+)R← BuildBSPTree(P−)T ← an internal node with children L and R

return T

Figure 3.2: Pseudocode for the generation of a BSP-tree.

Although the algorithm itself is rather easy, the choice of an appropriate partition plane is crucial anddepends on the purpose of the tree. Usually, a balanced tree is the best choice since the objects of thescene are then distributed roughly equally between the leafs of the tree. Another advantage of a balancedtree is the lower depth in comparison to an unbalanced tree, yielding to a better runtime performance andlesser memory consumption. However, it should be clear that the tree needs much more memory than anoctree due to the arbitrary position and orientation of the split plane. In computer graphics, the BSP-treedata structure is often used for hidden surface removal.

Page 21: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

3.1. SPATIAL CLUSTERING 17

Figure 3.3: Left: A region of space is partitioned into subspaces. Right: The BSP tree representation ofthe partition from the left side.

3.1.3 kD-Tree

An other possibility to divide the data is the usage of a kd-tree. A kd-tree is a special case of a BSP-treeand so a cell is only divided in one direction at a time using a split plane. Here, the split plane is restrictedto be parallel to one of the coordinate axis. With each recursive step, the axis, where the domain is splitchanges. In R3 for example, the root is split along the x-axis, the two child nodes of level one are splitalong the y-axis and the nodes of level two are split along the z-axis. At level three, the procedure wouldstart with the x-axis again, and so on. The split plane is chosen in a way that roughly divides the datainto two equally parts, ensuring a balanced tree. This may be achieved be selecting the mean point of theinput data as the split position. Hence, to define the split plane it is sufficient to store the mean point Oand a number k, indicating at which axis the node was split. Thus, the kd-tree combines the flexibility ofthe BSP-tree (by choosing the position of the split plane freely) and the small memory consumption ofthe octree (by restricting the split planes to be parallel to coordinate axis).Finding the position of the split plane is the most expensive part in the construction of the kd-tree, andtherefore, it should be optimized. The best solution is to presort the data in each dimension an pass thesepresorted lists to the method constructing the kd-tree. Then, the bn/2c-th entry in the list of the desiredsplit direction determines the position of the split plane, where n is the number of elements in the subtreebefore the split.

Range Finding

The kd-tree data structure is especially useful for solving range finding problems. In our application, wewant to find all points pi ∈ P that lie inside the sphere S(c, r) where c denotes the center of the sphereand r is the radius (see chapter 4). Here, the kd-tree data structure helps to solve this problem efficiently.Figure 3.4 illustrates the situation with a 2D example. To find the points which are inside the sphere, westart with the root node which contains all points. Then, we compute a value d as follows:

d = (c · nplane)− (O · nplane) (3.1)

Since the normal of the plane is always parallel to one of the coordinate axis, two of the three elementsof the normal vector are zero, while the third equals one. Hence, the dot products in equation 3.1 simplyselect those components of the other vectors, for which the normal equals one. The value d is positiveif the center of the sphere is right of the split plane, and negative if c is left of the split plane. Now, asimple comparison determines which of the two child nodes of the current node have to be processedfurther in the same way. If d + r ≥ 0, we have to process the right child and if d − r ≤ 0, we have toprocess the left child. Note that both conditions can be true at the same time. If we find a leaf node we

Page 22: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

18 3. CLUSTERING

Figure 3.4: Left: The three points (red, green, yellow) enclosed by the circle given by c and r should befound efficiently. Right: Illustration on how to find the points.

check whether the points p associated with that leaf node are inside the sphere or not. See the right sideof Figure 3.4 for a graphical explanation.

3.2 Data-driven Clustering

The term data-driven clustering emphasizes the fact, that the clustering is based on the actual data ratherthan just dividing space. This approach yields to a partition of the initial data set P that depends on thedata and not on how the data is oriented in space.

3.2.1 Lloyd Clustering

The Lloyd algorithm is one of the simplest and most efficient clustering algorithms. The given data set Pis divided into k distinct clusters, and since the number k of desired clusters is an input into the algorithm,it has to be known a priori and is fixed.

The algorithm consists of the following steps, which will be explained thereafter:

1. Initialization

2. Assignment

3. Recalculation

4. Iteration

Initialization

At the beginning, the data has to be partitioned into k clusters. In the simplest case, this is done byrandomly selecting k centroids µr, r = 1, . . . , k. Usually, this is done by picking k elements fromyour initial data set P and setting them as the centroids. It should be ensured, that no two centroidsare identical, since this will lead to an empty cluster and will not give you the expected result. Another

Page 23: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

3.2. DATA-DRIVEN CLUSTERING 19

possibility would be to use a heuristic to position the initial centroids. Note that the best results areachieved when the initial centroids have maximum distance between each other.

Assignment

After having found k centroids in the initialization step, each element pi ∈ P is associated with thecluster Cr, whose centroid µr is the nearest. Finding the nearest centroid involves the computation ofa distance, and typically the Euclidean distance is used. However, other distance measures are alsopossible, e.g.

• Canberra distance,

• squared chord distance, or

• squared Chi-squared distance.

Recalculation

Now that we have associated each point pi from our data set P with one of the clusters Cr, we recomputethe centroid for each cluster. Normally, we would just calculate the mean value of all points in the clusterand assign this value as the new cluster centroid:

µr =1|Cr|

∑pi∈Cr

pi (3.2)

But since we modified the concept of the Lloyd algorithm slightly, our recalculation step involves morecomputations. This will be in detail explained in section 3.2.2.

Iteration

When there is a change in the recalculated centroids, the whole process is repeated starting at the assign-ment stage. If they did not change, the algorithm stops.

Formally, we try to minimize the sum of squared distances of Equation 3.3, where pi − µr denotes thedistance between the data point pi and its centroid µr.

E2 =k∑

r=1

∑pi∈Cr

‖pi − µr‖2 (3.3)

The different stages of the Lloyd algorithm are illustrated in Figure 3.2.1.

Although the algorithm is very simple and popular, it is not guaranteed to yield to a global minimum.In fact, different initializations may lead to different final clusters. To overcome this problem, the wholeclustering process is run multiple times and the result with the smallest error according to Equation 3.3is taken as the final clustering of the data.

3.2.2 The Proxy Concept

As shown in the last section, Lloyd clustering can be used to divide the given data into manageablepieces. We extend this approach by introducing proxy objects. A proxy is basically a representative forthe whole cluster and it is possible to compute the distance between the proxy object and a point p ∈ R3

as well as fitting the proxy to a cluster.Having those abilities, proxies can be used as centroids in the Lloyd algorithm: In the assignment stage,the possibility to compute the distance is used to find the nearest proxy for each data point and fittingitself to data points is needed during the recalculation stage. The Lloyd algorithm as described in section

Page 24: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

20 3. CLUSTERING

Figure 3.5: The different stages of the Lloyd algorithm.

Page 25: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

3.2. DATA-DRIVEN CLUSTERING 21

3.2.1 may be described using a point m ∈ R3 as proxy object. To fit the point m to a cluster Cr, we justset m to be the mean value of Cr which is computed according to equation 3.2.But since we want to reconstruct a surface, we use more complex proxies, which serve as local approx-imations of the surface we want to reconstruct. One possible proxy is a plane, which can be describedas

0 = n · p− d, (3.4)

where n is the normal vector of the plane and d is a scalar offset from the origin. Naturally, a plane isnot a very good proxy to capture the features of a surface. For this purpose we use bivariate polynomialsas proposed in [OBA05]. The general form of such polynomials is given by equation 3.5:

f(x, y) = α0 + α1 · x + α2 · y + α3 · xy + α4 · x2 + α5 · y2 (3.5)

To fit a bivariate polynomial, the vector of coefficients A = (α0, . . . , α5)T must be determined.Since we have to deal with noisy data, proxy objects that interpolate the data are not appropriate. Hence,each proxy will provide an error value, representing the accuracy of the fitted surface. The whole processof fitting proxy objects to data points and the error calculation is the topic of chapter 4.As stated previously, the first step of the Lloyd clustering algorithm is the selection of k initial centroids.The extension of the Lloyd algorithm to use arbitrary proxy objects to compute the clusters instead ofusing a point centroid, leads to a problem in the initialization stage. Finding "good" initial centroidswhen using proxies other than a point proxy is generally not trivial. Good in this context means that thechosen initial centroids lead to a stable and fast convergence of the Lloyd algorithm. Hence, we first findan initial clustering using point proxies, and after that we can fit our desired proxy type to those initialclusters and improve them gradually using the Lloyd algorithm with those complex proxies.

3.2.3 Split Plane Clustering

As described in the last section, the proxies serve as a local approximation for the points in the cluster.This requires the proxies to be bounded to a certain domain, i.e. they would have to be restricted tothe area of their corresponding cluster. Unfortunately, we are not able to restrict the proxies to a certainbound because during the cluster process the clusters change with each iteration and we cannot knowthe extends of the cluster in advance. Hence, in most cases when using the standard Lloyd clusteringapproach, we face the problem that a cluster is not connected when using planes or bivariate polynomialsas proxies. The consequence of this, illustrated in Figure 3.7 and Figure 3.8, is that the clusters are notbound to a certain domain, but scattered all over the data. This makes it impossible to define boundsfor the proxy, since each proxy would occupy a large amount of the initial data set. Our goal is to haveclusters, that are connected, i.e. an enclosing ball only occupies a small region of the initial data.

To overcome that problem, we cluster our data according to a split plane. The basic idea is, that thesplit plane divides the space H wherein our data elements lie, into two halfspaces H+ and H− and thedata elements are labeled according to the halfspace they correspond to. The algorithm processes thefollowing stages:

1. Initialization

2. Iteration

Initialization

During the initialization stage, we determine an orientation for the split plane by calculating its normal.Therefore, we first cluster the data set P := p1, . . . , pm into two clusters, denoted by C+ and C−,using our LLoyd approach with point proxies. We then compute the mean value p of P using equation3.6:

p =1m

(m∑

i=1

pi) (3.6)

Page 26: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

22 3. CLUSTERING

Figure 3.6: Different proxy objects: 1: the source cluster, 2: the cluster with a point proxy (red), 3: thecluster with a plane proxy, 4: the cluster with bivariate polynomial proxy

Page 27: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

3.2. DATA-DRIVEN CLUSTERING 23

Figure 3.7: Assume that the green and the blue cluster have been build using a standard Lloyd approach.Fitting a line to this initial cluster configuration (middle) leads to unexpected results, becauseafter the process points that are not connected belong to the same cluster.

The normal of the split plane is then given by

n =‖ (∑

pi∈C+

(pi − p))− (∑

pj∈C−

(pj − p)) ‖ . (3.7)

Figure 3.9 illustrates this approach. Having computed n, we can now get a sorted list of the points withrespect to this normal by sorting the dot products between the points pi and the normal n. This sortedlist will be used during the iteration stage.

Iteration

In the iteration stage, the split plane is moved along its normal, dividing the data set P in two clusters.To drive this process, we need the two values

• kmin - the minimal number of points per cluster, and

• kstep - the number of points that are shifted during each iteration step.

To start, the first kmin points from the sorted list computed during the initialization stage are assignedwith cluster C+, and all other points are assigned with cluster C−. Now, the desired proxy type is fittedto each of the two clusters and the two error values e+

0 and e−0 are computed. The resulting error for eachiteration step is the maximum of the two individual errors :

ei = max(e+i ; e−i )

The plane is then moved by shifting the next kstep points from C− to C+ according to the sorted list.Again, the proxy objects are fitted and the error value e1 is computed. This procedure continues until

Page 28: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

24 3. CLUSTERING

Figure 3.8: A clustering result using plane proxies. Please note that the red cluster reaches from theshoulder of the statue up to the top of her hair, which is absolutely undesirable.

Figure 3.9: Calculating the normal for the split plane clustering.

Page 29: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

3.3. CLUSTER TREE GENERATION 25

there are only kmin points in cluster C−, what is the case after

l =⌈

m− 2 · kmin

kstep

⌉− 1

iterations.Given the error values ei for each iteration step, we can take the position of the split plane, where theerror of the fitted proxies is minimized. This gives us a clustering of the data set P into two boundedclusters without being restricted to point proxies. Figure 3.10 illustrates the split plane approach.

n

n

Figure 3.10: The split plane is swept in discret steps along its normal during the iteration stage.

3.3 Cluster Tree Generation

With the split plane approach, a data set can only be clustered into two parts at a time, in contrast tothe unrestricted number of parts that are possible when using the Lloyd approach together with pointproxies. We see shortly that this is not a real restriction.Because it is not predictable in advance how many clusters are appropriate to reconstruct the final surfacewithout exceeding a maximum total error value, we use a recursive procedure to divide the initial data

Page 30: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

26 3. CLUSTERING

set P into clusters. Starting with P as the root cluster, we recursively divide each cluster into two newclusters, if the error value produced by the proxy of this cluster exceeds a user specific value. A commonvalue for such a maximal error is 0.1% of L, where L is the length of the main bounding box diagonal ofthe inital point set P . Another important criteria is the number of points in a cluster. We need a minimumnumber of points to approximate a reasonable surface for those data points. Recent publications proposea minimum of 15 data points for each cluster [OBA+03] and we reflect this in our application as anadditional error or stop criterion. Whenever one criteria is reached, the approximation error drops underthe maximal error, or a cluster contains only the minimal number of data points, the cluster process isterminated for this tree branch. Figure 3.11 depicts the setup dialog, where all the parameters that drive

Figure 3.11: The setup dialog for the clustering process.

the cluster process may be adjusted. Our approach leads to a binary tree with the whole data set P as rootnode, and the proxy objects of the leaf nodes forming the final surface. Please refere to 4.3 for a detailedlook on how the final surface is assembled. As described in section 5, we use the tree data structure tospeed up the rendering of surface, but it may also be used for a level of detail representation of the globalsurface. We are aware of the fact that the generated tree is unbalanced, but since we don’t need the treefor searching purposes, this is no problem.

Page 31: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

27

4 Fitting

As described in the previous chapter, the inital data set P is divided into smaller, managable clusters Cr,which all together form the data set:

k⋃r=1

Cr = P (4.1)

A proxy object is associated with each of the clusters, which serves as an approximant for the data pointscontained within the cluster. For this purpose, many different proxy objects may be used, e.g.

• a subset of the points of a cluster,

• the mean value of the points of a cluster,

• a plane,

• a bivariate polynomial, or

• a quadric.

Each of those proxy objects have their own advantages and disadvantages, like approximation accuracyor the number of necessary computations to fit the proxy to a set of points. For this work we focuson the bivariate polynomials, since their suitability for surface reconstruction was proofed in [OBA05].However, to introduce the topic of surface fitting we start with an easy example and will then advanceto the more complicated topic. More information about linear regression and fitting may be found in[HB06].

4.1 Fitting a Plane

Fitting a plane to a set of points may be seen as an extension of the line fitting procedure. From section3.2.2 we know that the plane is given by 0 = n · x + d, which is nothing else than

0 = ax + by + cz + d. (4.2)

Hereby, n = (a, b, c) denotes the plane normal and d is the offset from the origin. If equation 4.2provides a value other than zero for a point p, that value is the signed distance from p to the plane. Withthat knowledge, we can find a equation that minimizes the sum of the squared distances from a set ofpoints to the plane:

E =n∑

i=1

(axi + byi + czi + d)2 → min (4.3)

In order to minimze it, we have to compute the partial derivatives with of this equation with respect tothe parameters a, b, c, and d, but for now we just need one of them:

∂E

∂d= 2 ·

n∑i

(axi + byi + czi + d)

Page 32: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

28 4. FITTING

To find a minimum for equation 4.2 we have to set the derivative equal to zero, which leads to

0 = 2 ·n∑i

(axi + byi + czi + d)

= a ·n∑i

xi + b ·n∑i

yi + c ·n∑i

zi + n · d

d = −(a · 1n

n∑i

xi + b · 1n

n∑i

yi + c · 1n

n∑i

zi)

d = −(a · px + b · py + c · pz). (4.4)

Accordingly, the plane passes through the point p, which is the centroid of the data points. If we nowapply our results from equation 4.4 to the equation that we want to minimize, we get

E =n∑i

(a · (xi − px) + b · (yi − py) + c · (zi − pz))2,

which leads to the following partial derivatives:

∂E

∂a=

n∑i

(a · (xi − px)2 + b · (yi − py)(xi − px) + c · (zi − pz)(xi − px))

∂E

∂b=

n∑i

(a · (xi − px)(yi − py) + b · (yi − py)2 + c · (zi − pz)(yi − py))

∂E

∂c=

n∑i

(a · (xi − px)(zi − pz) + b · (yi − py)(xi − px) + c · (zi − pz)2) (4.5)

To find a minimum, we have to set these partial derivatives equal to zero, which we may write in a moreconvenient way using matrix notation: C11 C12 C13

C21 C22 C23

C31 C32 C33

︸ ︷︷ ︸

Cov(P )

abc

=

000

(4.6)

The 3x3 matrix on the left side of equation 4.6 comprises of the six unique entries that are obtained fromthe partial derivatives in equations 4.5:

C11 = 1n

n∑i=1

(xi − px)2 C12 = C21 = 1n

n∑i=1

(xi − px)(yi − py)

C22 = 1n

n∑i=1

(yi − py)2 C13 = C31 = 1n

n∑i=1

(xi − px)(zi − pz)

C33 = 1n

n∑i=1

(zi − pz)2 C23 = C32 = 1n

n∑i=1

(yi − py)(zi − pz)

In the general case, the covariance matrix for a set of n-dimensional data points is given by

Cov(P ) =1n

n∑i=1

(pi − p)(pi − p)T . (4.7)

The covariance of the values is a measurement for their correlation, and so the entries of the covariancematrix represent a measurement for the correlation between each pair of the x-, y-, and z-coordinate. If

Page 33: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

4.1. FITTING A PLANE 29

two coordinates are not correlated, the matrix would have an zero entry for those coordinates. Hence, ifCov(P ) is a diagonal matrix, the points P are completely uncorrelated and distributed evenly among thethree coordinate axis.Thus, the normal of the plane minimizing the error defined by equation 4.3 is the vector representing theminimal covariance of the data set P . This vector can be obtained by computing a principal componentanalysis of P . The principal component analysis (PCA) transforms the data set into a new coordinatesystem using the eigenvectors and eigenvalues of the covariance matrix. The new coordinate system hasthe important property that its axis correspond with the variances of the data, i.e. the new x-axis corre-sponds with the direction of the greatest variance of the data and the z-axis with the smallest variance.Hence, the local z-axis equals our plane normal. For additional information on the principal componentanalysis, see [Jol02].

Incremental Computation

To fit a plane to a set of points P , it is necessary to set up the covariance matrix Cov(P ) of the points andcompute the eigenvectors and eigenvalues of this matrix which leads to a high computation time. Usingour split plane approach we can optimize the computation if we exploit the fact that some known pointsare only shifted between the two clusters, while most of them stay the same. This observation makes itpossible to compute the covariance matrices for the two clusters incrementally, rather than recomputingit in each iteration. With n being the number of points in a cluster, we define the following two symbols:

s =n∑

i=1

pi

Q =n∑

i=1

pipiT

p =1n

s (4.8)

Now, we can transform equation 4.7 using the above symbols:

Cov(P ) =1n

n∑i=1

((pi − p)(pi − p)T )

=1n

[(

n∑i=1

pipiT )− (

n∑i=1

pipT )− (p

n∑i=1

piT ) + (

n∑i=1

ppT )

]

=1n

(Q− spT − psT + n · ppT )

=1n

(Q− 1n

ssT − 1n

ssT +1n

ssT )

=1n

(Q− 1n

ssT ) (4.9)

If we now want to add a point pj to the cluster, we can get an updated covariance matrix by using equation4.9 with the values

s′ = s + pj

Q′ = Q + pjpjT

n′ = n + 1,

rather than to perform all the computations which would be necessary according to equation 4.7.

Page 34: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

30 4. FITTING

4.2 Fitting a Bivariate Polynomial

Following the results of Ohtake et al. [OBA05] who showed that bivariate polynomials are sufficientto reconstruct a surface from point cloud data, we use bivariate polynomials as proxies for our surfacereconstruction process. We start with a set P ⊂ R3 consisting of n points pi = (xi, yi, zi). Equation 3.5gives the general form of a bivariate polynomial. Rewritten in matrix form, this leads to

f(x, y) = AT ·B(x, y), (4.10)

where A = (α0, . . . , α5)T is the set of unknown coefficients and B(x, y) = (1, x, y, x2, xy, y2)T is thevector of basis functions. We determine a vector A of coefficients by minimizing the error function

E2(A) =∑

i

(f(xi, yi)− zi)2. (4.11)

We can transform equation 4.11 to

E2(A) = AT · (M ·A− 2 · v) + c, with (4.12)

M =∑

i

·B(xi, yi) ·B(xi, yi)T ,

v =∑

i

·zi ·B(xi, yi), and

c =∑

i

·z2i

Minimizing equation 4.12 for A leads to M ·A = v. If M is invertible, this can be transformed to

A = M−1 · v.

M is invertible, if and only if the determinant det(M) is not zero. It becomes zero if |P | < k, with kbeing the number of basis functions, which is six in our case. The determinant may also become zero ifthe points P are linearly dependent in terms of the basis B(x, y). But since we want a solution in anycase, we determine the best approximation of a solution by applying an eigenvalue decomposition to M .Since M is a symmetric matrix, we can decompose the matrix to

M = O · L ·OT ,

where O is an orthogonal matrix whose columns are the eigenvectors of M and L is a diagonal matrixwith the eigenvalues of M . This decomposition can be inverted easily:

M−1 = (O · L ·OT )−1

= OT−1 · L−1 ·O−1

= O · L−1 ·OT

Since O is orthonormal, its inverse is the same as its transpose O−1 = OT , and to invert a diagonal matrixwe just take the reciprocal value of each entry of the diagonal. The final solution for our coefficient matrixA is:

A = O · L−1 ·OT · v (4.13)

Page 35: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

4.3. CREATION OF THE FINAL SURFACE 31

4.3 Creation of the Final Surface

Our starting point for the creation of the final surface is a tree of clusters, in which at least the leaf nodesmust have proxy objects fitted to it. Remember that a proxy captures only the shape of a small part ofthe sampled surface, and hence should have only local influence on the shape of the final global surface.Our goal is to blend all proxies from the leaf nodes together to make up the global surface. Therefore, wehave to define an area for each proxy. where it contributes to the final surface. This area is representedby a support sphere S(c, r), with center c and radius r. The mean value of the cluster is used as center cand the radius is computed as

r = α · d,

where α is a scalar value and d is the length of the main bounding box diagonal of the cluster. Incompliance with [OBA+03], we set α = 0.75, which ensures that the spheres overlap in order to producesmooth transitions between neighboring local proxies. The proxy objects are blended together using apartition of unity weighting scheme. Assuming that you have n points that contribute to a particular pointon the final surface, each of those points is associated with a weight ωi. As mentioned in section 2.2, thepartition of unity property ensures that all weights sum up to one:

n∑i=1

ωi = 1

First, those support spheres are determined which contribute to the actually processed point of the finalsurface. In our raytracing based approach, we just check which support spheres are hit by the ray to buildour set of candidate spheres. Then, the proxies associated with those candidate spheres are intersected

Figure 4.1: Blending local surfaces to a global surfaces. The red and green lines are local functionswhose support is restricted to the corresponding sphere. In the overlapping area the globalsurface (blue) is given by a blending of the weighted surface points of the local functions.

by the ray. Each hitpoint is weighted and the resulting point s on the final surface is given by:

s =n∑

i=0

ωi∑nj=0 ωj

· pi =1∑n

j=0 ωj

n∑i=0

ωi · pi (4.14)

Page 36: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

32 4. FITTING

As weights, we take the distance from the hitpoint to the center of the corresponding support sphere.Dividing the result by the sum of the weights ensures that our weighting function matches the partitionof unity criteria as explained in section 2.2. This rather simple weighting scheme may be substituted byany smooth function that fulfills the partition of unity criteria.

Page 37: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

33

5 Rendering and Serialization

After having computed an implicit surface from a point set, the next logical steps are the rendering ofthe surface and the serialization of the surface to disk in order to be able to reuse it once it has beencomputed.

5.1 Rendering

Rendering an implicit surface is not as easy as rendering a polygonal representation, since today’s graph-ics hardware relies completely on triangles for the display of a three dimensional scene. Hence, theimplicit surface must be converted in a format, that graphic cards can understand. This process is usu-ally referred to as polygonalization and the standard technique for that is the marching cubes algorithm[LC87]. It was developed by Lorensen and Cline in 1987 and uses a voxel grid and a triangle lookuptable to compute a polygonal approximation of the implicit surface. The quality of the approximationdepends mostly on the resolution of the voxel grid, but the higher the resolution of the grid, the higherthe computation time. However, once the polygonal representation is computed, it can be used for aview point independent visualization without recomputation. Opposed to that, we may use a raytracingapproach to render the final surface.To implement this approach, we have to setup a ray for each pixel on the screen and find the intersectionof this ray with our surface. The brute force solution is to intersect each ray with each leaf node of ourtree, which results in unsatisfying high rendering times. Thus, we use our cluster tree as a hierarchicaldata structure to increase rendering speed: First, we intersect each ray with the root node. If it hits,the two child nodes are tested for intersection and only if they are hit, their children are tested to. Thisscheme is performed recursively until we find the relevant leaf nodes that are intersected. The speedupthat may be gained by using the hierarchical tree that we build during the clustering is documented infollowing table:

Number of Leafs Image Resolution Rendering Time SpeedupBrute Force Hierarchical Spheres

2183 500 x 400 263,3 s 5,2 s 5063 %2192 500 x 400 265,8 s 5,4 s 4922 %2192 800 x 600 645,7 s 13 s 4966 %2198 800 x 600 648,8 s 13,1 s 4953 %5884 500 x 400 753,8 s 6,5 s 11597 %5913 500 x 400 755,4 s 6,6 s 11445 %

Table 5.1: Comparison between the brute force rendering approach and the rendering using the hierar-chical spheres.

Ray-Bivariate Polynomial Intersection

After we have determined those spheres who have influence on the point of the global surface which wewant to evaluate, we now have to intersect the ray with the proxy objects that correspond to the candidatesupport spheres. Substitutional for the proxy objects, we will focus on the bivariate polynomials, since

Page 38: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

34 5. RENDERING AND SERIALIZATION

they are the proxies that are used in most cases and the intersection of a ray and a plane is well docu-mented.The ray is given as

r(t) = ro + t · rd,

with ro = (ox, oy, oz)T being the origin and rd = (dx, dy, dz)T being the direction of the ray. Modifyingequation 3.5, the bivariate polynomial can also be expressed as

(α1, α2, α3, α4, α5)T · (1, x, y, x2, xy, y2)− z = 0.

To get the intersection of the two, we have to insert the equation of the ray into the equation of thepolynomial:

α0

α1

α2

α3

α4

α5

·

1ox + t · dx

oy + t · dy

(ox + t · dx) (ox + t · dx)(ox + t · dx) (oy + t · dy)(oy + t · dy) (oy + t · dy)

− (oz + t · dz) = 0

To obtain an intersection point, we have to solve the equation above for the parameter t and this is nothingmore than solving the quadratic equation

0 = a · t2 + b · t + c

with the parameters

a = α4 · dx2 + α5 · dxdy + α6 · dy

2,

b = α2 · dx + α3 · dy + α4 · 2 · oxdx + α5 · (oxdy + oydx) + α6 · 2 · oydy − dz, and

c = α1 + α2 · ox + α3 · oy + α4 · ox2 + α5 · oxoy + α6 · oy

2 − oz.

After having computed all local hitpoints, we use the blending scheme described in section 4.3 and blendthem to find the position on the global surface.This approach leads to a high quality rendering of the implicit surface, but is computationally expensiveand not view independent. Thus, it has to be recomputed whenever the user decides to change his pointof view, e.g. by rotating around the model. Furthermore, we get a different final surface for each viewposition, because we do not blend the local approximants but the intersections with the approximants,and they change whenever the view point is changed. Although it faces this drawback, we decided to usethe raytracing approach for our application since it is very easy to implement.

5.2 Serialization

Since it is computationally expensive to reconstruct a surface from a point cloud, it is desirable to havethe possibility to save the result to a file and load it in other applications. Although it would be sufficientto save only the leaf nodes of the tree with the corresponding proxies and clusters, we prefer to save thewhole tree in case it is needed, i.e. for the often mentioned level of detail representation. Although thenumber of tree nodes and proxies is noticeable smaller than the number of data points, we neverthelessprefer a binary format over a e.g. XML-based format.For each node, we have to save the following values:

• The center of the support sphere

• The radius of the support sphere

• The coefficients of the proxy object

Page 39: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

5.2. SERIALIZATION 35

The coefficients which are saved depend on the type of proxy object. Where we store only three doublevalues for a point proxy (i.e. the mean value of the cluster), we have to store four double values for aplane proxy: three doubles for the normal and one double for the offset. To save a bivariate polynomial,we have to save six double values for the coefficients itself, plus 16 double values for the transformationmatrix, because the coefficients of the bivariate polynomial are in local coordinate space. To distinguishbetween the different types of proxy, each proxy is identified by a char value which is also written tothe file. In addition to that, we need a index value i to identify the position of the node within the tree.Since we have a binary tree, we can use a very simple scheme to assign the index numbers to the nodes:Starting with i = 1 for the root node, every left child of a node gets the value i = 2 · iparent and everyright child gets the value i = 2 · iparent + 1. With this simple approach we are capable of reconstructingthe tree very quickly.

Page 40: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

36 5. RENDERING AND SERIALIZATION

Page 41: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

37

6 Implementation and Results

The first section in this chapter provides details about the implementation of the software. In the secondpart we will discuss the results that have been achieved.

6.1 Implementation

The whole software system is implemented in C# using Microsoft’s .NET Framework 2.0. Other usedlibraries are:

• The Tao Framework1 as an OpenGL binding

• NLog2 for logging purposes

• Lore3 for GUI, Vector classes and Raytracing

• Numeric Math.NET4 for numerical calculations

The basis are a couple of small interfaces, as shown in Figure 6.1. The creation of the whole tree whose

2«interface»IProxy+DistanceTo(p:Point):double+FitTo(c:Cluster)+Error():double+CanFitIteratively():bool

«interface»IClusterAlgorithm+Init(basis:Cluster,settings:ClusterSettings)+CalculateCluster(basis:Cluster,settings:ClusterSettings)+Reset() «interface»ITreeGenerator+GenerateTree():BinaryTreeElementTBinaryTreeElementDm_Data:T+IsNode():bool

TBinaryTreeNode+LeftChild():BinaryTreeElement+RightChild():BinaryTreeElementTBinaryTreeLeaf

Figure 6.1: The interfaces

leafs are the local approximants of the surface, may be invoked using the GenerateTree() method of

1http://www.taoframework.com2http://www.nlog-project.org3Developed at TU Dresden4http://mathnet.opensourcedotnet.info

Page 42: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

38 6. IMPLEMENTATION AND RESULTS

the ITreeGenerator interface. This gives the user an easy way of creating the tree, leaving the detailsof how the tree is created to the class implementing the interface. The ITreeGenerator will then usea class implementing the IClusterAlgorithm interface, to do the actual clustering for one node inthe tree. As described in section 3.2.2, the cluster process is driven by proxy objects and each proxy hasto implement the IProxy interface, to provide the necessary functionality to realize the proxy concept.This set of interfaces provides a great flexibility for adapting the whole process of surface reconstructionif necessary by adding new proxy objects, new cluster algorithm, or even new ways of creating trees.The singleton Scene class is responsible for the management of the point cloud and all preferencesthat may be made. Our applications provides a GUI for user interaction, but with the Scene class, aconsole based application may be realized easily to enable batch processing of point clouds. When thecluster process is finished (Figure 6.2), the generated cluster tree is visualized on the right side of theapplication window. From there, we have the possibility to render sampled approximations of the proxyobjects (Figure 6.5) or the support spheres of the leaf nodes (Figure 6.4). When selecting a cluster in thetree view on the right, it gets highlighted in the 3D view on the left. It is also possible to visualize justthe proxy for the selected cluster (Figure 6.3).

Figure 6.2: The GUI after a point cloud has beenclustered. Each cluster has a differentcolor, whereat the selected cluster iscolored in red.

Figure 6.3: It is possible to visualize each proxyindividually.

Using template programming, the type of object associated with each tree node is kept flexible. Thatmakes it possible to reuse the binary tree structure in a totally different context or even in a differentapplication. Note that the tree structure itself is realized using the composite design pattern. The singlecluster algorithms and proxies are administrated by manager classes. Once registered, an instance ofeach proxy type or clustering algorithm may be obtained by a simple query on the ProxyManager orthe AlgorithmManager.

6.2 Results

Figures 6.6 to 6.9 show the renderings of a surfaces that have been reconstructed with our application.Except for the Stanford bunny, all models have been acquired using the scanner described in [Kön06] orhave been constructed mathematically.

From the images we notice that the hole repairing capabilities are very restricted. This is due to the factthat the clusters are formed using only the data points and the proxy objects are fit to the clusters. Hence,holes may only be filled if they are covered by neighboring support spheres. However, the bigger the

Page 43: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

6.2. RESULTS 39

Figure 6.4: The support spheres of the leaf nodes.The color indicates the size from small(red) over medium (green) to large(blue).

Figure 6.5: The leaf proxies.

radius of the support spheres are, the less details can be reproduced. Figures 6.10 and 6.11, which werereconstructed using the same parameters except for the support sphere radius, illustrated that: Althoughwe have less holes when the support spheres are bigger, notice how the details around the eyes, on theforehead, and on the cheek get lost. However, we still recommend at least α = 0.75 to ensure a sufficientoverlap of neighboring support spheres.

Furthermore, it turned out that our approach is not very suitable for noisy data. This gets especiallyapparent if we compare Figure 6.7, which is not filtered and needs 6.7k bivariate polynomials to ap-proximate the surface, to Figure 6.12, which is filtered and needs only 2.2k bivariate polynomials. Bothreconstructions were terminated if a cluster had an error value of at most 0.1% of the length of the bound-ing box diagonal or if there were less than 20 points in a cluster. The problems of unfiltered data areespecially obvious in the border regions, where we get a lot of tiny clusters. In those noisy regions, theclustering usually terminates because the clusters get too small, not because the proxy is well-suited. Theproblem is also illustrated in Figure 6.13, where the results of the clustering stage between filtered, andunfiltered data are opposed.

Figure 6.14 shows the differences between plane proxies and bivariate polynomials as proxy objects. Toachieve similar visual results, we need 3.8k plane proxies but only 2.5k bivariate polynomials. However,especially in areas with high curvature like the lips or the nose, it is obvious that linear proxy objects likeplanes are not sufficient to reproduce all the details.

Finally, Figure 6.15 provides a direct comparison between a SLIM based reconstruction of the humanhead (25k quadratic surfels) and our approach (7.7k bivariate polynomials).

Page 44: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

40 6. IMPLEMENTATION AND RESULTS

Figure 6.6: The Stanford bunny reconstructed us-ing 750 plane proxy objects.

Figure 6.7: The unfiltered scan of the bust recon-structed with 6.7k bivariate polynomi-als.

Figure 6.8: The filtered frog model approximatedby 1.6k bivariate polynomials.

Figure 6.9: Sine shaped heightmap approximatedby 170 planes as proxy objects.

Page 45: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

6.2. RESULTS 41

Figure 6.10: A human head with α = 0.75 for the support spheres. The spheres are visualized on the leftside, and the resulting surface is shown on the right.

Figure 6.11: A human head with α = 0.9 for the support spheres. The spheres are visualized on the leftside, and the resulting surface is shown on the right.

Page 46: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

42 6. IMPLEMENTATION AND RESULTS

Figure 6.12: The filtered scan of the bust reconstructed with 2.2k bivariate polynomials.

Figure 6.13: Comparison between the cluster results of a filtered and an unfiltered point cloud. The pointcloud on the left is not filtered, whereas the one on the right is filtered.

Page 47: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

6.2. RESULTS 43

Figure 6.14: Comparison between planes (left) and bivariate polynomials (right) as proxy objects. Allreconstruction parameters were identical. Shown from top to bottom: Cluster result, supportspheres, raytraced surface, and approximation error. The error is color coded and increasesfrom minimal error (green) to maximum error (red).

Page 48: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

44 6. IMPLEMENTATION AND RESULTS

Figure 6.15: Comparison between a SLIM based reconstruction and our approach. Left the SLIM basedapproach, using 25k quadratic surfel, on the right our approach using 7.7k bivariate polyno-mials.

Page 49: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

45

7 Summary and Future Work

We developed a software system to reconstruct the surface from a point cloud. We showed that a divideand conquer approach is necessary, to handle the high amount of data produced by a 3D scanner. Theclustering of the data points is achieved using a modified K-means algorithm. We introduced the proxyconcept which is used to approximate the surface with different kinds of approximants, like planes orbivariate polynomials. To use the proxy concept efficiently, we introduced a clustering of the data usinga split plane approach. The result of our clustering stage is a binary tree which can be used to realize alevel of detail representation of the surface or as an accelerating data structure for the rendering of thefinal surface. However, we use the proxy objects in the leaf nodes of the tree to build the final surface. Asupport sphere is associated with each cluster, defining the area of influence of the clusters proxy. Theproxies of the leaf nodes are then blended together using a partition of unity approach to make up thefinal surface.

Future Work

The first restriction of our software system is the fact that it uses only a single thread. With dualcore oreven quadcore systems becoming common these days, making the program multithreaded would increasethe performance significantly. Especially the clustering process is an ideal candidate for multithreadedcomputations.Additionally, other clustering approaches like Fuzzy C-Means, where overlapping clusters are allowed,may lead to better clustering results. Our approach faces difficulties when dealing with sharp featuresor borders. The analysis of other proxy objects that are suitable to represent such areas may also be animportant improvement which can be made. Another possible direction for future research is the identi-fication of features in the point cloud and the optimization of the cluster generation with this knowledge.When using the split plane clustering approach, the plane proxies may be computed incrementally asexplained in section 4.1. The possibility to also compute the bivariate polynomials incrementally mayincrease performance significantly. For the visualization, the standard raytracing approach to visualizethe final surface may be substituted by a GPU based approach like the one described in [KOKK06].

Page 50: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

46 7. SUMMARY AND FUTURE WORK

Page 51: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

47

Bibliography

[AB98] Nina Amenta and Marshall Bern. Surface reconstruction by voronoi filtering. In SCG ’98:Proceedings of the fourteenth annual symposium on Computational geometry, pages 39–48,New York, NY, USA, 1998. ACM Press.

[ACDL00] N. Amenta, S. Choi, T. K. Dey, and N. Leekha. A simple algorithm for homeomorphicsurface reconstruction. In SCG ’00: Proceedings of the sixteenth annual symposium onComputational geometry, pages 213–222, New York, NY, USA, 2000. ACM Press.

[ACK01] Nina Amenta, Sunghee Choi, and Ravi Krishna Kolluri. The power crust. In SMA ’01:Proceedings of the sixth ACM symposium on Solid modeling and applications, pages 249–266, New York, NY, USA, 2001. ACM Press.

[Bli82] James F. Blinn. A generalization of algebraic surface drawing. ACM Trans. Graph.,1(3):235–256, 1982.

[Blo94] Jules Bloomenthal. An implicit surface polygonizer. pages 324–349, 1994.

[Boi84] Jean-Daniel Boissonnat. Geometric structures for three-dimensional shape representation.ACM Trans. Graph., 3(4):266–286, 1984.

[Bre72] Richard P. Brent. Algorithms for Minimisation Without Derivatives (Automatic Computa-tion). Prentice Hall, 1972.

[CG04] F. Cazals and J. Giesen. Delaunay triangulation based surface reconstruction: Ideas andalgorithms. Report, INRIA, 11 2004.

[Dey06] Tamal K. Dey. Curve and Surface Reconstruction: Algorithms with Mathematical Anal-ysis (Cambridge Monographs on Applied and Computational Mathematics). CambridgeUniversity Press, 2006.

[DG03] Tamal K. Dey and Samrat Goswami. Tight cocone: a water-tight surface reconstructor. InSM ’03: Proceedings of the eighth ACM symposium on Solid modeling and applications,pages 127–134, New York, NY, USA, 2003. ACM Press.

[DG04] Tamal K. Dey and Samrat Goswami. Provable surface reconstruction from noisy samples.In SCG ’04: Proceedings of the twentieth annual symposium on Computational geometry,pages 330–339, New York, NY, USA, 2004. ACM Press.

[FKN80] Henry Fuchs, Zvi M. Kedem, and Bruce F. Naylor. On visible surface generation by a prioritree structures. In SIGGRAPH ’80: Proceedings of the 7th annual conference on Computergraphics and interactive techniques, pages 124–133, New York, NY, USA, 1980. ACMPress.

[Har96] J. C. Hart. Sphere tracing: A geometric method for the antialiased ray tracing of implicitsurfaces. The Visual Computer, 12(10):527–545, 1996.

[HB06] Martin Hanke-Bourgeois. Grundlagen der Numerischen Mathematik und des Wis-senschaftlichen Rechnens (Mathematische Leitfäden). Teubner, 2006.

Page 52: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

48 Bibliography

[HDD+92] Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, and Werner Stuetzle. Sur-face reconstruction from unorganized points. In SIGGRAPH ’92: Proceedings of the 19thannual conference on Computer graphics and interactive techniques, pages 71–78, NewYork, NY, USA, 1992. ACM Press.

[IJS03] I. P. Ivrissimtzis, W-K. Jeong, and H-P. Seidel. Using growing cell structures for surface re-construction. In SMI ’03: Proceedings of the Shape Modeling International 2003, page 78,Washington, DC, USA, 2003. IEEE Computer Society.

[Jäh06] André Jähnig. Matching und Registrierung von 3D-Scans.http://www.inf.tu-dresden.de/index.php?node_id=1158, 2006.

[Jol02] I.T. Jolliffe. Principal Component Analysis. Springer, 2002.

[KOKK06] Takashi Kanai, Yutaka Ohtake, Hiroaki Kawata, and Kiwamu Kase. Gpu-based renderingof sparse low-degree implicit surfaces. In GRAPHITE ’06: Proceedings of the 4th inter-national conference on Computer graphics and interactive techniques in Australasia andSoutheast Asia, pages 165–171, New York, NY, USA, 2006. ACM Press.

[Kön06] Sören König. Akquisition dynamischer Geometrie mit strukturiertem Licht.http://www.inf.tu-dresden.de/index.php?node_id=1158, 2006.

[KSO04] Ravikrishna Kolluri, Jonathan Richard Shewchuk, and James F. O’Brien. Spectral surfacereconstruction from noisy point clouds. In SGP ’04: Proceedings of the 2004 Eurograph-ics/ACM SIGGRAPH symposium on Geometry processing, pages 11–21, New York, NY,USA, 2004. ACM Press.

[LC87] William E. Lorensen and Harvey E. Cline. Marching cubes: A high resolution 3d surfaceconstruction algorithm. In SIGGRAPH ’87: Proceedings of the 14th annual conference onComputer graphics and interactive techniques, pages 163–169, New York, NY, USA, 1987.ACM Press.

[OBA+03] Yutaka Ohtake, Alexander Belyaev, Marc Alexa, Greg Turk, and Hans-Peter Seidel. Multi-level partition of unity implicits. ACM Trans. Graph., 22(3):463–470, 2003.

[OBA05] Yutaka Ohtake, Alexander Belyaev, and Marc Alexa. Sparse low-degree implicit surfaceswith applications to high quality rendering, feature extraction, and smoothing. In M. Des-brun and H. Pottman, editors, Eurographics Symposium on Geometry Processing 2005,pages 149–158, Vienna, Austria, 2005. Eurographics Association, Eurographics Associa-tion.

[PvGS+03] Mark Pauly, Luc van Gool, Gábor Székely, Markus Gross, and Bernt Schiele. Point Primi-tives for Interactive Modeling and Processing of 3D Geometry. Hartung-Gorre, 2003.

[PZvBG00] Hanspeter Pfister, Matthias Zwicker, Jeroen van Baar, and Markus Gross. Surfels: surfaceelements as rendering primitives. In SIGGRAPH ’00: Proceedings of the 27th annual con-ference on Computer graphics and interactive techniques, pages 335–342, New York, NY,USA, 2000. ACM Press/Addison-Wesley Publishing Co.

[RBW97] Alyn Rockwood, Jules Bloomenthal, and Brian Wyvill. Introduction to Implicit Surfaces(Morgan Kaufmann Series in Computer Graphics and Geometric Modeling (Hardcover)).Morgan Kaufmann Publishers Inc,US, 1997.

[SS05] Oliver Schall and Marie Samozino. Surface from scattered points: A brief survey of recentdevelopments. In Bianca Falcidieno and Nadia Magnenat-Thalmann, editors, 1st Interna-tional Workshop towards Semantic Virtual Environments, pages 138–147, Villars, Switzer-land, 2005. MIRALab.

Page 53: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

Bibliography 49

[Tau91] Gabriel Taubin. Estimation of planar curves, surfaces, and nonplanar space curves definedby implicit equations with applications to edge and range image segmentation. IEEE Trans.Pattern Anal. Mach. Intell., 13(11):1115–1138, 1991.

[WMW06] Simon Winkelbach, Sven Molkenstruck, and Friedrich M. Wahl. Low-cost laser range scan-ner and fast surface registration approach. In DAGM-Symposium, pages 718–728, 2006.

Page 54: Großer Beleg Surface Reconstruction from Point Clouds ... · 4 1. INTRODUCTION Figure 1.1: The content creation pipeline using modern acquisition techniques. Image adopted from [PvGS+03]

50 Bibliography