ImFusion SDK 4.3
Relocalization Class Referenceabstract

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

Interface for relocalization algorithms using RGB-D data, typically used in RGBDReconstructionAlgorithm. More...

+ Inheritance diagram for Relocalization:

Detailed Description

Interface for relocalization algorithms using RGB-D data, typically used in RGBDReconstructionAlgorithm.

This abstract base class defines the API for keyframe-based relocalization, including initialization, frame addition, and localization queries. Implementations manage a database of keyframes and provide pose candidates for new frames based on image similarity and pose estimation.

Typical usage involves initializing the relocalizer, adding frames with known poses, and querying for pose candidates of new frames.

Note
  • All methods are pure virtual and must be implemented by derived classes.
  • The relocalizer manages its own keyframe database.
  • Not thread-safe.
See also
RGBDReconstructionAlgorithm, RGBDRelocalization

Public Member Functions

 Relocalization ()
 Constructs the relocalization interface.
 
virtual ~Relocalization ()
 Destroys the relocalization interface.
 
virtual void clear ()=0
 Clears all keyframe data from the relocalizer.
 
virtual bool init (int widthDepth, int heightDepth, int widthColor, int heightColor)=0
 Initializes relocalization parameters.
 
virtual int addFrame (int id, TypedImage< float > *imgDepth, TypedImage< unsigned char > *imgColor, const mat4 &T, bool *addedToDatabase=0)=0
 Adds a frame to the relocalization database.
 
virtual int localize (TypedImage< float > *imgDepth, TypedImage< unsigned char > *imgColor, std::vector< std::tuple< mat4, double, int > > &T, int k=4)=0
 Localizes a frame and returns pose candidates for closest matching frames.
 

Additional Inherited Members

- Protected Member Functions inherited from NotCopyable
 NotCopyable (NotCopyable &&) noexcept=default
 
NotCopyableoperator= (NotCopyable &&) noexcept=default
 
 NotCopyable (const NotCopyable &)=delete
 
NotCopyableoperator= (const NotCopyable &)=delete
 

Member Function Documentation

◆ clear()

virtual void clear ( )
pure virtual

Clears all keyframe data from the relocalizer.

Implemented in RelocalizationStack, and RGBDRelocalization.

◆ init()

virtual bool init ( int widthDepth,
int heightDepth,
int widthColor,
int heightColor )
pure virtual

Initializes relocalization parameters.

Parameters
widthDepthInput depth image width.
heightDepthInput depth image height.
widthColorInput color image width.
heightColorInput color image height.
Returns
true if initialization was successful.

Implemented in RelocalizationStack, and RGBDRelocalization.

◆ addFrame()

virtual int addFrame ( int id,
TypedImage< float > * imgDepth,
TypedImage< unsigned char > * imgColor,
const mat4 & T,
bool * addedToDatabase = 0 )
pure virtual

Adds a frame to the relocalization database.

Parameters
idFrame ID.
imgDepthDepth image.
imgColorColor image.
TPose for the frame.
[out]addedToDatabaseTrue if the frame was added to the pose database.
Returns
Zero if successful.

Implemented in RelocalizationStack, and RGBDRelocalization.

◆ localize()

virtual int localize ( TypedImage< float > * imgDepth,
TypedImage< unsigned char > * imgColor,
std::vector< std::tuple< mat4, double, int > > & T,
int k = 4 )
pure virtual

Localizes a frame and returns pose candidates for closest matching frames.

Parameters
imgDepthDepth image.
imgColorColor image.
[out]TVector of pose candidates (pose, normalized quality score, frame ID).
kMaximum number of poses to return.
Returns
Zero if successful.

Implemented in RelocalizationStack, and RGBDRelocalization.


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