41#include <pcl/point_cloud.h>
151 std::vector<char> &data,
152 std::uint32_t &uncompressed_size);
161 std::vector<char> &output);
201 template <
typename Po
intT>
bool
209 template <
typename Po
intT>
bool
211 unsigned int num_threads=0);
251 template<
typename Po
intT>
bool
260 template <
typename Po
intT>
bool
262 unsigned int num_threads=0);
298 template<
typename Po
intT>
bool
307 template <
typename Po
intT>
bool
309 unsigned int num_threads=0);
336 template<
typename Po
intT>
bool
345 template <
typename Po
intT>
bool
347 unsigned int num_threads=0);
391 std::uint32_t width, std::uint32_t height,
392 const std::string &filename) = 0;
401 const std::string &filename) = 0;
414 std::uint32_t width, std::uint32_t height,
416 const std::string &filename_data,
417 const std::string &filename_xml)
419 bool res1 =
write (data, width, height, filename_data);
421 return (res1 && res2);
437 const std::string &filename);
447 const std::string &filename);
461 compress (
const char* input, std::uint32_t input_size,
462 std::uint32_t width, std::uint32_t height,
463 const std::string &image_type,
495 std::uint32_t width, std::uint32_t height,
496 const std::string &filename)
override;
512 const std::string &filename)
override;
548 std::uint32_t width, std::uint32_t height,
549 const std::string &filename)
override;
558 const std::string &filename)
override;
590 std::uint32_t width, std::uint32_t height,
591 const std::string &filename)
override;
621 std::uint32_t width, std::uint32_t height,
622 const std::string &filename)
override;
627#include <pcl/io/impl/lzf_image_io.hpp>
PointCloud represents the base class in PCL for storing collections of 3D points.
bool readOMP(const std::string &filename, pcl::PointCloud< PointT > &cloud, unsigned int num_threads=0)
Read the data stored in a PCLZF Bayer 8bit file and convert it to a pcl::PointCloud type.
bool read(const std::string &filename, pcl::PointCloud< PointT > &cloud)
Read the data stored in a PCLZF Bayer 8bit file and convert it to a pcl::PointCloud type.
~LZFBayer8ImageReader() override=default
Empty destructor.
LZFBayer8ImageReader()=default
Empty constructor.
LZFBayer8ImageWriter()=default
Empty constructor.
~LZFBayer8ImageWriter() override=default
Empty destructor.
bool write(const char *data, std::uint32_t width, std::uint32_t height, const std::string &filename) override
Save a 8-bit Bayer image into PCL-LZF format.
bool read(const std::string &filename, pcl::PointCloud< PointT > &cloud)
Read the data stored in a PCLZF depth file and convert it to a pcl::PointCloud type.
LZFDepth16ImageReader()=default
Empty constructor.
bool readParameters(std::istream &is) override
Read camera parameters from a given stream and store them internally.
~LZFDepth16ImageReader() override=default
Empty destructor.
double z_multiplication_factor_
Z-value depth multiplication factor (i.e., if raw data is in [mm] and we want [m],...
bool readOMP(const std::string &filename, pcl::PointCloud< PointT > &cloud, unsigned int num_threads=0)
Read the data stored in a PCLZF depth file and convert it to a pcl::PointCloud type.
bool write(const char *data, std::uint32_t width, std::uint32_t height, const std::string &filename) override
Save a 16-bit depth image into PCL-LZF format.
double z_multiplication_factor_
Z-value depth multiplication factor (i.e., if raw data is in [mm] and we want [m],...
bool writeParameters(const CameraParameters ¶meters, const std::string &filename) override
Write camera parameters to disk.
~LZFDepth16ImageWriter() override=default
Empty destructor.
LZFDepth16ImageWriter()=default
Empty constructor.
std::uint32_t getWidth() const
Get the image width as read from disk.
std::string image_type_identifier_
The image type string, as read from the file.
void setParameters(const CameraParameters ¶meters)
Read the parameters from a struct instead.
virtual ~LZFImageReader()=default
Empty destructor.
bool readParameters(const std::string &filename)
Read camera parameters from a given file and store them internally.
virtual bool readParameters(std::istream &)
Read camera parameters from a given stream and store them internally.
bool decompress(const std::vector< char > &input, std::vector< char > &output)
Realtime LZF decompression.
bool loadImageBlob(const std::string &filename, std::vector< char > &data, std::uint32_t &uncompressed_size)
Load a compressed image array from disk.
LZFImageReader()
Empty constructor.
CameraParameters getParameters() const
Get the camera parameters currently being used returns a CameraParameters struct.
std::uint32_t getHeight() const
Get the image height as read from disk.
std::uint32_t width_
The image width, as read from the file.
std::string getImageType() const
Get the type of the image read from disk.
CameraParameters parameters_
Internal set of camera parameters.
std::uint32_t height_
The image height, as read from the file.
bool saveImageBlob(const char *data, std::size_t data_size, const std::string &filename)
Save a compressed image array to disk.
virtual bool writeParameters(const CameraParameters ¶meters, const std::string &filename)=0
Write camera parameters to disk.
virtual bool write(const char *data, std::uint32_t width, std::uint32_t height, const CameraParameters ¶meters, const std::string &filename_data, const std::string &filename_xml)
Save an image and its camera parameters into PCL-LZF format.
bool writeParameter(const double ¶meter, const std::string &tag, const std::string &filename)
Write a single image/camera parameter to file, given an XML tag.
LZFImageWriter()=default
Empty constructor.
virtual bool write(const char *data, std::uint32_t width, std::uint32_t height, const std::string &filename)=0
Save an image into PCL-LZF format.
std::uint32_t compress(const char *input, std::uint32_t input_size, std::uint32_t width, std::uint32_t height, const std::string &image_type, char *output)
Realtime LZF compression.
virtual ~LZFImageWriter()=default
Empty destructor.
bool read(const std::string &filename, pcl::PointCloud< PointT > &cloud)
Read the data stored in a PCLZF RGB file and convert it to a pcl::PointCloud type.
~LZFRGB24ImageReader() override=default
Empty destructor.
bool readOMP(const std::string &filename, pcl::PointCloud< PointT > &cloud, unsigned int num_threads=0)
Read the data stored in a PCLZF RGB file and convert it to a pcl::PointCloud type.
LZFRGB24ImageReader()=default
Empty constructor.
bool readParameters(std::istream &is) override
Read camera parameters from a given stream and store them internally.
bool write(const char *data, std::uint32_t width, std::uint32_t height, const std::string &filename) override
Save a 24-bit RGB image into PCL-LZF format.
~LZFRGB24ImageWriter() override=default
Empty destructor.
bool writeParameters(const CameraParameters ¶meters, const std::string &filename) override
Write camera parameters to disk.
LZFRGB24ImageWriter()=default
Empty constructor.
~LZFYUV422ImageReader() override=default
Empty destructor.
LZFYUV422ImageReader()=default
Empty constructor.
bool read(const std::string &filename, pcl::PointCloud< PointT > &cloud)
Read the data stored in a PCLZF YUV422 16bit file and convert it to a pcl::PointCloud type.
bool readOMP(const std::string &filename, pcl::PointCloud< PointT > &cloud, unsigned int num_threads=0)
Read the data stored in a PCLZF YUV422 file and convert it to a pcl::PointCloud type.
~LZFYUV422ImageWriter() override=default
Empty destructor.
bool write(const char *data, std::uint32_t width, std::uint32_t height, const std::string &filename) override
Save a 16-bit YUV422 image into PCL-LZF format.
LZFYUV422ImageWriter()=default
Empty constructor.
Defines all the PCL and non-PCL macros used.
Basic camera parameters placeholder.
double principal_point_y
cy
double principal_point_x
cx