Solar
Public Member Functions | List of all members
SolAR::api::reloc::IKeyframeRetriever Class Referenceabstract

Recovers a set of pre-recorded keyframes close to a given frame. UUID: f60980ce-bdbd-11e8-a355-529269fb1459 More...

#include <IKeyframeRetriever.h>

Inheritance diagram for SolAR::api::reloc::IKeyframeRetriever:
Inheritance graph
[legend]
Collaboration diagram for SolAR::api::reloc::IKeyframeRetriever:
Collaboration graph
[legend]

Public Member Functions

 IKeyframeRetriever ()=default
 IKeyframeRetriever default constructor.
 
virtual ~IKeyframeRetriever ()=default
 IKeyframeRetriever default destructor.
 
virtual FrameworkReturnCode addKeyframe (const SRef< SolAR::datastructure::Keyframe > keyframe)=0
 Add a keyframe to the retrieval model. More...
 
virtual FrameworkReturnCode suppressKeyframe (uint32_t keyframe_id)=0
 Suppress a keyframe from the retrieval model. More...
 
virtual FrameworkReturnCode retrieve (const SRef< SolAR::datastructure::Frame > frame, std::vector< uint32_t > &retKeyframes_id)=0
 Retrieve a set of keyframes close to the frame pass in input. More...
 
virtual FrameworkReturnCode retrieve (const SRef< SolAR::datastructure::Frame > frame, const std::set< unsigned int > &canKeyframes_id, std::vector< uint32_t > &retKeyframes_id)=0
 Retrieve a set of keyframes close to the frame pass in input. More...
 
virtual FrameworkReturnCode saveToFile (const std::string &file) const =0
 This method allows to save the keyframe feature to the external file. More...
 
virtual FrameworkReturnCode loadFromFile (const std::string &file)=0
 This method allows to load the keyframe feature from the external file. More...
 
virtual FrameworkReturnCode match (const SRef< SolAR::datastructure::Frame > frame, const SRef< SolAR::datastructure::Keyframe > keyframe, std::vector< SolAR::datastructure::DescriptorMatch > &matches)=0
 Match a frame with a keyframe. More...
 
virtual FrameworkReturnCode match (const std::vector< int > &indexDescriptors, const SRef< SolAR::datastructure::DescriptorBuffer > descriptors, const SRef< SolAR::datastructure::Keyframe > keyframe, std::vector< SolAR::datastructure::DescriptorMatch > &matches)=0
 Match a set of descriptors with a keyframe. More...
 
virtual const SRef< SolAR::datastructure::KeyframeRetrieval > & getConstKeyframeRetrieval () const =0
 This method returns the keyframe retrieval. More...
 
virtual std::unique_lock< std::mutex > getKeyframeRetrieval (SRef< SolAR::datastructure::KeyframeRetrieval > &keyframeRetrieval)=0
 This method returns the keyframe retrieval. More...
 
virtual void setKeyframeRetrieval (const SRef< SolAR::datastructure::KeyframeRetrieval > keyframeRetrieval)=0
 This method is to set the keyframe retrieval. More...
 

Detailed Description

Recovers a set of pre-recorded keyframes close to a given frame. UUID: f60980ce-bdbd-11e8-a355-529269fb1459

This class provides a solution to retrieve a set of keyframes corresponding to a given frame.

Member Function Documentation

◆ addKeyframe()

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::addKeyframe ( const SRef< SolAR::datastructure::Keyframe keyframe)
pure virtual

Add a keyframe to the retrieval model.

Parameters
[in]keyframethe keyframe to add to the retrieval model
Returns
FrameworkReturnCode::SUCCESS if the keyfram adding succeed, else FrameworkReturnCode::_ERROR

◆ getConstKeyframeRetrieval()

virtual const SRef< SolAR::datastructure::KeyframeRetrieval > & SolAR::api::reloc::IKeyframeRetriever::getConstKeyframeRetrieval ( ) const
pure virtual

This method returns the keyframe retrieval.

Returns
the keyframe retrieval

