Collision Detection for Point Cloud Models With Bounding Spheres Hierarchies

(cid:178) Point cloud models are a common shape representation for several reasons. Three-dimensional scanning devices are widely used nowadays and points are an attractive primitive for rendering complex geometry. Nevertheless, there is not much literature on collision detection for point cloud models. This paper presents a novel collision detection algorithm for large point cloud models using voxels, octrees and bounding spheres hierarchies (BSH). The scene graph is divided in voxels. The objects of each voxel are organized intoan octree. Due to the high number of points in the scene, each non-empty cell of the octree is organized in a bounding sphere hierarchy, based on an R-tree hierarchy like structure. The BSH hierarchies are used to group neighboring points and filter out very quickly parts of objects that do not interact with other models. Points derived from laser scanned data typically are not segmented and can have arbitrary spatial resolution thus introducing computational and modeling issues. We address these issues and our results show that the proposed collision detection algorithm effectively finds intersections between point cloud models since it is able to reduce the number of bounding volume checks and updates.

BSH organizes spatially its geometry, grouping neighboring points.
Results show that the collision detection algorithm for point cloud models uses effectively the bounding sphere hierarchy to find intersections between point cloud models at interactive rates.In addition, unlike CAD objects which typically contain object hierarchies and are already segmented into surface groups, point data sets derived from laser scanned data do not have such information thus presenting computational issues.The octree was used for this purpose to address these issues and it is a solution that adapts to point sets derived from different laser scanners and spatial settings.
The paper is organized as follows.Section 2 presents collision detection approaches for the determination of intersections between polygonal and point cloud models.Section 3 describes the VIZIR project that highlighted the need to develop an efficient collision detection algorithm for point cloud models.Section 4 describes the data structures for the representation of the scene graph.Section 5 presents the bounding sphere hierarchy that is used for to solve the collision detection problem.Section 6 describes the novel collision detection algorithm and results using laser scanned point sets are presented in Section 7. Conclusions and future work are presented in Section 8.

II. RELATED WORK
Currently, there are many implementations of collision detection schemes for interactive systems, most of them only support polygonal models.Frequently, they use bounding volume hierarchies (BVH), spatial subdivision methods and more recently use graphics hardware to accelerate collision detection by hardware.There is a lack of collision detection systems for point cloud models.Bounding volume hierarchies are frequently used to organize the triangles of an object to improve the performance of the collision detection process, by reducing the number of pairs of bounding volume tests.The classic scheme for hierarchical collision detection is a simultaneous recursive traversal of two bounding volumes trees A and B.
The main advantage of SOLID, OPCODE, Box-Tree, Chen [5]and Lu [6] is that AABBs are faster to intersect.
RAPID approximates 3D objects with hierarchies of oriented bounding boxes (OBBs).The main advantage of RAPID is that OBBs are better approximations to triangles reducing effectively the number of intersecting operations.
V-COLLIDE solves the broad-phase of the collision detection using a sweep-and-prune operation to find pairs of objects potentially in contact.It uses RAPID to find in the narrow phase which pairs of objects intersect.
H-COLLIDE is a framework to find collisions for haptic interactions.It uses a hybrid hierarchy of uniform grids and trees of OBBs to exploit frame-to-frame coherence.It was specialized to find collisions between a point probe against 3D objects.
The QuickCD and Dop-Tree implementations build a hierarchy tree of discrete orientation polytopes (k-dops).The main advantage of using discrete orientation polytopes is that k-dops are better approximations to the underlying geometry than AABBs with the advantage of its low cost compared to OBBs.
Swift++ builds a hierarchy of convex hulls and intersection is tested using a modified Lin-Canny closest feature algorithm.
He [14] uses a hybrid approach that combines OBBs and k-dops called QuOSPOs.This approach provides a tight approximation of the original model at each level.
Spatial subdivisions are a recursive partitioning of the embedding space occupied by objects.In general, spatial partitioning structures are used as a secondary representation for the collision detection process.
The main idea behind all space partitioning methods is to exploit spatial coherency.For each object, we check for collision only objects of the neighborhood, eliminating comparisons with those objects that are far away and therefore cannot be colliding.
Zyda [15] uses grids to find overlapping objects in the broad phase.García-Alonso [16] also uses uniform grids to find exact collisions between 3D objects for the narrow phase.Teschner [23] use uniform grid subdivision combined with hashing to reduce storage requirements for collision and self-collision detection of deforming objects that consist of tetrahedrons.Eitz [24] also uses a spatial grid inspired by the work of Teschener together with 1D hash table to find collisions between deformable tetrahedral models.A hybrid approach is presented by Gregory [10] using regular grids, where each occupied grid cell stores an OBBs tree of those triangles on that cell.
Hubbard´s [19] approach for finding collisions in real time is based on a time-critical computing algorithm and on octrees of spheres.Kitamura´s [20] algorithm for collision detection uses an octree for each object.Ganovelli [18] also associate an octree of axis aligned bounding boxes with each object, and keeps this hierarchy efficiently and dynamically updated for deformable objects.
Luque [21] uses semi-adjusting BSP-trees for representing scenes composed of thousands of moving objects.
Figueiredo [22] combines AABBs with R-trees to implement an efficient collision detection algorithm that determines intersecting surfaces.
Algorithms using graphics hardware use depth and stencil buffer techniques to determine collisions between convex [25] and non-convex [26] objects.CULLIDE [27] is also a GPU based algorithm that uses image-space occlusion queries and OBBs in a hybrid approach to determine intersections between general models with thousands of polygons.MRC [28] deals with large models composed of dozens of millions of polygons by using the representation of a clustered hierarchy of progressive meshes (CHPM) as a LOD hierarchy for a conservative errorbound collision and as a BVH for a GPU-based collision culling algorithm.
These GPU-based algorithms are applicable to both rigid and deformable models since all the computations are made in the image-space.Collision detection methods using GPUs have the disadvantage that they compete with the rendering process, slowing down the overall frame rate.Furthermore, some of these approaches are pure image based reducing their accuracy due to the discrete geometry representation.
All these collision methods have been applied only to polygonal objects.Recently Klein [30] presented a novel approach for collision detection of point clouds.They construct a point hierarchy of bounding volumes to enclose the points at different levels of the hierarchy.Points are stored in the hierarchy leaves.Each node stores a sufficient sample of the points plus a sphere enclosing part of the surface.Given two point cloud hierarchies, two objects are tested for collision by simultaneous traversal.At the leaves, an intersection is determined by estimating the smallest distance.
Kim [31] et.al show the performance benefits of using compression of out-of-core AABBs for collision detection of polygon models that do not fit in main memory, namely they show that the resources of the CPU can be used to compensate the I/O lag of reading uncompressed data structures.
Figueiredo [32] et.al used AABBs where each box centered at a point had respectively the width of the average inter point distance of the data set and twice the average distance, so as to overlap and better approximate a surface collision.However, they noticed that in some areas such as doorways a closer fit would be more desirable to avoid false collisions.It is not immediately clear whether grouping of spheres provides a tighter bounding volume than groups of cubes for arbitrary objects.

