FPFH with sparce normals?

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

FPFH with sparce normals?

kwaegel
Administrator
I am trying to implement real-time visual odometry using the OpenCV ORB detector and FPFH descriptors, but the normal calculation time is causing a problem.

I already have ORB 2D-to-2D odometry working by matching ORB descriptors before converting them into a cloud and running RANSAC, but I'd like to try 3D feature descriptors.

The features tutorial describes calculating descriptors for a subset of points, but it seems to depend on having an existing cloud of surface normals. Using the IntegralImageNormalEstimation to create the normals is reasonably fast, but it still takes 40-50ms (with optimizations) and is not fast enough for real-time use.

Is there any way I can calculate a minimal set of normals needed to create the FPFH descriptors? I'm assuming that this would be a small subset of my original image.

For reference, here is how I'm calculating normals:
pcl::PointCloud<pcl::Normal>::Ptr
ColorTrackerPcl::getImageNormals(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud)
{
  double startTime = Clock::absMills();
  printf("Computing normals...");

  // estimate normals
  pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);

  pcl::IntegralImageNormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
  ne.setNormalEstimationMethod (ne.AVERAGE_3D_GRADIENT);
  ne.setMaxDepthChangeFactor(0.02f);
  ne.setNormalSmoothingSize(10.0f);
  ne.setInputCloud(cloud);
  ne.compute(*normals);

  double time = Clock::absMills() - startTime;
  printf("done in %4.2f ms\n", time);  // 40-50ms
  return normals;
}
Reply | Threaded
Open this post in threaded view
|

Re: FPFH with sparce normals?

andersgb1
Hmm, I would have said that you could just use the inherited function setIndices(), to force it only to compute the normals at a subset of points. But looking in the source code, that class doesn't seem to be using it, like e.g. the "regular" normal estimation class does.

Therefore, I suggest you just do a computePointNormal() for the subset of points you need - that should do it.


On 9 March 2014 02:43, kwaegel <[hidden email]> wrote:
I am trying to implement real-time visual odometry using the OpenCV ORB
detector and FPFH descriptors, but the normal calculation time is causing a
problem.

I already have ORB 2D-to-2D odometry working by matching ORB descriptors
before converting them into a cloud and running RANSAC, but I'd like to try
3D feature descriptors.

The  features tutorial
<http://pointclouds.org/documentation/tutorials/how_features_work.php>
describes calculating descriptors for a subset of points, but it seems to
depend on having an existing cloud of surface normals. Using the
IntegralImageNormalEstimation
<http://pointclouds.org/documentation/tutorials/normal_estimation_using_integral_images.php>
to create the normals is reasonably fast, but it still takes 40-50ms (with
optimizations) and is not fast enough for real-time use.

Is there any way I can calculate a minimal set of normals needed to create
the FPFH descriptors? I'm assuming that this would be a small subset of my
original image.

For reference, here is how I'm calculating normals:




--
View this message in context: http://www.pcl-users.org/FPFH-with-sparce-normals-tp4032783.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


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