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

Do not discard data fields in pcl_uniform_sampling tool #3461

Conversation

taketwo
Copy link
Member

@taketwo taketwo commented Nov 8, 2019

This PR changes the behavior of the uniform sampling tool. Currently, the tool always outputs XYZ point clouds irrespective of the original point type. This means that any additional fields (e.g. color) are lost. With this change the output point cloud will have exactly same fields as the input.

@taketwo taketwo added changelog: behavior change Meta-information for changelog generation module: tools labels Nov 8, 2019
@SergioRAgostinho SergioRAgostinho self-assigned this Nov 10, 2019
us.getRemovedIndices(removed_indices);
std::sort(removed_indices.indices.begin(),
removed_indices.indices.end(),
[](const auto& a, const auto& b) { return a < b; });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed_indices.indices is std::vector<int> and the comparison metric you're using is the default one. I suspect you don't need to provide this third argument.

@taketwo taketwo force-pushed the improve-uniform-sampling-tool branch from 907a9b8 to 7680ea8 Compare November 13, 2019 10:55
@SergioRAgostinho SergioRAgostinho merged commit e0e7cb9 into PointCloudLibrary:master Nov 14, 2019
@taketwo taketwo deleted the improve-uniform-sampling-tool branch November 14, 2019 08:59
@taketwo taketwo changed the title Do not discard data fields in uniform sampling tool Do not discard data fields in pcl_uniform_sampling tool Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: behavior change Meta-information for changelog generation module: tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants