Solar
Public Member Functions | Protected Attributes | Friends | List of all members
SolAR::datastructure::Frame Class Reference

A frame. More...

#include <Frame.h>

Inheritance diagram for SolAR::datastructure::Frame:
Inheritance graph
[legend]

Public Member Functions

 Frame (const SRef< Frame > frame)
 
 Frame (const SRef< Keyframe > keyframe)
 
 Frame (const std::vector< Keypoint > &keypoints, const SRef< DescriptorBuffer > descriptors, const SRef< Image > view, const Transform3Df pose=Transform3Df::Identity())
 
 Frame (const std::vector< Keypoint > &keypoints, const std::vector< Keypoint > &undistortedKeypoints, const SRef< DescriptorBuffer > descriptors, const SRef< Image > view, const SRef< Keyframe > refKeyframe, const Transform3Df pose=Transform3Df::Identity())
 
 Frame (const std::vector< Keypoint > &keypoints, const std::vector< Keypoint > &undistortedKeypoints, const SRef< DescriptorBuffer > descriptors, const SRef< Image > view, const Transform3Df pose=Transform3Df::Identity())
 
 ~Frame ()=default
 ~Frame
 
const SRef< Image > & getView () const
 get view image More...
 
void setView (const SRef< Image > &view)
 set view image More...
 
const Transform3DfgetPose () const
 get camera pose More...
 
void setPose (const Transform3Df &pose)
 set pose More...
 
const std::vector< Keypoint > & getKeypoints () const
 get keypoints More...
 
const KeypointgetKeypoint (int i) const
 get the i-th keypoint More...
 
void setKeypoints (const std::vector< Keypoint > &kpts)
 set keypoints More...
 
const std::vector< Keypoint > & getUndistortedKeypoints () const
 get undistorted keypoints More...
 
const KeypointgetUndistortedKeypoint (int i) const
 get the i-th undistorted keypoint More...
 
void setUndistortedKeypoints (const std::vector< Keypoint > &kpts)
 set undistorted keypoints More...
 
void setReferenceKeyframe (const SRef< Keyframe > &keyframe)
 set reference keyframe More...
 
const SRef< Keyframe > & getReferenceKeyframe () const
 get reference keyframe More...
 
const SRef< DescriptorBuffer > & getDescriptors () const
 get descriptors More...
 
void setDescriptors (const SRef< DescriptorBuffer > &descriptors)
 set descriptors More...
 
const std::map< uint32_t, uint32_t > & getVisibility () const
 Get all cloud point visibilities.
 
void setVisibility (const std::map< uint32_t, uint32_t > &visibilities)
 set visibility More...
 
void addVisibilities (const std::map< uint32_t, uint32_t > &visibilites)
 Add cloud point visibilities to frame. More...
 
void addVisibility (const uint32_t &id_keypoint, const uint32_t &id_cloudPoint)
 Add a cloud point visibility to frame. More...
 
bool removeVisibility (const uint32_t &id_keypoint, const uint32_t &id_cloudPoint)
 Remove a visibility. More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 

Protected Attributes

Transform3Df m_pose
 
SRef< Imagem_view
 
SRef< Keyframem_referenceKeyFrame
 
SRef< DescriptorBufferm_descriptors
 
std::vector< Keypointm_keypoints
 
std::vector< Keypointm_keypointsUndistort
 
std::map< uint32_t, uint32_t > m_mapVisibility
 

Friends

class boost::serialization::access
 

Detailed Description

A frame.

This class provides frame definition.

Member Function Documentation

◆ addVisibilities()

void SolAR::datastructure::Frame::addVisibilities ( const std::map< uint32_t, uint32_t > &  visibilites)

Add cloud point visibilities to frame.

Parameters
[in]visibilitesa map of cloud pont visibilities, the first element is keypoint id, the second one is cloud point id

◆ addVisibility()

void SolAR::datastructure::Frame::addVisibility ( const uint32_t &  id_keypoint,
const uint32_t &  id_cloudPoint 
)

Add a cloud point visibility to frame.

Parameters
[in]id_keypointid of keypoint
[in]id_cloudPointid of cloud point

◆ getDescriptors()

const SRef< DescriptorBuffer > & SolAR::datastructure::Frame::getDescriptors ( ) const

get descriptors

Returns
descriptors

◆ getKeypoint()

const Keypoint & SolAR::datastructure::Frame::getKeypoint ( int  i) const

get the i-th keypoint

Parameters
[in]iindex of keypoint
Returns
i-th keypoint

◆ getKeypoints()

const std::vector< Keypoint > & SolAR::datastructure::Frame::getKeypoints ( ) const

get keypoints

Returns
keypoints

◆ getPose()

const Transform3Df & SolAR::datastructure::Frame::getPose ( ) const

get camera pose

Returns
camera pose

◆ getReferenceKeyframe()

const SRef< Keyframe > & SolAR::datastructure::Frame::getReferenceKeyframe ( ) const

get reference keyframe

Returns
reference keyframe

◆ getUndistortedKeypoint()

const Keypoint & SolAR::datastructure::Frame::getUndistortedKeypoint ( int  i) const

get the i-th undistorted keypoint

Parameters
[in]iindex of undistorted keypoint
Returns
i-th undistorted keypoint

◆ getUndistortedKeypoints()

const std::vector< Keypoint > & SolAR::datastructure::Frame::getUndistortedKeypoints ( ) const

get undistorted keypoints

Returns
undistorted keypoints

◆ getView()

const SRef< Image > & SolAR::datastructure::Frame::getView ( ) const

get view image

Returns
view image

◆ removeVisibility()

bool SolAR::datastructure::Frame::removeVisibility ( const uint32_t &  id_keypoint,
const uint32_t &  id_cloudPoint 
)

Remove a visibility.

Parameters
[in]id_keypointid of keypoint
[in]id_cloudPointid of cloud point
Returns
true if remove successfully

◆ setDescriptors()

void SolAR::datastructure::Frame::setDescriptors ( const SRef< DescriptorBuffer > &  descriptors)

set descriptors

Parameters
[in]descriptorsdescriptors

◆ setKeypoints()

void SolAR::datastructure::Frame::setKeypoints ( const std::vector< Keypoint > &  kpts)

set keypoints

Parameters
[in]kptskeypoints

◆ setPose()

void SolAR::datastructure::Frame::setPose ( const Transform3Df pose)

set pose

Parameters
[in]posecamera pose

◆ setReferenceKeyframe()

void SolAR::datastructure::Frame::setReferenceKeyframe ( const SRef< Keyframe > &  keyframe)

set reference keyframe

Parameters
[in]keyframereference keyframe

◆ setUndistortedKeypoints()

void SolAR::datastructure::Frame::setUndistortedKeypoints ( const std::vector< Keypoint > &  kpts)

set undistorted keypoints

Parameters
[in]kptsundistorted keypoints

◆ setView()

void SolAR::datastructure::Frame::setView ( const SRef< Image > &  view)

set view image

Parameters
[in]viewview image

◆ setVisibility()

void SolAR::datastructure::Frame::setVisibility ( const std::map< uint32_t, uint32_t > &  visibilities)

set visibility

Parameters
[in]visibilitiesa map of cloud pont visibilities, the first element is keypoint id, the second one is cloud point id

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