Point Cloud Library (PCL)  1.8.0
lzf_image_io.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2012-, Open Perception, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of the copyright holder(s) nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
37 
38 #ifndef PCL_LZF_IMAGE_IO_H_
39 #define PCL_LZF_IMAGE_IO_H_
40 
41 #include <pcl/pcl_macros.h>
42 #include <pcl/point_cloud.h>
43 #include <vector>
44 
45 namespace pcl
46 {
47  namespace io
48  {
49  /** \brief Basic camera parameters placeholder. */
51  {
52  /** fx */
54  /** fy */
56  /** cx */
58  /** cy */
60  };
61 
62  /** \brief PCL-LZF image format reader.
63  * The PCL-LZF image format is nothing else but a LZF-modified compression over
64  * an existing file type (e.g., PNG). However, in certain situations, like RGB data for
65  * example, an [RGBRGB...RGB] array will be first reordered into [RR...RGG...GBB...B]
66  * in order to ensure better compression.
67  *
68  * The current list of compressors/decompressors include:
69  * * LZF compressed 24-bit [RR...RGG...GBB...B] data
70  * * LZF compressed 8-bit Bayer data
71  * * LZF compressed 16-bit YUV422 data
72  * * LZF compressed 16-bit depth data
73  *
74  * Please note that files found using the above mentioned extensions will be treated
75  * as such. Inherit from this class and overwrite the I/O methods if you plan to change
76  * this behavior.
77  *
78  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
79  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
80  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
81  * provide the best score for the types of applications PCL is suited for.
82  *
83  * \author Radu B. Rusu
84  * \ingroup io
85  */
86  class PCL_EXPORTS LZFImageReader
87  {
88  public:
89  /** Empty constructor */
90  LZFImageReader ();
91  /** Empty destructor */
92  virtual ~LZFImageReader () {}
93 
94  /** \brief Read camera parameters from a given file and store them internally.
95  * \return true if operation successful, false otherwise
96  */
97  bool
98  readParameters (const std::string &filename);
99 
100  /** \brief Read the parameters from a struct instead
101  * \param[in] parameters Camera parameters to use */
102  inline void
103  setParameters (const CameraParameters &parameters)
104  {
105  parameters_ = parameters;
106  }
107 
108  /** \brief Get the camera parameters currently being used
109  * returns a CameraParameters struct */
110  inline CameraParameters
111  getParameters () const
112  {
113  return parameters_;
114  }
115 
116  /** \brief Get the image width as read from disk. */
117  inline uint32_t
118  getWidth () const
119  {
120  return (width_);
121  }
122 
123  /** \brief Get the image height as read from disk. */
124  inline uint32_t
125  getHeight () const
126  {
127  return (height_);
128  }
129 
130  /** \brief Get the type of the image read from disk. */
131  inline std::string
132  getImageType () const
133  {
134  return (image_type_identifier_);
135  }
136 
137  protected:
138  /** \brief Read camera parameters from a given stream and store them internally.
139  * \return true if operation successful, false otherwise
140  */
141  virtual bool
142  readParameters (std::istream&) { return (false); }
143 
144  /** \brief Load a compressed image array from disk
145  * \param[in] filename the file name to load the data from
146  * \param[out] data the size of the data
147  * \param uncompressed_size
148  * \return an array filled with the data loaded from disk, NULL if error
149  */
150  bool
151  loadImageBlob (const std::string &filename,
152  std::vector<char> &data,
153  uint32_t &uncompressed_size);
154 
155  /** \brief Realtime LZF decompression.
156  * \param[in] input the array to decompress
157  * \param[out] output the decompressed array
158  * \return true if operation successful, false otherwise
159  */
160  bool
161  decompress (const std::vector<char> &input,
162  std::vector<char> &output);
163 
164  /** \brief The image width, as read from the file. */
165  uint32_t width_;
166 
167  /** \brief The image height, as read from the file. */
168  uint32_t height_;
169 
170  /** \brief The image type string, as read from the file. */
172 
173  /** \brief Internal set of camera parameters. */
175  };
176 
177  /** \brief PCL-LZF 16-bit depth image format reader.
178  *
179  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
180  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
181  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
182  * provide the best score for the types of applications PCL is suited for.
183  *
184  * \author Radu B. Rusu
185  * \ingroup io
186  */
187  class PCL_EXPORTS LZFDepth16ImageReader : public LZFImageReader
188  {
189  public:
191 
192  /** Empty constructor */
194  : LZFImageReader ()
195  , z_multiplication_factor_ (0.001) // Set default multiplication factor
196  {}
197 
198  /** Empty destructor */
200 
201  /** \brief Read the data stored in a PCLZF depth file and convert it to a pcl::PointCloud type.
202  * \param[in] filename the file name to read the data from
203  * \param[out] cloud the resultant output point cloud
204  */
205  template <typename PointT> bool
206  read (const std::string &filename, pcl::PointCloud<PointT> &cloud);
207 
208  /** \brief Read the data stored in a PCLZF depth file and convert it to a pcl::PointCloud type.
209  * \param[in] filename the file name to read the data from
210  * \param[in] num_threads The number of threads to use. 0 indicates OpenMP is free to choose.
211  * \param[out] cloud the resultant output point cloud
212  */
213  template <typename PointT> bool
214  readOMP (const std::string &filename, pcl::PointCloud<PointT> &cloud,
215  unsigned int num_threads=0);
216 
217  /** \brief Read camera parameters from a given stream and store them internally.
218  * The parameters will be read from the <depth> ... </depth> tag.
219  * \return true if operation successful, false otherwise
220  */
221  virtual bool
222  readParameters (std::istream& is);
223 
224  protected:
225  /** \brief Z-value depth multiplication factor
226  * (i.e., if raw data is in [mm] and we want [m], we need to multiply with 0.001)
227  */
229  };
230 
231  /** \brief PCL-LZF 24-bit RGB image format reader.
232  *
233  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
234  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
235  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
236  * provide the best score for the types of applications PCL is suited for.
237  *
238  * \author Radu B. Rusu
239  * \ingroup io
240  */
241  class PCL_EXPORTS LZFRGB24ImageReader : public LZFImageReader
242  {
243  public:
245 
246  /** Empty constructor */
248  /** Empty destructor */
249  virtual ~LZFRGB24ImageReader () {}
250 
251  /** \brief Read the data stored in a PCLZF RGB file and convert it to a pcl::PointCloud type.
252  * \param[in] filename the file name to read the data from
253  * \param[out] cloud the resultant output point cloud
254  */
255  template<typename PointT> bool
256  read (const std::string &filename, pcl::PointCloud<PointT> &cloud);
257 
258  /** \brief Read the data stored in a PCLZF RGB file and convert it to a pcl::PointCloud type.
259  * Note that, unless massively multithreaded, this will likely not result in a significant speedup and may even slow performance.
260  * \param[in] filename the file name to read the data from
261  * \param[in] num_threads The number of threads to use
262  * \param[out] cloud the resultant output point cloud
263  */
264  template <typename PointT> bool
265  readOMP (const std::string &filename, pcl::PointCloud<PointT> &cloud,
266  unsigned int num_threads=0);
267 
268  /** \brief Read camera parameters from a given stream and store them internally.
269  * The parameters will be read from the <rgb> ... </rgb> tag.
270  * \return true if operation successful, false otherwise
271  */
272  virtual bool
273  readParameters (std::istream& is);
274 
275  protected:
276  };
277 
278  /** \brief PCL-LZF 8-bit Bayer image format reader.
279  *
280  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
281  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
282  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
283  * provide the best score for the types of applications PCL is suited for.
284  *
285  * \author Radu B. Rusu
286  * \ingroup io
287  */
288  class PCL_EXPORTS LZFYUV422ImageReader : public LZFRGB24ImageReader
289  {
290  public:
292 
293  /** Empty constructor */
295  /** Empty destructor */
297 
298  /** \brief Read the data stored in a PCLZF YUV422 16bit file and convert it to a pcl::PointCloud type.
299  * \param[in] filename the file name to read the data from
300  * \param[out] cloud the resultant output point cloud
301  */
302  template<typename PointT> bool
303  read (const std::string &filename, pcl::PointCloud<PointT> &cloud);
304 
305  /** \brief Read the data stored in a PCLZF YUV422 file and convert it to a pcl::PointCloud type.
306  * Note that, unless massively multithreaded, this will likely not result in a significant speedup
307  * \param[in] filename the file name to read the data from
308  * \param[in] num_threads The number of threads to use
309  * \param[out] cloud the resultant output point cloud
310  */
311  template <typename PointT> bool
312  readOMP (const std::string &filename, pcl::PointCloud<PointT> &cloud,
313  unsigned int num_threads=0);
314  };
315 
316  /** \brief PCL-LZF 8-bit Bayer image format reader.
317  *
318  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
319  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
320  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
321  * provide the best score for the types of applications PCL is suited for.
322  *
323  * \author Radu B. Rusu
324  * \ingroup io
325  */
326  class PCL_EXPORTS LZFBayer8ImageReader : public LZFRGB24ImageReader
327  {
328  public:
330 
331  /** Empty constructor */
333  /** Empty destructor */
335 
336  /** \brief Read the data stored in a PCLZF Bayer 8bit file and convert it to a pcl::PointCloud type.
337  * \param[in] filename the file name to read the data from
338  * \param[out] cloud the resultant output point cloud
339  */
340  template<typename PointT> bool
341  read (const std::string &filename, pcl::PointCloud<PointT> &cloud);
342 
343  /** \brief Read the data stored in a PCLZF Bayer 8bit file and convert it to a pcl::PointCloud type.
344  * Note that, unless massively multithreaded, this will likely not result in a significant speedup and may even slow performance.
345  * \param[in] filename the file name to read the data from
346  * \param[in] num_threads The number of threads to use
347  * \param[out] cloud the resultant output point cloud
348  */
349  template <typename PointT> bool
350  readOMP (const std::string &filename, pcl::PointCloud<PointT> &cloud,
351  unsigned int num_threads=0);
352  };
353 
354  /** \brief PCL-LZF image format writer.
355  * The PCL-LZF image format is nothing else but a LZF-modified compression over
356  * an existing file type (e.g., PNG). However, in certain situations, like RGB data for
357  * example, an [RGBRGB...RGB] array will be first reordered into [RR...RGG...GBB...B]
358  * in order to ensure better compression.
359  *
360  * The current list of compressors/decompressors include:
361  * * LZF compressed 24-bit [RR...RGG...GBB...B] data
362  * * LZF compressed 8-bit Bayer data
363  * * LZF compressed 16-bit YUV422 data
364  * * LZF compressed 16-bit depth data
365  *
366  * Please note that files found using the above mentioned extensions will be treated
367  * as such. Inherit from this class and overwrite the I/O methods if you plan to change
368  * this behavior.
369  *
370  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
371  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
372  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
373  * provide the best score for the types of applications PCL is suited for.
374  *
375  * \author Radu B. Rusu
376  * \ingroup io
377  */
378  class PCL_EXPORTS LZFImageWriter
379  {
380  public:
381  /** Empty constructor */
383  /** Empty destructor */
384  virtual ~LZFImageWriter () {}
385 
386  /** \brief Save an image into PCL-LZF format. Virtual.
387  * \param[in] data the array holding the image
388  * \param[in] width the with of the data array
389  * \param[in] height the height of the data array
390  * \param[in] filename the file name to write
391  * \return true if operation successful, false otherwise
392  */
393  virtual bool
394  write (const char* data,
395  uint32_t width, uint32_t height,
396  const std::string &filename) = 0;
397 
398  /** \brief Write camera parameters to disk. Virtual.
399  * \param[in] parameters the camera parameters
400  * \param[in] filename the file name to write
401  * \return true if operation successful, false otherwise
402  */
403  virtual bool
404  writeParameters (const CameraParameters &parameters,
405  const std::string &filename) = 0;
406 
407  /** \brief Save an image and its camera parameters into PCL-LZF format.
408  * \param[in] data the array holding the image
409  * \param[in] width the with of the data array
410  * \param[in] height the height of the data array
411  * \param[in] parameters the camera parameters
412  * \param[in] filename_data the file name to write the data to
413  * \param[in] filename_xml the file name to write the parameters to
414  * \return true if operation successful, false otherwise
415  */
416  virtual bool
417  write (const char* data,
418  uint32_t width, uint32_t height,
419  const CameraParameters &parameters,
420  const std::string &filename_data,
421  const std::string &filename_xml)
422  {
423  bool res1 = write (data, width, height, filename_data);
424  bool res2 = writeParameters (parameters, filename_xml);
425  return (res1 && res2);
426  }
427 
428  /** \brief Write a single image/camera parameter to file, given an XML tag
429  * \param[in] parameter the value of the parameter to write
430  * \param[in] tag the value of the XML tag
431  * \param[in] filename the file name to write
432  * \return true if operation successful, false otherwise
433  * Example:
434  * \code
435  * pcl::io::LZFDepthImageWriter w;
436  * w.writeParameter (0.001, "depth.multiplication_factor", "parameters.xml");
437  * \endcode
438  */
439  bool
440  writeParameter (const double &parameter, const std::string &tag,
441  const std::string &filename);
442  protected:
443  /** \brief Save a compressed image array to disk
444  * \param[in] data the data to save
445  * \param[in] data_size the size of the data
446  * \param[in] filename the file name to write the data to
447  * \return true if operation successful, false otherwise
448  */
449  bool
450  saveImageBlob (const char* data, size_t data_size,
451  const std::string &filename);
452 
453  /** \brief Realtime LZF compression.
454  * \param[in] input the array to compress
455  * \param[in] input_size the size of the array to compress
456  * \param[in] width the with of the data array
457  * \param[in] height the height of the data array
458  * \param[in] image_type the type of the image to save. This should be an up to
459  * 16 characters string describing the data type. Examples are: "bayer8", "rgb24",
460  * "yuv422", "depth16".
461  * \param[out] output the compressed output array (must be pre-allocated!)
462  * \return the number of bytes in the output array
463  */
464  uint32_t
465  compress (const char* input, uint32_t input_size,
466  uint32_t width, uint32_t height,
467  const std::string &image_type,
468  char *output);
469  };
470 
471  /** \brief PCL-LZF 16-bit depth image format writer.
472  *
473  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
474  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
475  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
476  * provide the best score for the types of applications PCL is suited for.
477  *
478  * \author Radu B. Rusu
479  * \ingroup io
480  */
481  class PCL_EXPORTS LZFDepth16ImageWriter : public LZFImageWriter
482  {
483  public:
484  /** Empty constructor */
486  : LZFImageWriter ()
487  , z_multiplication_factor_ (0.001) // Set default multiplication factor
488  {}
489 
490  /** Empty destructor */
492 
493  /** \brief Save a 16-bit depth image into PCL-LZF format.
494  * \param[in] data the array holding the depth image
495  * \param[in] width the with of the data array
496  * \param[in] height the height of the data array
497  * \param[in] filename the file name to write (preferred extension: .pclzf)
498  * \return true if operation successful, false otherwise
499  */
500  virtual bool
501  write (const char* data,
502  uint32_t width, uint32_t height,
503  const std::string &filename);
504 
505  /** \brief Write camera parameters to disk.
506  * \param[in] parameters the camera parameters
507  * \param[in] filename the file name to write
508  * \return true if operation successful, false otherwise
509  * This overwrites the following parameters in the xml file, under the
510  * <depth> tag:
511  * <focal_length_x>...</focal_length_x>
512  * <focal_length_y>...</focal_length_y>
513  * <principal_point_x>...</principal_point_x>
514  * <principal_point_y>...</principal_point_y>
515  * <z_multiplication_factor>...</z_multiplication_factor>
516  */
517  virtual bool
518  writeParameters (const CameraParameters &parameters,
519  const std::string &filename);
520 
521  protected:
522  /** \brief Z-value depth multiplication factor
523  * (i.e., if raw data is in [mm] and we want [m], we need to multiply with 0.001)
524  */
526  };
527 
528  /** \brief PCL-LZF 24-bit RGB image format writer.
529  *
530  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
531  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
532  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
533  * provide the best score for the types of applications PCL is suited for.
534  *
535  * \author Radu B. Rusu
536  * \ingroup io
537  */
538  class PCL_EXPORTS LZFRGB24ImageWriter : public LZFImageWriter
539  {
540  public:
541  /** Empty constructor */
543  /** Empty destructor */
544  virtual ~LZFRGB24ImageWriter () {}
545 
546  /** \brief Save a 24-bit RGB image into PCL-LZF format.
547  * \param[in] data the array holding the RGB image (as [RGB..RGB] or [BGR..BGR])
548  * \param[in] width the with of the data array
549  * \param[in] height the height of the data array
550  * \param[in] filename the file name to write (preferred extension: .pclzf)
551  * \return true if operation successful, false otherwise
552  */
553  virtual bool
554  write (const char *data,
555  uint32_t width, uint32_t height,
556  const std::string &filename);
557 
558  /** \brief Write camera parameters to disk.
559  * \param[in] parameters the camera parameters
560  * \param[in] filename the file name to write
561  * \return true if operation successful, false otherwise
562  */
563  virtual bool
564  writeParameters (const CameraParameters &parameters,
565  const std::string &filename);
566 
567  protected:
568  };
569 
570  /** \brief PCL-LZF 16-bit YUV422 image format writer.
571  *
572  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
573  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
574  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
575  * provide the best score for the types of applications PCL is suited for.
576  *
577  * \author Radu B. Rusu
578  * \ingroup io
579  */
580  class PCL_EXPORTS LZFYUV422ImageWriter : public LZFRGB24ImageWriter
581  {
582  public:
583  /** Empty constructor */
585  /** Empty destructor */
586  virtual ~LZFYUV422ImageWriter () {}
587 
588  /** \brief Save a 16-bit YUV422 image into PCL-LZF format.
589  * \param[in] data the array holding the YUV422 image (as [YUYV...YUYV])
590  * \param[in] width the with of the data array
591  * \param[in] height the height of the data array
592  * \param[in] filename the file name to write (preferred extension: .pclzf)
593  * \return true if operation successful, false otherwise
594  */
595  virtual bool
596  write (const char *data,
597  uint32_t width, uint32_t height,
598  const std::string &filename);
599  };
600 
601  /** \brief PCL-LZF 8-bit Bayer image format writer.
602  *
603  * The main advantage of using the PCL-LZF image I/O routines is a very good file size
604  * versus I/O speed ratio. Tests performed using LZF, Snappy, ZIP, GZ2, BZIP2, as well
605  * as PNG, JPEG, and TIFF compression have shown that the internal PCL LZF methods
606  * provide the best score for the types of applications PCL is suited for.
607  *
608  * \author Radu B. Rusu
609  * \ingroup io
610  */
611  class PCL_EXPORTS LZFBayer8ImageWriter : public LZFRGB24ImageWriter
612  {
613  public:
614  /** Empty constructor */
616  /** Empty destructor */
617  virtual ~LZFBayer8ImageWriter () {}
618 
619  /** \brief Save a 8-bit Bayer image into PCL-LZF format.
620  * \param[in] data the array holding the 8-bit Bayer array
621  * \param[in] width the with of the data array
622  * \param[in] height the height of the data array
623  * \param[in] filename the file name to write (preferred extension: .pclzf)
624  * \return true if operation successful, false otherwise
625  */
626  virtual bool
627  write (const char *data,
628  uint32_t width, uint32_t height,
629  const std::string &filename);
630  };
631  }
632 }
633 
634 #include <pcl/io/impl/lzf_image_io.hpp>
635 
636 #endif //#ifndef PCL_LZF_IMAGE_IO_H_
PCL-LZF 24-bit RGB image format reader.
Definition: lzf_image_io.h:241
PCL-LZF 24-bit RGB image format writer.
Definition: lzf_image_io.h:538
PCL-LZF image format writer.
Definition: lzf_image_io.h:378
PCL-LZF image format reader.
Definition: lzf_image_io.h:86
~LZFBayer8ImageReader()
Empty destructor.
Definition: lzf_image_io.h:334
virtual bool write(const char *data, uint32_t width, uint32_t height, const CameraParameters &parameters, const std::string &filename_data, const std::string &filename_xml)
Save an image and its camera parameters into PCL-LZF format.
Definition: lzf_image_io.h:417
double z_multiplication_factor_
Z-value depth multiplication factor (i.e., if raw data is in [mm] and we want [m], we need to multiply with 0.001)
Definition: lzf_image_io.h:525
PCL-LZF 16-bit depth image format writer.
Definition: lzf_image_io.h:481
LZFRGB24ImageReader()
Empty constructor.
Definition: lzf_image_io.h:247
Basic camera parameters placeholder.
Definition: lzf_image_io.h:50
LZFDepth16ImageWriter()
Empty constructor.
Definition: lzf_image_io.h:485
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
Definition: region_xy.h:47
virtual ~LZFImageReader()
Empty destructor.
Definition: lzf_image_io.h:92
PCL-LZF 8-bit Bayer image format reader.
Definition: lzf_image_io.h:326
virtual ~LZFRGB24ImageWriter()
Empty destructor.
Definition: lzf_image_io.h:544
uint32_t getWidth() const
Get the image width as read from disk.
Definition: lzf_image_io.h:118
void setParameters(const CameraParameters &parameters)
Read the parameters from a struct instead.
Definition: lzf_image_io.h:103
~LZFYUV422ImageReader()
Empty destructor.
Definition: lzf_image_io.h:296
std::string image_type_identifier_
The image type string, as read from the file.
Definition: lzf_image_io.h:171
virtual ~LZFBayer8ImageWriter()
Empty destructor.
Definition: lzf_image_io.h:617
virtual bool readParameters(std::istream &)
Read camera parameters from a given stream and store them internally.
Definition: lzf_image_io.h:142
PCL-LZF 8-bit Bayer image format reader.
Definition: lzf_image_io.h:288
CameraParameters parameters_
Internal set of camera parameters.
Definition: lzf_image_io.h:174
LZFDepth16ImageReader()
Empty constructor.
Definition: lzf_image_io.h:193
PCL-LZF 16-bit YUV422 image format writer.
Definition: lzf_image_io.h:580
virtual ~LZFYUV422ImageWriter()
Empty destructor.
Definition: lzf_image_io.h:586
virtual ~LZFDepth16ImageWriter()
Empty destructor.
Definition: lzf_image_io.h:491
PCL-LZF 16-bit depth image format reader.
Definition: lzf_image_io.h:187
std::string getImageType() const
Get the type of the image read from disk.
Definition: lzf_image_io.h:132
PointCloud represents the base class in PCL for storing collections of 3D points. ...
virtual ~LZFRGB24ImageReader()
Empty destructor.
Definition: lzf_image_io.h:249
virtual bool readParameters(std::istream &is)
Read camera parameters from a given stream and store them internally.
virtual ~LZFImageWriter()
Empty destructor.
Definition: lzf_image_io.h:384
bool readParameters(const std::string &filename)
Read camera parameters from a given file and store them internally.
CameraParameters getParameters() const
Get the camera parameters currently being used returns a CameraParameters struct. ...
Definition: lzf_image_io.h:111
void write(std::ostream &stream, Type value)
Function for writing data to a stream.
Definition: region_xy.h:64
LZFYUV422ImageWriter()
Empty constructor.
Definition: lzf_image_io.h:584
uint32_t width_
The image width, as read from the file.
Definition: lzf_image_io.h:165
virtual ~LZFDepth16ImageReader()
Empty destructor.
Definition: lzf_image_io.h:199
uint32_t height_
The image height, as read from the file.
Definition: lzf_image_io.h:168
double z_multiplication_factor_
Z-value depth multiplication factor (i.e., if raw data is in [mm] and we want [m], we need to multiply with 0.001)
Definition: lzf_image_io.h:228
LZFRGB24ImageWriter()
Empty constructor.
Definition: lzf_image_io.h:542
LZFBayer8ImageWriter()
Empty constructor.
Definition: lzf_image_io.h:615
uint32_t getHeight() const
Get the image height as read from disk.
Definition: lzf_image_io.h:125
LZFImageWriter()
Empty constructor.
Definition: lzf_image_io.h:382
LZFYUV422ImageReader()
Empty constructor.
Definition: lzf_image_io.h:294
LZFBayer8ImageReader()
Empty constructor.
Definition: lzf_image_io.h:332
PCL-LZF 8-bit Bayer image format writer.
Definition: lzf_image_io.h:611