43 #include <pcl/point_cloud.h>
44 #include <pcl/console/print.h>
46 #include <pcl/io/point_cloud_image_extractors.h>
61 saveCharPNGFile (
const std::string& file_name,
const unsigned char *mono_image,
int width,
int height,
int channels);
72 saveShortPNGFile (
const std::string& file_name,
const unsigned short *short_image,
int width,
int height,
int channels);
82 saveRgbPNGFile (
const std::string& file_name,
const unsigned char *rgb_image,
int width,
int height);
115 template <
typename Po
intT>
void
119 PointCloudImageExtractorPtr pcie;
120 if (field_name ==
"normal")
124 else if (field_name ==
"rgb")
128 else if (field_name ==
"label")
132 else if (field_name ==
"z")
136 else if (field_name ==
"curvature")
140 else if (field_name ==
"intensity")
146 PCL_ERROR (
"[pcl::io::savePNGFile] Unsupported field \"%s\".\n", field_name.c_str ());
150 if (pcie->extract (cloud, image))
156 PCL_ERROR (
"[pcl::io::savePNGFile] Failed to extract an image from \"%s\" field.\n", field_name.c_str());
PCL_EXPORTS void saveShortPNGFile(const std::string &file_name, const unsigned short *short_image, int width, int height, int channels)
Saves 16-bit encoded image to PNG file.
PCL_EXPORTS void saveRgbPNGFile(const std::string &file_name, const unsigned char *rgb_image, int width, int height)
Saves 8-bit encoded RGB image to PNG file.
PCL_EXPORTS void saveCharPNGFile(const std::string &file_name, const unsigned char *mono_image, int width, int height, int channels)
Saves 8-bit encoded image to PNG file.
PCL_EXPORTS void savePNGFile(const std::string &file_name, const pcl::PointCloud< unsigned char > &cloud)
Saves 8-bit grayscale cloud as image to PNG file.
Defines all the PCL and non-PCL macros used.