MLS problem with PCD file

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

MLS problem with PCD file

Amine
Hi,

I tried MLS smoothing in PCL tutorial with my pcd file which is generated using pcl::io::savePCDFileASCII in another code, but when I compile it crashes.
My PCD file is one attachment.
Thanks in advance.test_face.pcd

Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

aichim
Administrator
Hi,

We need some kind of output from your compilation/run, otherwise we cannot help you.

Cheers,
Alex
---
http://www.alexichim.com
http://www.openperception.org




On May 23, 2013, at 2:23 AM, Amine <[hidden email]> wrote:

> Hi,
>
> I tried MLS smoothing in PCL tutorial with my pcd file which is generated
> using pcl::io::savePCDFileASCII in another code, but when I compile it
> crashes.
> My PCD file is one attachment.
> Thanks in advance. test_face.pcd
> <http://www.pcl-users.org/file/n4027946/test_face.pcd>  
>
>
>
>
>
> --
> View this message in context: http://www.pcl-users.org/MLS-problem-with-PCD-file-tp4027946.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
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

Amine
The output is the pcd file I attached to previous message.test_face.pcd
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

aichim
Administrator
You said the compilation crashes. What is the error message?

Cheers,
Alex
---
http://www.alexichim.com
http://www.openperception.org




On May 23, 2013, at 12:07 PM, Amine <[hidden email]> wrote:

> The output is the pcd file I attached to previous message. test_face.pcd
> <http://www.pcl-users.org/file/n4027955/test_face.pcd>  
>
>
>
> --
> View this message in context: http://www.pcl-users.org/MLS-problem-with-PCD-file-tp4027946p4027955.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
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

Amine
There is no error message, the same code works foe bun0.pcd but didn't work with my pcd.
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

Amine
You can try my PCD file in MLS example and you will see.
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

aichim
Administrator
Sorry, but this is not really the right attitude here :-). It's a community-driven project, and if you need support, you should be willing to collaborate.


Cheers,
Alex
---
http://www.alexichim.com
http://www.openperception.org




On May 23, 2013, at 12:42 PM, Amine <[hidden email]> wrote:

> You can try my PCD file in MLS example and you will see.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/MLS-problem-with-PCD-file-tp4027946p4027958.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
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

Amine
I don't know what I should do, I exactly run this example :
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/surface/mls.h>

int
main (int argc, char** argv)
{
  // Load input file into a PointCloud<T> with an appropriate type
  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ> ());
  // Load bun0.pcd -- should be available with the PCL archive in test
  pcl::io::loadPCDFile ("bun0.pcd", *cloud);

  // Create a KD-Tree
  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ>);

  // Output has the PointNormal type in order to store the normals calculated by MLS
  pcl::PointCloud<pcl::PointNormal> mls_points;

  // Init object (second point type is for the normals, even if unused)
  pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal> mls;
 
  mls.setComputeNormals (true);

  // Set parameters
  mls.setInputCloud (cloud);
  mls.setPolynomialFit (true);
  mls.setSearchMethod (tree);
  mls.setSearchRadius (0.03);

  // Reconstruct
  mls.process (mls_points);

  // Save output
  pcl::io::savePCDFile ("bun0-mls.pcd", mls_points);
}
I just replaced bun0.pcd with my pcd file which I generate in another code from kinect., the bun0.pcd works but my own pcd didn't.
 
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

Amine
I don't really what do you need as information.
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

Amine
Thanks anyway, I solved my problem :).
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

aichim
Administrator
What was it?

Cheers,
Alex
---
http://www.alexichim.com
http://www.openperception.org




On May 23, 2013, at 1:57 PM, Amine <[hidden email]> wrote:

> Thanks anyway, I solved my problem :).
>
>
>
> --
> View this message in context: http://www.pcl-users.org/MLS-problem-with-PCD-file-tp4027946p4027962.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
Reply | Threaded
Open this post in threaded view
|

Re: MLS problem with PCD file

Amine
By applying Passthrough filter without setting filter limits.