![]() |
ImFusion SDK 4.3
|
#include <RGBD/Include/ImFusion/RGBD/RGBDMultiSequence.h>
Collection of multiple synchronized or unsynchronized RGB-D sequences. More...
Collection of multiple synchronized or unsynchronized RGB-D sequences.
This class manages a set of RGBDSequence objects, providing unified access to frames and sensor parameters across RGBDSequences. It supports construction from image sets or various file formats (rfms, rfs, bag), and handles frame synchronization if requested.
Usage:
getFrame() and camera().sequences() to access individual sequences.Important aspects:
Example:
Public Member Functions | |
| RGBDMultiSequence (std::vector< std::unique_ptr< RGBDSequence > > &sequences, bool syncFrames=true) | |
| Constructor: takes ownership of the input sequences. | |
| std::string | filename () const |
| Returns the filename if the sequence was constructed from a file. | |
| bool | isValid () |
| Returns whether the sequence is valid. | |
| bool | getFrame (int frame, int sensor, TypedImage< float > *imgDepth, TypedImage< unsigned char > *imgColor, uint64_t *timestampDepth=nullptr, uint64_t *timestampColor=nullptr, mat4 *T=nullptr, int *sensorFrame=nullptr) |
| Retrieves a frame from the sequence. | |
| int | frames () const |
| Returns the number of frames in the sequence. | |
| RGBDDataComponent | camera (int sensor) const |
| Returns the sensor parameters for a given sensor. | |
| bool | setCamera (int sensor, const RGBDDataComponent &cam) |
| Sets the sensor parameters for a given sensor. | |
| std::vector< RGBDSequence * > | sequences () const |
| Returns pointers to the individual sequences. | |
| int | size () const |
| Returns the number of sequences (sensors). | |
Static Public Member Functions | |
| static std::unique_ptr< RGBDMultiSequence > | createFromImages (std::vector< std::unique_ptr< SharedImageSet > > &isDepth, std::vector< std::unique_ptr< SharedImageSet > > &isColor, const std::vector< std::vector< uint64_t > > ×tampsDepth=std::vector< std::vector< uint64_t > >(), const std::vector< std::vector< uint64_t > > ×tampsColor=std::vector< std::vector< uint64_t > >()) |
| Creates a multi-sequence from SharedImageSets. Ownership is transferred. | |
| static std::unique_ptr< RGBDMultiSequence > | createFromRFMS (const std::string &filename, bool syncFrames=true) |
| Creates a multi-sequence from an RFMS file. | |
| static std::unique_ptr< RGBDMultiSequence > | createFromRFS (const std::string &filename, bool syncFrames=true) |
| Creates a multi-sequence from an RFS file. | |
| static std::unique_ptr< RGBDMultiSequence > | createFromBAG (const std::string &filename) |
| Creates a multi-sequence from a ROS bag file. | |
| bool getFrame | ( | int | frame, |
| int | sensor, | ||
| TypedImage< float > * | imgDepth, | ||
| TypedImage< unsigned char > * | imgColor, | ||
| uint64_t * | timestampDepth = nullptr, | ||
| uint64_t * | timestampColor = nullptr, | ||
| mat4 * | T = nullptr, | ||
| int * | sensorFrame = nullptr ) |
Retrieves a frame from the sequence.
| frame | Frame index | |
| sensor | Sensor index | |
| [out] | imgDepth | Depth image |
| [out] | imgColor | Color image |
| [out] | timestampDepth | Depth timestamp (optional) |
| [out] | timestampColor | Color timestamp (optional) |
| [out] | T | Sensor pose (optional) |
| [out] | sensorFrame | Frame index in the sensor sequence (optional) |