Conditional Euclidean Clustering class

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

Conditional Euclidean Clustering class

eva
Dear PCL users,

I hope that I am using this mailing list in the correct way. If not I would appreciate if someone lets me know.

I have installed PCL a few days ago because I want to use the Conditional Euclidean Clustering class.
http://pointclouds.org/documentation/tutorials/conditional_euclidean_clustering.php
Has someone used this class successfully and could you in that case please give me some hints about how it is working?

I have copied the example code from the tutorial about the class. I tried to copy the file Statues_4.pcd but it was not found. Instead I copied this file http://www.pcl-users.org/file/n4025557/region_growing_tutorial.pcd and renamed it to Statues_4.pcd

The point cloud does not have intensity, but the conditional clustering should work also with other criteria. Hence, I edited the function customRegionGrowing in the tutorial code and commented out the lines related to intensity. The only possible conditions for clustering is then
if (fabs (point_a_normal.dot (point_b_normal)) < 0.06)

If I understand correctly, this should mean that points with normals in approximately the same direction may be joined into one cluster. When I run the program on the file above, the resulting classes are spatially mixed. I thought that it was because the limit was too low (making it impossible for many points spatially close to each to form one cluster), but it is strange in other ways too. The point clouds originates from a house, and some of the points on the different faces of the roof are assigned to the same cluster. That should not be possible if the condition is small difference in normal angles.

Have I misunderstood something about the class or about how the normals are calculated? Has someone else had problems with this class?

I am using version 1.7.0 of PCL and have built it from source. Some details about my configuration: Windows 7 64 bits, Visual Studio 2010.

Thank you in advance,
Eva


Eva Lindberg

Swedish University of Agricultural Sciences                Vienna University of Technology

Department of Forest Resource Management               Department of Geodesy and Geoinformation
Remote Sensing                                                                   Research Groups Photogrammetry and Remote Sensing
Skogmarksgränd                                                                   Gußhausstraße 27 - 29
SE-901 83 UMEÅ                                                                   AT-1040 Vienna
Phone: +46 90 786 85 36                                                     +43-(0)1-58801-12214
[hidden email]
www.slu.se/srh
,

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

Re: Conditional Euclidean Clustering class

Radu B. Rusu
Administrator
Eva,

The missing file can be found at http://sourceforge.net/projects/pointclouds/files/PCD%20datasets/Trimble/Outdoor1/

Best,
Radu.

On May 26, 2014, at 8:14 AM, Eva Lindberg <[hidden email]> wrote:

> Dear PCL users,
>
> I hope that I am using this mailing list in the correct way. If not I would appreciate if someone lets me know.
>
> I have installed PCL a few days ago because I want to use the Conditional Euclidean Clustering class.
> http://pointclouds.org/documentation/tutorials/conditional_euclidean_clustering.php
> Has someone used this class successfully and could you in that case please give me some hints about how it is working?
>
> I have copied the example code from the tutorial about the class. I tried to copy the file Statues_4.pcd but it was not found. Instead I copied this filehttp://www.pcl-users.org/file/n4025557/region_growing_tutorial.pcd and renamed it to Statues_4.pcd
>
> The point cloud does not have intensity, but the conditional clustering should work also with other criteria. Hence, I edited the function customRegionGrowing in the tutorial code and commented out the lines related to intensity. The only possible conditions for clustering is then
> if (fabs (point_a_normal.dot (point_b_normal)) < 0.06)
>
> If I understand correctly, this should mean that points with normals in approximately the same direction may be joined into one cluster. When I run the program on the file above, the resulting classes are spatially mixed. I thought that it was because the limit was too low (making it impossible for many points spatially close to each to form one cluster), but it is strange in other ways too. The point clouds originates from a house, and some of the points on the different faces of the roof are assigned to the same cluster. That should not be possible if the condition is small difference in normal angles.
>
> Have I misunderstood something about the class or about how the normals are calculated? Has someone else had problems with this class?
>
> I am using version 1.7.0 of PCL and have built it from source. Some details about my configuration: Windows 7 64 bits, Visual Studio 2010.
>
> Thank you in advance,
> Eva
>
>
> Eva Lindberg
>
> Swedish University of Agricultural Sciences                Vienna University of Technology
>
> Department of Forest Resource Management               Department of Geodesy and Geoinformation
> Remote Sensing                                                                   Research Groups Photogrammetry and Remote Sensing
> Skogmarksgränd                                                                   Gußhausstraße 27 - 29
> SE-901 83 UMEÅ                                                                   AT-1040 Vienna
> Phone: +46 90 786 85 36                                                     +43-(0)1-58801-12214
> [hidden email]
> www.slu.se/srh,
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

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

