RecFusion SDK
RecFusion::RFSRecorder Class Reference

Saves RGB-D sequences in RFS format. More...

Public Member Functions

 RFSRecorder (const char *filename)
 Create recorder object. More...
 ~RFSRecorder ()
 Destroy recorder object.
bool init (int colorWidth, int colorHeight, int depthWidth, int depthHeight, const Mat3 &depthK, const Mat3 *colorK=nullptr, const Mat4 *depthToColorT=nullptr)
 Initialize image recorder. More...
bool cleanup ()
 Free image recorder internal data and close output file.
void start ()
 Start recording thread. Needs to be called before adding frames.
void stop ()
 Stop recording thread. Will return after all images in the queue have been written.
bool addFrame (const DepthImage &imgDepth, const ColorImage &imgColor)
 Add frame to file. The images must have the same size passed to initialize() More...

Detailed Description

Saves RGB-D sequences in RFS format.

The recorder uses a ring buffer to store the passed in images. In the background a thread is writing the images to disk. To start the thread call start(), to stop it call stop(). If the thread is not running images will be dropped when the ring buffer is full. Frames will also be dropped when the frames cannot be written fast enough to disk. Whether a frame was dropped is indicated by the return value of addFrame()

Constructor & Destructor Documentation

◆ RFSRecorder()

RecFusion::RFSRecorder::RFSRecorder ( const char *  filename)

Create recorder object.

filenameFile name of file to record to

Member Function Documentation

◆ addFrame()

bool RecFusion::RFSRecorder::addFrame ( const DepthImage imgDepth,
const ColorImage imgColor 

Add frame to file. The images must have the same size passed to initialize()

imgDepth16-bit single channel depth image
imgColor8-bit three channel RGB image
True when frame was added, false when frame was dropped

◆ init()

bool RecFusion::RFSRecorder::init ( int  colorWidth,
int  colorHeight,
int  depthWidth,
int  depthHeight,
const Mat3 depthK,
const Mat3 colorK = nullptr,
const Mat4 depthToColorT = nullptr 

Initialize image recorder.

colorWidthWidth of recorded color images
colorHeightHeight of recorded color images
depthWidthWidth of recorded depth images
depthHeightHeight of recorded depth images
depthKIntrinsic depth camera parameters
colorKIntrinsic color camera parameters (optional)
depthToColorTTransformation from depth to color camera coordinate system (optional)
True if successful, false otherwise

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