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);
193 : z_multiplication_factor_ (0.001)
203 template <
typename Po
intT>
bool
211 template <
typename Po
intT>
bool
213 unsigned int num_threads=0);
253 template<
typename Po
intT>
bool
262 template <
typename Po
intT>
bool
264 unsigned int num_threads=0);
300 template<
typename Po
intT>
bool
309 template <
typename Po
intT>
bool
311 unsigned int num_threads=0);
338 template<
typename Po
intT>
bool
347 template <
typename Po
intT>
bool
349 unsigned int num_threads=0);
393 std::uint32_t width, std::uint32_t height,
394 const std::string &filename) = 0;
403 const std::string &filename) = 0;
416 std::uint32_t width, std::uint32_t height,
418 const std::string &filename_data,
419 const std::string &filename_xml)
421 bool res1 =
write (data, width, height, filename_data);
422 bool res2 = writeParameters (parameters, filename_xml);
423 return (res1 && res2);
439 const std::string &filename);
449 const std::string &filename);
463 compress (
const char* input, std::uint32_t input_size,
464 std::uint32_t width, std::uint32_t height,
465 const std::string &image_type,
484 : z_multiplication_factor_ (0.001)
499 std::uint32_t width, std::uint32_t height,
500 const std::string &filename)
override;
516 const std::string &filename)
override;
552 std::uint32_t width, std::uint32_t height,
553 const std::string &filename)
override;
562 const std::string &filename)
override;
594 std::uint32_t width, std::uint32_t height,
595 const std::string &filename)
override;
625 std::uint32_t width, std::uint32_t height,
626 const std::string &filename)
override;
631 #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()
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],...
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.
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()
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::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.
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