cars_mesh.core.mesh =================== .. py:module:: cars_mesh.core.mesh .. autoapi-nested-parse:: Meshing methods to create a surface from the point cloud. Functions --------- .. autoapisummary:: cars_mesh.core.mesh.ball_pivoting_reconstruction cars_mesh.core.mesh.poisson_reconstruction cars_mesh.core.mesh.delaunay_2d_reconstruction Module Contents --------------- .. py:function:: ball_pivoting_reconstruction(pcd: cars_mesh.tools.handlers.PointCloud, radii: Union[list, float, None] = 0.6, normal_search_method: str = 'knn', normal_nb_neighbor: int = 30, normal_radius: float = 2.0) -> cars_mesh.tools.handlers.Mesh Bernardini, Fausto et al. “The ball-pivoting algorithm for surface reconstruction.” IEEE Transactions on Visualization and Computer Graphics 5 (1999): 349-359. Function that computes a triangle mesh from a oriented PointCloud. This implements the Ball Pivoting algorithm proposed in F. Bernardini et al., “The ball-pivoting algorithm for surface reconstruction”, 1999. The implementation is also based on the algorithms outlined in Digne, “An Analysis and Implementation of a Parallel Ball Pivoting Algorithm”, 2014. The surface reconstruction is done by rolling a ball with a given radius over the point cloud, whenever the ball touches three points a triangle is created. Radius is computed to be slightly larger than the average distance between points https://cs184team.github.io/cs184-final/writeup.html :param pcd: Point cloud object :type pcd: PointCloud :param radii: Radius (unique or a list) of the ball. :type radii: Union[list, float, None], default=0.6 :param normal_search_method: Search method for normal computation :type normal_search_method: str (default="knn") :param normal_nb_neighbor: Number of neighbours used by the KNN algorithm to compute the normals with Open3D. :type normal_nb_neighbor: int (defaul=30) :param normal_radius: Radius of search for neighbours for normal computation. :type normal_radius: float (default=2.) :returns: **mesh** -- Mesh object :rtype: Mesh .. py:function:: poisson_reconstruction(pcd: cars_mesh.tools.handlers.PointCloud, depth: int = 8, width: float = 0.8, scale: float = 1.1, linear_fit: bool = False, n_threads: int = -1, normal_search_method: str = 'knn', normal_nb_neighbor: int = 30, normal_radius: float = 2.0) -> cars_mesh.tools.handlers.Mesh Kazhdan, Michael M. et al. “Poisson surface reconstruction.” SGP '06 (2006). Function that computes a triangle mesh from a oriented PointCloud pcd. This implements the Screened Poisson Reconstruction proposed in Kazhdan and Hoppe, “Screened Poisson Surface Reconstruction”, 2013. This function uses the original implementation by Kazhdan. See https://github.com/mkazhdan/PoissonRecon Warning: Since the Poisson reconstruction is an optimisation process, the triangle vertices are not the initial point cloud points. Thus, "pcd" points will be different from "o3d..." and mesh points. :param pcd: Point cloud object :type pcd: PointCloud :param depth: Maximum depth of the tree that will be used for surface reconstruction. Running at depth d corresponds to solving on a grid whose resolution is no larger than 2^d x 2^d x 2^d. Note that since the reconstructor adapts the octree to the sampling density, the specified reconstruction depth is only an upper bound. :type depth: int (default=8) :param width: Specifies the target width of the finest level octree cells. This parameter is ignored if depth is specified. It is expressed in the point cloud unit (for example in meters for utm data). :type width: float (default=0.) :param scale: Specifies the ratio between the diameter of the cube used for reconstruction and the diameter of the samples’ bounding cube. :type scale: float (default=1.1) :param linear_fit: If true, the reconstructor will use linear interpolation to estimate the positions of iso-vertices. :type linear_fit: bool (default=False) :param n_threads: Number of threads used for reconstruction. Set to -1 to automatically determine it. :type n_threads: int (default=-1) :param normal_search_method: Search method for normal computation :type normal_search_method: str (default="knn") :param normal_nb_neighbor: Number of neighbours used by the KNN algorithm to compute the normals with Open3D. :type normal_nb_neighbor: int (default=30) :param normal_radius: Radius of search for neighbours for normal computation. :type normal_radius: float (default=2.) :returns: **mesh** -- Mesh object :rtype: Mesh .. py:function:: delaunay_2d_reconstruction(pcd: cars_mesh.tools.handlers.PointCloud, method: str = 'matplotlib') -> cars_mesh.tools.handlers.Mesh 2.5D Delaunay triangulation: Delaunay triangulation on the planimetric points and add afterwards the z coordinates. :param pcd: Point cloud object :type pcd: PointCloud :param method: Method to use for Delaunay 2.5D triangulation. Available methods are 'matplotlib' and 'scipy'. :type method: str, default='matplotlib' :returns: **mesh** -- Mesh object :rtype: Mesh