Ausrada404
Ausrada404

Reputation: 599

how to import o3dtut in open3d

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

Upvotes: 2

Views: 9899

Answers (2)

Guinther Kovalski
Guinther Kovalski

Reputation: 1929

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)

Upvotes: 4

Haruka Yamamoto
Haruka Yamamoto

Reputation: 381

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

Upvotes: 7

Related Questions