how to import o3dtut in open3d

Question:

I am a beginner in open3d.

I want to try some examples in the document.

But I can’t find any information about how to import o3dtut.

mesh = o3dtut.get_bunny_mesh()
pcd = mesh.sample_points_poisson_disk(750)
o3d.visualization.draw_geometries([pcd])
alpha = 0.03
print(f"alpha={alpha:.3f}")
mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_alpha_shape(
    pcd, alpha)
mesh.compute_vertex_normals()
o3d.visualization.draw_geometries([mesh], mesh_show_back_face=True)

the code was copied from here

Asked By: Ausrada404

||

Answers:

I had the same problem.But now that I’ve settled it.

I don’t find it anywhere, but "o3dtut" omits "open3d_tutorial" in the It seems to be the one you did. I found the "open3d_tutorial.py" in the Open3D Github repository(https://github.com/intel-isl/Open3D/tree/master/examples/python).

Cloning this repository and copy "open3d_tutorial.py" to your directory. importing the following from the source code solved the problem.

import open3d_tutorial as o3dtut
Answered By: Haruka Yamamoto

if you want to use data from tutorials, use:

o3d.data 

To get meshes. In the case you give, use:

bunny = o3d.data.BunnyMesh()
mesh  = o3d.io.read_triangle_mesh(bunny.path)
Answered By: Guinther Kovalski
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.