Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Member Functions
pcl::io::LZFYUV422ImageReader Class Reference

PCL-LZF 8-bit Bayer image format reader. More...

#include <pcl/io/lzf_image_io.h>

+ Inheritance diagram for pcl::io::LZFYUV422ImageReader:
+ Collaboration diagram for pcl::io::LZFYUV422ImageReader:

Public Member Functions

 LZFYUV422ImageReader ()=default
 Empty constructor. More...
 
 ~LZFYUV422ImageReader () override=default
 Empty destructor. More...
 
template<typename PointT >
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. More...
 
template<typename PointT >
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. More...
 
bool readParameters (std::istream &is) override
 Read camera parameters from a given stream and store them internally. More...
 
bool readParameters (const std::string &filename)
 Read camera parameters from a given file and store them internally. More...
 
virtual bool readParameters (std::istream &)
 Read camera parameters from a given stream and store them internally. More...
 
- Public Member Functions inherited from pcl::io::LZFRGB24ImageReader
 LZFRGB24ImageReader ()=default
 Empty constructor. More...
 
 ~LZFRGB24ImageReader () override=default
 Empty destructor. More...
 
template<typename PointT >
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. More...
 
template<typename PointT >
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. More...
 
bool readParameters (std::istream &is) override
 Read camera parameters from a given stream and store them internally. More...
 
bool readParameters (const std::string &filename)
 Read camera parameters from a given file and store them internally. More...
 
virtual bool readParameters (std::istream &)
 Read camera parameters from a given stream and store them internally. More...
 
- Public Member Functions inherited from pcl::io::LZFImageReader
 LZFImageReader ()
 Empty constructor. More...
 
virtual ~LZFImageReader ()=default
 Empty destructor. More...
 
bool readParameters (const std::string &filename)
 Read camera parameters from a given file and store them internally. More...
 
void setParameters (const CameraParameters &parameters)
 Read the parameters from a struct instead. More...
 
CameraParameters getParameters () const
 Get the camera parameters currently being used returns a CameraParameters struct. More...
 
std::uint32_t getWidth () const
 Get the image width as read from disk. More...
 
std::uint32_t getHeight () const
 Get the image height as read from disk. More...
 
std::string getImageType () const
 Get the type of the image read from disk. More...
 

Additional Inherited Members

- Protected Member Functions inherited from pcl::io::LZFImageReader
bool loadImageBlob (const std::string &filename, std::vector< char > &data, std::uint32_t &uncompressed_size)
 Load a compressed image array from disk. More...
 
bool decompress (const std::vector< char > &input, std::vector< char > &output)
 Realtime LZF decompression. More...
 
- Protected Attributes inherited from pcl::io::LZFImageReader
std::uint32_t width_ {0}
 The image width, as read from the file. More...
 
std::uint32_t height_ {0}
 The image height, as read from the file. More...
 
std::string image_type_identifier_
 The image type string, as read from the file. More...
 
CameraParameters parameters_
 Internal set of camera parameters. More...
 

Detailed Description

PCL-LZF 8-bit Bayer image format reader.

The main advantage of using the PCL-LZF image I/O routines is a very good file size versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods provide the best score for the types of applications PCL is suited for.

Author
Radu B. Rusu

Definition at line 284 of file lzf_image_io.h.

Constructor & Destructor Documentation

◆ LZFYUV422ImageReader()

pcl::io::LZFYUV422ImageReader::LZFYUV422ImageReader ( )
default

Empty constructor.

◆ ~LZFYUV422ImageReader()

pcl::io::LZFYUV422ImageReader::~LZFYUV422ImageReader ( )
overridedefault

Empty destructor.

Member Function Documentation

◆ read()

template<typename PointT >
bool pcl::io::LZFYUV422ImageReader::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.

Parameters
[in]filenamethe file name to read the data from
[out]cloudthe resultant output point cloud

Definition at line 312 of file lzf_image_io.hpp.

References pcl::io::LZFImageReader::decompress(), pcl::io::LZFImageReader::getHeight(), pcl::io::LZFImageReader::getImageType(), pcl::io::LZFImageReader::getWidth(), pcl::PointCloud< PointT >::height, pcl::io::LZFImageReader::loadImageBlob(), pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.

◆ readOMP()

template<typename PointT >
bool pcl::io::LZFYUV422ImageReader::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.

Note that, unless massively multithreaded, this will likely not result in a significant speedup

Parameters
[in]filenamethe file name to read the data from
[in]num_threadsThe number of threads to use
[out]cloudthe resultant output point cloud

Definition at line 370 of file lzf_image_io.hpp.

References pcl::io::LZFImageReader::decompress(), pcl::io::LZFImageReader::getHeight(), pcl::io::LZFImageReader::getImageType(), pcl::io::LZFImageReader::getWidth(), pcl::PointCloud< PointT >::height, pcl::utils::ignore(), pcl::io::LZFImageReader::loadImageBlob(), pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.

◆ readParameters() [1/3]

bool pcl::io::LZFImageReader::readParameters

Read camera parameters from a given file and store them internally.

Returns
true if operation successful, false otherwise

◆ readParameters() [2/3]

virtual bool pcl::io::LZFImageReader::readParameters
inline

Read camera parameters from a given stream and store them internally.

Returns
true if operation successful, false otherwise

Definition at line 240 of file lzf_image_io.h.

◆ readParameters() [3/3]

bool pcl::io::LZFRGB24ImageReader::readParameters
override

Read camera parameters from a given stream and store them internally.

The parameters will be read from the <rgb> ... </rgb> tag.

Returns
true if operation successful, false otherwise

The documentation for this class was generated from the following files: