Giter VIP home page Giter VIP logo

templatefitting's Introduction

Template fitting for non-rigid mesh registration

The provided program fits a template mesh to a scan using a non-rigid iterative closet point (ICP) otimization. This template fitting had been used to register the training data of the statistical models described in the scientific publication.

Figure: Given an input scan (and optionally 3D landmarks), the provided program minimizes the distance between a template mesh and the scan surface, returning a registered mesh.

Setup

The provided code has dependencies on the following libraries:

  • Insight Segmentation and Registration Toolkit ITK (http://www.itk.org/). We recommend using ITK 4.50.
  • Clapack (http://www.netlib.org/clapack/). Clapack must be compiled using Blas (USE BLAS WRAP must be enabled when using CMake). We recommend using Clapac 3.2.1.
  • Approximate Nearest Neighbor Library ANN (http://www.cs.umd.edu/ mount/ANN/). We recommend using ANN 1.1.2.

To setup the provided code, use CMake and specify the required ITK, Clapack and ANN paths. Successfully compiling the project outputs a MM Restricted.exe. The provided code has been developed and tested under Windows 7.

Basic usage

To run the program, the TemplateFitting.exe must be called with the following 5 parameters, separated by a blank.

  • templateMesh.off - full path of the training data template mesh, needed for the mesh structure of the result. This parameter should point to the Template.off.
  • templateLmks.txt - full path of a text file containing the landmark (x y z)-coordinates of the template mesh. If the template and the input mesh are already aligned, this parameter can be discarded. This parameter should point to the Template Lmks.txt.
  • targetMesh.off - full path of the fitting target mesh. This parameter should point to the Target.off.
  • targetLmks.txt - full path of a text file containing the landmark (x y z)-coordinates of the target face mesh. If the template and the input mesh are already aligned, this parameter can be discarded. This parameter should point to the Target Lmks.txt.
  • outFitting.off - full path of the fitting result file.
Landmarks

If the TemplateFitting.exe is called without specified landmarks (i.e. without templateLmks.txt and targetLmks.txt), the absolute position and orientation in Euclidean vertex space is used as alignment of the template mesh and the target mesh. The landmark files contain the concatenated (x y z)-coordinates of corresponding salient point sets on the template mesh and the target mesh, whereas all coordinates are separated by a line break. At least four non-coplanar landmarks are required to define a valid rigid alignment.

File formats

While the program provides basic support for WRL-file format and OBJ-file format as input, we recommend using OFF-file format. Only triangle meshes are supported.

Configurations

The header Definitions.h provides parameters to influence the template fitting energy. See the provided comments at the header file for more details. Example: The example TemplateFittingTest.cmd fits the template mesh Template.off to the target mesh Target.off. The template mesh and the target mesh are aligned using the landmarks TemplateLmks.txt for the template, and landmarks TargetLmks.txt for the target mesh. To run the example, the path for the ANN library must be adjusted within the TemplateFittingTest.cmd. By exchanging the parameters, this can be used to fit any other template to any other target mesh.

License

The source is provided for NON-COMMERCIAL RESEARCH PURPOSES only, and is provided as is WITHOUT ANY WARRANTY; without even the implied warranty of fitness for a particular purpose. The redistribution of the code is not permitted.

Citing

When using this code in a scientific publication, please cite

@article{Brunton:CVIU:2014:Review,
  title = {Review of statistical shape spaces for {3D} data with comparative analysis for human faces},
  author = {Brunton, Alan and Salazar, Augusto and Bolkart, Timo and Wuhrer, Stefanie},
  journal={Computer Vision and Image Understanding},
  volume={128},
  pages={1--17},
  year={2014}
}

Acknowledgement

This work has been partially funded by the Saarland University, Cluster of Excellence MMCI

templatefitting's People

Contributors

timobolkart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

templatefitting's Issues

ConfigureCLAPACK.cmake missing!

when I try to "cmake .." in bulid dir, I got the err:
INCLUDE could not find load file:
ConfigureCLAPACK.cmake
I thought the project is missing the file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.