Ocean
Ocean::Tracking::MapBuilding::Relocalizer Class Reference

This class base class for all relocalizers. More...

Inheritance diagram for Ocean::Tracking::MapBuilding::Relocalizer:

Public Types

using ImageFeaturePointDetectorFunction = std::function< bool(const AnyCamera &camera, const Frame &yFrame, Vectors2 &imagePoints, SharedUnifiedDescriptors &imagePointDescriptors)>
 Definition of a function which detects and describes feature points in a given image. More...
 

Public Member Functions

virtual ~Relocalizer ()=default
 Destructs this relocalizer. More...
 
virtual bool setImageFeaturePointDetectorFunction (ImageFeaturePointDetectorFunction imageFeaturePointDetectorFunction)
 Sets or updates the function to detect and describe feature points in an image. More...
 
virtual bool setFeatureMap (SharedUnifiedFeatureMap featureMap)
 Sets or updates the feature map to be used for relocalization. More...
 
const Vectors3objectPoints () const
 Returns the object points of this relocalizer. More...
 
const Indices32objectPointIds () const
 Returns the ids of the object points of this relocalizer. More...
 
virtual bool isValid () const
 Returns whether this relocalizer holds a valid map. More...
 

Static Public Member Functions

static bool detectFreakFeatures (const AnyCamera &camera, const Frame &yFrame, Vectors2 &imagePoints, SharedUnifiedDescriptors &imagePointDescriptors)
 Helper function allowing to detect and to describe multi-level FREAK features with 32 bytes per descriptor in an image. More...
 

Protected Member Functions

 Relocalizer ()=default
 Default constructor. More...
 
 Relocalizer (ImageFeaturePointDetectorFunction imageFeaturePointDetectorFunction)
 Creates a new relocalizer object. More...
 
Relocalizeroperator= (Relocalizer &&relocalizer)
 Move operator. More...
 

Protected Attributes

ImageFeaturePointDetectorFunction imageFeaturePointDetectorFunction_
 The function which detects and describes feature points in a given image. More...
 
SharedUnifiedFeatureMap featureMap_
 The feature map to be used when relocalizing. More...
 
RandomGenerator randomGenerator_
 The random generator object to be used. More...
 
Lock lock_
 The relocalizer's lock. More...
 

Detailed Description

This class base class for all relocalizers.

Member Typedef Documentation

◆ ImageFeaturePointDetectorFunction

using Ocean::Tracking::MapBuilding::Relocalizer::ImageFeaturePointDetectorFunction = std::function<bool(const AnyCamera& camera, const Frame& yFrame, Vectors2& imagePoints, SharedUnifiedDescriptors& imagePointDescriptors)>

Definition of a function which detects and describes feature points in a given image.

Parameters
cameraThe camera profile associated with the image
yFrameThe image in which the feature will be detected, with pixel format FORMAT_Y8
imagePointsThe resulting image points within the pixel domain
imagePointDescriptorsThe resulting descriptors, one for each resulting image point
Returns
True, if succeeded

Constructor & Destructor Documentation

◆ ~Relocalizer()

virtual Ocean::Tracking::MapBuilding::Relocalizer::~Relocalizer ( )
virtualdefault

Destructs this relocalizer.

◆ Relocalizer() [1/2]

Ocean::Tracking::MapBuilding::Relocalizer::Relocalizer ( )
protecteddefault

Default constructor.

◆ Relocalizer() [2/2]

Ocean::Tracking::MapBuilding::Relocalizer::Relocalizer ( ImageFeaturePointDetectorFunction  imageFeaturePointDetectorFunction)
explicitprotected

Creates a new relocalizer object.

Parameters
imageFeaturePointDetectorFunctionThe feature detection and description function to be used

Member Function Documentation

◆ detectFreakFeatures()

static bool Ocean::Tracking::MapBuilding::Relocalizer::detectFreakFeatures ( const AnyCamera camera,
const Frame yFrame,
Vectors2 imagePoints,
SharedUnifiedDescriptors imagePointDescriptors 
)
static

Helper function allowing to detect and to describe multi-level FREAK features with 32 bytes per descriptor in an image.

Parameters
cameraThe camera profile to be used, must be valid
yFrameThe image in which the feature will be detected and described, with pixel format FORMAT_Y8, must be valid
imagePointsThe resulting image points of all detected features
imagePointDescriptorsThe resulting descriptors, one for each resulting image point
Returns
True, if succeeded

◆ isValid()

virtual bool Ocean::Tracking::MapBuilding::Relocalizer::isValid ( ) const
virtual

Returns whether this relocalizer holds a valid map.

Returns
True, if so

◆ objectPointIds()

const Indices32 & Ocean::Tracking::MapBuilding::Relocalizer::objectPointIds ( ) const
inline

Returns the ids of the object points of this relocalizer.

This function is not thread-safe.

Returns
The relocalizer's object point ids

◆ objectPoints()

const Vectors3 & Ocean::Tracking::MapBuilding::Relocalizer::objectPoints ( ) const
inline

Returns the object points of this relocalizer.

This function is not thread-safe.

Returns
The relocalizer's 3D object points

◆ operator=()

Relocalizer& Ocean::Tracking::MapBuilding::Relocalizer::operator= ( Relocalizer &&  relocalizer)
protected

Move operator.

Parameters
relocalizerThe relocalizer to be moved
Returns
Reference to this object

◆ setFeatureMap()

virtual bool Ocean::Tracking::MapBuilding::Relocalizer::setFeatureMap ( SharedUnifiedFeatureMap  featureMap)
virtual

Sets or updates the feature map to be used for relocalization.

Parameters
featureMapThe feature map to be set, must be valid
Returns
True, if succeeded

Reimplemented in Ocean::Tracking::MapBuilding::TrackerStereo, and Ocean::Tracking::MapBuilding::TrackerMono.

◆ setImageFeaturePointDetectorFunction()

virtual bool Ocean::Tracking::MapBuilding::Relocalizer::setImageFeaturePointDetectorFunction ( ImageFeaturePointDetectorFunction  imageFeaturePointDetectorFunction)
virtual

Sets or updates the function to detect and describe feature points in an image.

Parameters
imageFeaturePointDetectorFunctionThe function to be used
Returns
True, if succeeded

Field Documentation

◆ featureMap_

SharedUnifiedFeatureMap Ocean::Tracking::MapBuilding::Relocalizer::featureMap_
protected

The feature map to be used when relocalizing.

◆ imageFeaturePointDetectorFunction_

ImageFeaturePointDetectorFunction Ocean::Tracking::MapBuilding::Relocalizer::imageFeaturePointDetectorFunction_
protected

The function which detects and describes feature points in a given image.

◆ lock_

Lock Ocean::Tracking::MapBuilding::Relocalizer::lock_
mutableprotected

The relocalizer's lock.

◆ randomGenerator_

RandomGenerator Ocean::Tracking::MapBuilding::Relocalizer::randomGenerator_
protected

The random generator object to be used.


The documentation for this class was generated from the following file: