ImFusion SDK 4.3
SurfaceReconstruction Class Referenceabstract

#include <RGBD/Include/ImFusion/RGBD/SurfaceReconstruction.h>

Abstract interface for surface reconstruction from RGB-D data. More...

+ Inheritance diagram for SurfaceReconstruction:

Detailed Description

Abstract interface for surface reconstruction from RGB-D data.

This class defines the interface for surface reconstruction algorithms. Implementations are responsible for integrating RGB-D frames into a 3D representation, tracking camera pose, and extracting a mesh representation of the reconstructed surface.

Usage:

Public Member Functions

virtual ~SurfaceReconstruction ()
 Virtual destructor.
 
virtual bool init (SurfaceReconstructionData &data)=0
 Initializes the reconstruction algorithm with the given parameters.
 
virtual void cleanup ()=0
 Cleans up all reconstruction data and resources.
 
virtual int addFrame (const TypedImage< float > *imgDepth, const TypedImage< unsigned char > *imgColor, int sensor, const TypedImage< float > *imgDepthToColorMap=nullptr, mat4 *T=nullptr, bool poseHint=false, TypedImage< unsigned char > *imgScene=nullptr, bool updateVolume=true, mat4 *sensorT=nullptr, bool forceFirstFrame=false, bool ortho=false, int *icpMatches=nullptr, bool *isKeyframe=nullptr, double *timestamp=nullptr, const TypedImage< unsigned char > *mask=nullptr)=0
 Adds a frame to the reconstruction.
 
virtual mat4f currentPose () const =0
 Returns the current transformation from camera to world coordinate system.
 
virtual void setCurrentPose (const mat4f &T)=0
 Sets the current transformation from camera to world coordinate system.
 
virtual void resetReconstruction ()=0
 Resets the reconstruction volume. All other settings are left unchanged.
 
virtual std::unique_ptr< MeshgetMesh () const =0
 Retrieves the reconstructed mesh. Ownership is transferred to the caller.
 
virtual void stopReconstruction ()=0
 Stops all reconstruction threads. The controller will wait until this function finishes execution when the stop button is triggered.
 

Member Function Documentation

◆ init()

virtual bool init ( SurfaceReconstructionData & data)
pure virtual

Initializes the reconstruction algorithm with the given parameters.

Returns
True when initialization succeeded, false otherwise.

Implemented in SurfaceReconstructionGPU.

◆ cleanup()

virtual void cleanup ( )
pure virtual

Cleans up all reconstruction data and resources.

Implemented in SurfaceReconstructionGPU.

◆ addFrame()

virtual int addFrame ( const TypedImage< float > * imgDepth,
const TypedImage< unsigned char > * imgColor,
int sensor,
const TypedImage< float > * imgDepthToColorMap = nullptr,
mat4 * T = nullptr,
bool poseHint = false,
TypedImage< unsigned char > * imgScene = nullptr,
bool updateVolume = true,
mat4 * sensorT = nullptr,
bool forceFirstFrame = false,
bool ortho = false,
int * icpMatches = nullptr,
bool * isKeyframe = nullptr,
double * timestamp = nullptr,
const TypedImage< unsigned char > * mask = nullptr )
pure virtual

Adds a frame to the reconstruction.

Parameters
imgDepthDepth map.
imgColorRGB color image.
sensorSensor index.
imgDepthToColorMapDepth-to-color mapping.
TPose hint.
poseHintTrue if pose hint is provided.
[out]imgSceneRendered reconstruction volume from current viewpoint.
updateVolumeIf true, volume is updated.
sensorTSensor transformation.
forceFirstFrameIf true, forces integration of first frame.
orthoIf true, uses orthographic projection.
[out]icpMatchesNumber of ICP matches.
[out]isKeyframeTrue if frame is a keyframe.
[out]timestampFrame timestamp.
[out]maskmask image.
Returns
Error code: 0: No error. Frame was added. 1: No error. Frame was not added. -1: Invalid OpenCL context. -2: Invalid input. -3: Preprocessing failed. -4: Surface prediction failed. -5: ICP failed. -6: Volume integration failed. -7: Could not download reduction results.

Implemented in SurfaceReconstructionGPU.

◆ currentPose()

virtual mat4f currentPose ( ) const
pure virtual

Returns the current transformation from camera to world coordinate system.

Implemented in SurfaceReconstructionGPU.

◆ setCurrentPose()

virtual void setCurrentPose ( const mat4f & T)
pure virtual

Sets the current transformation from camera to world coordinate system.

Implemented in SurfaceReconstructionGPU.

◆ resetReconstruction()

virtual void resetReconstruction ( )
pure virtual

Resets the reconstruction volume. All other settings are left unchanged.

Implemented in SurfaceReconstructionGPU.

◆ getMesh()

virtual std::unique_ptr< Mesh > getMesh ( ) const
pure virtual

Retrieves the reconstructed mesh. Ownership is transferred to the caller.

Implemented in SurfaceReconstructionGPU.

◆ stopReconstruction()

virtual void stopReconstruction ( )
pure virtual

Stops all reconstruction threads. The controller will wait until this function finishes execution when the stop button is triggered.

Implemented in SurfaceReconstructionGPU.


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