ReconstructMe SDK  2.6.43-0
Real-time 3D reconstruction engine
example_reconstructmesdk_recorder_update_fileformat.cpp

Content

Updates a recording of the file-sensor using the new file format.

Boost is only used to generate examples and is not necessary for working with this SDK.

#include <boost/test/unit_test.hpp>
#include <conio.h>
#include <iostream>
BOOST_AUTO_TEST_SUITE(example_reconstructmesdk)
BOOST_AUTO_TEST_CASE(recorder_update_fileformat) {
int argc = boost::unit_test::framework::master_test_suite().argc;
char** argv = boost::unit_test::framework::master_test_suite().argv;
if (argc < 3) {
std::cout << "usage: recorder_update_fileformat input_sensor_file output_sensor_file" << std::endl;
exit(-1);
}
// Create a new context
// Options object
reme_sensor_create(c, argv[1], 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", argv[2]);
reme_options_set(c, o, "depth_file", "updated_depths.gz");
reme_options_set(c, o, "color_file", "updated_colors.avi");
// Open the recorder. At this point the sensor
// needs to be open as well.
// Loop until done
while (REME_SUCCESS(reme_sensor_grab(c, s))) {
// Prepare image and depth data
// Update the recorder with current sensor data
}
// Done with recorder, forces the files to be closed.
// Print pending errors
// Make sure to release all memory acquired
}
BOOST_AUTO_TEST_SUITE_END()