PCL-LZF image format reader. More...
#include <pcl/io/lzf_image_io.h>
Public Member Functions | |
LZFImageReader () | |
Empty constructor. More... |
|
virtual | ~LZFImageReader () |
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 ¶meters) |
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... |
|
Protected Member Functions | |
virtual bool | readParameters (std::istream &) |
Read camera parameters from a given stream and store them internally. More... |
|
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 | |
std::uint32_t | width_ |
The image width, as read from the file. More... |
|
std::uint32_t | height_ |
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... |
|
PCL-LZF image format reader.
The PCL-LZF image format is nothing else but a LZF-modified compression over an existing file type (e.g., PNG). However, in certain situations, like RGB data for example, an [RGBRGB...RGB] array will be first reordered into [RR...RGG...GBB...B] in order to ensure better compression.
The current list of compressors/decompressors include:
Please note that files found using the above mentioned extensions will be treated as such. Inherit from this class and overwrite the I/O methods if you plan to change this behavior.
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.
Definition at line 85 of file lzf_image_io.h.
pcl::io::LZFImageReader::LZFImageReader | ( | ) |
Empty constructor.
| inlinevirtual |
Empty destructor.
Definition at line 91 of file lzf_image_io.h.
| protected |
Realtime LZF decompression.
[in] | input | the array to decompress |
[out] | output | the decompressed array |
Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().
| inline |
Get the image height as read from disk.
Definition at line 124 of file lzf_image_io.h.
Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().
| inline |
Get the type of the image read from disk.
Definition at line 131 of file lzf_image_io.h.
Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().
| inline |
Get the camera parameters currently being used returns a CameraParameters struct.
Definition at line 110 of file lzf_image_io.h.
| inline |
Get the image width as read from disk.
Definition at line 117 of file lzf_image_io.h.
Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().
| protected |
Load a compressed image array from disk.
[in] | filename | the file name to load the data from |
[out] | data | the size of the data |
uncompressed_size |
Referenced by pcl::io::LZFDepth16ImageReader::read(), pcl::io::LZFRGB24ImageReader::read(), pcl::io::LZFYUV422ImageReader::read(), pcl::io::LZFBayer8ImageReader::read(), pcl::io::LZFDepth16ImageReader::readOMP(), pcl::io::LZFRGB24ImageReader::readOMP(), pcl::io::LZFYUV422ImageReader::readOMP(), and pcl::io::LZFBayer8ImageReader::readOMP().
bool pcl::io::LZFImageReader::readParameters | ( | const std::string & | filename | ) |
Read camera parameters from a given file and store them internally.
| inlineprotectedvirtual |
Read camera parameters from a given stream and store them internally.
Reimplemented in pcl::io::LZFRGB24ImageReader, and pcl::io::LZFDepth16ImageReader.
Definition at line 141 of file lzf_image_io.h.
| inline |
Read the parameters from a struct instead.
[in] | parameters | Camera parameters to use |
Definition at line 102 of file lzf_image_io.h.
| protected |
The image height, as read from the file.
Definition at line 167 of file lzf_image_io.h.
| protected |
The image type string, as read from the file.
Definition at line 170 of file lzf_image_io.h.
| protected |
Internal set of camera parameters.
Definition at line 173 of file lzf_image_io.h.
Referenced by pcl::io::LZFDepth16ImageReader::read(), and pcl::io::LZFDepth16ImageReader::readOMP().
| protected |
The image width, as read from the file.
Definition at line 164 of file lzf_image_io.h.
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1io_1_1_l_z_f_image_reader.html