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