Class PointcloudEncoder

Class Documentation

class PointcloudEncoder

PointcloudEncoder is used to encode a point cloud into a compressed format.

The encoder uses two stages of compression:

  1. First stage: applies lossy or lossless compression to the fields of the point cloud.

  2. Second stage: applies general-purpose compression (LZ4 or ZSTD) to the entire point cloud data.

Public Functions

PointcloudEncoder(const EncodingInfo &info)
size_t encode(ConstBufferView cloud_data, std::vector<uint8_t> &output)

Encode the point cloud data into a compressed format.

Parameters:
  • cloud_data – The input point cloud data to be encoded.

  • output – The output buffer to store the compressed data. It will be resized to fit the encoded data.

Returns:

The size of the encoded data.

size_t encode(ConstBufferView cloud_data, BufferView &output, bool write_header)
inline const EncodingInfo &getEncodingInfo() const
inline const std::vector<uint8_t> &getHeader() const
~PointcloudEncoder()