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

Function batchProcess

tools/grid_min.cpp:117–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117int
118batchProcess (const std::vector<std::string> &pcd_files, std::string &output_dir,
119 float resolution)
120{
121 for (const auto &pcd_file : pcd_files)
122 {
123 // Load the first file
124 Cloud::Ptr cloud (new Cloud);
125 if (!loadCloud (pcd_file, *cloud))
126 return (-1);
127
128 // Perform the feature estimation
129 Cloud output;
130 compute (cloud, output, resolution);
131
132 // Prepare output file name
133 std::string filename = pcl_fs::path(pcd_file).filename().string();
134
135 // Save into the second file
136 const std::string filepath = output_dir + '/' + filename;
137 saveCloud (filepath, output);
138 }
139 return (0);
140}
141
142
143/* ---[ */

Callers 1

mainFunction · 0.70

Calls 3

loadCloudFunction · 0.70
computeFunction · 0.70
saveCloudFunction · 0.70

Tested by

no test coverage detected