24

ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

Technical Report CAIP-TR-216PARAMETER CONTROLLED SKELETONIZATION OF THREEDIMENSIONAL OBJECTSNikhil Gagvani and Deborah SilverDepartment of Electrical and Computer Engineering and CAIP center,Rutgers University, Piscataway, NJ 088553 June 1997COMPUTER AIDS FOR INDUSTRIAL PRODUCTIVITYCoRE Building - Frelinghuysen RoadRutgers - The State University of New JerseyPiscataway, New Jersey 08855-1390(908) 445-4208

Page 2: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

AbstractSkeletons are useful shape abstractions and have varied applications invisualization. The complexity of the desired skeletal structure dependson the application. Current techniques for extracting skeletons do notallow control over the complexity. In this paper, we describe an algorithmwhich uses a thinness parameter to control the density of the skeleton. Wepresent applications from CFD and medical visualization and show howthe skeletal structure can be used in these domains. We also illustratea technique which uses the skeleton to extract the centerline for surgicalnavigation.Keywords:Scienti�c Visualization, Medical Visualization, Skeleton,Volume Thinning, Centerline, Surgical Navigation

ii

Page 3: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

AcknowledgementThe research reported here was made possible through the support of theNew Jersey Commission on Science and Technology and the CAIP Center'sIndustrial Members.The work for this paper was done at the Laboratory for Visiometrics andModeling at Rutgers University. The authors are grateful to Dr. MarshaJessup of the Robert Wood Johnson Medical School for valuable input onmedical visualization and to Dr. Bernhard Geiger of Siemens CorporateResearch for providing the trachea dataset. Special thanks also go to Dr.N. Zabusky, X. Wang and J. Ray for useful discussions. The lab alsoacknowledges the support of ARPA HPCD, DOE and the CAIP center.

iii

Page 4: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

Table of ContentsAbstract iiAcknowledgement iiiList of Figures v1. Introduction 12. Previous Work 33. Algorithm 63.1 The Distance Transform 63.1.1 Algorithm for the Distance Transform 63.2 Skeleton Extraction 73.3 Extracting the Centerline 93.3.1 Algorithm for the Centerline 94. Implementation 104.1 The Distance Transform 104.2 Extracting the Skeleton 104.3 Reconstruction and Sphere Growing 115. Examples and Applications 125.1 Centerlines for Surgical Navigation 135.2 Skeletons in Feature Tracking 166. Conclusions and Future Work 17References 17iv

Page 5: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

List of Figures3.1 Minimal set for reconstruction 84.1 Data Structure for the Distance Transform 105.1 Exact reconstruction 125.2 Inexact reconstruction 125.3 Varying Thinness Skeletons 135.4 Skeleton of S shape 135.5 Trachea and its Skeleton (Thinness 2.5) 145.6 Generating the Centerline 145.7 Camera views from the Centerline 155.8 Vortex structures and their Skeletons 16

v

Page 6: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

1. IntroductionSkeletonization is a process for reducing an image/object 1 to a thinner remnant that largelypreserves the extent and connectivity of the original region. In a more general sense, a skeleton is areduced representation that captures the essential features of the image under investigation. Underthis general description, the skeleton is not just a simple curve; rather it is a collection of points.We can de�ne di�erent types of skeletons depending on the domain. The geometric skeletonof an object can be de�ned as the locus of points that are centered with respect to the objectboundary. Such a representation can serve as a powerful shape descriptor for object identi�cationand matching. Other types of skeletons use information about the physical properties of theobject, e.g. vortex cores [1]. The process of skeletonization is sometimes referred to as volumethinning, medial-axis generation or centerline extraction. In this paper, our focus is on thegeometric skeleton.Since a skeleton is an e�cient and compact shape descriptor, it can give useful cues for a numberof applications in visualization. These include� automatic navigation� compression� shape description and abstraction� trackingHowever, these applications are so varied and the requirements so diverse, that no single methodcan be used to generate skeletons for all of them. Some applications require the skeleton to beas thin as possible while others impose the condition that the object be reconstructible from theskeleton. These are two con icting requirements and existing algorithms favor one over the other.Extremely thin skeletons, which are essentially centerlines are useful in automatic navigation andsurgical path planning [2, 3]. Automatic path planning aids a surgeon in precisely exploring avirtual model of the inner anatomy of a patient by a non-invasive technique. The centerline isused as a guiding path for a virtual camera. Centerlines also �nd use in animation control, wherethe motion of a human subject is mapped to an animated �gure. The motion can be broken downinto a set of basis motions of a \stick-like" representation of the human, and these same basismotions can then be applied to the animation. When used for shape abstraction in cognitivevision, it is desirable to have a skeleton which captures all the branches in the object. As acompression tool, we would like to be able to reconstruct the original object from the skeleton.In this case, it is necessary to preserve as much information as possible, leading to a very thickskeletal structure. The shape information in a skeleton can also be used for tracking objects [4].While it is essential to preserve as much shape information as possible, reconstruction is not arequirement for tracking, so we could use a moderately thin skeleton.This paper discusses a skeletonization algorithm that allows control over the density of the skeletonand thus can be used for a range of applications. In Chapter 2, we look at some of the existing work1Image is a collection of pixels in 2D, object refers to a collection of voxels in 3D.1

Page 7: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

and methods for 3D skeletonization and their applications in visualization. Chapter 3 describesthe algorithm for extracting the skeletal points and a method to generate a centerline. Chapter 4deals with the data structures and issues for an e�cient implementation. In Chapter 5 we presentexamples and applications from current research in medical and CFD visualization.

2

Page 8: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

2. Previous WorkThe concept of using skeletons to describe shape has been a topic of interest to researchers inComputer Vision for over 30 years. The �eld has been well explored in 2D and many algorithmshave been extended to three dimensional thinning. Most of the three dimensional thinning al-gorithms, which identify points to be removed, belong to one of the three categories describedbelow. In the literature and the descriptions that follow, `Point' refers to a pixel/voxel and `Ball'refers to the digitized version of a sphere.Topological ThinningTopological thinning is in uenced by the work done in characterizing the topological propertiesof 2D images. Methods like [5, 6] identify simple points, the removal of which does not change thetopology of the image. The simple point test essentially reduces to checking the local neighbor-hood of a point to determine whether removal of the point will disconnect the neighboring points.Since the test is purely based on local connectivity, certain primitive shapes like cuboids might beexcessively thinned (to just a point). Therefore, certain simple points which are end-points areleft unchanged to preserve useful information about the shape of the object. One characterizationof end-points in a two-dimensional digital picture is a point which is adjacent to just one otherpoint. Several authors [7, 8, 9] have tried to extend the idea of topological thinning to threedimensions. However, characterizing 3D end-points does not easily extend from the 2D approach.Morgenthaler [10] has attempted a study of such a characterization. This class of algorithmscan also be easily parallelized as described in [11]. Topological thinning can guarantee connectedskeletons at the cost of reconstructibility. Since these methods use a topological property like theEuler characteristic to test points for removal, two objects with the same Euler characteristic butdi�erent geometries would be thinned to similar skeletons. e.g. a cuboidal box with sharp cornersand one with rounded corners would yield the same center line unless a robust end-point test isused.Distance Transform MethodsThe Distance Transform (DT) at a point within an object is de�ned as the minimum distanceto a boundary point. Since the skeleton is required to be centered with respect to the objectboundary, the distance transform gives useful cues for point removal. Points closest to the centerof the object would have the maximumdistance transform value and would not be removed whilethinning. Di�erent metrics can be used to compute the distance transform. The computationof a correct Euclidean DT is neither e�cient nor algorithmically trivial. Several algorithms havebeen proposed for the Euclidean DT [12, 13, 14]. The Euclidean metric can be approximated byManhattan or chessboard metrics for faster computation. The medial surface/axis can then bede�ned as the locus of maximal circles (2D) or balls (3D). The circles are constructed such as tohave a radius equal to the distance transform at a point and a maximal circle is one which is notcontained in the circle of any other point. The set of points thus extracted does not guaranteea connected skeletal representation. Niblack et al. [15] identify saddle points to get a connectedskeleton of 2D images. It is di�cult to identify saddle points in 3D because of the absence of aunique cyclic ordering of voxels (around a given voxel). This makes it hard to enforce connectiv-3

Page 9: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

