Buffer

Just a good old buffer. All other messages derive from the Buffer class.

Reference

class depthai.Buffer

Base message - buffer of binary data

getData(self: object) → numpy.ndarray[numpy.uint8]
Returns

Reference to internal buffer

getRaw(self: depthai.ADatatype)depthai.RawBuffer
setData(*args, **kwargs)

Overloaded function.

  1. setData(self: depthai.Buffer, arg0: List[int]) -> None

Parameter data:

Copies data to internal buffer

  1. setData(self: depthai.Buffer, arg0: numpy.ndarray[numpy.uint8]) -> None

Parameter data:

Copies data to internal buffer

class dai::Buffer : public dai::ADatatype

Base message - buffer of binary data.

Subclassed by dai::CameraControl, dai::ImageManipConfig, dai::ImgDetections, dai::ImgFrame, dai::IMUData, dai::NNData, dai::SpatialImgDetections, dai::SpatialLocationCalculatorConfig, dai::SpatialLocationCalculatorData, dai::SystemInformation, dai::Tracklets

Public Functions

Buffer()

Creates Buffer message.

Buffer(std::shared_ptr<dai::RawBuffer> ptr)
~Buffer() = default
std::vector<std::uint8_t> &getData()

Return

Reference to internal buffer

void setData(std::vector<std::uint8_t> data)

Parameters
  • data: Copies data to internal buffer

Private Functions

std::shared_ptr<dai::RawBuffer> serialize() const

Got questions?

We’re always happy to help with code or other questions you might have.