Solar
Public Member Functions | Friends | List of all members
SolAR::datastructure::KeyframeCollection Class Reference

A set of keyframes. This class provides a set of keyframes. More...

#include <KeyframeCollection.h>

Inheritance diagram for SolAR::datastructure::KeyframeCollection:
Inheritance graph
[legend]
Collaboration diagram for SolAR::datastructure::KeyframeCollection:
Collaboration graph
[legend]

Public Member Functions

 KeyframeCollection ()=default
 KeyframeCollection constructor.
 
 KeyframeCollection (const KeyframeCollection &other)=default
 
KeyframeCollectionoperator= (const KeyframeCollection &other)=default
 
 ~KeyframeCollection ()=default
 ~KeyframeCollection
 
FrameworkReturnCode addKeyframe (const SRef< SolAR::datastructure::Keyframe > keyframe)
 This method allow to add a frame to the keyframe manager component. More...
 
FrameworkReturnCode addKeyframe (const SolAR::datastructure::Keyframe &keyframe)
 This method allow to add a frame to the key frame manager component. More...
 
FrameworkReturnCode getKeyframe (const uint32_t id, SRef< SolAR::datastructure::Keyframe > &keyframe) const
 This method allows to get a keyframe by its id. More...
 
FrameworkReturnCode getKeyframes (const std::vector< uint32_t > &ids, std::vector< SRef< SolAR::datastructure::Keyframe > > &keyframes) const
 This method allows to get a set of keyframes by their ids. More...
 
FrameworkReturnCode getAllKeyframes (std::vector< SRef< SolAR::datastructure::Keyframe > > &keyframes) const
 This method allows to get all keyframes. More...
 
FrameworkReturnCode suppressKeyframe (const uint32_t id)
 This method allow to suppress a keyframe by its id. More...
 
SolAR::datastructure::DescriptorType getDescriptorType () const
 This method allows to get the descriptor type used to extract descriptor for each keyframe. More...
 
FrameworkReturnCode setDescriptorType (const SolAR::datastructure::DescriptorType &type)
 This method allows to set the descriptor type used to extract descriptor for each keyframe. More...
 
bool isExistKeyframe (const uint32_t id) const
 This method allows to know if a keyframe is already stored in the component. More...
 
int getNbKeyframes () const
 This method allows to get the number of keyframes stored in the point cloud. More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 
- Public Member Functions inherited from SolAR::datastructure::Lockable
 Lockable ()=default
 LockableCollection constructor.
 
std::unique_lock< std::mutex > acquireLock ()
 This method returns the point cloud. More...
 
void lock ()
 
void unlock ()
 
bool tryLock ()
 

Friends

class boost::serialization::access
 

Detailed Description

A set of keyframes. This class provides a set of keyframes.

Member Function Documentation

◆ addKeyframe() [1/2]

FrameworkReturnCode SolAR::datastructure::KeyframeCollection::addKeyframe ( const SolAR::datastructure::Keyframe keyframe)

This method allow to add a frame to the key frame manager component.

Parameters
[in]framethe frame to add to the set of persistent keyframes
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addKeyframe() [2/2]

FrameworkReturnCode SolAR::datastructure::KeyframeCollection::addKeyframe ( const SRef< SolAR::datastructure::Keyframe keyframe)

This method allow to add a frame to the keyframe manager component.

Parameters
[in]framethe frame to add to the set of persistent keyframes
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getAllKeyframes()

FrameworkReturnCode SolAR::datastructure::KeyframeCollection::getAllKeyframes ( std::vector< SRef< SolAR::datastructure::Keyframe > > &  keyframes) const

This method allows to get all keyframes.

Parameters
[out]theset of keyframes
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getDescriptorType()

DescriptorType SolAR::datastructure::KeyframeCollection::getDescriptorType ( ) const

This method allows to get the descriptor type used to extract descriptor for each keyframe.

Returns
Descriptor type

◆ getKeyframe()

FrameworkReturnCode SolAR::datastructure::KeyframeCollection::getKeyframe ( const uint32_t  id,
SRef< SolAR::datastructure::Keyframe > &  keyframe 
) const

This method allows to get a keyframe by its id.

Parameters
[in]idof the keyframe to get
[out]akeyframe stored in the keyframes manager
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getKeyframes()

FrameworkReturnCode SolAR::datastructure::KeyframeCollection::getKeyframes ( const std::vector< uint32_t > &  ids,
std::vector< SRef< SolAR::datastructure::Keyframe > > &  keyframes 
) const

This method allows to get a set of keyframes by their ids.

Parameters
[in]avector of ids of the keyframes to get
[out]avector of keyframes stored in the keyframe manager
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getNbKeyframes()

int SolAR::datastructure::KeyframeCollection::getNbKeyframes ( ) const

This method allows to get the number of keyframes stored in the point cloud.

Returns
The number of keyframes

◆ isExistKeyframe()

bool SolAR::datastructure::KeyframeCollection::isExistKeyframe ( const uint32_t  id) const

This method allows to know if a keyframe is already stored in the component.

Parameters
[in]Idof this keyframe
Returns
true if exist, else false

◆ setDescriptorType()

FrameworkReturnCode SolAR::datastructure::KeyframeCollection::setDescriptorType ( const SolAR::datastructure::DescriptorType &  type)

This method allows to set the descriptor type used to extract descriptor for each keyframe.

Parameters
[in]typethe descriptor type
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ suppressKeyframe()

FrameworkReturnCode SolAR::datastructure::KeyframeCollection::suppressKeyframe ( const uint32_t  id)

This method allow to suppress a keyframe by its id.

Parameters
[in]idof the keyframe to suppress
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

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