@@ -29,7 +29,7 @@ point types
29
29
* registration (ICP, GICP, ICP_NL)
30
30
31
31
The code tries to follow the Point Cloud API, and also provides helper function
32
- for interacting with numpy . For example (from tests/test.py)
32
+ for interacting with NumPy . For example (from tests/test.py)
33
33
34
34
.. code-block :: python
35
35
@@ -52,6 +52,20 @@ or, for smoothing
52
52
fil.set_std_dev_mul_thresh (1.0 )
53
53
fil.filter().to_file(" inliers.pcd" )
54
54
55
+ Point clouds can be viewed as NumPy arrays, so modifying them is possible
56
+ using all the familiar NumPy functionality:
57
+
58
+ .. code-block :: python
59
+
60
+ import numpy as np
61
+ import pcl
62
+ p = pcl.PointCloud(10 ) # "empty" point cloud
63
+ a = np.asarray(p) # NumPy view on the cloud
64
+ a[:] = 0 # fill with zeros
65
+ print (p[3 ]) # prints (0.0, 0.0, 0.0)
66
+ a[:, 0 ] = 1 # set x coordinates to 1
67
+ print (p[3 ]) # prints (1.0, 0.0, 0.0)
68
+
55
69
More samples can be found in the `examples directory <https://github.com/strawlab/python-pcl/tree/master/examples >`_,
56
70
and in the `unit tests <https://github.com/strawlab/python-pcl/blob/master/tests/test.py >`_.
57
71
@@ -60,11 +74,11 @@ This work was supported by `Strawlab <http://strawlab.org/>`_.
60
74
Requirements
61
75
------------
62
76
63
- This release has been tested on Ubuntu 13.10 with
77
+ This release has been tested on Linux Mint 17 with
64
78
65
- * Python 2.7.5
66
- * pcl 1.7.1
67
- * Cython 0.21
79
+ * Python 2.7.6
80
+ * pcl 1.7.2
81
+ * Cython 0.21.2
68
82
69
83
and CentOS 6.5 with
70
84
0 commit comments