MCPcopy Create free account
hub / github.com/Pamphlett/Outram / random_downsample_pl

Function random_downsample_pl

examples/global_localization.cpp:1016–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1014}
1015
1016pcl::PointCloud<PointL>::Ptr
1017random_downsample_pl(pcl::PointCloud<PointL>::Ptr cloud_ori, int ratio) {
1018 pcl::PointCloud<PointL>::Ptr sampled_pc(new pcl::PointCloud<PointL>);
1019
1020 for (int i = 0; i < cloud_ori->points.size(); ++i) {
1021 if (i % ratio == 0) {
1022 sampled_pc->points.push_back(cloud_ori->points[i]);
1023 }
1024 }
1025
1026 return sampled_pc;
1027}
1028
1029void ds_point_cloud(pcl::PointCloud<PointType>::Ptr &pc_in,
1030 pcl::PointCloud<PointType>::Ptr &pc_out) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected