Skeleton Sandbox: 3D Skeletonization for Volumetric Models
This page describes our SkeletonSandbox, a framework for shape processing of voxel models using skeletons or medial axes. The framework implements the following operations:
- computation of distance and feature transforms
- computation of regularized curve and surface skeletons
- part-based segmentation of shapes using curve skeletons
- patch-based segmentation of shapes using surface skeletons
- surface skeleton segmentation in manifolds (sheets)
Features
SkeletonSandbox is an application which allows processing voxel shapes as described above and interactive visualization of the produced results. Many examples are available here.
Input
SkeletonSandbox accepts 3D binary voxel models in VTK structured points format. See below how to produce these from mesh models.
Output
SkeletonSandbox saves its results (skeleton and additional computed metrics such as importance, segmentation, and distance fields) as 3D VTK volumes. Also, it can export its results for high-quality rendering in POV-Ray.
Quick start
- Download the binary distribution of SkeletonSandbox. This distribution should work out of the box on a Windows machine with a recent OpenGL card and preferably 4GB of RAM.
- Unzip the distribution somewhere on your hard disk
- If you want to create volumetric input datasets from 3D polygonal shapes, see below. If you already have such shapes, start the executable "ss.exe" and proceed as below.
- Choose what you want to compute. See here for a general outline of the tool's user interface.
The source code (compilable with Visual Studio under Windows) is also provided. Please note that this code is not in the public domain.
Computing curve skeletons
This is probably the simplest and fastest thing you can try out. For this
- check Skeletonization|Only C-skel
- select Skeletonize (same menu). Choose a VTK volume file containing the input shape
- wait a bit while the curve skeleton is computed
- select C-skel measure (Layers in set right panel). This is the computed curve skeleton field
- check "All voxels" (Voxelset tab below); this shows all curve-skeleton voxels
- change the lower filter threshold to eliminate low-importance skeleton voxels, as desired (Filter tab)
- to visualize the original voxel model, select indexset (Layers in set panel)
Below we see a voxelized model (catpose1, 82x198x896 voxels, obtained by running binvox2 -d 300.
The image below shows the curve skeleton of the cat model
Computing surface skeletons
To compute surface skeletons
- uncheck Skeletonization|Only C-skel
- check Equalize importance measure (same menu). This allows next to simplify the surface skeleton towards the curve skeleton
- select Skeletonize (same menu). Choose an input file as for curve skeletons.
- wait for the surface skeleton to be computed
- select Combined C-skel and S-skel measure (Layers in set right panel)
- play with other settings like for curve skeletons.
The image below shows the surface skeleton of the cat model. Blue voxels are less important, red ones are most important.
Part-based segmentation
Using curve skeletons, we can segment shapes into their natural parts. For this, use the Part-type segmentation menu:
- load a 3D volume (Skeletonize for volume segmentation)
- detect the junctions of the curve skeleton (New junction detection)
- compute the junctions' importances (Compute geodesic strain)
- merge nearby junctions (Merge junctions)
- refine the junctions (Move critical points)
- do the segmentation (Flat segmentation)
- check the Flat segmentation field to see the result
The image below shows the segmented cat model: Each 'part' has a different color.
User interface
SkeletonSandbox has the following navigation options
- mouse interaction: see the Help menu for changing the viewpoint and selecting voxels
- Layer sets: a layer set contains all processing done for an input shape. Several layer sets can coexist. Typically, you want only one layer set selected.
- Layers in set: a layer contains several fields. Each field contains some processing done on that layer. Layers are added as you do more processing. Typically, you view one layer at a time.
- Voxelset: within a layer, there are several types of voxels:
- Selection: voxels picked with the mouse for inspection
- All voxels: all layer voxels. Typically you want this on
Other options
- select File|Open mesh after doing some processing to overlay a mesh with a voxel model.
- right mouse button (main window): view options (reset camera, show/hide the mesh, etc)
- File|Save camera saves the current viewpoint for later use
Creating volumetric shapes
The easiest way to create VTK volumes for SkeletonSandbox is to use binvox2, also provided in our distribution.
Input examples
The distribution contains sample meshes in PLY and OBJ format that you can voxelize with binvox2. Its source code is available here.
Voxelization
To run binvox2, use the following
binvox2 -d
resolution -t vtk
inputfile (for example, binvox2 -d 256 -t vtk horse.obj
)
- inputfile is a mesh file, like the provided examples
- resolution is the voxel volume size. Good values are in 200..400. Large values take more memory and time.
binvox2 creates a file inputfile.vtk which you can next load in SkeletonSandbox
Remarks
- run binvox2 without arguments to see all options
- binvox2 supports only simple PLY and OBJ mesh files. If possible, remove all things like materials, groups, etc besides vertices and triangles.
- to run binvox2 without an OpenGL window popping on the screen, add the
-fb
option - Sometimes, binvox2 will not work correctly if the input mesh is self-intersecting or has topology problems. Use the
-c
and/or-v
options if this happens. - if you encounter problems with binvox2, try the slower, but stabler binvox version
For more details, see the original algorithm from Patrick Min.
More processing
Many functions of SkeletonSandbox are not described here (feature transforms, geodesics, skeleton and patch-based segmentation, object reconstruction, ..). Full information on these is available in the PhD thesis of Dennie Reniers.
Acknowledgements
SkeletonSandbox was developed by Dennie Reniers as part of his PhD thesis (2004-2009).
If you use this software, please refer to:
D. Reniers, J.J. van Wijk, A. Telea. Computing Multiscale Curve and Surface Skeletons of Genus 0 Shapes Using a Global Importance Measure, IEEE Transactions on Visualization and Computer Graphics, March/April 2008, vol. 14, no. 2, pp. 355-368