-
Notifications
You must be signed in to change notification settings - Fork 694
Function to compute normals #8
Conversation
It's much faster to import/export data using numpy arrays than to use lists. Arrays can not be returned ~400x faster than before. --Example speed test-- import numpy as np import pcl p = pcl.PointCloud() x = np.random.randint(0,1000,[100000,3]) p.from_array(x.astype(np.float32)) %timeit p.to_array() %timeit p.to_list() -- Comparison of old to_array() function versus the new version -- Before: 525ms Now: 1.25 ms
|
I didn't mean to include the 'array/list io speedup' commit with this. I'm not sure how to remove this. |
|
Can you please add a test for this? |
|
Done! @nzjrs, is this project sticking with PCL 1.5 or is it acceptable to commit code particular to 1.6 or dev? I noticed that the API for moving least squares changed slightly between versions. |
|
Ok, so now this pull request is quite messy. I also left comments on your last commit. Can you please re-open with the original patch to support 1.5 (and not including the duplicate array list speedups which I have just merged). Then I can create a 1.6 branch and put the 1.6 api changes there |
|
What is the status of this functionnality please? |
|
It was abandoned because the original author left. Please create a new pull-request rebased on master. |
|
It doesn't compile : Cheers, |
|
Yes - you will need to fix it so it compiles.... |
|
Hm I browsed his version and found the missing part. Cheers, |
|
Did you add his test too? Please create a pull request with your changes and I can review your code. |
|
Yes I add everything except a change in pointcloud class adding an int (I think he had forgotten to remove it). It work in python terminal but I still have trouble using it (I use it inside a postgres server). I 'll do the pull request |
|
The pull request is here : #43 |
Normals were already being calculated in make_segmenter_normals(). I created a new function that outputs this set of normals.
Example:
import pcl
cloud = pcl.PointCloud()
cloud.from_file("tests/table_scene_mug_stereo_textured_noplane.pcd")
n = cloud.calc_normals(50)