-
Notifications
You must be signed in to change notification settings - Fork 14
/
pv.py
35 lines (28 loc) · 905 Bytes
/
pv.py
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
33
34
35
# 点群ビューワ
import numpy as np
from open3d import *
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description='point cloud viewer')
parser.add_argument('--input', nargs='*', help='input data (.ply or .pcd)')
args = parser.parse_args()
print(args.input)
print(len(args.input))
pcd = []
for name in args.input:
tmp = PointCloud()
tmp = read_point_cloud( name )
pcd.append(tmp)
print(tmp)
#draw_geometries([tmp])
if len(args.input) == 1:
draw_geometries([pcd[0]])
elif len(args.input) == 2:
draw_geometries([pcd[0],pcd[1]])
elif len(args.input) == 3:
draw_geometries([pcd[0],pcd[1],pcd[2]])
elif len(args.input) == 4:
draw_geometries([pcd[0],pcd[1],pcd[2],pcd[3]])
elif 4 < len(args.input):
print('Too many inputs.')