libfreenect2 0.4
Open source driver for the Kinect for Windows v2 (K4W2) sensor
Loading...
Searching...
No Matches

Library context to create and open replay devices. More...

#include <libfreenect2/libfreenect2.hpp>

Classes

struct  Calibration
 Calibration required to decode raw depth recordings without hardware. More...

Public Member Functions

 Freenect2Replay ()
 Creates the context.
virtual ~Freenect2Replay ()
Freenect2DeviceopenDevice (const std::vector< std::string > &frame_filenames)
 Open a device by a collection of stored frame filenames with default pipeline.
Freenect2DeviceopenDevice (const std::vector< std::string > &frame_filenames, const PacketPipeline *factory)
 Open device by a collection of stored frame filenames with the specified pipeline.
Freenect2DeviceopenDevice (const std::vector< std::string > &frame_filenames, const Calibration &calibration)
 Open replay data with the calibration needed for depth decoding.
Freenect2DeviceopenDevice (const std::vector< std::string > &frame_filenames, const Calibration &calibration, const PacketPipeline *factory)
Freenect2DeviceopenRecording (const std::string &directory, const ReplayOptions &options=ReplayOptions())
 Open a versioned recording directory with the default pipeline.
Freenect2DeviceopenRecording (const std::string &directory, const PacketPipeline *factory, const ReplayOptions &options=ReplayOptions())
 Open a versioned recording directory with the specified pipeline.

Detailed Description

Library context to create and open replay devices.

Call openDevice() and control the device with the returned Freenect2ReplayDevice object.

Constructor & Destructor Documentation

◆ Freenect2Replay()

Freenect2Replay ( )

Creates the context.

Referenced by openRecording().

◆ ~Freenect2Replay()

virtual ~Freenect2Replay ( )
virtual

Member Function Documentation

◆ openDevice() [1/4]

Freenect2Device * openDevice ( const std::vector< std::string > & frame_filenames)

Open a device by a collection of stored frame filenames with default pipeline.

See filename format below. This legacy API remains independent of manifest-directory ReplayOptions.

Parameters
frame_filenamesA list of filenames for stored frames.
Returns
New device object, or NULL on failure

◆ openDevice() [2/4]

Freenect2Device * openDevice ( const std::vector< std::string > & frame_filenames,
const PacketPipeline * factory )

Open device by a collection of stored frame filenames with the specified pipeline.

File names non-compliant with the filename format will be skipped. Filename format: <prefix>_<timestamp>_<sequence>.<suffix>

  • <prefix> – a string of the filename, anything
  • <timestamp> – packet timestamp as in pipeline packets
  • <sequence> – frame sequence number in the packet
  • <suffix> – .depth, .jpg, or .jpeg (case sensitive)
    Parameters
    frame_filenamesA list of filenames for stored frames.
    factoryNew PacketPipeline instance. This is always automatically freed.
    Returns
    New device object, or NULL on failure

◆ openDevice() [3/4]

Freenect2Device * openDevice ( const std::vector< std::string > & frame_filenames,
const Calibration & calibration )

Open replay data with the calibration needed for depth decoding.

◆ openDevice() [4/4]

Freenect2Device * openDevice ( const std::vector< std::string > & frame_filenames,
const Calibration & calibration,
const PacketPipeline * factory )

◆ openRecording() [1/2]

Freenect2Device * openRecording ( const std::string & directory,
const ReplayOptions & options = ReplayOptions() )

Open a versioned recording directory with the default pipeline.

◆ openRecording() [2/2]

Freenect2Device * openRecording ( const std::string & directory,
const PacketPipeline * factory,
const ReplayOptions & options = ReplayOptions() )

Open a versioned recording directory with the specified pipeline.

References Freenect2Replay().