miop.surface_reconstruction

Classes

PoissonSurfaceReconstruction([depth, color])

Class for performing surface reconstruction from 3D point clouds using the Poisson Surface Reconstruction method.

class miop.surface_reconstruction.PoissonSurfaceReconstruction(depth=5, color=array([[0.5], [0.5], [0.5]]))[source]

Bases: DAGNode

Class for performing surface reconstruction from 3D point clouds using the Poisson Surface Reconstruction method.

This class wraps the Open3D implementation of Poisson reconstruction and includes methods for visualizing and saving the resulting mesh.

depth

Octree depth controlling reconstruction resolution. Higher values give finer meshes at the cost of more computation. Default is 5.

Type:

int

color

RGB color used to uniformly paint the reconstructed mesh. Default is gray ([[0.5], [0.5], [0.5]]).

Type:

np.ndarray, shape (3, 1)

mesh

Reconstructed mesh, set after eval() is called.

Type:

o3d.geometry.TriangleMesh or None

eval(pcds)[source]

Estimates normals and performs Poisson Surface Reconstruction on the first point cloud in the list.

Parameters:

pcds (list of o3d.geometry.PointCloud) – A list of Open3D point clouds. Only the first point cloud (pcds[0]) is used for reconstruction.

Returns:

A list containing one element: the reconstructed mesh.

Return type:

list of o3d.geometry.TriangleMesh

Raises:

ValueError – If the input list is empty or the input is not a valid point cloud.

save(path)[source]

Saves the reconstructed mesh to a PLY file.

Parameters:

path (str) – Path to save the mesh file. Must end with ‘.ply’.

Raises:

ValueError – If the file extension is not ‘.ply’ or the mesh has not been computed yet (i.e., eval() hasn’t been called).

show()[source]

Displays the reconstructed mesh in an Open3D visualization window.

Raises:

ValueError – If the mesh has not been computed yet (i.e., eval() hasn’t been called).