Re: Conditional Euclidean Clustering class

eva
Thank you Radu. I have downloaded the data.

I have now managed to get something resembling clustering based on the tutorial. However, there are still two issues.

First, I think that there is an error in the tutorial. The condition for the normal vectors is
    if (fabs (point_a_normal.dot (point_b_normal)) < 0.06)
      return (true);
This does not make sense since the dot product is small for orthogonal vectors but the condition should be true for parallel vectors. I changed the condition to >0.99, but it can also be the case that an arccos is missing.

Second, I don't understand the normal vector estimation. I am trying to segment a data set with points from the ground (almost completely horizontal) and points from low vegetation (shrubs around 2 m height). I have thinned the point cloud with a voxel grid with leaf size 0.5 in all directions and I have set the search radius for the normal vector estimation to 0.75 (I tried greater radii but I decided to use a very small one to be able to understand what is going on). I thought that search radius means that for one point, the normal vector is calculated from that point and the points within the search radius. Is that correct? Is the search radius in 3D or 2D?

Here is an example of a point and all points within its search radius in 3D:
344409.1, 5672391, 37.371
344409.0, 5672390, 36.897
344409.6, 5672391, 36.972
344408.6, 5672391, 37.680

The result for the normal vector for the first point is
0.09971826, -0.0062248, 0.9949963
That is almost completely vertical although the points don't form a horizontal plane.

Have I misunderstood something or is there some functionality which is better to use in this case?

Thank you, Eva
Reply | Threaded
Open this post in threaded view
|

Re: Conditional Euclidean Clustering class

VictorLamoine
Administrator
Hi,

Just a fast suggestion, from what I understood you have a point cloud containing a plane and you want to segment this plane.

Did you try a RANSAC plane segmentation ?
It's implemented in PCL under SACSegmentation

And some useful links:
http://www.pointclouds.org/assets/iros2011/segmentation.pdf
http://www.pointclouds.org/documentation/tutorials/planar_segmentation.php#planar-segmentation
http://www.pointclouds.org/documentation/tutorials/random_sample_consensus.php#random-sample-consensus

Bye!
eva
Reply | Threaded
Open this post in threaded view
|

Re: Conditional Euclidean Clustering class

eva
VictorL: Thank you for your suggestion. However, the data that I want to segment are in general not planes. The objects may be smooth surfaces (not necessarily planes) but they may also be more rough and with similar intensity. Hence, I want to include several different attributes in the segmentation condition and the Conditional Euclidean Clustering class seemed to fit the bill.

The data set that I have started with contains a plane because I want to start with an easy case and add more complexity once this is working. I hope that this describes the situation more clearly.
Reply | Threaded
Open this post in threaded view
|

Re: Conditional Euclidean Clustering class

Scott_Yang
This post has NOT been accepted by the mailing list yet.
Hello ,have you already solved this problem? I have the same problem maybe you could help me,thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Conditional Euclidean Clustering class

Scott_Yang
This post has NOT been accepted by the mailing list yet.
In reply to this post by eva
Hello ,have you already solved this problem? I have the same problem maybe you could help me,thanks!
eva wrote
VictorL: Thank you for your suggestion. However, the data that I want to segment are in general not planes. The objects may be smooth surfaces (not necessarily planes) but they may also be more rough and with similar intensity. Hence, I want to include several different attributes in the segmentation condition and the Conditional Euclidean Clustering class seemed to fit the bill.

The data set that I have started with contains a plane because I want to start with an easy case and add more complexity once this is working. I hope that this describes the situation more clearly.