Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[segmentation] "Implement ConditionalRegionGrowing class" #4826

Open
wnederpel opened this issue Jul 1, 2021 · 0 comments
Open

[segmentation] "Implement ConditionalRegionGrowing class" #4826

wnederpel opened this issue Jul 1, 2021 · 0 comments
Labels
kind: request Type of issue module: segmentation needs: feedback Specify why not closed/merged yet status: triage Labels incomplete

Comments

@wnederpel
Copy link

wnederpel commented Jul 1, 2021

Is your feature request related to a problem? Please describe.

I am encountering a problem when using the RegionGrowing class. In my code I use this class to segment a point cloud into regions which are then projected to a fitted plane so hulls can be created around the regions using the ConcaveHull class. My problem occurs when a region consist of points which are not closely spatially clustered.
In that case, the region found is not intuitively a region in general and the fitted plane does not accurately describe the region.

This problem happens when for example:
The camera on my robot sees a part of its leg.
There are not a lot of points on the leg (less then the number of neighbors) so the region grower considers points at the ground to be in the same region as well.

Now the ground plane is not one consistent region and the region consisting of both the ground and the leg is not intuitively a region.

Context

I wanted to solve this using the ConditionalEuclideanClustering class, where I would set the custom condition to check for normal vectors within a certain threshold and the distance between the points to be within a certain range. This is not an neat solution however as the eclidean clustering considers every point added to a region as a seed to continue growing the region from. The region growing algorithm has an additional check based on curvature to decide which points should become seeds to continue growing the region from. Because of this I am not able to create an identical implementation with distance constraint.

Expected behavior

I would like to be able to use a ConditionalRegionGrowing class, which, similar to the ConditionalEuclideanClustering class, allows the user to set a condition function to evaluate when deciding if a point should be added to the region, and one to evaluate when deciding if a point should become a seed.

Current Behavior

The ConditionalEuclideanClustering has no way to make certain points seeds and other not. All points are seeds by default.

Describe the solution you'd like

A New class ConditionalRegionGrowing which inherits from PCLBase with (in short) the following public member functions

ConditionalEuclideanClustering(...)

... set / get SearchMethod(...)

void setIncludeConditionFunction(..)

void setSeedConditionFunction(..)

... set / get MinClusterSize(...)

... set / get MaxClusterSize(...)

void extract(...)

... set / get InputNormals()

... set / get NumberOfNeighbours()

.. getColoredCloud()

.. getColoredCloudRGBA()

.. getSegmentFromPoint ()

Describe alternatives you've considered

Creating an implementation identical to the region growing algorithm using the ConditionalEuclideanClustering class.

Tuning the number of neighbours and the curvature threshold to make this occur less often. This is not an optimal solution as the problem can still occur and this can also make the regions found undesirable.

Additional context

In the screenshots below the regions of the point cloud have all been colored differently, invalid regions are not visualized.
When the hulls are visualized too they are visualized with colored cubes, the color does not necessarily match that of the region.

image

The problem with the edge of a step up a stair and the ground plane (with hulls visualized

image

The problem with part of the robot's leg and a part of a step up a stair (with hulls visualized)

image

The problem with part of the robot's leg and a part of a step up a stair (without hulls visualized)

@wnederpel wnederpel added kind: request Type of issue status: triage Labels incomplete labels Jul 1, 2021
@kunaltyagi kunaltyagi added module: segmentation needs: feedback Specify why not closed/merged yet labels Jul 2, 2021
@wnederpel wnederpel changed the title [segmentation] "Implement ConditionalEuclideanClustering class" [segmentation] "Implement ConditionalRegionGrowing class" Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: request Type of issue module: segmentation needs: feedback Specify why not closed/merged yet status: triage Labels incomplete
Projects
None yet
Development

No branches or pull requests

2 participants