Skip to content

Instantly share code, notes, and snippets.

@universax
Last active February 2, 2019 10:06
Show Gist options
  • Save universax/d4c7eb6f49f8dc504199c32c3c7bc35d to your computer and use it in GitHub Desktop.
Save universax/d4c7eb6f49f8dc504199c32c3c7bc35d to your computer and use it in GitHub Desktop.
usage example of pcl filter functions
// Copy for compute
pcl::PointCloud<PointType>::Ptr calcPoints(new pcl::PointCloud<PointType>());
*calcPoints = *mCloud;
// Filter
float voxelVal = 0.01f; // Set Voxel size to 0.01m
voxelGridFilter(voxelVal, calcPoints);
statisticalOutlierFilter(calcPoints);
passThroughFilter(calcPoints, "x", -2.0, 2.0); //-2.0m to 2.0m
passThroughFilter(calcPoints, "y", 0.0, 2.0); //0.0m to 2.0m
passThroughFilter(calcPoints, "z", 0.0, 3.0); //0.0m to 3.0m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment