Efficient_RANSAC: Plane detection and point indices

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

Efficient_RANSAC: Plane detection and point indices

tholzmann
Hi,

I'm detecting planes in a point cloud by using RANSAC as described in
the manual at 4.1:

http://doc.cgal.org/latest/Point_set_shape_detection_3/index.html#title4

This works very well.

Next, I want to iterate over all assigned points of each plane as
described in 4.3. This works, but it seems as the input
pointsWithNormals-vector is rearranged, and therefore the retrieved
indices doesn't correspond to the original ordering of the vector.

Is there a way to keep the original ordering of the points? Or, if not,
is it possible to store an additional information (the original ID) for
each pointWithNormal?

Thomas

--
====================================================
Dipl.-Ing. Thomas Holzmann
TU Graz - Institut fuer Maschinelles Sehen und Darstellen
Graz University of Technology - Institute for Computer Graphics & Vision
Inffeldgasse 16/II, 8010 Graz, Austria

http://www.icg.tugraz.at/
phone: +43 316 873 5091
====================================================


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Efficient_RANSAC: Plane detection and point indices

Sebastien Loriot (GeometryFactory)
On 05/24/2017 03:32 PM, Thomas Holzmann wrote:

> Hi,
>
> I'm detecting planes in a point cloud by using RANSAC as described in
> the manual at 4.1:
>
> http://doc.cgal.org/latest/Point_set_shape_detection_3/index.html#title4
>
> This works very well.
>
> Next, I want to iterate over all assigned points of each plane as
> described in 4.3. This works, but it seems as the input
> pointsWithNormals-vector is rearranged, and therefore the retrieved
> indices doesn't correspond to the original ordering of the vector.
>
> Is there a way to keep the original ordering of the points? Or, if not,
> is it possible to store an additional information (the original ID) for
> each pointWithNormal?
>
> Thomas
>
The input range might indeed be reordered. Since points are accessed
through property maps, you might provide a range of indices while
your points are stored in a vector the algorithm won't touch.
Or you can also provide a range filled with pairs of point and index.

It is the same idea (but in another package) than:

http://doc.cgal.org/latest/Spatial_sorting
/Spatial_sorting_2sp_sort_using_property_map_2_8cpp-example.html

where the input range are pairs.

In:
http://doc.cgal.org/latest/Spatial_sorting/Spatial_sorting_2sp_sort_using_property_map_3_8cpp-example.html
we use a range of indices.

Sebastien.


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss