MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / batchProcess

Function batchProcess

tools/sac_segmentation_plane.cpp:178–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178int
179batchProcess (const std::vector<std::string> &pcd_files, std::string &output_dir, int max_it, double thresh, bool negative)
180{
181 for (const auto &pcd_file : pcd_files)
182 {
183 // Load the first file
184 pcl::PCLPointCloud2::Ptr cloud (new pcl::PCLPointCloud2);
185 if (!loadCloud (pcd_file, *cloud))
186 return (-1);
187
188 // Perform the feature estimation
189 pcl::PCLPointCloud2 output;
190 compute (cloud, output, max_it, thresh, negative);
191
192 // Prepare output file name
193 std::string filename = pcl_fs::path(pcd_file).filename().string();
194
195 // Save into the second file
196 const std::string filepath = output_dir + '/' + filename;
197 saveCloud (filepath, output);
198 }
199 return (0);
200}
201
202/* ---[ */
203int

Callers 1

mainFunction · 0.70

Calls 3

loadCloudFunction · 0.70
computeFunction · 0.70
saveCloudFunction · 0.70

Tested by

no test coverage detected