How to use MLS with a PointNormal dataset?

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

How to use MLS with a PointNormal dataset?

rsadams
Hello,

I'm attempting to use the MLS code from the current trunk to re-sample a dataset.  The following works:

pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal> mls;

But I get linker errors when I attempt:

pcl::MovingLeastSquares<pcl::PointNormal, pcl::PointNormal> mls;

How do I go about passing data to MLS when I already have some approximate normals?

Thanks for any help,

Richard
Reply | Threaded
Open this post in threaded view
|

Re: How to use MLS with a PointNormal dataset?

aichim
Administrator
Hi,

Due to large main memory usage of the compilation process for the MLS
class, we decided not to instantiate it for all possible point types.
This is shortly mentioned here:
http://dev.pointclouds.org/projects/pcl/repository/entry/trunk/surface/src/mls.cpp

What you would have to do is to do a PCL_INSTANTIATE in your code and
everything should be fine.


Cheers,
Alex

On 6/18/12 12:41 PM, rsadams wrote:

> Hello,
>
> I'm attempting to use the MLS code from the current trunk to re-sample a
> dataset.  The following works:
>
> pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal>  mls;
>
> But I get linker errors when I attempt:
>
> pcl::MovingLeastSquares<pcl::PointNormal, pcl::PointNormal>  mls;
>
> How do I go about passing data to MLS when I already have some approximate
> normals?
>
> Thanks for any help,
>
> Richard
>
> --
> View this message in context: http://www.pcl-users.org/How-to-use-MLS-with-a-PointNormal-dataset-tp4019396.html
> Sent from the Point Cloud Library (PCL) Users 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
Reply | Threaded
Open this post in threaded view
|

Re: How to use MLS with a PointNormal dataset?

rsadams
H Alex,

Thanks for the reply.  Just so I'm clear, I need to enable PointNormal as an input type for MLS and re-compile..

1) Will the supplied normals be preserved in the output data (assuming I have calculate normals set to false).

2) Will the input normals have any effect on MLS? I.E.  Will re-sampled points only be "smoothed" in the approximate direction of the supplied normal?

Thanks again for your help,

Rich
Reply | Threaded
Open this post in threaded view
|

Re: How to use MLS with a PointNormal dataset?

Radu B Rusu
Administrator
Rich,

On 06/18/2012 06:40 AM, rsadams wrote:
> H Alex,
>
> Thanks for the reply.  Just so I'm clear, I need to enable PointNormal as an
> input type for MLS and re-compile..
>
> 1) Will the supplied normals be preserved in the output data (assuming I
> have calculate normals set to false).

If you set that to false, then yes, they should be preserved. If not, please file a bug on our tracker.

> 2) Will the input normals have any effect on MLS? I.E.  Will re-sampled
> points only be "smoothed" in the approximate direction of the supplied
> normal?

The normals are recalculated by MLS based on the polynomial projection.

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