ity of the skeletal points. Helman and Hesselink [16] �nd saddle points in a 2D vector �eld bycomputing the eigenvalues of the Jacobian matrix of the �eld. A vector �eld can be derived as thegradient of the distance transform, but the accuracy of saddle points depends on the method usedto compute the gradient. Besides, the characterization of saddle points in 3D is computationallyexpensive. Moreover, noisy complex datasets would have too many saddle points which mightnot be necessary for applications requiring a thin skeleton. Distance transform methods are wellsuited for reconstruction of the object from the skeletal points and their distance transform values.If a Euclidean or quasi-Euclidean metric is used for the distance transform, the skeleton is robustunder rotation of the object.Voronoi MethodsThe Voronoi Diagram is a well-known tool in Computational Geometry [17]. Given a set S of npoints in a plane, the Voronoi polygon of a point Pi is the polygon enclosing all points in the planethat are closer to Pi than to any other point in S. The Voronoi Diagram (V D) is the collectionof the Voronoi polygons of all the points in S. This concept can be extended to 3D as well,where the V D is the collection of Voronoi polyhedra. The medial-axis is a subset of the VoronoiDiagram. Since a maximal ball is tangent to the object boundary, its center is equidistant fromat least two di�erent points on the object boundary. Therefore, the V D of points on the objectboundary will yield Voronoi edges/faces near the center of the object which are equidistant fromtwo or more boundary points, giving part of the medial-axis. A 2D skeletonization algorithmbased on the Voronoi Diagram of a shape's boundary points is described in [18]. [19, 20, 21]compute the 3D medial-axis/skeleton by using some form of the Voronoi Diagram or its dual,the Delaunay triangulation. Voronoi methods are best suited for polygonally de�ned objects forwhich volumetric models are not available.Various forms of volume-thinning have been used for visualization applications. Itoh et al. [22]use a volume thinning technique to search for cells intersected by an isosurface. They use atopological thinning strategy based on a classi�cation of cells. Their method is a very speci�capplication since it needs to preserve extrema for propagating the isosurface. Hong et al. [3] usethe onion-peel technique [23] to produce a ythrough path for virtual colonoscopy. The onion-peeltechnique is a method for 2D skeletonization based on topological thinning. In the absence of a\complete" characterization of 3D end-points, such an approach could excessively thin the object,missing important features. Moreover, two end-points for the ythrough path need to be speci�ed. Specifying two such end-points needs considerable knowledge of the shape geometry since it isdesirable to have the points centered in the object interior. It is also desirable to be able to dealwith bifurcated objects.Most of the existing skeletonization algorithms do not allow much control over the complexity ofthe skeleton. Topological thinning works well for smooth, regular objects. However, objects inthe visualization domain tend to have noisy boundaries which would cause a lot of the points tobe identi�ed as end-points by a topological thinning method. Algorithms based on the VoronoiDiagram need a description of the object boundary, and it is hard to determine the density ofthe boundary point distribution a priori. Boundary noise would cause the Voronoi Diagram tobe very dense which needs to be appropriately pruned to generate the medial axis. In this paper,we look at a skeletonization method for 3D objects based on the distance transform, which allowsthe user to specify the complexity of the skeleton using a thinness parameter. Since it is based onthe distance transform, it is centered with respect to the object. It has the additional propertiesof invariance under rotation and it captures sharp corners which a topological method may missif the end-point test is not strict. The e�ect of boundary noise can be reduced by choosing a4

Page 10: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

thinness parameter that removes most of the \hairs" and \spikes" in the skeleton.

5

Page 11: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

3. AlgorithmIn this chapter, we describe an algorithm for parameter controlled volume thinning based on aquasi-Euclidean distance transform. The volume is considered to be uniformly sampled in all threedimensions. A voxel is the smallest unique element of this sampled volume. Voxels can be parti-tioned into object-voxels and background-voxels. The object-voxels are taken to be 26-connectedand the background-voxels are taken to be 6-connected (for a discussion on connectedness see[24]). Boundary-voxels are object-voxels that are 6-neighbors of background-voxels, i.e. they lieon the boundary. For a voxel p, we de�ne F-neighbors (face), E-neighbors (edge) and V-neighbors(vertex). F-neighbors of a voxel are the 6-neighbors and share a face with the voxel in a cubic grid.E-neighbors are the 18-neighbors that are not 6-neighbors, i.e. they share an edge of the voxelcube. V-neighbors are the 26 neighbors that are not 6-neighbors or 18-neighbors. The aim of thealgorithm is to identify a set M of object voxels that satis�es most of the following properties:� the voxels in M are geometrically centered with respect to the boundary voxels;� the object voxels are reproducible from the set M. This is the criterion for object recon-structibility;� M forms a minimal set for a given thinness value; and,� the voxels in M are 26-connected.3.1 The Distance TransformThe distance transform at a voxel p = fx,y,zg is de�ned asDTp = min(i,j,k) fdt((x; y; z); (i; j; k)) : (i; j; k) 2 BV gwhere dt is the distance from voxel (x,y,z) to voxel (i,j,k) and BV is the set of boundary voxels.The distance transform can be computed by using neighborhood masks which are based on theidea that global distances in the image are approximated by propagating local distances [25]. A3x3x3 neighborhood mask is used with a 3-4-5 metric which approximates the Euclidean metricfairly well.3.1.1 Algorithm for the Distance TransformLet S be the set of object-voxels, �S be the set of background-voxels and BV denote the set ofboundary-voxels. We use a peeling technique which propagates the boundary inwards, assigningdistance transform values to object-voxels which are in the neighborhood of the boundary-voxels.The distance transform value for a voxel is updated only if the new value is smaller than thecurrent value. 6

