Question to Step "Buffers two clouds"

Added by Weiser Hannah about 3 years ago


I was succesfully segmenting my trees with a downsampled version of the scene cloud. Now I want to apply the segmentation information to the original point cloud. I was trying to use the “buffer two clouds"-step but it does not do anything (input data was a merged cloud in the “segmented tree” group as source cloud and the original scene as target cloud with the standard parameters (range = 0.05m I think). The step just runs through in no time at all and seems to produce an empty cloud.
Is there a certain restriction on the input clouds? How is this step be done properly?

Additional question: I am only interested in one tree in the plot. Can I also save my segmented trees, then load just that one target tree and then buffer with the original scene? It is also important for me to maintain the reflectance values in the original scene (for leaf-wood separation, etc.).



Replies (3)

RE: Question to Step "Buffers two clouds" - Added by Hackenberg Jan about 3 years ago

If anybody can afford by time and experience, here is the solution to the problem presumingly, a cloud "source" and a cloud "target" have to be swapped:
  • This is line 151 and following in symbol
    void ST_StepBuffering::compute()

    std::vector<bool> is_cluster;
    for(size_t i = 0; i < _cloud_in_target->points.size(); i++) {
QSharedPointer&lt;pcl::octree::OctreePointCloudSearch&lt;PointS&gt; > octree (new pcl::octree::OctreePointCloudSearch&lt;PointS&gt; (SimpleMath&lt;float&gt;::_OCTREE_RESOLUTION));
octree->setInputCloud (_cloud_in_source);
octree->addPointsFromInputCloud ();
for(size_t i = 0; i < _cloud_in_target->points.size(); i++)
PointS query = _cloud_in_target->;
std::vector&lt;int&gt; pointIdxRadiusSearch;
std::vector&lt;float&gt; pointRadiusSquaredDistance;
octree->radiusSearch(query, _range, pointIdxRadiusSearch,
for (size_t j = 0; j < pointIdxRadiusSearch.size(); j++) {
is_cluster[pointIdxRadiusSearch[j]] = true;

RE: Question to Step "Buffers two clouds" - Added by Weiser Hannah about 3 years ago

Hey Jan,

thanks for your answer. This wasn’t the issue though.
I tried it with other point clouds and it worked so I think the issue is that the clouds are from different groups (in my case the centered point cloud group and the tree group). Could this be the case?
So where exactly did you intend to use the buffer tool? Is there even a way to use it after thre tree segmentation procedure?



RE: Question to Step "Buffers two clouds" - Added by Hackenberg Jan about 3 years ago

Hi Hannah

sorry for the wrong hint . I cannot compile right now SimpleTree on my Linux machine, thats why I could not try out myself. I opened code, looked at it for a while and thought my eyes catched a bug. Apparently not.

Also I have to say that I did not open SimpleTree since two years now already. I focus on my new plugin instead, but there is still a way to go until I can release this one. I think I made this step due to a similar request, but thats so long ago. As I experienced a lot of wrong group issues already, that is another explanation. CT version 6 should be easier to configure from what I heard... I am really sorry that I cant help you out, I hope you understand the given reason. Makes no sense to try out blindly here, better make some progress with SimpleForest. The last time I checked EU servers, the SimpleTree project deliverable is still not online.

Hope you can still work out with what you have, will try to release SimpleForest as soon as possible