rvl_codec.h
Go to the documentation of this file.
1 // The following code is a C++ wrapper of the code presented by
2 // Andrew D. Wilson in "Fast Lossless Depth Image Compression" at SIGCHI'17.
3 // The original code is licensed under the MIT License.
4 
5 #ifndef RVL_CODEC_H_
6 #define RVL_CODEC_H_
7 
8 #include <cstdint>
9 #include "rtabmap/core/rtabmap_core_export.h"
10 
11 namespace rtabmap
12 {
13 
14 class RTABMAP_CORE_EXPORT RvlCodec {
15 public:
16  RvlCodec();
17  // Compress input data into output. The size of output can be equal to (1.5 * numPixels + 4) in the worst case.
18  int CompressRVL(const uint16_t * input, unsigned char * output, int numPixels);
19  // Decompress input data into output. The size of output must be equal to numPixels.
20  void DecompressRVL(const unsigned char * input, uint16_t * output, int numPixels);
21 
22 private:
23  RvlCodec(const RvlCodec &);
24  RvlCodec & operator=(const RvlCodec &);
25 
26  void EncodeVLE(int value);
27  int DecodeVLE();
28 
29  int *buffer_;
30  int *pBuffer_;
31  int word_;
33 };
34 
35 } // namespace rtabmap
36 
37 #endif // RVL_CODEC_H_
rtabmap::RvlCodec::pBuffer_
int * pBuffer_
Definition: rvl_codec.h:30
rtabmap::RvlCodec::nibblesWritten_
int nibblesWritten_
Definition: rvl_codec.h:32
uint16_t
::uint16_t uint16_t
rtabmap::RvlCodec::word_
int word_
Definition: rvl_codec.h:31
rtabmap::RvlCodec
Definition: rvl_codec.h:14
rtabmap::RvlCodec::buffer_
int * buffer_
Definition: rvl_codec.h:29
rtabmap
Definition: CameraARCore.cpp:35
value
value


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Feb 13 2025 03:44:59