-
I want to build an application that:
Any idea on how to do that |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi @bilel-bj check out this C++ registration example: https://github.com/intel-isl/Open3D/blob/master/examples/cpp/TICPOdometry.cpp Python GUi examples are in the |
Beta Was this translation helpful? Give feedback.
-
Hi @bilel-bj , did you solve this problem? I want to build a similar User Interface like yours with the funtion to show two pointclouds before and after registration, still got no idea. And i can't open the link from @ssheorey, can you update the Link, many thanks! |
Beta Was this translation helpful? Give feedback.
-
A simple way to do that is with actions in the new def actions():
SOURCE_NAME = "Source"
RESULT_NAME = "Result (Poisson reconstruction)"
TRUTH_NAME = "Ground truth"
bunny = o3d.data.BunnyMesh()
bunny_mesh = o3d.io.read_triangle_mesh(bunny.path)
bunny_mesh.compute_vertex_normals()
bunny_mesh.paint_uniform_color((1, 0.75, 0))
bunny_mesh.compute_vertex_normals()
cloud = o3d.geometry.PointCloud()
cloud.points = bunny_mesh.vertices
cloud.normals = bunny_mesh.vertex_normals
def make_mesh(o3dvis):
# TODO: call o3dvis.get_geometry instead of using bunny_mesh
mesh, _ = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(
cloud)
mesh.paint_uniform_color((1, 1, 1))
mesh.compute_vertex_normals()
o3dvis.add_geometry({"name": RESULT_NAME, "geometry": mesh})
o3dvis.show_geometry(SOURCE_NAME, False)
def toggle_result(o3dvis):
truth_vis = o3dvis.get_geometry(TRUTH_NAME).is_visible
o3dvis.show_geometry(TRUTH_NAME, not truth_vis)
o3dvis.show_geometry(RESULT_NAME, truth_vis)
vis.draw([{
"name": SOURCE_NAME,
"geometry": cloud
}, {
"name": TRUTH_NAME,
"geometry": bunny_mesh,
"is_visible": False
}],
actions=[("Create Mesh", make_mesh),
("Toggle truth/result", toggle_result)]) See the full example here: https://github.com/isl-org/Open3D/blob/master/examples/python/visualization/draw.py |
Beta Was this translation helpful? Give feedback.
A simple way to do that is with actions in the new
draw()
function: