OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::RgbFrame

RGB24 false-color frame without alpha channel. Useful when the consumer expects packed 3-byte pixels (e.g. V4L2, JPEG encoding). For display on Windows/GPU prefer BgraFrame (BGRA8) instead.

Public functions

RgbFrame

RgbFrame()=default

RgbFrame

RgbFrame(uint32_t width, uint32_t height)

GetWidth

auto GetWidth() const -> uint32_t

GetHeight

auto GetHeight() const -> uint32_t

GetStride

auto GetStride() const -> uint32_t

Row stride in bytes (width * 3, no padding).

GetData

auto GetData() const -> const uint8_t *

RGB pixel buffer in row-major order, 3 bytes per pixel.

GetMutableData

auto GetMutableData() -> uint8_t *

Writable pixel buffer for the colorizer to fill.

GetDataSize

auto GetDataSize() const -> size_t

Size in bytes (width * height * 3).

GetMetadata

auto GetMetadata() const -> const FrameMetadata &

The capture this picture was drawn from. See BgraFrame::GetMetadata() -- this is the same picture in 24-bit, converted from the same buffer in the same call, so it carries the same identity.

Read HasMetadata() first. sequence defaults to 0 and 0 is the first frame of the stream, so no value here can mean "nobody said".

HasMetadata

auto HasMetadata() const -> bool

Whether the SDK marked this picture with the capture above.

SetMetadata

auto SetMetadata(const FrameMetadata &metadata) -> void

Mark this picture as drawn from metadata's capture.

Resize

auto Resize(uint32_t width, uint32_t height) -> void

Reallocates the internal buffer; invalidates all pointers. Leaves the metadata alone.