DvsenseDriver  1.3.0
The SDK for dvsense products.
Loading...
Searching...
No Matches
dvsense::ApsFrame Class Reference

Contiguous BGR888 APS image with exposure timestamps. More...

#include <ApsTypes.h>

Public Member Functions

 ApsFrame (int width=3840, int height=2160, TimeStamp start_ts=0, TimeStamp end_ts=0)
 ApsFrame (int width, int height, TimeStamp start_ts, TimeStamp end_ts, uint8_t *external_data, size_t data_size, bool own_data=false)
 Wrap external BGR888 pixels, optionally copying them.
 ApsFrame (int width, int height, TimeStamp start_ts, TimeStamp end_ts, std::shared_ptr< std::vector< uint8_t > > shared_data)
 Retain shared BGR888 storage without copying pixels.
 ApsFrame (const ApsFrame &other)
ApsFrame & operator= (const ApsFrame &other)
ApsFrame clone () const
 Return a deep copy with independent pixel storage.
uint8_t * data ()
const uint8_t * data () const
size_t getDataSize () const
int width () const
int height () const
ApsPixelType pixelType () const

Public Attributes

TimeStamp exposure_start_timestamp
TimeStamp exposure_end_timestamp

Detailed Description

Contiguous BGR888 APS image with exposure timestamps.

Copying a frame shares pixel storage; use clone() for an independent deep copy. Borrowed external storage must remain valid for every frame using it.

Constructor & Destructor Documentation

◆ ApsFrame() [1/4]

dvsense::ApsFrame::ApsFrame ( int width = 3840,
int height = 2160,
TimeStamp start_ts = 0,
TimeStamp end_ts = 0 )

◆ ApsFrame() [2/4]

dvsense::ApsFrame::ApsFrame ( int width,
int height,
TimeStamp start_ts,
TimeStamp end_ts,
uint8_t * external_data,
size_t data_size,
bool own_data = false )

Wrap external BGR888 pixels, optionally copying them.

own_data=false borrows the pointer; own_data=true copies pixels without taking ownership of the supplied pointer. The input must contain at least width * height * 3 bytes.

◆ ApsFrame() [3/4]

dvsense::ApsFrame::ApsFrame ( int width,
int height,
TimeStamp start_ts,
TimeStamp end_ts,
std::shared_ptr< std::vector< uint8_t > > shared_data )

Retain shared BGR888 storage without copying pixels.

shared_data must be non-null, contain at least width * height * 3 bytes, and must not be reallocated while any frame refers to it.

◆ ApsFrame() [4/4]

dvsense::ApsFrame::ApsFrame ( const ApsFrame & other)

Member Function Documentation

◆ operator=()

ApsFrame & dvsense::ApsFrame::operator= ( const ApsFrame & other)

◆ clone()

ApsFrame dvsense::ApsFrame::clone ( ) const

Return a deep copy with independent pixel storage.

◆ data() [1/2]

uint8_t * dvsense::ApsFrame::data ( )

◆ data() [2/2]

const uint8_t * dvsense::ApsFrame::data ( ) const

◆ getDataSize()

size_t dvsense::ApsFrame::getDataSize ( ) const

◆ width()

int dvsense::ApsFrame::width ( ) const

◆ height()

int dvsense::ApsFrame::height ( ) const

◆ pixelType()

ApsPixelType dvsense::ApsFrame::pixelType ( ) const

Member Data Documentation

◆ exposure_start_timestamp

TimeStamp dvsense::ApsFrame::exposure_start_timestamp

◆ exposure_end_timestamp

TimeStamp dvsense::ApsFrame::exposure_end_timestamp