Extract Point Density

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Extract Point Density

benoit duinat

Hi,

What is the most efficient way to get the point density for any given point of the point cloud.
i.e. for each point, get the number of other points in a Defined radius.
Is it possible to use kd tree (i already have some code for normal estimation) or should I use octree_Point_density ? Can't find any exemple of that

std::cout << "Start normal estimator." << std::endl;
search::Search<PointXYZI>::Ptr tree = boost::shared_ptr<search::Search<PointXYZI> > (new search::KdTree<PointXYZI>);
PointCloud <Normal>::Ptr normals (new PointCloud <Normal>);
NormalEstimation<PointXYZI, Normal> normal_estimator;
normal_estimator.setSearchMethod (tree);
normal_estimator.setInputCloud (cloud);
normal_estimator.setKSearch (50);
normal_estimator.compute (*normals);
std::cout << "End normal estimator." << std::endl;

--
Duinat Benoit
+14184736970

[hidden email]

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Extract Point Density

Sérgio Agostinho
Read everything here, especially the finally details at the end of the page

http://pointclouds.org/documentation/tutorials/octree.php#octree-search

Also the official description in the doc page

http://docs.pointclouds.org/trunk/classpcl_1_1octree_1_1_octree_point_cloud_density.html#details

Then go to the unit tests and check how is used

https://github.com/PointCloudLibrary/pcl/blob/master/test/octree/test_octree.cpp#L845-L882


Cheers


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users