Dr. Julian Timpner

3DScanner

Goals
Our goal was to capture real-world objects and recreate them as 3D objects in a virtual environment. This process should be kept as comfortable as possible for the user.

gauss-foto gauss-2
(a) Photo of Gauss statue (b) Reconstructed 3D model

What is 3DScanner?
3DScanner is a tool for reconstructing 3D models from unstructured images, taken with uncalibrated cameras. 3DScanner takes a set of JPEG images as input and produces a polyhedron mesh in the OBJ file format. In order to optimize the results and to ensure expandability and maintainability of the code, we implemented a modular concept, using state-of-the-art open source software and self-implemented code. Thus, it is possible to substitute specific parts of the system with later versions or alternative components, respectively. A great benefit of our system is, that only one camera is needed and no manual camera calibration is necessary.

workflow

3DScanner mainly consists of two components:

  • a camera calibration system
  • a hull reconstruction library

These components are connected and extended via software, that converts the calibration data into a format readable by the hull reconstruction system and the reconstructed model into a standard OBJ file respectively. The workflow is as follows:

  1. Camera Calibration with Bundler (excerpt from Bundler website)The main initial steps are to generate features and pairwise feature matches for the image set. Any type of image features can be used, but Bundler assumes the features are in the SIFT format, and so David Lowe’s SIFT detector is probably the easiest to get working with Bundler (RunBundler.sh assumes that SIFT is used). A list of images containing estimating focal length information also must be created. The four steps to creating a reconstruction are therefore:
    1. Create a list of images (this extracts focal length information, when available, from each image, and stores it in an image list).
    2. Generate (SIFT) features for each image.
    3. Match features between each pairs of images (this step can take a while).
    4. Run Bundler with a suitable options file.
  2. Projection Matrix Conversion
    The bundle_converter takes the bundle.out file, that is generated from step 1, as input. Therefore, the bundle.out file is copied to the path you specified after running 3DScan.sh. The converter uses the camera data as well as the specified image resolution to calculate a 3×4 projection matrix for each camera. These matrices are stored in a calib file in the directory specified for the PGM images.
  3. Mesh Reconstruction
    The input for the executable reconstruct is a calibration file with N 3×4 calibration matrices, and N greyscale image files containing the silhouette mask – the only formats supported for now are the raw greyscale (P5) pgm format (0=background, non-zero = foreground) and the TIFF format (thanks to libtiff). In the following, only the PGM format is taken into account, because we did not test the library with TIFF images. The output is an OFF model file with triangles.
  4. OFF to OBJ Conversion
    The executable off2obj converts the OFF model created in step 3 into a standard OBJ file.

Further Information

Please also visit the 3DScanner website at the Computer Graphics Lab at TU Braunschweig.