-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test_visual.py
42 lines (33 loc) · 1.22 KB
/
Test_visual.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
36
37
38
39
40
41
42
# -*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
import pcl
import pcl.pcl_visualization
# from pcl.pcl_registration import icp, gicp, icp_nl
def main():
# cloud = pcl.load_XYZRGB(
# './examples/pcldata/tutorials/table_scene_mug_stereo_textured.pcd')
# cloud = pcl.load("Tile_173078_LD_010_017_L22.obj")
# cloud = pcl.load('./table_scene_mug_stereo_textured.pcd')
cloud = pcl.load('./rabbit.pcd')
# cloud = pcl.load('./projData.pcd')
# Centred the data
# centred = cloud - np.mean(cloud, 0)
# # print(centred)
# ptcloud_centred = pcl.PointCloud()
# ptcloud_centred.from_array(centred)
# ptcloud_centred = pcl.load("Tile_173078_LD_010_017_L22.obj")
visual = pcl.pcl_visualization.CloudViewing()
# PointXYZ
# visual.ShowMonochromeCloud(ptcloud_centred, b'cloud')
visual.ShowMonochromeCloud(cloud, b'cloud')
# visual.ShowGrayCloud(ptcloud_centred, b'cloud')
# visual.ShowColorCloud(ptcloud_centred, b'cloud')
# visual.ShowColorACloud(ptcloud_centred, b'cloud')
v = True
while v:
v = not(visual.WasStopped())
if __name__ == "__main__":
# import cProfile
# cProfile.run('main()', sort='time')
main()