OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
ob::Frame Class Reference

#include <Frame.hpp>

+ Inheritance diagram for ob::Frame:

Public Member Functions

 Frame (std::unique_ptr< FrameImpl > impl)
 
 Frame (Frame &frame)
 
virtual ~Frame () noexcept
 
virtual OBFrameType type ()
 Get the type of frame.
 
virtual OBFormat format ()
 Get the format of the frame.
 
virtual uint64_t index ()
 Get the sequence number of the frame.
 
virtual void * data ()
 Get the frame data.
 
virtual uint32_t dataSize ()
 Get the size of the frame data.
 
uint64_t timeStamp ()
 Get the hardware timestamp of the frame in milliseconds.
 
uint64_t timeStampUs ()
 Get the hardware timestamp of the frame in microseconds.
 
uint64_t systemTimeStamp ()
 Get the system timestamp of the frame in milliseconds.
 
uint64_t systemTimeStampUs ()
 Get the system timestamp of the frame in microseconds.
 
uint64_t globalTimeStampUs ()
 Get the global timestamp of the frame in microseconds.
 
void * metadata ()
 Get the metadata of the frame.
 
uint32_t metadataSize ()
 Get the size of the metadata of the frame.
 
bool hasMetadata (OBFrameMetadataType type)
 Check if the frame object has metadata of a given type.
 
int64_t getMetadataValue (OBFrameMetadataType type)
 Get the metadata value.
 
std::shared_ptr< StreamProfilegetStreamProfile ()
 get StreamProfile of the frame
 
std::shared_ptr< SensorgetSensor ()
 get owner sensor of the frame
 
std::shared_ptr< DevicegetDevice ()
 get owner device of the frame
 
template<typename T >
bool is ()
 Check if the runtime type of the frame object is compatible with a given type.
 
template<typename T >
std::shared_ptr< T > as ()
 Convert the frame object to a target type.
 

Protected Attributes

std::unique_ptr< FrameImpl > impl_
 

Friends

class Filter
 
class Recorder
 
class FrameHelper
 
class CoordinateTransformHelper
 

Detailed Description

Definition at line 42 of file Frame.hpp.

Constructor & Destructor Documentation

◆ Frame() [1/2]

ob::Frame::Frame ( std::unique_ptr< FrameImpl >  impl)
explicit

◆ Frame() [2/2]

ob::Frame::Frame ( Frame frame)

◆ ~Frame()

virtual ob::Frame::~Frame ( )
virtualnoexcept

Member Function Documentation

◆ type()

virtual OBFrameType ob::Frame::type ( )
virtual

Get the type of frame.

Returns
OBFrameType The type of frame.

◆ format()

virtual OBFormat ob::Frame::format ( )
virtual

Get the format of the frame.

Returns
OBFormat The format of the frame.

◆ index()

virtual uint64_t ob::Frame::index ( )
virtual

Get the sequence number of the frame.

Returns
uint64_t The sequence number of the frame.

◆ data()

virtual void * ob::Frame::data ( )
virtual

Get the frame data.

Returns
void* The frame data.

◆ dataSize()

virtual uint32_t ob::Frame::dataSize ( )
virtual

Get the size of the frame data.

Returns
uint32_t The size of the frame data. For point cloud data, this returns the number of bytes occupied by all point sets. To find the number of points, divide the dataSize by the structure size of the corresponding point type.

◆ timeStamp()

uint64_t ob::Frame::timeStamp ( )

Get the hardware timestamp of the frame in milliseconds.

The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.

Returns
uint64_t The hardware timestamp of the frame in milliseconds.

◆ timeStampUs()

uint64_t ob::Frame::timeStampUs ( )

Get the hardware timestamp of the frame in microseconds.

The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.

Returns
uint64_t The hardware timestamp of the frame in microseconds.

◆ systemTimeStamp()

uint64_t ob::Frame::systemTimeStamp ( )

Get the system timestamp of the frame in milliseconds.

The system timestamp is the time point when the frame was received by the host, on host clock domain.

Returns
uint64_t The system timestamp of the frame in milliseconds.

◆ systemTimeStampUs()

uint64_t ob::Frame::systemTimeStampUs ( )

Get the system timestamp of the frame in microseconds.

The system timestamp is the time point when the frame was received by the host, on host clock domain.

Returns
uint64_t The system timestamp of the frame in microseconds.

◆ globalTimeStampUs()

uint64_t ob::Frame::globalTimeStampUs ( )

Get the global timestamp of the frame in microseconds.

The global timestamp is the time point when the frame was was captured by the device, and has been converted to the host clock domain. The conversion process base on the device timestamp and can eliminate the timer drift of the device

Attention
Only some devices support getting the global timestamp. If the device does not support it, this function will return 0. Check the device support status by Device::isGlobalTimestampSupported() function.
Returns
uint64_t The global timestamp of the frame in microseconds.

◆ metadata()

void * ob::Frame::metadata ( )

Get the metadata of the frame.

Returns
void* The metadata of the frame.

◆ metadataSize()

uint32_t ob::Frame::metadataSize ( )

Get the size of the metadata of the frame.

Returns
uint32_t The size of the metadata of the frame.

◆ hasMetadata()

bool ob::Frame::hasMetadata ( OBFrameMetadataType  type)

Check if the frame object has metadata of a given type.

Parameters
typeThe metadata type. refer to OBFrameMetadataType
Returns
bool The result.

◆ getMetadataValue()

int64_t ob::Frame::getMetadataValue ( OBFrameMetadataType  type)

Get the metadata value.

Parameters
typeThe metadata type. refer to OBFrameMetadataType
Returns
int64_t The metadata value.

◆ getStreamProfile()

std::shared_ptr< StreamProfile > ob::Frame::getStreamProfile ( )

get StreamProfile of the frame

Returns
std::shared_ptr<StreamProfile> The StreamProfile of the frame, may return nullptr if the frame is not captured from a stream.

◆ getSensor()

std::shared_ptr< Sensor > ob::Frame::getSensor ( )

get owner sensor of the frame

Returns
std::shared_ptr<Sensor> The owner sensor of the frame, return nullptr if the frame is not owned by any sensor or the sensor is destroyed

◆ getDevice()

std::shared_ptr< Device > ob::Frame::getDevice ( )

get owner device of the frame

Returns
std::shared_ptr<Device> The owner device of the frame, return nullptr if the frame is not owned by any device or the device is destroyed

◆ is()

template<typename T >
bool ob::Frame::is

Check if the runtime type of the frame object is compatible with a given type.

Template Parameters
TThe given type.
Returns
bool The result.

Definition at line 512 of file Frame.hpp.

◆ as()

template<typename T >
std::shared_ptr< T > ob::Frame::as ( )
inline

Convert the frame object to a target type.

Template Parameters
TThe target type.
Returns
std::shared_ptr<T> The result. If it cannot be converted, an exception will be thrown.

Definition at line 198 of file Frame.hpp.

Friends And Related Symbol Documentation

◆ Filter

friend class Filter
friend

Definition at line 207 of file Frame.hpp.

◆ Recorder

friend class Recorder
friend

Definition at line 208 of file Frame.hpp.

◆ FrameHelper

friend class FrameHelper
friend

Definition at line 209 of file Frame.hpp.

◆ CoordinateTransformHelper

friend class CoordinateTransformHelper
friend

Definition at line 210 of file Frame.hpp.

Member Data Documentation

◆ impl_

std::unique_ptr<FrameImpl> ob::Frame::impl_
protected

Definition at line 44 of file Frame.hpp.


The documentation for this class was generated from the following file: