CovarianceSampling always return the first n point

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

CovarianceSampling always return the first n point

Humam
Hi,
I have an organized point cloud grabbed from an RGB-D sensor. I am trying to
apply `CovarianceSampling` on it. However, I am getting very strange result
which is the first N point of the cloud.

The code I am using:

    //Grab the point cloud(point_cloud) and compute the
normals(point_cloud_normal)
    pcl::CovarianceSampling<pcl::PointXYZ, pcl::Normal> covariance_sampling;
    covariance_sampling.setInputCloud(point_cloud);
    covariance_sampling.setNormals(point_cloud_normal);
    covariance_sampling.setNumberOfSamples(4800);
    covariance_sampling.setKeepOrganized(true);
    covariance_sampling.filter(filtered_indices->indices);

This does not happen if I use another sampler such as `NormalSpaceSampling`.

What did I miss?
Thanks!



--
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: CovarianceSampling always return the first n point

Sérgio Agostinho

Disclaimer: I'm assuming you meant to write:

However, I am getting very strange result
which are the first N points of the cloud.
It does sound weird, although there's nothing which prevents it from doing so other than condition

It selects the points such that the resulting cloud is as stable as possible for being registered (against a copy of itself) with ICP. The algorithm adds points to the resulting cloud incrementally, while trying to keep all the 6 eigenvalues of the covariance matrix as close to each other as possible.

I would be surprising if these were always the first N samples you request.

Try to come up with a simple example we can all reproduce and open an issue in the issue tracker please.

Cheers



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

signature.asc (836 bytes) Download Attachment