日期:2021/11/9
论文网址:https://arxiv.org/abs/2004.04322
系统配置
Ubuntu 16.04 (gcc 5.4.0)
使用CMake编译
依赖
- OpenMesh
官网:https://www.graphics.rwth-aachen.de/software/openmesh/
安装步骤参考:https://github.com/TheWebMonks/meshmonk/blob/master/docs/ubuntu.md中OpenMesh安装部分。
注意事项:
(1)OpenMesh的版本对linux的gcc和clang版本有要求,根据系统gcc版本为5.4.0可知,选择OpenMesh7.1最为合适,更高版本的话gcc不满足要求。
(2)按照官网的步骤执行完cmake …和make之后,编译运行Fast_RNRR时仍然找不到OpenMesh,为解决这个问题,需要执行以下操作:
sudo mv /home/user/Downloads/OpenMesh-6.3/build/Build/lib/* /usr/local/lib/
sudo mv /home/user/Downloads/OpenMesh-6.3/src/OpenMesh/ /usr/local/include/
sudo ldconfig -v
ldconfig -p | grep OpenMesh
详细描述见网址:https://github.com/TheWebMonks/meshmonk/blob/master/docs/ubuntu.md
- Eigen
官网:http://eigen.tuxfamily.org/index.php?title=Main_Page
注意事项:
下载编译之后将其放在usr/local/include处,防止编译项目时系统找不到。
编译
按照readme流程进行:
- Make sure Eigen and OpenMesh is installed.
- Create a build folder ‘build’ within the root directory of the code
- Run cmake to generate the build files inside the build folder, and compile the source code:
- On linux, run the following commands within the build folder:
$ cmake -DCMAKE_BUILD_TYPE=Release .. $ make
- Afterwards, there should be an executable
Fast_RNRR
generated.
注意事项:
此处生成的Fast_RNRR
的属性为可执行文件。
使用
The program is run with four input parameters:
$ ./Fast_RNRR <srcFile> <tarFile> <outPath> <landmarkFile>
1.<srcFile>
: an input file storing the source mesh;
2.<tarFile>
: an input file storing the target mesh or point cloud;
3.<outPath>
: an output file storing the path of registered source mesh;
4.<landmarkFile>
: an landmark file (nx2 matrix, first column includes the indexes in source file, second column includes the indexes in target file, each row is a pair correspondences separated by space).
<landmarkFile>
can be ignored, our robust non-rigid registration method without landmarks will be used in this case.
示例:
./Fast_RNRR /home/sun/Fast_RNRR/build/data/test/source.obj /home/sun/Fast_RNRR/build/data/test/target_pc.obj /home/sun/Fast_RNRR/build/result/
注意事项:
(1)<srcFile>
和<tarFile>
需要指明所在位置。
(2)<outPath>
是配准结果的.obj文件的存储位置,不需要提前新建.obj文件。
(3)<landmarkFile>
不是必须项,可不写。
(4)Fast_RNRR 前面需要加./,不然提示没有Fast_RNRR这个命令。