RecFusion SDK
ReconstructionParams Class Reference

#include <Reconstruction.h>

Reconstruction parameters. More...

Detailed Description

Reconstruction parameters.

Currently only sensors with equal depth and color image sizes and intrinsics are supported

Public Member Functions

 ReconstructionParams (int sensors=1)
 Construct object. More...
 
 ~ReconstructionParams ()
 Destructor.
 
int sensors () const
 Get number of sensors.
 
bool setImageSize (int colorWidth, int colorHeight, int depthWidth, int depthHeight, int sensor=0)
 Set image size for sensor. More...
 
bool imageSize (int &colorWidth, int &colorHeight, int &depthWidth, int &depthHeight, int sensor=0) const
 Get image size for sensor. More...
 
bool setIntrinsics (const Mat3 &K, int sensor=0)
 Set depth image intrinsics for sensor. More...
 
bool intrinsics (Mat3 &K, int sensor=0) const
 Get depth image intrinsics for sensor. More...
 
bool setColorIntrinsics (const Mat3 &K, int sensor=0)
 Set color image intrinsics for sensor. More...
 
bool colorIntrinsics (Mat3 &K, int sensor=0) const
 Get color image intrinsics for sensor. More...
 
bool setDepthToColorTransformation (const Mat4 &T, int sensor=0)
 Set depth-to-color transformation for sensor. More...
 
bool depthToColorTransformation (Mat4 &T, int sensor=0) const
 Get depth-to-color transformation for sensor. More...
 
void setVolumeSize (const Vec3 &size)
 Set volume size. More...
 
Vec3 volumeSize () const
 Get volume size in mm.
 
void setVolumeResolution (const Vec3i &res)
 Set volume resolution. More...
 
Vec3i volumeResolution () const
 Get volume resolution in voxels.
 
void setVolumePosition (const Vec3 &pos)
 Set volume position. More...
 
Vec3 volumePosition () const
 Get volume position in mm.
 
void setVolumeRotation (const Mat3 &R)
 Set volume rotation. More...
 
Mat3 volumeRotation () const
 Get volume rotation matrix.
 
void setTrackingParams (double rotationThreshold, double translationThreshold)
 Set tracking parameters to control the maximum amount of displacement and rotation allowed between two subsequent frames. More...
 
void trackingParams (double &rotationThreshold, double &translationThreshold) const
 Get tracking parameters.
 

Constructor & Destructor Documentation

◆ ReconstructionParams()

ReconstructionParams ( int  sensors = 1)

Construct object.

Parameters
sensorsNumber of sensors used in reconstruction

By default a cubic volume of side length 1 m with a resolution of 256, 1 m in front of the sensor is defined. The image size and intrinsics for each sensor must be set prior to running the reconstruction.

Member Function Documentation

◆ setImageSize()

bool setImageSize ( int  colorWidth,
int  colorHeight,
int  depthWidth,
int  depthHeight,
int  sensor = 0 
)

Set image size for sensor.

Parameters
colorWidthColor image width
colorHeightColor image height
depthWidthDepth image width
depthHeightDepth image height
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ imageSize()

bool imageSize ( int &  colorWidth,
int &  colorHeight,
int &  depthWidth,
int &  depthHeight,
int  sensor = 0 
) const

Get image size for sensor.

Parameters
colorWidthColor image width
colorHeightColor image height
depthWidthDepth image width
depthHeightDepth image height
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ setIntrinsics()

bool setIntrinsics ( const Mat3 K,
int  sensor = 0 
)

Set depth image intrinsics for sensor.

Parameters
KDepth image intrinsics
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ intrinsics()

bool intrinsics ( Mat3 K,
int  sensor = 0 
) const

Get depth image intrinsics for sensor.

Parameters
KDepth image intrinsics
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ setColorIntrinsics()

bool setColorIntrinsics ( const Mat3 K,
int  sensor = 0 
)

Set color image intrinsics for sensor.

Parameters
KColor image intrinsics
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ colorIntrinsics()

bool colorIntrinsics ( Mat3 K,
int  sensor = 0 
) const

Get color image intrinsics for sensor.

Parameters
KColor image intrinsics
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ setDepthToColorTransformation()

bool setDepthToColorTransformation ( const Mat4 T,
int  sensor = 0 
)

Set depth-to-color transformation for sensor.

Parameters
TDepth-to-color transformation
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ depthToColorTransformation()

bool depthToColorTransformation ( Mat4 T,
int  sensor = 0 
) const

Get depth-to-color transformation for sensor.

Parameters
TDepth-to-color transformation
sensorSensor index
Returns
True if sensor index is valid, false otherwise

◆ setVolumeSize()

void setVolumeSize ( const Vec3 size)

Set volume size.

Parameters
sizeVolume size in mm along each axis

◆ setVolumeResolution()

void setVolumeResolution ( const Vec3i res)

Set volume resolution.

Parameters
resVolume resolution in voxels

◆ setVolumePosition()

void setVolumePosition ( const Vec3 pos)

Set volume position.

Parameters
posVolume position in mm relative to camera center of first sensor in mm

The position specified here is the translation from the camera center of the first sensor to the center of the reconstruction volume. The depth direction point away from the sensor is given by the z-component. The x-axis specifies the movement to the right as seen from the sensor, while the y-axis is the movement downward.

◆ setVolumeRotation()

void setVolumeRotation ( const Mat3 R)

Set volume rotation.

Parameters
posVolume rotation given as 3x3 rotation matrix

The rotation specified here is the rotation around the center of the reconstruction volume.

◆ setTrackingParams()

void setTrackingParams ( double  rotationThreshold,
double  translationThreshold 
)

Set tracking parameters to control the maximum amount of displacement and rotation allowed between two subsequent frames.

Choosing too large values makes the tracking less stable.

Parameters
rotationThresholdMaximum rotation between two frames in degrees
translationThresholdMaximum translation between two frames in mm.

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close