◆ getKeyframeRetrieval()

virtual std::unique_lock< std::mutex > SolAR::api::reloc::IKeyframeRetriever::getKeyframeRetrieval ( SRef< SolAR::datastructure::KeyframeRetrieval > &  keyframeRetrieval)
pure virtual

This method returns the keyframe retrieval.

Parameters
[out]keyframeRetrievalthe keyframe retrieval of map
Returns
the keyframe retrieval

◆ loadFromFile()

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::loadFromFile ( const std::string &  file)
pure virtual

This method allows to load the keyframe feature from the external file.

Parameters
[in]filethe file name
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ match() [1/2]

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::match ( const SRef< SolAR::datastructure::Frame frame,
const SRef< SolAR::datastructure::Keyframe keyframe,
std::vector< SolAR::datastructure::DescriptorMatch > &  matches 
)
pure virtual

Match a frame with a keyframe.

Parameters
[in]framethe frame to match
[in]keyframeid of keyframe to match
[out]matchesa set of matches between frame and keyframe
Returns
FrameworkReturnCode::SUCCESS if the retrieve succeed, else FrameworkReturnCode::_ERROR

◆ match() [2/2]

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::match ( const std::vector< int > &  indexDescriptors,
const SRef< SolAR::datastructure::DescriptorBuffer descriptors,
const SRef< SolAR::datastructure::Keyframe keyframe,
std::vector< SolAR::datastructure::DescriptorMatch > &  matches 
)
pure virtual

Match a set of descriptors with a keyframe.

Parameters
[in]indexDescriptorsindex of descriptors to match.
[in]descriptorsa descriptor buffer contains all descriptors
[in]keyframeid of keyframe to match
[out]matchesa set of matches between frame and keyframe
Returns
FrameworkReturnCode::SUCCESS if the retrieve succeed, else FrameworkReturnCode::_ERROR

◆ retrieve() [1/2]

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::retrieve ( const SRef< SolAR::datastructure::Frame frame,
const std::set< unsigned int > &  canKeyframes_id,
std::vector< uint32_t > &  retKeyframes_id 
)
pure virtual

Retrieve a set of keyframes close to the frame pass in input.

Parameters
[in]framethe frame for which we want to retrieve close keyframes.
[in]canKeyframes_ida set including id of keyframe candidates
[out]retKeyframes_ida set of keyframe ids which are close to the frame pass in input
Returns
FrameworkReturnCode::SUCCESS if the retrieve succeed, else FrameworkReturnCode::_ERROR

◆ retrieve() [2/2]

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::retrieve ( const SRef< SolAR::datastructure::Frame frame,
std::vector< uint32_t > &  retKeyframes_id 
)
pure virtual

Retrieve a set of keyframes close to the frame pass in input.

Parameters
[in]framethe frame for which we want to retrieve close keyframes.
[out]retKeyframes_ida set of keyframe ids which are close to the frame pass in input
Returns
FrameworkReturnCode::SUCCESS if the retrieve succeed, else FrameworkReturnCode::_ERROR

◆ saveToFile()

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::saveToFile ( const std::string &  file) const
pure virtual

This method allows to save the keyframe feature to the external file.

Parameters
[in]filethe file name
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ setKeyframeRetrieval()

virtual void SolAR::api::reloc::IKeyframeRetriever::setKeyframeRetrieval ( const SRef< SolAR::datastructure::KeyframeRetrieval keyframeRetrieval)
pure virtual

This method is to set the keyframe retrieval.

Parameters
[in]keyframeRetrievalthe keyframe retrieval of map

◆ suppressKeyframe()

virtual FrameworkReturnCode SolAR::api::reloc::IKeyframeRetriever::suppressKeyframe ( uint32_t  keyframe_id)
pure virtual

Suppress a keyframe from the retrieval model.

Parameters
[in]keyframe_idthe keyframe to supress from the retrieval model
Returns
FrameworkReturnCode::SUCCESS if the keyfram adding succeed, else FrameworkReturnCode::_ERROR

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