ImFusion SDK 4.3
RGBDFrame Class Reference

#include <RGBD/Include/ImFusion/RGBD/RGBDStream.h>

Class for representing RGBD image. More...

+ Inheritance diagram for RGBDFrame:

Detailed Description

Class for representing RGBD image.

Stores color, depth, and infrared images, as well as pose and timestamps. Used for encapsulating a single RGB-D frame from a stream.

Objects of this class should be emitted in the signal signalStreamData of RGBDStream inside the doWork() method.

Public Member Functions

 RGBDFrame (RGBDStream *stream, TypedImage< unsigned char > *colorImg=nullptr, TypedImage< float > *depthImg=nullptr, TypedImage< unsigned short > *irImg=nullptr, mat4 *T=nullptr)
 Constructs an RGBDFrame from raw images and pose.
 
 RGBDFrame (RGBDStream *stream, const std::shared_ptr< const SharedImage > &colorImg=nullptr, const std::shared_ptr< const SharedImage > &depthImg=nullptr, const std::shared_ptr< const SharedImage > &irImg=nullptr, mat4 *T=nullptr)
 Constructs an RGBDFrame from shared images and pose.
 
const TypedImage< unsigned char > * colorImage () const
 Returns the color image.
 
const TypedImage< float > * depthImage () const
 Returns the depth image.
 
const TypedImage< unsigned short > * infraredImage () const
 Returns the infrared image.
 
const mat4 * pose () const
 Returns the pose.
 
void setPose (const mat4 &T)
 Sets the pose.
 
void setTimestampColor (uint64_t t)
 Sets the color frame timestamp (ms since epoch).
 
void setTimestampDepth (uint64_t t)
 Sets the depth frame timestamp (ms since epoch).
 
uint64_t timestampColor () const
 Returns the color frame timestamp (ms since epoch).
 
uint64_t timestampDepth () const
 Returns the depth frame timestamp (ms since epoch).
 
- Public Member Functions inherited from ImageStreamData
 ImageStreamData (Stream *stream)
 Creates an empty ImageStreamData object with the given stream.
 
 ImageStreamData (Stream *stream, SharedImageSet &&imageSet)
 Moves the images and (possibly per element) components into the newly created object.
 
 ImageStreamData (Stream *stream, std::unique_ptr< SharedImage > &&img)
 Moves the single image into the newly created object.
 
 ImageStreamData (Stream *stream, const std::shared_ptr< SharedImage > &img)
 Shallow-copies the single image into the newly created object.
 
 ImageStreamData (Stream *stream, const std::shared_ptr< const SharedImage > &img)
 Shallow-copies the single image into the newly created object.
 
 ImageStreamData (Stream *stream, MemImage *img)
 Deprecated constructor. Creates an ImageStreamData object with the given stream and image.
 
virtual void setImageSet (const SharedImageSet &imageSet)
 Sets the images and (possibly per element) components into this object, replacing all existing images and components.
 
virtual void setImages (const std::vector< std::shared_ptr< const SharedImage > > &sharedImages)
 Sets the images into this object, replacing all existing images. Does not modify components.
 
virtual std::vector< std::shared_ptr< const SharedImage > > images2 () const
 Return all images contained in sample.
 
std::shared_ptr< SharedImageSetshallowCloneToSharedImageSet () const
 Return all images and (possibly per element) DataComponents contained in sample.
 
std::unique_ptr< StreamDataclone () const override
 
int size () const
 Return the number of images in the stream data.
 
bool containsGlImage () const
 Returns whether any of the images contains an OpenGL image and thus requires synchronization if moved to a thread different from the signaling thread.
 
const DataComponentListcomponents (int i) const
 Returns the DataComponents associated to the element with that index.
 
const DataComponentListcomponents () const
 Returns the list of DataComponents for this data.
 
DataComponentListcomponents ()
 Returns the list of DataComponents for this data.
 
- Public Member Functions inherited from StreamData
virtual Streamstream () const
 Returns the stream object which updates this data.
 
virtual unsigned long long timestampDevice () const
 Timestamp in milliseconds. Set by the streaming device.
 
virtual void setTimestampDevice (unsigned long long time)
 Set timestamp provided by the streaming device, in milliseconds.
 
virtual unsigned long long timestampArrival () const
 Timestamp in milliseconds. Based on message's arrival time.
 
virtual void setTimestampArrival (std::chrono::system_clock::time_point time)
 Set the system time when this streamData was arrived. It will be stored in milliseconds relative to epoch time.
 
virtual void setTimestampArrival (unsigned long long time)
 Set arrival timestamp manually, in milliseconds.
 
const DataComponentListcomponents () const
 Returns the list of DataComponents for this data.
 
DataComponentListcomponents ()
 Returns the list of DataComponents for this data.
 
template<typename StreamDataClass>
const StreamDataClass * typed () const
 
- Public Member Functions inherited from ElementwiseDataComponentData
ElementwiseDataComponentListelementwiseComponents ()
 Returns elementwise data component list.
 
const ElementwiseDataComponentListelementwiseComponents () const
 Returns elementwise data component list.
 
DataComponentListmutableComponents (int i)
 Returns the DataComponents associated to the element with that index, creating it if necessary.
 
const DataComponentListcomponents (int i) const
 Returns the DataComponents associated to the element with that index.
 

Protected Attributes

std::shared_ptr< const SharedImagem_colorImg
 Color image.
 
std::shared_ptr< const SharedImagem_depthImg
 Depth image.
 
std::shared_ptr< const SharedImagem_irImg
 Infrared image.
 
mat4 * m_T
 Pose.
 
uint64_t m_timestampColor
 Color frame timestamp.
 
uint64_t m_timestampDepth
 Depth frame timestamp.
 
- Protected Attributes inherited from ImageStreamData
std::vector< std::shared_ptr< const SharedImage > > m_sharedImages
 
- Protected Attributes inherited from StreamData
Streamm_stream
 The stream object which updates this data.
 
unsigned long long m_timestampDevice
 Timestamp of the streaming device, in milliseconds.
 
unsigned long long m_timestampArrival
 Timestamp when the data is received in ImFusion framework, in milliseconds.
 
DataComponentList m_dataComponentList
 The list of DataComponents for this StreamData.
 
- Protected Attributes inherited from ElementwiseDataComponentData
ElementwiseDataComponentList m_elementwiseComponents
 Encodes elementwise data components.
 

Additional Inherited Members

- Protected Member Functions inherited from StreamData
 StreamData (const StreamData &other)=default
 
 StreamData (Stream *stream)
 
 StreamData (Stream *stream, DataComponentList &&components)
 

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close