- Python package, implementation of Morel et al. 2020.
- Linux (tested on Ubuntu 21.10)
- PCL 1.11
- Python 3.9.7
- GNU Scientific Library
Compile the package by running the following commands:
cmake .
make
Import the package:
import dtm
- MINIMUM_POINTS: the path to the ASCII file containing the minimum points to approximate.
- BB_POINTS: the path to the ASCII file containing the 4 points of the minimum bounding rectangle of the minimum points.
- MINIMUM_POINTS_NUMBER: the minimum number of points in the quadtree leaves.
- MINIMUM_SIZE: the minimum size (in meter) of the quadtree leaves.
surface = dtm.dtm(MINIMUM_POINTS,BB_POINTS,MINIMUM_POINTS_NUMBER,MINIMUM_SIZE)
- NUMBER_ITERATIONS: the number of iterations of the deformable model.
- GAMMA: the ratio adjusting the elasticity of the surface.
surface.applyDeformableModel(NUMBER_ITERATIONS,GAMMA)
- NX, NY and NZ: the division of the polygonizer 3D grid
surface.polygonize(NX,NY,NZ)
- OBJ_FILE: the path to the .obj file.
surface.exportDTM(OBJ_FILE)
surface.display()
To run the algorithm on the testing data, simply run:
python test.py