本文整理汇总了C++中PCDWriter::writeBinaryCompressed方法的典型用法代码示例。如果您正苦于以下问题:C++ PCDWriter::writeBinaryCompressed方法的具体用法?C++ PCDWriter::writeBinaryCompressed怎么用?C++ PCDWriter::writeBinaryCompressed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCDWriter
的用法示例。
在下文中一共展示了PCDWriter::writeBinaryCompressed方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: save
void
save (const std::string &object_file, const std::string &plane_file)
{
PCDWriter w;
if (object_ && !object_->empty ())
{
w.writeBinaryCompressed (object_file, *object_);
w.writeBinaryCompressed (plane_file, *plane_);
print_highlight ("Object successfully segmented. Saving results in: %s, and %s.\n", object_file.c_str (), plane_file.c_str ());
}
}
示例2: printHelp
/* ---[ */
int
main (int argc, char** argv)
{
print_info ("Convert a simple XYZ file to PCD format. For more information, use: %s -h\n", argv[0]);
if (argc < 3)
{
printHelp (argc, argv);
return (-1);
}
// Parse the command line arguments for .pcd and .ply files
vector<int> pcd_file_indices = parse_file_extension_argument (argc, argv, ".pcd");
vector<int> xyz_file_indices = parse_file_extension_argument (argc, argv, ".xyz");
if (pcd_file_indices.size () != 1 || xyz_file_indices.size () != 1)
{
print_error ("Need one input XYZ file and one output PCD file.\n");
return (-1);
}
// Load the first file
PointCloud<PointXYZ> cloud;
if (!loadCloud (argv[xyz_file_indices[0]], cloud))
return (-1);
// Convert to PCD and save
PCDWriter w;
w.writeBinaryCompressed (argv[pcd_file_indices[0]], cloud);
}
示例3:
void
saveCloud (const string &filename, const pcl::PCLPointCloud2 &output,
const Eigen::Vector4f &translation, const Eigen::Quaternionf &orientation)
{
PCDWriter w;
w.writeBinaryCompressed (filename, output, translation, orientation);
}
示例4: sprintf
void
cloud_cb (const CloudConstPtr& cloud)
{
PCDWriter w;
sprintf (buf, "frame_%06d.pcd", i);
w.writeBinaryCompressed (buf, *cloud);
PCL_INFO ("Wrote a cloud with %zu (%ux%u) points in %s.\n",
cloud->size (), cloud->width, cloud->height, buf);
++i;
}
示例5:
void
saveCloud (const string &filename, const pcl::PCLPointCloud2 &output)
{
TicToc tt;
tt.tic ();
print_highlight ("Saving "); print_value ("%s ", filename.c_str ());
PCDWriter w;
w.writeBinaryCompressed (filename, output, translation, orientation);
print_info ("[done, "); print_value ("%g", tt.toc ()); print_info (" ms : "); print_value ("%d", output.width * output.height); print_info (" points]\n");
}
示例6: printElapsedTimeAndNumberOfPoints
void
saveCloud (const std::string &filename, const pcl::PCLPointCloud2 &output)
{
TicToc tt;
tt.tic ();
print_highlight ("Saving "); print_value ("%s ", filename.c_str ());
PCDWriter w;
w.writeBinaryCompressed (filename, output);
printElapsedTimeAndNumberOfPoints (tt.toc (), output.width, output.height);
}