project vs. extract with PCL

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

project vs. extract with PCL

Markus Eich
Dear all,

I just started to use some algorithms from PCL for PC RanSac segmentation.

On  the tutorials I stumbled over two methods on how to process the extracted data further.


In one sample the inliers indeces are used together with  pcl::ExtractIndices<PointT> Template. (i.e. extract.filter(&target_PC))

In another example, the segmented points are projected with the pcl::ProjectInliers< PointT > template (i.e.   proj.filter (cloud_projected), using only the coefficients,
generated by the  seg.segment (inliers_plane, coefficients_plane) method).


Am I wrong or are those two methods doing exactly the same? If they do, what is the preferable method to use?


Cheers,

Markus


-- 
Dipl. Inf. Markus Eich
Researcher

DFKI Bremen
Robotics Innovation Center
Mary-Somerville-Str. 9
28359 Bremen, Germany

Phone: +49 (0)421 17845-4105
Fax:   +49 (0)421 17845-4150
E-Mail: [hidden email]

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3 
-----------------------------------------------------------------------

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

Re: project vs. extract with PCL

Radu B. Rusu
Administrator
Markus,

Sorry for the lack of documentation :) We apologize, and acknowledge that we need help improving it.


On 12/14/2010 05:15 AM, Markus Eich wrote:

> Am I wrong or are those two methods doing exactly the same? If they do, what is the preferable method to use?

The methods do two different things:

  * ExtractIndices is very dumb: given some set of point indices (vector<int>, PointIndices, etc) and a cloud, it
creates a new cloud by copying those indices over. This is useful for a some of the nodelets that haven't been finished
to work with <cloud,indices>, but also for 3rd party software outside of PCL, like RViz

  * ProjectInliers is like ExtractIndices, except it takes in a SAC model (coefficients of a plane, sphere, line, etc)
and in addition to extracting the data, it also projects it onto the model. This is useful if you have a bunch of
inliers for a specific geometric model, and then you want them projected onto the equation of the model so you can do
further operations with them. The classical example here is: project planar inliers onto the model, so you can afterward
compute a convex hull of the plane, etc.

Hope this helps.

Cheers,
Radu.
--
http://pointclouds.org
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: project vs. extract with PCL

Markus Eich
Thank you Radu,

slowly I am getting into the PCL :-)

Cheers,

Markus


> -----Urspr√ľngliche Nachricht-----
> Von: Radu Bogdan Rusu [mailto:[hidden email]]
> Gesendet: Dienstag, 14. Dezember 2010 18:16
> An: Point Cloud Library (PCL) mailing list
> Cc: Markus Eich
> Betreff: Re: [PCL-users] project vs. extract with PCL
>
> Markus,
>
> Sorry for the lack of documentation :) We apologize, and acknowledge
> that we need help improving it.
>
>
> On 12/14/2010 05:15 AM, Markus Eich wrote:
>
> > Am I wrong or are those two methods doing exactly the same? If they
> do, what is the preferable method to use?
>
> The methods do two different things:
>
>   * ExtractIndices is very dumb: given some set of point indices
> (vector<int>, PointIndices, etc) and a cloud, it
> creates a new cloud by copying those indices over. This is useful for a
> some of the nodelets that haven't been finished
> to work with <cloud,indices>, but also for 3rd party software outside
> of PCL, like RViz
>
>   * ProjectInliers is like ExtractIndices, except it takes in a SAC
> model (coefficients of a plane, sphere, line, etc)
> and in addition to extracting the data, it also projects it onto the
> model. This is useful if you have a bunch of
> inliers for a specific geometric model, and then you want them
> projected onto the equation of the model so you can do
> further operations with them. The classical example here is: project
> planar inliers onto the model, so you can afterward
> compute a convex hull of the plane, etc.
>
> Hope this helps.
>
> Cheers,
> Radu.
> --
> http://pointclouds.org

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