-
Notifications
You must be signed in to change notification settings - Fork 1
/
pcdVisualizer.py
22 lines (19 loc) · 943 Bytes
/
pcdVisualizer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import numpy as np
import open3d as o3d
# read pcd file
pcd = o3d.io.read_point_cloud("pointcloud.pcd")
# visualize pcd file
o3d.visualization.draw_geometries([pcd],
zoom=0.3412,
front=[0.4257, -0.2125, -0.8795],
lookat=[2.6172, 2.0475, 1.532],
up=[-0.0694, -0.9768, 0.2024])
# # estimate the normal for each cloud pointx`
# pcd.estimate_normals(
# search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))
# o3d.visualization.draw_geometries([pcd],
# zoom=0.3412,
# front=[0.4257, -0.2125, -0.8795],
# lookat=[2.6172, 2.0475, 1.532],
# up=[-0.0694, -0.9768, 0.2024],
# point_show_normal=True)