This repository includes the source code of the paper SPARE: Symmetrized Point-to-Plane Distance for Robust Non-Rigid Registration.
Authors: Yuxin Yao, Bailin Deng, Junhui Hou and Juyong Zhang.
- Non-rigid registration of two surfaces.
- Non-rigid registration of a motion sequence frame by frame using a template surface.
This code is protected under patent. It can be only used for research purposes. If you are interested in business purposes/for-profit use, please contact Juyong Zhang (the corresponding author, email: [email protected]).
- Release code.
- Release processed data and evaluation code.
- Release GPU-accelerated version.
- Eigen-3.4.0
- OpenMesh-8.1
- (Optional for Linux) MKL. It is used to speed up the LDLT solver(https://eigen.tuxfamily.org/dox-devel/group__PardisoSupport__Module.html). If it is not installed, Eigen's SimplicialLDLT will be used instead.
They can be installed in the system path. If they are not installed in the system path, you need to change the install path in the CMakeLists.txt
.
The code is compiled using CMake and tested on Ubuntu 20.04 (gcc9.4.0).
Run cd scripts & ./compile.sh
and an executable spare
will be generated.
The program is run with following input parameters:
$ ./spare <srcFile> <tarFile> <outPath>
or
$ ./spare <srcFile> <tarFile> <outPath> <radius> <w_reg> <w_rot> <w_arap_c> <w_arap_f> <use_normalize>
Details (click to expand)
-
<srcFile>
: an input file storing the source mesh; -
<tarFile>
: an input file storing the target mesh or point cloud; -
<outPath>
: an output file storing the path of registered source mesh; -
<radius>
: the sampling radius of deformation graph. -
<w_smo>
: the weight parameter ofsmooth term
during the coarse stage. -
<w_rot>
: the weight parameter ofrotation matrix term
during the coarse stage. -
<w_arap_c>
: the weight parameter ofARAP term
during the coarse stage. -
<w_arap_f>
: the weight parameter ofARAP term
during the fine stage. -
<use_normalize>
: if it's set1
, the source surface and the target surface will be scaled with the same scaling factor, such that they are contained in a bounding box with a unit diagonal length during the registration process. The deformed surface will return to the original size. If the surfaces are the normalized, set it to0
.
Running cd scripts & ./run_demo.sh
can execute the test example.
- Calculate normals for point cloud
- Install dependences
pip install openmesh pip install pymeshlab
- Change the file path in
estimate_normal.py
and run
cd useful_tools python estimate_normal.py
This code supports non-rigid registration with meshes or point clouds. When the input is a point cloud, the normal is required. When the source surface is represented as a point cloud, the deformation graph will be constructed by the farthest point sampling (FPS) based on Euclidean distance.
If you find our code or paper helps, please consider citing:
@article{yao2024spare,
author = {Yao, Yuxin and Deng, Bailin and Hou, Junhui and Zhang, Juyong},
title = {SPARE: Symmetrized Point-to-Plane Distance for Robust Non-Rigid Registration},
journal = {Arxiv},
year = {2024},
}