Page 12: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

For all voxels p 2 S, assign a distance transform DTp 1Calculate the Distance transform of boundary-voxelsFor all voxels p 2 S that have a ( face/edge/vertex ) neighbor q 2 �SDTp ( 3 for face / 4 for edge / 5 for vertex )Add p to BVPropagate the boundary inwardRepeat for all p 2 BVFind all voxels r 2 S which are ( face/edge/vertex ) neighbors of pAssign DTr minf DTr , DTp + ( 3 for face / 4 for edge / 5 for vertex )gRemove p from BVAdd r to BVuntil no DTr is modi�ed.3.2 Skeleton ExtractionOne desirable property of a skeleton is the ability to reconstruct the object from the skeletal voxelsand the distance transform values associated with these voxels. The condition of reconstructibilityalso makes the skeleton accurate in the sense that there are longer spines in regions with sharpcorners or curvature changes. We state some de�nitions and observations below :De�nition 1 If a voxel p has a distance transform DTp, the ball B(p) associated with p is the setof object voxels q such that the transform distance dt(p; q) from p to q is strictly less than DTp.De�nition 2 The ball for an object voxel is maximal if it is not contained in the ball of any othervoxel.Observation 1 The set of voxels whose balls are maximal is su�cient to reconstruct the object.This observation is true because every voxel in the object is contained at least in its own ball, andall non-maximal balls are contained in maximal ones. We now introduce the concept of a witnessvoxel in a manner similar to that in [15].De�nition 3 The witness for a voxel p is any 26-neighbor q such that the distance transform ofq, DTq = DTp - (3 for F-neighbor / 4 for E-neighbor / 5 for V-neighbor). Thus, if a voxel q isa witness for a voxel p, B(q) � B(p) .Since the ball associated with a witness voxel is contained in the ball of another voxel, the set ofnon-witness voxels should su�ce for reconstruction of the object. However, this set of non-witnessvoxels is not a minimal set for reconstruction. This holds because the ball of a voxel may not becompletely contained in that of another, but may be contained in the union of the balls of severalother voxels. This is illustrated by the example in Figure 3.1. The �gure shows a 5x5x5 cube withthe distance transform value at every voxel indicated by the number inside. Figure 3.1a showsthe ball of the black voxel, the voxels in the ball being marked gray. Figure 3.1b,c show the ballof each of the other voxels marked black. All the black voxels are non-witness voxels, but theball of the black voxel in Figure 3.1a is contained in the union of the other two balls. Hence, thenon-witness voxel marked black in Figure 3.1a is not essential to the skeleton.7

Page 13: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

3

6

9 9 9

3 3

3

3

3

3

3 3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3 3

3

3

3

3 3

3

3

3

3 3

3

3

3

3 3

3

3

3

3

3

3

3

3

3 3

3

3

33

3

3

3

3

3

3 3

3

3

3

3 3

3

3

3

3

3

3

3

3

33333

3

3

3

3 3 3 33 3 3 3 3

3

3

3

33333

3

3

33

33333

3

3

3

3 3 3 3 3

3

3

33

3

3

3

3 3 3 3 3

3

3

3

33333333

3

3

3

3 3 3 3 3

3

3

3

3 3 3 3 3

3

3

3

33333

3

3

3

33

3

3

3

3 3 3 3 3

3

3

3

33 333333

3

3

33

3 3 3 3 3

3

3

3

33333

3

3

3

3 3 3 3 3

3

3

3

33333

3

3

3

3 3 3 3 3

3

3

3

3

3

3

3

3 3 3 3 3

3

3

3

3333 3 3 3 3 3

3

3

3

33333

3

3

33

3

3 3 3

3

33

3

3

3

3 3 3

3

33

3

3

3

3 3 3

3

33

3

66 6 6

6

66666

6 6

6

6

6

6

666 6 6 6

6

666

6

66

6

6 6 6

6

6

6

6 6

6

666

6 6

6 6 6

6

666

6

6 6 6

6

66

66

6

6

6 6 6

6

66

6

6

666

6

6 6 6

6

6

6

6

