So you’ve played around with RunSFM and produced some cool looking point clouds. But let’s go even further and create a textured mesh model for extra coolness. TextureMesh is a program to do texture mapping on a 3D mesh for this very purpose. It’s designed to be used in conjunction with RunSFM and Meshlab. The workflow is as follows:
RunSFM -> Point cloud from PMVS -> Meshlab -> TextureMesh -> ViewMesh or MeshLab
The end result can be seen in this video.
Last update: 10/08/2013
Latest Windows binary compiled using Visual Studio 2010:
You can simply type make to compile for both programs or alternatively open it up in CodeBlocks.
TextureMesh requires an additional mesh.ply file be created and placed in
Instructions for creating said file is described in the section below. Once you created that file you can then call TextureMesh as follows:
where pmvs_dir is the directory that PMVS generates. Then view the output by
Instructions for using ViewMesh is shown on screen. Alternatively, the model can be views in Meshlab by loading [pmvs_dir]/models/output.obj.
TextureMesh loads all the images into memory even if parts of the image is not used. It will shrink the image if the width is larger than 512 pixels. This is a hard coded value. Hopefully you don’t run out of memory!
Here is the same castle dataset used in the video. The images came from http://cvlab.epfl.ch/~strecha/multiview/denseMVS.html
castle-data.7z (53.4 MB)
You can run either TextureMesh or ViewMesh on it to verify things are working.
Simplified BSD license. See LICENSE.txt inside the package.
How to create a mesh model in Meshlab
The following instruction assumes you already have existing directory where you ran RunSFM on. The first step is to create a 3D mesh from. Go to your project directory and open up pmvs/models/option-0000.ply in Meshlab. You’ll want to do a Poisson Surface reconstruction. Here’s how I typically do it in Meshlab
Perform a Poisson surface reconstruction as shown
You’ll see the large faces highlighted. If you’re not happy with the choice you’ll have to go to Filter -> Selection -> Select None and redo. Once you are happy delete the faces and vertex via the button shown or Shift + Del.
By default it will reduce the mesh to 10% of the original size. In this example I take it down to 1% (6894 faces) by deleting the last digit of the default value. I also tick Preserve Topology and Planar Simplification.