ReconstructMe SDK  2.6.43-0
Real-time 3D reconstruction engine
Recorder

Streams sensor data to disk for later replay. More...

Typedefs

typedef int reme_recorder_t
 Handle referencing a sensor recorder object. More...
 
reme_error_t reme_recorder_create (reme_context_t c, reme_recorder_t *r)
 Create a new sensor recorder object. More...
 
reme_error_t reme_recorder_destroy (reme_context_t c, reme_recorder_t *r)
 Destroy a previously created recorder object. More...
 
reme_error_t reme_recorder_set_sensor (reme_context_t c, reme_recorder_t r, reme_sensor_t s)
 Set the sensor to record from. More...
 
reme_error_t reme_recorder_bind_file_options (reme_context_t c, reme_recorder_t r, reme_options_t o)
 Access the recorder specific file options. More...
 
reme_error_t reme_recorder_open (reme_context_t c, reme_recorder_t r)
 Open the recorder for streaming. More...
 
reme_error_t reme_recorder_update (reme_context_t c, reme_recorder_t r)
 Update the associated file streams with the current sensor content. More...
 
reme_error_t reme_recorder_close (reme_context_t c, reme_recorder_t r)
 Close the recorder file streams. More...
 

Detailed Description

Streams sensor data to disk for later replay.

The recorder is capable of streaming sensor data to disk, in order to later replay that data using a file sensor.

// Create a new real sensor
reme_sensor_create(c, "openni;mskinect", true, &s);
// Create a new file recorder.
// By default the recorder uses the first sensor.
// Specify the sensor to use
// Modify the recording outputs
reme_options_set(c, o, "file_sensor_config", "my_file_recording.txt");
reme_options_set(c, o, "depth_file", "my_depths.gz");
reme_options_set(c, o, "color_file", "my_colors.avi");
// Open the recorder. At this point the sensor
// needs to be open as well.
// Quick viewer
reme_viewer_t viewer;
reme_viewer_create_image(c, "Recording data", &viewer);
reme_image_t depth, color;
reme_image_create(c, &depth);
reme_image_create(c, &color);
reme_viewer_add_image(c, viewer, depth);
reme_viewer_add_image(c, viewer, color);
// Loop until done
while (!_kbhit() && REME_SUCCESS(reme_sensor_grab(c, s))) {
// Prepare image and depth data
// Update the recorder with current sensor data
// Update the viewer
reme_viewer_update(c, viewer);
}
// Done with recorder, forces the files to be closed.

The full example including a replaying the recordered stream is located at example_reconstructmesdk_recorder.cpp

Typedef Documentation

◆ reme_recorder_t

typedef int reme_recorder_t

Handle referencing a sensor recorder object.

A reme_recorder_t represents a file based recording utility that is able to save sensor frames to disk for later replay.

Function Documentation

◆ reme_recorder_create()

reme_error_t reme_recorder_create ( reme_context_t  c,
reme_recorder_t r 
)

Create a new sensor recorder object.

Parameters
cA valid context object
rA pointer that will receive the handle of the created recorder
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
Examples:
example_reconstructmesdk_recorder.cpp, and example_reconstructmesdk_recorder_update_fileformat.cpp.

◆ reme_recorder_destroy()

reme_error_t reme_recorder_destroy ( reme_context_t  c,
reme_recorder_t r 
)

Destroy a previously created recorder object.

Parameters
cA pointer to a valid context object
rA mutable pointer to a valid recorder handle to destroy
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure

◆ reme_recorder_set_sensor()

reme_error_t reme_recorder_set_sensor ( reme_context_t  c,
reme_recorder_t  r,
reme_sensor_t  s 
)

Set the sensor to record from.

The recorder will use the given sensor to stream data from. It will also copy the sensors' intrinsics to the resulting file sensor configuration file, so replaying from this sensor uses the correct camera intrinsics.

By default the recorder streams from the first sensor.

Parameters
cA valid context object
rA valid recorder object
sA valid sensor object
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
Examples:
example_reconstructmesdk_recorder.cpp, and example_reconstructmesdk_recorder_update_fileformat.cpp.

◆ reme_recorder_bind_file_options()

reme_error_t reme_recorder_bind_file_options ( reme_context_t  c,
reme_recorder_t  r,
reme_options_t  o 
)

Access the recorder specific file options.

Associated Protocol Buffers Specification
// Recorder options
message recorder_options {
// Where to save the depth file
optional string depth_file = 1 [default = "reconstructme.depths.gz"];
// Where to save the color file if supported
optional string color_file = 2 [default = "reconstructme.avi"];
// Where to save the file_sensor configuration file
// Note that the recorder will copy the relevant sensor intrinsics
// from the real sensor
optional string file_sensor_config = 3 [default = "file_sensor.txt"];
}
Parameters
cA valid context object
rA valid recorder object
oA valid options binding object
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
Examples:
example_reconstructmesdk_recorder.cpp, and example_reconstructmesdk_recorder_update_fileformat.cpp.

◆ reme_recorder_open()

reme_error_t reme_recorder_open ( reme_context_t  c,
reme_recorder_t  r 
)

Open the recorder for streaming.

This will force existing files to be overridden.

Parameters
cA valid context object
rA valid recorder object
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
Examples:
example_reconstructmesdk_recorder.cpp, and example_reconstructmesdk_recorder_update_fileformat.cpp.

◆ reme_recorder_update()

reme_error_t reme_recorder_update ( reme_context_t  c,
reme_recorder_t  r 
)

Update the associated file streams with the current sensor content.

Parameters
cA valid context object
rA valid recorder object
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
Examples:
example_reconstructmesdk_recorder.cpp, and example_reconstructmesdk_recorder_update_fileformat.cpp.

◆ reme_recorder_close()

reme_error_t reme_recorder_close ( reme_context_t  c,
reme_recorder_t  r 
)

Close the recorder file streams.

Closes the file streams.

Parameters
cA valid context object
rA valid recorder object
Return values
REME_ERROR_SUCCESSOn success
REME_ERROR_UNSPECIFIEDOn failure
Examples:
example_reconstructmesdk_recorder.cpp, and example_reconstructmesdk_recorder_update_fileformat.cpp.