What is the fastest way for surface smoothing and normal estimation in an organised point cloud?

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

What is the fastest way for surface smoothing and normal estimation in an organised point cloud?

CreFroD
I am using Intel RealSense R200 sensor and I capture an organized point cloud
of XYZ points from it. I need to smooth surface because data at some
distance becomes noisy, and then estimate normal for each point. In order to
do this, I want to use the MLS algorithm in PCL:

int main() {
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new
pcl::PointCloud<pcl::PointXYZ>(640, 480));
    pcl::PointCloud<pcl::PointNormal>::Ptr cloudMLSPointNormals (new
pcl::PointCloud<pcl::PointNormal>(640, 480));
    pcl::search::OrganizedNeighbor<pcl::PointXYZ>::Ptr organizedNeighbor
(new pcl::search::OrganizedNeighbor<pcl::PointXYZ> ());
    pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal> mls;
    mls.setComputeNormals (true);
    mls.setInputCloud (cloud);
    mls.setPolynomialFit (true);
    mls.setSearchMethod (organizedNeighbor);
    mls.setSearchRadius (0.03);

   while(true) {
       // capturing cloud from R200...
       mls.process(*cloudMLSPointNormals); //here the programm freezes
   }
}

The mls.process command takes extremely long time (at least few tens of
minutes - I am not patient enough to wait for it to complete, the time is
unacceptable for my application anyway). If I use pcl::search::kdtree, as
shown  here
<http://pointclouds.org/documentation/tutorials/normal_estimation.php>  , it
works also too slow, and I think even slower, because, as I know, kdtree
doesn't take an advantage of the organized point cloud. I use UP-Board SBC
with Intel® Atom™ x5-Z8350 Processor (2M Cache, up to 1.92 GHz) Quad-Core
CPU with 64-bit architecture. One core is loaded 100% with my program. Why
does it run so slow even with OrganizedNeighbor? How can I speed it up? Are
there other algorithms I could use? Maybe it is possible to parallelize it
on all four cores or use atom's GPU? Thank you for help in advance?



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

Re: What is the fastest way for surface smoothing and normal estimation in an organised point cloud?

Sérgio Agostinho
Things which exploit the Organized structure tend to have the Organized prefix in the name. Classes which exploit multicore architectures, tend to have OMP in their suffix. If the algorithms the library provides do not suit your requirements feel free to propose changes to speed them up.

Cheers
Sérgio

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