OrbbecSDK 2.6.3
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
ob::FrameSet Class Reference

Define the FrameSet class, which inherits from the Frame class. More...

#include <Frame.hpp>

Inheritance diagram for ob::FrameSet:

Public Member Functions

 FrameSet (const ob_frame *impl)
 ~FrameSet () noexcept override=default
uint32_t getCount () const
 Get the number of frames in the FrameSet.
std::shared_ptr< FramegetFrame (OBFrameType frameType) const
 Get a frame of a specific type from the FrameSet.
std::shared_ptr< FramegetFrameByIndex (uint32_t index) const
 Get a frame at a specific index from the FrameSet.
void pushFrame (std::shared_ptr< const Frame > frame) const
 Push a frame to the FrameSet.
std::shared_ptr< DepthFramegetDepthFrame () const
 Get the depth frame from the frameset.
std::shared_ptr< ColorFramegetColorFrame () const
 Get the color frame from the frameset.
std::shared_ptr< IRFramegetIrFrame () const
 Get the infrared frame from the frameset.
std::shared_ptr< PointsFramegetPointsFrame () const
 Get the point cloud frame from the frameset.
uint32_t frameCount () const
std::shared_ptr< DepthFramedepthFrame () const
std::shared_ptr< ColorFramecolorFrame () const
std::shared_ptr< IRFrameirFrame () const
std::shared_ptr< PointsFramepointsFrame () const
std::shared_ptr< FramegetFrame (int index) const
Public Member Functions inherited from ob::Frame
 Frame (const ob_frame *impl)
 Construct a new Frame object with a given pointer to the internal frame object.
const ob_framegetImpl () const
 Get the internal (impl) frame object.
virtual ~Frame () noexcept
 Destroy the Frame object.
virtual OBFrameType getType () const
 Get the type of frame.
virtual OBFormat getFormat () const
 Get the format of the frame.
virtual uint64_t getIndex () const
 Get the sequence number of the frame.
virtual uint8_t * getData () const
 Get frame data.
virtual uint32_t getDataSize () const
 Get the size of the frame data.
uint64_t getTimeStampUs () const
 Get the hardware timestamp of the frame in microseconds.
uint64_t getSystemTimeStampUs () const
 Get the system timestamp of the frame in microseconds.
uint64_t getGlobalTimeStampUs () const
 Get the global timestamp of the frame in microseconds.
uint8_t * getMetadata () const
 Get the metadata pointer of the frame.
uint32_t getMetadataSize () const
 Get the size of the metadata of the frame.
bool hasMetadata (OBFrameMetadataType type) const
 Check if the frame object has metadata of a given type.
int64_t getMetadataValue (OBFrameMetadataType type) const
 Get the metadata value.
std::shared_ptr< StreamProfilegetStreamProfile () const
 get StreamProfile of the frame
std::shared_ptr< SensorgetSensor () const
 get owner sensor of the frame
std::shared_ptr< DevicegetDevice () const
 get owner device of the frame
template<typename T>
bool is () const
 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.
template<typename T>
std::shared_ptr< const T > as () const
 Convert the frame object to a target type.
void copyFrameInfo (std::shared_ptr< const Frame > srcFrame)
 Copy the information of the source frame object to the destination frame object.
void setSystemTimestampUs (uint64_t systemTimestampUs)
 Set the system timestamp of the frame in microseconds.
void updateData (const uint8_t *data, uint32_t dataSize)
 Update the data of a frame.
void updateMetadata (const uint8_t *metadata, uint32_t metadataSize)
 Update the metadata of the frame.
void setStreamProfile (std::shared_ptr< const StreamProfile > profile)
 Set (override) the stream profile of the frame.
OBFrameType type () const
virtual OBFormat format () const
virtual uint64_t index () const
virtual void * data () const
virtual uint32_t dataSize () const
uint64_t timeStamp () const
uint64_t timeStampUs () const
uint64_t systemTimeStamp () const
uint64_t systemTimeStampUs () const
uint64_t globalTimeStampUs () const
uint8_t * metadata () const
uint32_t metadataSize () const

Additional Inherited Members

Protected Attributes inherited from ob::Frame
const ob_frameimpl_ = nullptr
 The pointer to the internal (c api level) frame object.

Detailed Description

Define the FrameSet class, which inherits from the Frame class.

A FrameSet is a container for multiple frames of different types.

Definition at line 905 of file Frame.hpp.

Constructor & Destructor Documentation

◆ FrameSet()

ob::FrameSet::FrameSet ( const ob_frame * impl)
inlineexplicit

Definition at line 908 of file Frame.hpp.

◆ ~FrameSet()

ob::FrameSet::~FrameSet ( )
overridedefaultnoexcept

Member Function Documentation

◆ getCount()

uint32_t ob::FrameSet::getCount ( ) const
inline

Get the number of frames in the FrameSet.

Returns
uint32_t The number of frames

Definition at line 917 of file Frame.hpp.

Referenced by frameCount(), and getCount().

◆ getFrame() [1/2]

std::shared_ptr< Frame > ob::FrameSet::getFrame ( OBFrameType frameType) const
inline

Get a frame of a specific type from the FrameSet.

Parameters
[in]frameTypeThe type of sensor
Returns
std::shared_ptr<Frame> The corresponding type of frame

Definition at line 931 of file Frame.hpp.

Referenced by colorFrame(), depthFrame(), irFrame(), and pointsFrame().

◆ getFrameByIndex()

std::shared_ptr< Frame > ob::FrameSet::getFrameByIndex ( uint32_t index) const
inline

Get a frame at a specific index from the FrameSet.

Parameters
[in]indexThe index of the frame
Returns
std::shared_ptr<Frame> The frame at the specified index

Definition at line 948 of file Frame.hpp.

Referenced by getFrame().

◆ pushFrame()

void ob::FrameSet::pushFrame ( std::shared_ptr< const Frame > frame) const
inline

Push a frame to the FrameSet.

Attention
If the FrameSet contains the same type of frame, the new frame will replace the old one.
Parameters
[in]frameThe frame to be pushed

Definition at line 965 of file Frame.hpp.

◆ getDepthFrame()

std::shared_ptr< DepthFrame > ob::FrameSet::getDepthFrame ( ) const
inline

Get the depth frame from the frameset.

Returns
std::shared_ptr<DepthFrame> Return the depth frame.

Definition at line 982 of file Frame.hpp.

◆ getColorFrame()

std::shared_ptr< ColorFrame > ob::FrameSet::getColorFrame ( ) const
inline

Get the color frame from the frameset.

Returns
std::shared_ptr<ColorFrame> Return the color frame.

Definition at line 997 of file Frame.hpp.

◆ getIrFrame()

std::shared_ptr< IRFrame > ob::FrameSet::getIrFrame ( ) const
inline

Get the infrared frame from the frameset.

Returns
std::shared_ptr<IRFrame> Return the infrared frame.

Definition at line 1012 of file Frame.hpp.

◆ getPointsFrame()

std::shared_ptr< PointsFrame > ob::FrameSet::getPointsFrame ( ) const
inline

Get the point cloud frame from the frameset.

Returns
std::shared_ptr<PointsFrame> Return the point cloud frame.

Definition at line 1027 of file Frame.hpp.

◆ frameCount()

uint32_t ob::FrameSet::frameCount ( ) const
inline

Definition at line 1039 of file Frame.hpp.

◆ depthFrame()

std::shared_ptr< DepthFrame > ob::FrameSet::depthFrame ( ) const
inline

Definition at line 1043 of file Frame.hpp.

Referenced by depthFrame().

◆ colorFrame()

std::shared_ptr< ColorFrame > ob::FrameSet::colorFrame ( ) const
inline

Definition at line 1052 of file Frame.hpp.

Referenced by colorFrame().

◆ irFrame()

std::shared_ptr< IRFrame > ob::FrameSet::irFrame ( ) const
inline

Definition at line 1061 of file Frame.hpp.

Referenced by irFrame().

◆ pointsFrame()

std::shared_ptr< PointsFrame > ob::FrameSet::pointsFrame ( ) const
inline

Definition at line 1072 of file Frame.hpp.

Referenced by pointsFrame().

◆ getFrame() [2/2]

std::shared_ptr< Frame > ob::FrameSet::getFrame ( int index) const
inline

Definition at line 1081 of file Frame.hpp.


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