Class PngLidarFrameEncoder¶
Defined in File png_lidarframe_encoder.h
Inheritance Relationships¶
Base Type¶
public ouster::sdk::osf::LidarFrameEncoderClass LidarFrameEncoder
Class Documentation¶
-
class PngLidarFrameEncoder : public ouster::sdk::osf::LidarFrameEncoder¶
Encoder for lidar frame fields into PNG format.
This class implements the LidarFrameEncoder interface to encode lidar frame fields into PNG format, supporting various bit depths and destaggering options.
Public Functions
-
inline PngLidarFrameEncoder(int compression_amount)¶
Construct a PngLidarFrameEncoder with a specified compression level.
- Parameters:
compression_amount[in] Compression level passed to zlib (0 = none, 9 = max).
-
virtual FrameChannelData encode_field(const ouster::sdk::core::Field &field, const std::vector<int> &px_offset = {}) const override¶
This method encodes a field, if px_offset is provided it is destaggered before encoding.
- Parameters:
field[in] The field to encode (e.g., RANGE, SIGNAL).
px_offset[in] Optional pixel offsets for destaggering the data.
- Throws:
std::runtime_error – If encoding fails (e.g., invalid field shape, unsupported field type, or backend encoding errors).
- Returns:
Encoded binary data representing the field.
-
inline PngLidarFrameEncoder(int compression_amount)¶