41 #include <pcl/point_cloud.h>
104 parameters_ = parameters;
133 return (image_type_identifier_);
151 std::vector<char> &data,
152 std::uint32_t &uncompressed_size);
161 std::vector<char> &output);
164 std::uint32_t width_{0};
167 std::uint32_t height_{0};
201 template <
typename Po
intT>
bool
209 template <
typename Po
intT>
bool
211 unsigned int num_threads=0);
224 double z_multiplication_factor_{0.001};
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);
420 bool res2 = writeParameters (parameters, filename_xml);
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;
518 double z_multiplication_factor_{0.001};
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.
PCL-LZF 8-bit Bayer image format reader.
~LZFBayer8ImageReader() override=default
Empty destructor.
LZFBayer8ImageReader()=default
Empty constructor.
PCL-LZF 8-bit Bayer image format writer.
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.
PCL-LZF 16-bit depth image format reader.
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.
PCL-LZF 16-bit depth image format writer.
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.
bool writeParameters(const CameraParameters ¶meters, const std::string &filename) override
Write camera parameters to disk.
~LZFDepth16ImageWriter() override=default
Empty destructor.
LZFDepth16ImageWriter()=default
Empty constructor.
PCL-LZF image format reader.
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::string getImageType() const
Get the type of the image read from disk.
CameraParameters parameters_
Internal set of camera parameters.
PCL-LZF image format writer.
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.
PCL-LZF 24-bit RGB image format reader.
bool readParameters(const std::string &filename)
Read camera parameters from a given file and store them internally.
~LZFRGB24ImageReader() override=default
Empty destructor.
LZFRGB24ImageReader()=default
Empty constructor.
bool readParameters(std::istream &is) override
Read camera parameters from a given stream and store them internally.
PCL-LZF 24-bit RGB image format writer.
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.
PCL-LZF 8-bit Bayer image format reader.
~LZFYUV422ImageReader() override=default
Empty destructor.
LZFYUV422ImageReader()=default
Empty constructor.
PCL-LZF 16-bit YUV422 image format writer.
~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.
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
void write(std::ostream &stream, Type value)
Function for writing data to a stream.
Defines all the PCL and non-PCL macros used.
Basic camera parameters placeholder.
double principal_point_y
cy
double principal_point_x
cx