a. b. c.Figure 3.1: Minimal set for reconstructionThe identi�cation of the essential non-witness voxels is not a simple problem. A brute forceapproach which grows the ball of every non-witness voxel and checks it for inclusion in the ballsof all other voxels would be computationally intensive. An equivalent approach is to check onlythe 26-neighborhood of every voxel.Claim 1 The ball of a voxel p must be contained in the ball of one of its 26 neighbors if it is tobe contained in the ball of any other voxel in the object.If the ball of a voxel p is contained in the ball of another voxel q, DTq > DTp. Therefore, thereexists an uphill path of increasing distance transform value from p to q, which passes throughvoxel p0 which is a neighbor of p. Therefore, the ball of p0 contains the ball of p. It also followsby a similar argument that if the ball of p is contained in the union of the balls of voxels q1, q2and q3, it must be contained in the union of the balls of the neighbors of p, namely p0, p00 andp000. The complete proof is given in [26].By de�nition, the ball of every non-witness voxel is maximal, so no single neighbor's ball com-pletely contains the ball of a non-witness voxel p. As mentioned above, it can be contained in theunion of the balls of neighboring voxels. If such neighbors exist, then their balls have to be atleast as big as the ball of p, which implies that their distance transform should be greater thanor equal to DTp. Rather than grow the ball for every neighbor and scan for containment in theunion of balls, a simple approach is to average the distance transform values of the neighbors qi ofp. The motivation behind summing the distance transform value of the neighbors is that if thereare several neighbors with a higher distance transform value, the ball of p could be contained inthe union of their balls. Therefore, if the mean of the neighbors' distance transform, MNTp isclose to or greater than DTp, we do not want to keep p in the skeleton.De�nition 4 MNTp = P26i=1DTqi26 ; p; q 2 S; q is a 26-neighbor of p.We introduce the thinness parameter TP , that is used to control how close MNTp should be toDTp for p to be added to the skeleton. 8

Page 14: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

