WangYueFt / dcp

355 stars 90 forks source link

Visualization #25

Open Vaishali-Nimilan opened 2 years ago

Vaishali-Nimilan commented 2 years ago

Hey,

Thanks for the code. I am trying to visualize the results after testing. Can you please say how to visualize the results of the registration after I have the trained model? Thanks in advance.

mkt1412 commented 1 year ago

This block of code should help. The inputs are two point cloud arrays with [N, 3] shape.

def vis_pc_pair(points_a, points_b=None):
    pcd_vector_a = o3d.geometry.PointCloud()
    pcd_vector_a.points = o3d.utility.Vector3dVector(points_a)
    pcd_vector_a.paint_uniform_color([1, 0.706, 0])

    if points_b is not None:
        pcd_vector_b = o3d.geometry.PointCloud()
        pcd_vector_b.points = o3d.utility.Vector3dVector(points_b)
        pcd_vector_b.paint_uniform_color([0, 0.706, 1])

    o3d.visualization.draw_geometries([pcd_vector_a, pcd_vector_b])
jishuo1 commented 6 months ago

@Vaishali-Nimilan Hello whether you have solved the problem