-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow_sample_script.py
More file actions
30 lines (25 loc) · 931 Bytes
/
show_sample_script.py
File metadata and controls
30 lines (25 loc) · 931 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
import numpy as np
import point_cloud as pcloud
import vision
# category : 9 - 12
category = list(range(9, 10))
for cat in category:
src_filename = 'test_data/{}.txt'.format(cat)
cloud = pcloud.PointCloud(cat)
cloud.from_file(src_filename)
cloud.normalize()
# show origin figure
save_path = 'tmp/{}.png'.format(cat)
vision.show_3d(save_path, cloud)
cloud = cloud.down_sample(16384)
save_path = 'tmp/{}_sample{}.png'.format(cat, 16384)
vision.show_3d(save_path, cloud)
num_cropped = 16384 - 12288
cloud, cropped_cloud = cloud.crop(num_cropped,
remove_cropped=True,
return_hollowed=True,
reuse=True)
save_path = 'tmp/{}_crop{}.png'.format(cat, num_cropped)
vision.show_3d(save_path, cropped_cloud)
save_path = 'tmp/{}_incomplete{}.png'.format(cat, 16384)
vision.show_3d(save_path, cloud)