Condition 1 If MNTp < DTp � TP , add p to the skeleton.A low value of TP indicates that p is retained in the skeleton if its distance transform is slightlygreater than that of its neighbors. This results in a thick skeleton. A high value of TP meansthat for inclusion in the skeleton, p must have a distance transform that is much greater thanthat of its neighbors, resulting in a thinner skeleton.3.3 Extracting the CenterlineThe parameter controlled skeletonization outlined above thins the volume, keeping only the voxelsthat satisfy Condition 1. These skeletal voxels are not generally connected. However, since theywere based on the criterion for reconstructibility, the skeletal voxels capture the essential shapeproperties of the object. They can now be processed for a variety of applications.A centerline is a curve that is centered with respect to the object boundaries. It can serve as thepath for a virtual camera in surgical path planning. We describe a simple midpoint subdivisionalgorithm to generate the centerline from the skeletal voxels. It is a semi-automatic algorithmin which the user speci�es end-points for centerline generation. These end-points are speci�edfrom among the skeletal voxels. This strategy enables the user to accurately pick end-points sincethe skeletal voxels are already centered with respect to the object. Moreover, it allows multiplecenterlines to be rapidly generated for interactive exploration of the dataset. This is true becausethe skeletal voxels are pre-computed and for every new path, the object does not have to bethinned again. The operator can see the skeletal voxels and thus all bifurcations and bumps areavailable as potential navigation paths.3.3.1 Algorithm for the CenterlineLet SK be the set of skeleton voxels. Let p1 and p2 be the end-points of the centerline such thatp1, p2 2 SK. We have a subdivision parameter (\�neness") F, which determines the number ofpoints along the centerline and gives a stopping condition for the recursion.Centerline ( p1, p2, F )f If ( distance ( p1, p2 ) < F ) returnFind the midpoint pm, of p1 and p2 such that pm = p1+p22Locate point q 2 SK such thatdistance ( q, pm ) is minimum for all q 2 SKCall Centerline ( p1, q, F )Call Centerline ( q, p2, F )gThe method outlined above is a simple, fast approach and works well for tube-like objects fre-quently occuring in medical applications. Since it uses the closest points, it could get perturbedby small \hairs" in the skeleton. A better method would use the distance transform value storedin the skeletal voxels and use the closest point with the greatest distance transform value for therecursive subdivision. This is discussed in Chapter 6.9

Page 15: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

4. ImplementationThe object is represented as an octree structure with object voxels in the leaf nodes and back-ground voxels stored as NULL leaves. The octree facilitates fast searching and optimizes memoryutilization.4.1 The Distance TransformOCTREE

CIRCULAR QUEUE

LINKED LISTFigure 4.1: Data Structure for the Distance TransformTo compute the distance transform, a circular queue (Figure 4.1) is used to keep track of thedistance values for successive peeling. We use the fact that at any given instant, if we areprocessing points with a distance value k, their neighbors can get DT values of k + 3, k + 4 ork + 5 only. We create a linked list for every DT value; the list stores pointers to the point in theoctree. The circular queue is initialized with lists for DT values 3, 4 and 5 with the head of thequeue at 3. As we process the list for DT=3, lists for DT values of 6, 7 and 8 are created and areadded in order to the tail of the queue. Once the list for DT=3 is processed, we move the headof the queue. A point is added to the list only if its new DT value comes out to be smaller thanthe existing one. Such an implementation makes the computation very fast, since the time takenis of the order of the number of object-voxels. The computation stops when the queue is empty.4.2 Extracting the SkeletonOnce the distance transform value at every object point is known, a linked list of all the objectpoints is created with pointers to the octree nodes. One pass is done over this list to test if thepoint is a local maximum or if it satis�es Condition 1 (described in the previous chapter). Ifthe point is either a local maximum or it satis�es the thinness test, the point is marked as beingin the skeleton. 10

Page 16: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

The above implementation is easily parallelizable. Each point can be independently examined forinclusion in the skeleton, and the order of scanning the points does not a�ect the results. WithN processors, one can theoretically achieve a speedup of N .Since the algorithm is not based on connectivity, the set of points marked as skeletal points arenot necessarily a single connected component. A simple connection scheme is used, which consistsof marching in the direction of maximum distance transform gradient (also called steepest uphillpath) from points which have less than two neighbors in the skeleton. The uphill march proceedsby successively stepping to equal or greater valued neighbors, and terminates at another skeletalvoxel or a local maximum.4.3 Reconstruction and Sphere GrowingIn order to reconstruct the object from the skeletal points, spheres of radius equal to the distancetransform value have to be constructed, with their center at each of the points. A recursivestrategy is adopted to implement this. A sphere growing path is initiated from every skeletalpoint and starts with a value equal to the distance transform at that point. Every move to aneighboring point incurs a cost of either 3, 4 or 5 for face, edge and vertex neighbors respectively,and the sphere value is decremented by the cost. The neighbor points then serve as startingpoints for a new sphere growing path with the decremented value. A path terminates when itsvalue is less than or equal to 3. All points along every sphere growing path are inserted into thereconstructed object.

11

Page 17: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

5. Examples and ApplicationsIn this chapter, we apply our algorithm to three example datasets. The �rst example uses a setof simple digitized shapes. We then look at an example from medical visualization and anotherfrom computational uid dynamics.Figure 5.1a shows a 9x9x9 cube. The skeleton is shown in Figure 5.1b for a thinness value of 2.0.Using the skeletal points, the object is reconstructed as shown in Figure 5.1c.Figure 5.1: Exact reconstructionFigure 5.2: Inexact reconstructionFigure 5.2a is a digitized cylinder with height 12 and radius 6. The skeleton in Figure 5.2b hasbeen extracted using a thinness value of 1.6. Figure 5.2 (c) shows the reconstructed object. Notehow the ball growing process squares out the rounded corners because of the pseudo-Euclideanmetric, hence extra voxels are observed in the reconstructed object.Figure 5.3 shows the skeleton for a cylindrical object with varying thinness parameter. The sharpcurvature discontinuity at the faces of the cylinder is responsible for the multiple spikes, whichincrease in density as the thinness parameter is reduced.The result of applying our algorithm to an S-shaped object constructed from cuboidal elementsis shown in Figure 5.4. A thinness parameter of 2.0 was used for this example.12

Page 18: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

Figure 5.3: Varying Thinness SkeletonsFigure 5.4: Skeleton of S shape5.1 Centerlines for Surgical NavigationWe demonstrate our centerline algorithm on the segmented human trachea obtained from SiemensCorporate Research (courtesy of Dr. Bernhard Geiger). The dataset consists of 281 slices of512x512 images, and the segmented trachea has 148,892 voxels. The complete trachea and itsskeleton with a thinness parameter of 2.5 are shown in Figure 5.5. The skeleton captures all thebifurcations in the object and includes the disjoint fragments of the object.We apply our algorithm to the �rst 180 slices of the dataset which contain the major bifurcationof the trachea. The user de�nes two end-points per centerline from the set of skeletal points. Twodi�erent paths are generated, with the user-de�ned end-points as indicated in Figure 5.6a Thetrachea with the centerline inside it is shown in Figure 5.6b. The centerline for both the pathswas constructed using a subdivision parameter of 5.0. Figure 5.7 shows camera shots taken from 4di�erent points along the centerline with the camera looking downwards into the bifurcated part.13

Page 19: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

Figure 5.5: Trachea and its Skeleton (Thinness 2.5)Figure 5.6: Generating the Centerline14

Page 20: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

Figure 5.7: Camera views from the CenterlineThe inset legend indicates the camera position for each of the views. Figure 5.7a highlights thepoints along the centerline. Note that the two ends of the trachea and the bifurcation are clearlyseen in Figure 5.7b which shows the view from a point halfway into the straight part. Figure 5.7cshows the camera view from close to the bifurcation point and Figure 5.7d shows the view from15

Page 21: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

Figure 5.8: Vortex structures and their SkeletonsThinness % Error Total time (sec) % TimeNone 0 344.62 1000.5 4.32 89.38 25.91.0 5.15 52.48 15.22.0 14.50 15.92 4.6Table 5.1: Error and speedup for feature tracking with skeletonsa point in the left branch.5.2 Skeletons in Feature TrackingIn [4], Silver and Wang use a volume based approach for tracking features. They extract fea-tures from a time varying dataset and perform a volume di�erence test over timesteps to matchfeatures. Objects which match to a tolerance value are considered to be the same. Since thecomplete volumes are used for the di�erence test, the algorithm is computationally intensive.However, the skeleton of each volume can be used to perform matching across timesteps. Thenumber of voxels in the skeletons ranges from 1% to 15% of the original object voxels. We presentresults for tracking a 1283 dataset which is from a simulation of turbulent vortex structures. Thevortex structures are tracked over 10 timesteps, �rst using the complete volume data and thenusing skeletons of three di�erent thinness values. We compare the time taken for tracking theskeletal points and the the time to track the complete volume. The percentage error is also calcu-lated and results are tabulated in Table 5.1. A signi�cant speedup is observed when the skeletalpoints are tracked. Most of the errors are due to very small features disappearing when subjectedto skeletonization. Very often, these small features arise due to noise or improper segmentationand are not of great importance. The skeleton of a typical dataset being tracked is shown inFigure 5.8. A thinness value of 1.0 was used for this �gure.16

Page 22: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

6. Conclusions and Future WorkSkeletons are useful for a range of visualization applications including automatic navigation,shape abstraction and feature tracking. In this paper, we have presented a versatile and exiblealgorithm to extract the set of skeletal points from a 3D object.We use a single pass method which gives O(N ) complexity both for distance transform and skele-ton extraction (where N is the number of object-voxels). The algorithm automatically favorsreconstruction over connectivity because of a formulation based on the distance transform. Com-plex shapes with noisy boundaries generate many skeletal points near the boundary to capturethe sharp curvature changes. Very often, it is not possible to connect up the fragments of theskeleton by a simple strategy as described in this paper, due to the existence of loops to equalvalued neighbors in an uphill climb. If all the points are �nally connected, the skeleton comesout to be thicker than desired, with extraneous points. A hybrid scheme which looks at localconnectivity while considering potential skeletal points could solve this problem. To address theproblem of thick skeletons, the Voronoi diagram of a sparse distribution of boundary points couldbe used to generate a rough medial axis, which could then be used as a guide for identifyingoutlying skeletal points which need to be culled.We have also described a simple method to construct the centerline from the skeletal voxels. Themethod is fast and captures all the shape properties of the object. No prior knowledge of the objectgeometry is necessary. It is also more interactive than existing methods since every new path isgenerated from the small set of skeletal voxels avoiding the huge computational cost associatedwith thinning the volume for every new path. A better method to construct the centerline wouldexploit the distance transform at the skeletal points to propagate the line, and avoid the problemsdue to \spikes" and \hairs" in the skeleton. We are exploring such a possibility which would resultin a robust centerline which is insensitive to boundary noise.17

Page 23: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

References1. David Banks and Bart Singer. Vortex Tubes in Turbulent Flows: Identi�cation, Representa-tion, Reconstruction. In Proceedings Visualization'94 IEEE, pages 132{139. Computer SocietyPress, 1994.2. R. A. Robb. Virtual (Computed) Endoscopy: Development and Evaluation Using the VisibleHuman Datasets. In Visible Human Project Conference, October 1996.3. L Hong, A. Kaufman, Y-C. Wei, A. Viswambharan, M. Wax, and Z. Liang. 3D VirtualColonoscopy. In IEEE Symposium on Frontiers in Biomedical Visualization, pages 26{32, 1995.4. D. Silver and X. Wang. Volume Tracking. In Proceedings IEEE Visualization '96, pages157{164, San Francisco, CA, 1996.5. C. Arcelli and G. Sanniti di Baja. A Width-Independent Fast Thinning Algorithm. IEEETrans. Pattern Recognition and Machine Intelligence, 7(4):463{474, 1985.6. T. Pavlidis. A Thinning Algorithm for Discrete Binary Images. Computer Graphics andImage Processing, 13:142{157, 1980.7. Y. F. Tsao and K.S. Fu. A 3D Parallel Skeletonwise Thinning Algorithm. Proc. IEEEPattern Recognition Image Processing Conf., pages 678{683, 1982.8. G Bertrand. A Parallel Thinning Algorithm For Medial Surfaces. Pattern Recognition Let-ters, 16:979{986, 1995.9. J. Mukerjee, Das P.P, and B.N. Chatterji. Thinning of 3-D Images Using the Safe PointThinning Algorithm (PTA). Pattern Recognition Letters, 10:167{173, 1989.10. Morgenthaler D.G. Three Dimensional Simple Points: Serial Erosion, Parallel Thinning, andSkeletonization, TR-1005. Technical report, Computer Science Center, University of Maryland,College Park, 1981.11. C.M. Ma and M. Sonka. A Fully Parallel 3D Thinning Algorithm and Its Applications.Computer Vision and Image Understanding, 64(3):420{433, November 1996.12. H. Yamada. Complete Euclidean Distance Transformation by Parallel Operation. In Proc.7th Intl. Conf. on Pattern Recognition, pages 69{71, Montreal, Canada, 1984.13. I. Ragnemalm. The Euclidean Distance Transformation in Arbitrary Dimensions. PatternRecognition Letters, 14:883{888, 1993.14. T. Saito and J. Toriwaki. New algorithms for Euclidean Distance Transformation of ann-Dimensional Digitized Picture with Applications. Pattern recognition, 27:1551{1565, 1994.15. W. Niblack, P.B. Gibbons, and D. Capson. Generating Skeletons and Centerlines from theDistance Transform. CVGIP : Graphical Models and Image Processing, 54(5):420{437, Septem-ber 1992.16. J.L. Helman and L. Hesselink. Visualization of Vector Field Topology in Fluid Flows. IEEEComputer Graphics and Applications, 11(3):36{46, 1991.18

Page 24: ani and Deb orah Silv al and Computer Engine · 2015-07-29 · T ec hnical Rep ort CAIP-TR-216 P ARAMETER CONTR OLLED SKELETONIZA TION OF THREE DIMENSIONAL OBJECTS Nikhil Gagv ani

17. F. P. Preparata and M. I. Shamos. Computational Geometry. Springer-Verlag, New York,1990.18. R.L. Ogniewicz and O. Kubler. Hierarchic Voronoi Skeletons. Pattern Recognition,28(3):343{359, 1995.19. J. M. Reddy and G. M. Turkiyyah. Computation of 3D Skeletons Using a GeneralizedDelaunay Triangulation Technique. Computer-Aided Design, 27(9):677{694, September 1995.20. D.J. Sheehy, C.G. Armstrong, and D.J. Robinson. Shape-Description by Medial SurfaceConstruction. IEEE Trans. on Visualization and Computer Graphics, 2(1):62{72, March 1996.21. E.C. Sherbrooke, N.M. Patrikalakis, and E. Brisson. An Algorithm for the Medial AxisTransform of 3D Polyhedral Solids. IEEE Trans. on Visualization and Computer Graphics,2(1):44{61, March 1996.22. T. Itoh, Y. Yamaguchi, and K. Koyamada. Volume Thinning for Automatic IsosurfacePropagation. In Proceedings IEEE Visualization '96, pages 303{310, San Francisco, CA, 1996.23. T. Pavlidis. Algorithms for Graphics and Image Processing. Computer Science Press, 1982.24. T.Y. Kong and A. Rosenfeld. Digital Topology: Introduction and Survey. Computer Vision,Graphics and Image Processing, 48:357{393, 1989.25. G. Borgefors. A New Distance Transformation Approximating the Euclidean Distance. InProc. 8th ICPR, pages 336{339, 1986.26. Nikhil Gagvani. Skeletons and Volume Thinning in Visualization. MS. Thesis, Dept. OfElectrical and Computer Engineering, Rutgers University, New Brunswick, New Jersey, 1997.

19