Upgrade to RecFusion SDK 2.2

Here is what you need to know when upgrading to RecFusion SDK 2.2.

Licensing system
Before it was necessary to provide a license file. Now a user needs to provide a license key and optionally a license code (for offline activation). So instead of calling:

RecFusionSDK::setLicenseFile("license.dat");

one should call

RecFusionSDK::activate("XXXXX-XXXXX-XXXXX-XXXXX-XXXXX");

If you are eligible for the 1 year SDK upgrade, please contact us via license@recfusion.net and we will send you the license key.

Sensor interface

Support of all RecFusion sensors
Sensor class of the old SDK supported only OpenNI sensors. With the new SDK one can open any sensor that is supported by RecFusion application using the Sensor class. ConsoleReconstruction, QtReconstruction and MultiViewReconstruction samples demonstrate the use of Sensor class for Kinect Azure, RealSense, Orbbec and other sensors. RealSenseReconstruction sample, on the other hand, shows how to perform a reconstruction using an arbitrary RGB-D sensor without the usage of the Sensor class.

SensorManager
In order to instantiate a Sensor object one needs to create a SensorManager object which holds information about all available sensors. As long as instantiated Sensor objects are in use, the SensorManager object needs to exist. When it is destroyed, all the Sensor objects are destroyed with it. The following example shows how to migrate the code to the new SDK. It demonstrates how the sensors are opened and deleted using an old and new API.

Old API:

Sensor* sensor = new Sensor();
int numSensors = sensor->deviceCount();
std::vector<Sensor*> sensors(numSensors, nullptr);
sensors[0] = sensor;
for(int i = 1; i < numSensors; i++)
	sensors[i] = new Sensor();
for(int i = 0; i < numSensors; i++)
	sensors[i]->open(i, 640, 480);
// your code here
for(int i = 0; i < numSensors; i++)
	delete sensors[i];

New API:

SensorManager* sensorManager = new SensorManager();
int numSensors = sensorManager->deviceCount();
std::vector<Sensor*> sensors(numSensors, nullptr);
for(int i = 0; i < numSensors; i++)
{
	sensors[i] = sensorManager->sensor(i);
	sensors[i]->open(640, 480);
}
// your code here
delete sensorManager;

Stream format
New SDK allows a user to query available formats for depth and color streams using depthFormat and colorFormat functions

Mesh texturing
RecFusion SDK 2.2 supports mesh texturing which is available in RecFusion application. Mesh can be textured using Mesh::applyTexturing method

1 Like