-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvisualize.py
More file actions
32 lines (25 loc) · 869 Bytes
/
visualize.py
File metadata and controls
32 lines (25 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import open3d as o3d
import os
def main():
# Change to your candidate_path-derived base name
base = "img1625660046.0920656"
save_dir = "./Results/Plots"
# File paths
pcd1_path = os.path.join(save_dir, f"{base}_pcd1.ply")
pcd2_path = os.path.join(save_dir, f"{base}_pcd2.ply")
line_path = os.path.join(save_dir, f"{base}_lines.ply")
camera_path = os.path.join(save_dir, f"{base}camera.json")
# Load geometries
pcd1 = o3d.io.read_point_cloud(pcd1_path)
pcd2 = o3d.io.read_point_cloud(pcd2_path)
line_set = o3d.io.read_line_set(line_path)
# Visualize
vis = o3d.visualization.Visualizer()
vis.create_window()
vis.add_geometry(pcd1)
vis.add_geometry(pcd2)
vis.add_geometry(line_set)
vis.run() # 🟢 Interact and close manually
vis.destroy_window()
if __name__ == "__main__":
main()