III. VIZIR
The VIZIR project sets out to develop new visualization and interaction algorithms of massive out-of-core data to build a virtual reality representation of an historical monument in Portugal.Virtual reality has been adopted by the Cultural Heritage field as a perfect, objective simulation of reality to present hyper realistic reconstructions of monuments as true historical Fig. 3. Every object of each voxel is an R-tree of points.representations [33].The 3D model of study consists of approximately 700 laser scans of the Batalha monastery, ~1 billion points, exceeding 100 GBytes.
Collision detection is an important interaction cue to help user navigation in the virtual world.Unfortunately not much work exists with solutions for collision detection with point clouds.
Before the full complexity of the model can be addressed, an efficient and reliable collision detection solution is needed for point clouds.
For this purpose a simple scenario (Fig. 1 and 2)was designed to evaluate different user collisions that can occur whilst navigating and exploring a 3D point cloud model.
In this scenario a subset of the model was chosen that point cloud for collision detection purposes, to pass through open doors, walk alongside walls, but is stopped when colliding with the point cloud.
In addition standard collision detection tests were carried out, and collisions with points obtained from CAD models were also tested.
In the next section we present our solution for efficiently detecting collisions with point clouds.

IV. POINT CLOUD HIERARCHY
This section presents the data structures that the proposed algorithm uses to find collisions in a large environment where 3D models are described as point clouds.
First a uniform grid that divides the scene graph into N N N cubic cells of equal volume is used, thus building a grid of voxels.Each voxel is segmented using an octree.Each leaf node of the octreehas a list of the objects and the points occupying that region.To study the various user scenarios described in the previous section the voxel containing the entrance to the monastery was used (Fig. 2).In a future scenario, each data structure associated with a voxel could be comuncompressed into a LRU queue [34].
To determine colliding objects at each voxel, the approach presented in this paper uses bounding volume spheres hierarchies, to find collisions between pairs of 3D objects defined as point clouds.Each object is represented by aBounding Sphere Hierarchy (BSH), implemented as an R-tree data structure, in its own local coordinate system.The bounding sphere hierarchy structure is used to filter out portions of the object that cannot intersect.
The choice of bounding volume type influences performance of the collision detection process.The implementation of the collision detection algorithm presented in this paper uses spheres because they use less memory than axis-aligned bounding boxes and are faster to update.
It was decided to use a hierarchy like an R-tree [35] to build bounding sphere hierarchy and organize 3D geometry of objects.R-trees are a good choice for collision detection because first, at any level of the tree, each primitive is associated with only a single node.Secondly, in an R-tree all leaf nodes appear on the same level.Third, because the depth of a R-tree storing n primitives islog m n, m is the minimum number of children of a node.And finally, because that the total number of primitives stored in a R-tree equals the number of original primitives.The points of each voxel are partitioned using an octree.
Each partition P i of the octree is represented by an R-tree data structure in its own local coordinate system (Fig. 3) to speed up the process of finding collisions.The R-tree is built, grouping neighboring points.The leaf nodes are the bounding spheres S i that enclosethe points that define the object.For two objects, it checks for collisions between points which are in the neighborhood, eliminating comparisons with those that are far away.

V. BOUNDING SPHERE HIERARCHY FOR THE COL-LISION DETECTION PROBLEM
As explained in the previous section, it was decided to use a bounding sphere hierarchy implementedas an R-tree to build the bounding volume hierarchies and organize the 3D geometry of objects for improving the performance of the collision detection process.
For the implementation of the collision detection algorithm each object is represented by an R-tree data structure in its own local coordinate system (Fig. 4).Since the model has a huge amount of points, first the object is partitioned using an octree.Then, a hierarchical tree is built, grouping neighboring points.The leaf nodes of the BSH point to the geometry of the partitions Pi that define the object.For two objects, it checks for collisions between partitions which are in the neighborhood, eliminating comparisons with those which are far away.The same idea is applied for partitions.Partitions from a three-dimensional model can be complex with a large number of points.Another bounding spheres hierarchy is used to organize the points spatially and hence to quickly reject points that cannot intersect (Fig. 5).In this approach, an R-tree is computed for each partition P i , grouping neighboring points to eliminate comparisons with those that are faraway from the area of intersection.The leaf nodes of the tree point to the bounding spheresS i of the points.

VI. COLLISION DETECTION ALGORITHM
This section presents a novel algorithm for determining intersections between pairs of 3D objects defined as point clouds.
The approach presented is supported by hierarchies of bounding spheres.The advantage of using bounding spheres is that they are good approximations to points and are faster to update.
Two levels of bounding sphere hierarchies are used.The top sphere hierarchy organizes the space divided by the octree structure to quickly reject regions of the objects that cannot intersect because they belong to partitions that are not intersecting.The lower sphere hierarchy organizes the point cloud geometry of each partition to speed up the process of finding a pair of points in close proximity to determine if the pair of objects is overlapping.
To find if two objects are intersecting, the collision detection manager makes a recursive traversal of two spherebounding volumes trees A and B. Fig. 6 presents the pseudo code of the novel approach.The collision detection algorithm first checks if bounding spheres from the partition hierarchy of objects A and B are disjoint (line 1-2 in Fig. 6).
The sphere volumes (SV) of each object are originally SV A (A) and SV B (B), respectively.The transformation matrix that converts the local representation of object A into the local coordinate system of object B is defined as M B A .The sphere volume of object A is updated to the coordinate system of object B, SV B (A) (line 1of Fig. 6).Once the sphere volumes of each object are in the same coordinate system they can be checked for overlap (line 2 of Fig. 6).
For those pair of nodes Aand B whose corresponding sphere volumes do not overlap, then the corresponding two objects are not intersecting and the process ends (line 3of Fig. 6).
If they overlap, they are candidate for collision,further tests must be made.If both nodes Aand B are leaves then the sphere hierarchies of the points for this partition of the space must be checked to find a pair of points in close proximity (line 5 of Fig. 6).In the case that at least one of nodes Aor B, are not leaves then it continues the traversal of the sphere bounding volume hierarchy, down to the leaves nodes (lines6to 12 of Fig. 6).
Figure 7 presentsthe pseudo code for the process of finding points in close proximity for each partition.
At this point, the process of finding overlap between the two objects uses the lower sphere hierarchy that organizes the point cloud geometry of each partition.The points of A and B are stored at the leaf nodes of the sphere tree.This process is very similar to the previous one, since it is a recursive traversal of two sphere bounding volumes trees A and B.
First, the sphere volume of object A is updated to the coordinate system of object B, SV B (A) (line 1of Fig. 7).If bounding spheres from objects A and B are disjoint (line 2 of Fig. 7) then there is no overlapping and the process ends (line 3 of Fig. 7).If they overlap, they are candidate for collision.If both nodes Aand B are leaves then points A and B are in close proximity and the two objects are overlapping (lines 4 and 5 of Fig. 7).

collidePoints (A, B) 1:SVB(A)=MB
In the case that at least one of nodes Aor B, are not leaves then it continues the traversal of the sphere bounding volume hierarchy, down to the leaves nodes (lines6to 12 of Fig. 7).

