Vision and Mobile Robotics Laboratory | Software
Home | Members | Projects | Publications | Software | Videos Internal

Mesh Preprocessing Tutorial

Usually, meshes in 3-D computer vision come from algorithms and sensors that measure the real world from a single viewpoint. Consequently, the sensed surface will be noisy, and surfaces that are not connected in the real world may be incorrectly connected by mesh generation algorithms. Mesh Preprocessing is used to remove noise from sensed data and separate disconnect surfaces. By following the steps below, a raw mesh can be transformed into a mesh that is amenable to alignment or object recognition. In between each step the resulting mesh can always be viewed using ivview or some other VRML browser.

Step 1: Clean the Mesh

The first step in mesh preprocessing is to clean the mesh using the program CleanMesh. CleanMesh serves two purposes. First, it reduces the effects of some problems that can occur in meshes created from laser rangefinders. Sometimes the boundaries of meshes tend to curl due to the mixed pixel effect. Removing the boundary vertices usually removes the curl at the expense of removing some good vertices. Removing long edges is a commonly used heuristic for eliminating the phantom surfaces that are created when a mesh is triangulated across a range shadow boundary.

CleanMesh's second use is to eliminate invalid faces and vertices that may be present in an input mesh. In a valid mesh, every vertex is the corner of at least one face, and every edge has one or two adjacent faces. CleanMesh removes vertices and faces that do not fit these criteria.

Step 2: Smooth the Mesh

Once the mesh is cleaned it should be smoothed with SmoothMesh. SmoothMesh will apply a low-pass filter to the position of the vertices of the mesh and will smooth it without shrinking. To increase smoothing, increase the number of iterations applied to the mesh (-n option). Experimenting with the gains of the filter (-l and -m options) can be used to improve the performance of the filter.

Step 3: Simplify the Mesh

Note: You may see references to mesh resampling in older papers that reference the Mesh Toolbox. We found that mesh resampling did not scale well to very large meshes, and we have replaced this step with mesh simplification. For mesh simplification, we use a program called qslim, written by Michael Garland. This version of qslim reads and writes files in smf format. The programs wrltosmf and smftowrl are used to convert Mesh Toolbox meshes to smf format for simplification and back to our format afterwards.

For model building, a coarse mesh is used for initial alignment while a fine mesh is used for surface registration after coarse alignment and for integration. Therefore, qslim is applied twice to the smoothed and cleaned mesh to obtain the coarse and fine meshes.

Example

Suppose that we are preprocessing a raw mesh raw.wrl so that we can use it in model building.

First determine the resolution of the mesh so that it can be used to set the maximum kept edge length

Suppose that a mesh resolution of 0.5 is reported, remove all edges that are greater than 4 times the mesh resolution (i.e., 2.0)and patches with less than 100 vertices Next, smooth the mesh using an average number (25) of iterations and the default filter gains Next, create the fine version of the smoothed mesh. First, the mesh is converted to smf format. Then we run qslim to simplify down to 10000 faces. The -B parameter prevents the boundary vertices from "eroding" during simplification - lower values will allow more motion of the boundary. The mesh is converted back to wrl format, and CleanMesh is applied once again, because qslim can introduce invalid vertices and faces.

Finally, we create the coarse mesh by simplifying the fine mesh.

The end result are two meshes, fine.wrl for registration and integration, and coarse.wrl for coarse alignment using spin-images.

up


The VMR Lab is part of the Vision and Autonomous Systems Center within the Robotics Institute in the School of Computer Science, Carnegie Mellon University.