PyPoisson绑定提供了使用Matlab和Python进行泊松抠图以及基于深度图像的3D曲面重建的工具。此项目集成了两种编程语言的优势,便于科研与教学应用。
泊松抠图的MATLAB代码以及泊松曲面重建Python绑定(PoissonReconstruction)由MichaelKazhdan提供用于C++GNU编译,并基于MATLABMEX文件绑定进行安装。
要开始使用,执行以下命令:
```
$ git clone --recursive https://github.com/mmolero/pypoisson.git
$ cd pypoisson
$ python setup.py build
$ python setup.py install
```
在Windows、OSX和Linux上完成测试后,请转到示例文件夹。从pypoisson导入poisson_reconstruction,并使用ply_from_array中的points_normals_from和ply_from_array函数,例如:
```python
from pypoisson import poisson_reconstruction
from ply_from_array import points_normals_from, ply_from_array
filename = horse_with_normals.xyz
output_file = hor
```
这样可以实现泊松曲面重建的Python绑定安装及初步使用。