VII. EXPERIMENTAL RESULTS
This section presents the performance evaluation results of the novel collision detection algorithm for point cloud models described in this paper.
Point cloudmodels derived from laser scans present two main characteristics: they are not segmented, and points are only samples of the surface, making an actual collision between points a less likely event.Point based rendering algorithms such as QSplat [34] change the thickness and shape of a point splat to better convey visually the underlying surface while viewing in close range.Similarly we use the average closest point distance ofa point divided by two to create bounding spheres at point level that ensure collision detection of the surface they represent.
As mentioned in section 3, we created an interactive system to study various collision scenarios using the Batalhafaçade model.This model was obtained using a laser scan and contains 587923 points.The avatar is the Al model comprised of 3617 points and walks along a predefined path of 40 seconds used to benchmark our collision algorithm and is depicted with a white dashed line in Fig. 2.
We run our experiment on a laptop equipped with a Core 2 Duo T9300 2.50 GHz Cpu, 4 Gb of RAM memory, a NVIDIA 8800M GTX graphic card with 512 Mb and running Windows 7 64 bits.Our walkthrough application was implemented in C++ using GLUT and OpenGL libraries.The Batalhamodel was partitioned using an octree data-structure with 4096 cells.
Our application was designed to run a synchronized rendering loop of 30 fps which is sufficient for desktop based real-time visualization.We note that the collision test is defined between the avatar and the scene points.
Table 1 presents the average frame rate and memory usage obtained with bounding sphere hierarchies of different degrees.We can notice that our approach provides an average frame rate from 15 up to 21 fps with collision detection.The application determines intersections interactively.
The higher the degree of the tree, the smaller is the height of the tree.Minimizing the height of the tree is desirable, so that when searching the hierarchy, the tree is traversed from root to a leaf in a small number of steps by visiting a fewer number of nodes.However, searching trees of a higher degree can be less efficient than searching trees of a lower degree.Trees of a higher degree need more processing at each node, since more comparisons are needed to find which leafs to descend next.Although, fewer nodes are visited during the traversal of a higher degree tree, more comparisons may be required, reducing the overall performance.Therefore a balance between the degree and height is desired.
The collision test is defined between the avatar and the scene points.Our experiments have shown that best performance is achieved using bounding sphere hierarchies of degree less than 10 (Table 1).Fig. 8 depicts the variation of the framerate along our 40 second path using bounding sphere hierarchies of different degrees.The black dashed line corresponds to the framerate obtained with the walkthrough of the path without collision detection.Fig. 8 shows that even with collision detection the navigation is still interactive and the cost of the traversal of the hierarchies is variable due to the spatial partition of the structure.

VIII. CONCLUSIONS AND FUTURE WORK
This paper presents a novel approach for collision detection of point clouds.There are many approaches and algorithms to determine collisions between 3D polygonal models.There is very little in the literature about collision between 3D point clouds models.However, point clouds have become a popular shape representation.One of the reasons is due to the fact that 3D scanning devices became affordable and widely used for projects like VIZIR.
The proposed collision detection approach divides the scene graph in voxels.This paper implements a novel sphere tree based on an R-Tree for collision detection.There is a bounding volume R-Tree of bounding spheres for each object in a voxel that organizes spatially its point cloud.
Experimental results show that this implementation is effective in determining interactively intersections between 3D models.However, traversing tighter areas such as the door of the Monastery "still" became more difficult without colliding.In the future we would like to design an adaptive bounding box size to better handle point sets with heterogeneous sampling density.And explore an approach that manually classifies border vertices, and treats these groups of vertices as different surface entities that directly represent the geometry.We also would like to design abounding sphere hierarchy for the partitions that distributes the point sets among different partitions in order to make the trees of the complete data model with the same depth.

Fig. 1 .
Fig.1.First person view of the user in the scenario of interaction whilst navigating the scanned Batalha monastery model.

Fig. 2 .
Fig.2.Walkthrough collision test scenarios between the Al avatar model comprised of 3617 points (lower left) and the 587923 point cloud belonging to a single voxel.

Fig. 4 .
Fig.4.Each object of the scene graph is represented by its own sphere hieararchy data structure representing in a first level the partitions of the octree.

Fig. 5 .
Fig.5.Each octree partition of the 3D model is also represented by its own bounding spheres hierarchy data structure.

Fig. 8 .
Fig.8.Application framerate when Al model is walking along the path.

Fig. 9
Fig.9shows for the entire model the bounding spheres of the fourth level.The model is partitioned depending on the octree structure and underlying point data set.Consequentely, depending on the density and the actual octree partitions used for the model subdivision, different bounding depths are potentially reached in each bounding sphere tree.

TABLE 1 .
TIMING AND MEMORY USAGE FOR DIFFERENT DEGREES OF THE BOUNDING SPHERE HIERARCHY OF THE BATALHA MOD-EL.