NDEVR
API Documentation
KeyFrame

A keyframe in the SLAM map, derived from Frame. More...

Inheritance diagram for KeyFrame:
[legend]
Collaboration diagram for KeyFrame:
[legend]

Classes

struct  KeyFrameScore
 Stores place-recognition query scores for a keyframe. More...

Public Types

enum  ScoreEnum { e_merge , e_loop , e_relocation , e_place_recognition }
 Enumerates the types of place-recognition scoring. More...

Public Member Functions

 KeyFrame (Frame &F, Map *pMap, KeyFrameDatabase *pKFDB)
 Constructs a KeyFrame from a Frame.
void AddChild (KeyFrame *pKF)
 Adds a child keyframe in the spanning tree.
void addConnection (KeyFrame *pKF, uint04 weight)
 Adds a covisibility connection to another keyframe.
void addGlobalPositionMeas (const GlobalPosition *meas)
 Adds a global position measurement to this keyframe.
void AddLoopEdge (KeyFrame *pKF)
 Adds a loop closure edge to another keyframe.
void AddMergeEdge (KeyFrame *pKF)
 Adds a merge edge to another keyframe.
void bestCovisibilityKeyFrames (Buffer< KeyFrame * > &frames, uint04 N=Constant< uint04 >::Max) const
 Returns the N best covisible keyframes by weight.
void ChangeParent (KeyFrame *pKF)
 Changes the parent of this keyframe in the spanning tree.
float ComputeSceneMedianDepth (const int q)
 Computes the median scene depth.
void covisiblesByWeight (uint04 w, Buffer< KeyFrame * > &frames) const
 Returns keyframes with covisibility weight at least w.
bool doNotReduce () const
 Checks whether this keyframe should not be reduced/culled.
void EraseChild (KeyFrame *pKF)
 Removes a child keyframe from the spanning tree.
void EraseConnection (KeyFrame *pKF)
 Removes a covisibility connection.
void eraseMapPoint (MapPoint *pMP)
 Removes a map point observation from this keyframe.
Eigen::Vector3f GetAccBias ()
 Returns the accelerometer bias.
Set< KeyFrame * > GetChilds ()
 Returns the children of this keyframe in the spanning tree.
Set< KeyFrame * > GetConnectedKeyFrames ()
 Returns all connected keyframes in the covisibility graph.
Buffer< const GlobalPosition * > getGlobalPositionMeas () const
 Returns global position measurements associated with this keyframe.
Eigen::Vector3f GetGyroBias ()
 Returns the gyroscope bias.
IMU::Bias GetImuBias ()
 Returns the full IMU bias (gyroscope + accelerometer).
Eigen::Vector3< g_type > GetImuPosition () const final override
 Returns the IMU position in world coordinates.
Eigen::Matrix3< g_type > GetImuRotation () const final override
 Returns the IMU rotation matrix.
Set< KeyFrame * > GetLoopEdges ()
 Returns all loop closure edges.
MapGetMap ()
 Returns the map this keyframe belongs to.
Set< KeyFrame * > GetMergeEdges ()
 Returns all merge edges.
Sophus::SE3f GetRelativePoseTlr ()
 Returns the relative pose from left to right camera.
Sophus::SE3f GetRelativePoseTrl ()
 Returns the relative pose from right to left camera.
Eigen::Vector3f GetRightCameraCenter ()
 Returns the right camera center in world coordinates.
Sophus::SE3< float > GetRightPose ()
 Returns the right camera pose in world coordinates.
Sophus::SE3< float > GetRightPoseInverse ()
 Returns the inverse of the right camera pose.
Eigen::Matrix< float, 3, 3 > GetRightRotation ()
 Returns the right camera rotation matrix.
Eigen::Vector3f GetRightTranslation ()
 Returns the right camera translation vector.
Eigen::Matrix3< g_type > GetRotation () const final override
 Returns the camera rotation matrix (camera-to-world).
Eigen::Vector3< g_type > GetTranslation () const final override
 Returns the camera translation vector (camera-to-world).
bool hasChild (KeyFrame *pKF)
 Checks whether a keyframe is a child of this one.
Sophus::SE3< g_type > imuPose () const final override
 Returns the IMU pose as an SE3 transform.
Sophus::SE3< g_type > inversePose () const override
 Returns the inverse camera pose (camera-to-world transform).
bool IsInImage (const float &x, const float &y) const
 Checks whether a point is within the image bounds.
Eigen::Vector3< g_type > linearVelocity () const final override
 Returns the linear velocity of the frame.
Mapmap () const
 Returns the map this keyframe belongs to.
KeyFrameparent () const
 Returns the parent keyframe in the spanning tree.
Sophus::SE3< g_type > pose () const override
 Returns the camera pose (thread-safe).
void processGlobalPositionMeas ()
 Processes global position measurements for this keyframe.
void SetBadFlag ()
 Marks this keyframe as bad and removes it from the map.
void setDoNotReduce (bool do_not_reduce) const
 Sets whether this keyframe should not be reduced/culled.
void SetErase ()
 Allows this keyframe to be erased.
void SetFirstConnection (bool bFirst)
 Sets the first-connection flag.
void SetKeyFrameDatabase (KeyFrameDatabase *pKFDB)
 Sets the keyframe database for this keyframe.
void setLinearVelocity (const Eigen::Vector3< g_type > &Vw_) final override
 Sets the IMU linear velocity (thread-safe).
void SetNewBias (const IMU::Bias &b)
 Updates the IMU bias for this keyframe.
void SetNotErase ()
 Prevents this keyframe from being erased.
void SetORBVocabulary (ORBVocabulary *pORBVoc)
 Sets the ORB vocabulary for this keyframe.
void setPose (const Sophus::SE3< g_type > &Tcw) final override
 Sets the camera pose (thread-safe).
void updateBestCovisibles ()
 Sorts covisible keyframes by weight.
void updateConnections ()
 Updates all covisibility connections based on shared map points.
void UpdateMap (Map *pMap)
 Updates the map association for this keyframe.
uint04 weight (KeyFrame *pKF) const
 Returns the covisibility weight with another keyframe.
Public Member Functions inherited from Frame
 Frame ()=default
 Default constructor.
 Frame (const Frame &frame)
 Copy constructor.
 Frame (Frame &&frame) noexcept
 Move constructor.
 Frame (FrameInfo *frame_info, const cv::Mat &imGray, const cv::Mat &imDepth, fltp08 timeStamp, ORBextractor *extractor, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
 Constructor for RGB-D cameras.
 Frame (FrameInfo *frame_info, const cv::Mat &imGray, fltp08 timeStamp, ORBextractor *extractor, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
 Constructor for monocular cameras.
 Frame (FrameInfo *frame_info, const cv::Mat &imLeft, const cv::Mat &imRight, fltp08 timeStamp, ORBextractor *extractorLeft, ORBextractor *extractorRight, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
 Constructor for stereo cameras.
 Frame (FrameInfo *frame_info, const cv::Mat &imLeft, const cv::Mat &imRight, fltp08 timeStamp, ORBextractor *extractorLeft, ORBextractor *extractorRight, ORBVocabulary *voc, GeometricCamera *pCamera2, Sophus::SE3< g_type > &Tlr, const IMU::Calib &ImuCalib=IMU::Calib())
 Constructor for stereo cameras with a second camera model.
 ~Frame ()
 Destructor.
const BowVector & bow () const
 Returns the Bag of Words vector.
const Eigen::Vector3< g_type > & cameraCenter () const
 Returns the camera center in world coordinates.
Eigen::Matrix3< g_type > cameraRotation () const
 Returns the world-to-camera rotation (inverse rotation).
void clearBoW ()
 Clears the Bag of Words data.
void clearMapPoints ()
 Clears all map point associations.
void computeBoW ()
 Computes the Bag of Words representation for this frame.
void ComputeStereoFishEyeMatches ()
 Computes stereo matches for fisheye cameras.
void computeStereoFromRGBD (const cv::Mat &imDepth)
 Associates depth-derived right coordinates to keypoints from an RGB-D depthmap.
void computeStereoMatches ()
 Searches stereo matches between left and right keypoints.
fltp04 depth (uint04 idx) const
 Returns the depth at the given keypoint index.
Vector< 2, uint04discardOutliers ()
 Discards outlier map point associations.
void eraseMapPointMatch (uint04)
 Removes a map point association at the given index.
void extractORB (uint01 flag, const cv::Mat &im, uint04 x0, uint04 x1)
 Extracts ORB features from the image.
const Dictionary< uint04, Buffer< uint04 > > & featureIndices () const
 Returns the feature index map (word ID to keypoint indices).
void getFeaturesInArea (Buffer< uint04 > &indices, fltp04 x, fltp04 y, fltp04 r, uint04 min_level=0U, uint04 max_level=Constant< uint04 >::Max, const bool bRight=false) const
 Finds features within a circular area in the image.
Sophus::SE3< g_type > GetRelativePoseTlr () const
 Returns the relative pose from left to right camera.
Eigen::Matrix3< g_type > GetRelativePoseTlr_rotation () const
 Returns the rotation component of the left-to-right relative pose.
Eigen::Vector3< g_type > GetRelativePoseTlr_translation () const
 Returns the translation component of the left-to-right relative pose.
Sophus::SE3< g_type > GetRelativePoseTrl () const
 Returns the relative pose from right to left camera.
bool hasCamera (uint01 index) const
 Checks whether a camera at the given index is available.
bool HasPose () const
 Checks whether a valid pose has been set.
bool HasVelocity () const
 Checks whether a valid velocity has been set.
bool imuIsPreintegrated () const
 Checks whether the IMU preintegration is complete.
const FrameInfoinfo () const
 Returns the shared frame info.
void init (FrameInfo *info, const cv::Mat &imGray, const cv::Mat &imDepth, fltp08 timeStamp, ORBextractor *extractor, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
 Initializes a frame from RGB-D data.
Eigen::Vector3< g_type > inRefCoordinates (Eigen::Vector3< g_type > pCw) const
 Transforms a world-coordinate point into this frame's camera coordinates.
const Buffer< float > & invLevelSigma2 () const
 Returns the inverse sigma squared values per pyramid level.
const Buffer< float > & invScaleFactors () const
 Returns the inverse ORB scale factors per pyramid level.
bool isKeyFrame ()
 Checks whether this frame is a keyframe.
bool isMono () const
 Checks whether this frame is monocular (single camera).
bool isOutlier (uint04 idx) const
 Checks whether the map point at the given index is an outlier.
bool isSet () const
 Checks whether this frame has been initialized.
const cv::KeyPoint & keypoint (uint04 i) const
 Returns the keypoint at the given index.
const cv::KeyPoint & keypoint (uint04 i, bool is_right) const
 Returns the keypoint at the given index from left or right view.
uint04 levelCount () const
 Returns the number of pyramid levels.
const Buffer< float > & levelSigma2 () const
 Returns the sigma squared values per pyramid level.
LogPtr log ()
 Returns the logger for this frame.
MapPointmapPoint (uint04 idx)
 Returns the map point at the given index (non-const).
MapPointmapPoint (uint04 idx) const
 Returns the map point at the given index.
uint04 mapPointCount () const
 Returns the number of map points associated with this frame.
const Buffer< MapPoint * > & mapPointMatches ()
 Returns the map point matches buffer.
const Buffer< MapPoint * > & mapPoints () const
 Returns all map point associations.
RWLockmapPointsLockPtr () const
 Returns the read-write lock for map point access.
fltp04 nearFarThreshold () const
 Returns the near/far depth threshold.
uint04 observationCount (uint04 idx) const
 Returns the observation count for a map point at the given index.
Frameoperator= (const Frame &frame) noexcept
 Copy assignment operator.
Frameoperator= (Frame &&frame) noexcept
 Move assignment operator.
const Buffer< bool > & outliers () const
 Returns the outlier flags buffer.
fltp04 right (uint04 idx) const
 Returns the right stereo coordinate at the given keypoint index.
fltp04 scaleFactor () const
 Returns the ORB scale factor.
const Buffer< float > & scaleFactors () const
 Returns the ORB scale factors per pyramid level.
void setImuPoseVelocity (const Eigen::Matrix3< g_type > &Rwb, const Eigen::Vector3< g_type > &twb, const Eigen::Vector3< g_type > &Vwb)
 Sets IMU pose and velocity, implicitly updating the camera pose.
void setIntegrated ()
 Marks the IMU preintegration as complete.
void setMapPointMatch (uint04, MapPoint *pMP)
 Sets a map point association at the given index.
void setMapPoints (const Buffer< MapPoint * > &map_points)
 Sets all map point associations.
void SetNewBias (const IMU::Bias &b)
 Updates the IMU bias.
void setOutlier (uint04 idx, bool outlier)
 Sets the outlier flag at the given index.
void setOutliers (const Buffer< bool > &map_points)
 Sets the outlier flags buffer.
Eigen::Vector3< g_type > stereo3DPoint (uint04 idx) const
 Returns the triangulated 3D stereo point at the given index.
const Eigen::Matrix< g_type, 3, 1 > & tcw () const
 Returns the camera-to-world translation.
fltp08 timestamp () const
 Returns the capture timestamp.
fltp04 trackDepth (const Eigen::Vector3< g_type > &global_position) const
 Computes the depth of a 3D point relative to this frame's camera.
uint04 trackedMapPoints (uint04 minObs) const
 Counts map points with at least the given number of observations.
const cv::KeyPoint & undistortedPoint (uint04 idx) const
 Returns the undistorted keypoint at the given index.
uint04 undistortedPointCount () const
 Returns the number of undistorted keypoints.
const PrimitiveAlignedBuffer< cv::KeyPoint, 32 > & undistortedPoints () const
 Returns all undistorted keypoints.
Eigen::Vector3< g_type > unproject (uint04 i)
 Backprojects a keypoint into 3D world coordinates using stereo/depth info.
void updatePoseMatrices ()
 Recomputes derived pose matrices from the current camera pose.

Public Attributes

bool bImu = false
 Whether this keyframe uses IMU data.
uint04 frame_id = Constant<uint04>::Invalid
 Original frame ID.
uint04 keyframe_id = Constant<uint04>::Invalid
 Unique keyframe ID.
uint04 mnBAFixedForKF = 0U
 Fixed BA keyframe ID marker.
uint04 mnBALocalForKF = 0U
 Local BA keyframe ID marker.
KeyFramemNextKF = nullptr
 Next keyframe in temporal order.
uint04 mnFuseTargetForKF = 0U
 Fuse target keyframe ID for tracking.
KeyFramemPrevKF = nullptr
 Previous keyframe in temporal order.
Sophus::SE3< g_type > mTcp
 Pose relative to parent (computed when bad flag is set).
KeyFrameScore scores [4]
 Scores indexed by ScoreEnum.
Public Attributes inherited from Frame
uint04 id = Constant<uint04>::Invalid
 Unique frame ID.
IMUData imu_data
 IMU calibration and bias data.
ORBextractorm_extractor
 ORB feature extractor.
Dictionary< uint04, Buffer< uint04 > > m_features_indices
 Maps BoW word IDs to keypoint indices.
FrameInfom_frame_info = nullptr
 Shared camera info (intrinsics, bounds).
bool m_is_keyframe = false
 Whether this frame is a keyframe.
fltp08 m_timestamp = 0.0
 Frame capture timestamp.
FrameViewm_view [2] = { nullptr, nullptr }
 Left [0] and right [1] view data.
bool mbHasPose = false
 Whether a valid pose has been set.
bool mbHasVelocity = false
 Whether a valid velocity has been set.
bool mbImuPreintegrated = false
 Whether IMU preintegration is complete.
bool mbIsSet = false
 Whether this frame has been initialized.
Eigen::Vector3< g_type > mOwb
 IMU position in world coordinates.
ConstraintPoseImumpcpi = nullptr
 IMU pose constraint.
IMU::Preintegrated * mpImuPreintegrated = nullptr
 IMU preintegration from last keyframe.
IMU::Preintegrated * mpImuPreintegratedFrame = nullptr
 Frame-level IMU preintegration.
KeyFramempLastKeyFrame = nullptr
 Previous keyframe.
ORBVocabularympORBvocabulary = nullptr
 ORB vocabulary for relocalization.
KeyFramempReferenceKF = nullptr
 Reference keyframe.
uint04 N = 0
 Number of keypoints.
Sophus::SE3< g_type > sensor_pose
 External sensor pose.

Static Public Attributes

static volatile uint04 s_next_kf_id
 Global keyframe ID counter.
Static Public Attributes inherited from Frame
static cv::BFMatcher BFmatcher
 Brute-force matcher for stereo fisheye matching.
static volatile uint04 s_next_id
 Global frame ID counter.
static __attribute__((visibility("default"))) static void Set3DCallback(std std::function< Vector< 3, fltp04 >(Frame *frame, Vector< 3, fltp04 >) s_point_to_3d_callback )
 Sets a callback for converting frame points to 3D.

Additional Inherited Members

Protected Attributes inherited from Frame
BowVector m_bow
 Bag of Words vector for this frame.
Buffer< fltp04m_depth
 Depth per keypoint.
RWLock m_feature_lock
 Read-write lock for map point access.
Eigen::Vector3< g_type > m_linear_velocity = Eigen::Vector3<g_type>(0,0,0)
 IMU linear velocity.
Buffer< MapPoint * > m_map_points
 Map point associations for each keypoint.
Buffer< Vector< 2, fltp04 > > m_original_points
 Original (possibly distorted) keypoint positions.
Buffer< bool > m_outlier
 Outlier flag per keypoint.
Buffer< fltp04m_right
 Right stereo coordinate per keypoint (negative if monocular).
Buffer< Eigen::Vector3< g_type > > m_stereo_3D_points
 Triangulated stereo 3D points from fisheye matching.
PrimitiveAlignedBuffer< cv::KeyPoint, 32 > m_undistorted_points
 Undistorted keypoints used by the system.
Sophus::SE3< g_type > mTcw
 World-to-camera transform.
Sophus::SE3< g_type > mTlr
 Left-to-right camera relative pose.
Sophus::SE3< g_type > mTrl
 Right-to-left camera relative pose.
Sophus::SE3< g_type > mTwc
 Camera-to-world transform (inverse of mTcw).

Detailed Description

A keyframe in the SLAM map, derived from Frame.

KeyFrames are selected frames that anchor the map. They store covisibility graph connections, spanning tree relationships, loop edges, and are used for local mapping, loop closing, and relocalization.

Definition at line 30 of file KeyFrame.h.

Member Enumeration Documentation

◆ ScoreEnum

Enumerates the types of place-recognition scoring.

Enumerator
e_merge 

Merge detection score.

e_loop 

Loop detection score.

e_relocation 

Relocalization score.

e_place_recognition 

General place recognition score.

Definition at line 293 of file KeyFrame.h.

Constructor & Destructor Documentation

◆ KeyFrame()

KeyFrame::KeyFrame ( Frame & F,
Map * pMap,
KeyFrameDatabase * pKFDB )

Constructs a KeyFrame from a Frame.

Parameters
[in]FSource frame to promote to a keyframe.
[in]pMapMap this keyframe belongs to.
[in]pKFDBKeyframe database for place recognition.

References Frame::Frame().

Referenced by AddChild(), addConnection(), AddLoopEdge(), AddMergeEdge(), bestCovisibilityKeyFrames(), ChangeParent(), covisiblesByWeight(), EraseChild(), EraseConnection(), GetChilds(), GetConnectedKeyFrames(), hasChild(), parent(), and weight().

Member Function Documentation

◆ AddChild()

void KeyFrame::AddChild ( KeyFrame * pKF)

Adds a child keyframe in the spanning tree.

Parameters
[in]pKFChild keyframe to add.

References KeyFrame(), and AddChild().

Referenced by AddChild().

◆ addConnection()

void KeyFrame::addConnection ( KeyFrame * pKF,
uint04 weight )

Adds a covisibility connection to another keyframe.

Parameters
[in]pKFConnected keyframe.
[in]weightNumber of shared map points.

References KeyFrame(), addConnection(), and weight().

Referenced by addConnection().

◆ addGlobalPositionMeas()

void KeyFrame::addGlobalPositionMeas ( const GlobalPosition * meas)

Adds a global position measurement to this keyframe.

Parameters
[in]measPointer to the global position measurement.

◆ AddLoopEdge()

void KeyFrame::AddLoopEdge ( KeyFrame * pKF)

Adds a loop closure edge to another keyframe.

Parameters
[in]pKFLoop-connected keyframe.

References KeyFrame().

◆ AddMergeEdge()

void KeyFrame::AddMergeEdge ( KeyFrame * pKF)

Adds a merge edge to another keyframe.

Parameters
[in]pKFMerge-connected keyframe.

References KeyFrame().

◆ bestCovisibilityKeyFrames()

void KeyFrame::bestCovisibilityKeyFrames ( Buffer< KeyFrame * > & frames,
uint04 N = Constantuint04 >::Max ) const

Returns the N best covisible keyframes by weight.

Parameters
[out]framesBuffer to fill with covisible keyframes.
[in]NMaximum number to return (default all).

References KeyFrame(), bestCovisibilityKeyFrames(), and Frame::N.

Referenced by bestCovisibilityKeyFrames().

◆ ChangeParent()

void KeyFrame::ChangeParent ( KeyFrame * pKF)

Changes the parent of this keyframe in the spanning tree.

Parameters
[in]pKFNew parent keyframe.

References KeyFrame(), and ChangeParent().

Referenced by ChangeParent().

◆ ComputeSceneMedianDepth()

float KeyFrame::ComputeSceneMedianDepth ( const int q)

Computes the median scene depth.

Used in monocular initialization.

Parameters
[in]qQuantile parameter (2 for median).
Returns
The median depth value.

◆ covisiblesByWeight()

void KeyFrame::covisiblesByWeight ( uint04 w,
Buffer< KeyFrame * > & frames ) const

Returns keyframes with covisibility weight at least w.

Parameters
[in]wMinimum weight threshold.
[out]framesBuffer to fill with qualifying keyframes.

References KeyFrame(), and covisiblesByWeight().

Referenced by covisiblesByWeight().

◆ doNotReduce()

bool KeyFrame::doNotReduce ( ) const
inline

Checks whether this keyframe should not be reduced/culled.

Returns
True if reduction is suppressed.

Definition at line 50 of file KeyFrame.h.

◆ EraseChild()

void KeyFrame::EraseChild ( KeyFrame * pKF)

Removes a child keyframe from the spanning tree.

Parameters
[in]pKFChild keyframe to remove.

References KeyFrame(), and EraseChild().

Referenced by EraseChild().

◆ EraseConnection()

void KeyFrame::EraseConnection ( KeyFrame * pKF)

Removes a covisibility connection.

Parameters
[in]pKFKeyframe to disconnect.

References KeyFrame(), and EraseConnection().

Referenced by EraseConnection().

◆ eraseMapPoint()

void KeyFrame::eraseMapPoint ( MapPoint * pMP)

Removes a map point observation from this keyframe.

Parameters
[in]pMPMap point to remove.

◆ GetAccBias()

Eigen::Vector3f KeyFrame::GetAccBias ( )

Returns the accelerometer bias.

Returns
The 3D accelerometer bias vector.

◆ GetChilds()

Set< KeyFrame * > KeyFrame::GetChilds ( )

Returns the children of this keyframe in the spanning tree.

Returns
Set of child keyframe pointers.

References KeyFrame(), and GetChilds().

Referenced by GetChilds().

◆ GetConnectedKeyFrames()

Set< KeyFrame * > KeyFrame::GetConnectedKeyFrames ( )

Returns all connected keyframes in the covisibility graph.

Returns
Set of connected keyframe pointers.

References KeyFrame(), and GetConnectedKeyFrames().

Referenced by GetConnectedKeyFrames().

◆ getGlobalPositionMeas()

Buffer< const GlobalPosition * > KeyFrame::getGlobalPositionMeas ( ) const

Returns global position measurements associated with this keyframe.

Returns
Buffer of global position pointers.

◆ GetGyroBias()

Eigen::Vector3f KeyFrame::GetGyroBias ( )

Returns the gyroscope bias.

Returns
The 3D gyroscope bias vector.

◆ GetImuBias()

IMU::Bias KeyFrame::GetImuBias ( )

Returns the full IMU bias (gyroscope + accelerometer).

Returns
The IMU bias.

◆ GetImuPosition()

Eigen::Vector3< g_type > KeyFrame::GetImuPosition ( ) const
finaloverridevirtual

Returns the IMU position in world coordinates.

Returns
The 3D IMU position.

Reimplemented from Frame.

◆ GetImuRotation()

Eigen::Matrix3< g_type > KeyFrame::GetImuRotation ( ) const
finaloverridevirtual

Returns the IMU rotation matrix.

Returns
The 3x3 IMU rotation.

Reimplemented from Frame.

References GetImuRotation().

Referenced by GetImuRotation().

◆ GetLoopEdges()

Set< KeyFrame * > KeyFrame::GetLoopEdges ( )

Returns all loop closure edges.

Returns
Set of loop-connected keyframe pointers.

◆ GetMap()

Map * KeyFrame::GetMap ( )

Returns the map this keyframe belongs to.

Returns
Pointer to the map.

◆ GetMergeEdges()

Set< KeyFrame * > KeyFrame::GetMergeEdges ( )

Returns all merge edges.

Returns
Set of merge-connected keyframe pointers.

◆ GetRelativePoseTlr()

Sophus::SE3f KeyFrame::GetRelativePoseTlr ( )

Returns the relative pose from left to right camera.

Returns
The SE3 transform Tlr.

◆ GetRelativePoseTrl()

Sophus::SE3f KeyFrame::GetRelativePoseTrl ( )

Returns the relative pose from right to left camera.

Returns
The SE3 transform Trl.

◆ GetRightCameraCenter()

Eigen::Vector3f KeyFrame::GetRightCameraCenter ( )

Returns the right camera center in world coordinates.

Returns
The 3D right camera center.

◆ GetRightPose()

Sophus::SE3< float > KeyFrame::GetRightPose ( )

Returns the right camera pose in world coordinates.

Returns
The SE3 right camera pose.

◆ GetRightPoseInverse()

Sophus::SE3< float > KeyFrame::GetRightPoseInverse ( )

Returns the inverse of the right camera pose.

Returns
The SE3 inverse right camera pose.

◆ GetRightRotation()

Eigen::Matrix< float, 3, 3 > KeyFrame::GetRightRotation ( )

Returns the right camera rotation matrix.

Returns
The 3x3 rotation matrix.

◆ GetRightTranslation()

Eigen::Vector3f KeyFrame::GetRightTranslation ( )

Returns the right camera translation vector.

Returns
The 3D translation vector.

◆ GetRotation()

Eigen::Matrix3< g_type > KeyFrame::GetRotation ( ) const
inlinefinaloverridevirtual

Returns the camera rotation matrix (camera-to-world).

Returns
The 3x3 rotation matrix.

Reimplemented from Frame.

Definition at line 101 of file KeyFrame.h.

References GetRotation(), and Frame::mTcw.

Referenced by GetRotation().

◆ GetTranslation()

Eigen::Vector3< g_type > KeyFrame::GetTranslation ( ) const
inlinefinaloverridevirtual

Returns the camera translation vector (camera-to-world).

Returns
The 3D translation vector.

Reimplemented from Frame.

Definition at line 106 of file KeyFrame.h.

References Frame::mTcw.

◆ hasChild()

bool KeyFrame::hasChild ( KeyFrame * pKF)

Checks whether a keyframe is a child of this one.

Parameters
[in]pKFKeyframe to check.
Returns
True if pKF is a child.

References KeyFrame().

◆ imuPose()

Sophus::SE3< g_type > KeyFrame::imuPose ( ) const
finaloverridevirtual

Returns the IMU pose as an SE3 transform.

Returns
The IMU pose.

Reimplemented from Frame.

References imuPose().

Referenced by imuPose().

◆ inversePose()

Sophus::SE3< g_type > KeyFrame::inversePose ( ) const
inlineoverridevirtual

Returns the inverse camera pose (camera-to-world transform).

Returns
The SE3 pose Twc.

Reimplemented from Frame.

Definition at line 66 of file KeyFrame.h.

References Frame::mTwc.

◆ IsInImage()

bool KeyFrame::IsInImage ( const float & x,
const float & y ) const

Checks whether a point is within the image bounds.

Parameters
[in]xX coordinate.
[in]yY coordinate.
Returns
True if the point is within bounds.

◆ linearVelocity()

Eigen::Vector3< g_type > KeyFrame::linearVelocity ( ) const
finaloverridevirtual

Returns the linear velocity of the frame.

Returns
The 3D velocity vector.

Reimplemented from Frame.

◆ map()

Map * KeyFrame::map ( ) const
inline

Returns the map this keyframe belongs to.

Returns
Pointer to the map.

Definition at line 62 of file KeyFrame.h.

◆ parent()

KeyFrame * KeyFrame::parent ( ) const
inline

Returns the parent keyframe in the spanning tree.

Returns
Pointer to the parent keyframe.

Definition at line 166 of file KeyFrame.h.

References KeyFrame(), and parent().

Referenced by parent().

◆ pose()

Sophus::SE3< g_type > KeyFrame::pose ( ) const
overridevirtual

Returns the camera pose (thread-safe).

Returns
The SE3 world-to-camera transform.

Reimplemented from Frame.

◆ setDoNotReduce()

void KeyFrame::setDoNotReduce ( bool do_not_reduce) const
inline

Sets whether this keyframe should not be reduced/culled.

Parameters
[in]do_not_reduceTrue to suppress reduction.

Definition at line 54 of file KeyFrame.h.

◆ SetFirstConnection()

void KeyFrame::SetFirstConnection ( bool bFirst)

Sets the first-connection flag.

Parameters
[in]bFirstTrue if this is the first connection.

◆ SetKeyFrameDatabase()

void KeyFrame::SetKeyFrameDatabase ( KeyFrameDatabase * pKFDB)

Sets the keyframe database for this keyframe.

Parameters
[in]pKFDBPointer to the keyframe database.

◆ setLinearVelocity()

void KeyFrame::setLinearVelocity ( const Eigen::Vector3< g_type > & Vw_)
finaloverridevirtual

Sets the IMU linear velocity (thread-safe).

Parameters
[in]Vw_Velocity in world coordinates.

Reimplemented from Frame.

◆ SetNewBias()

void KeyFrame::SetNewBias ( const IMU::Bias & b)

Updates the IMU bias for this keyframe.

Parameters
[in]bNew IMU bias.

◆ SetORBVocabulary()

void KeyFrame::SetORBVocabulary ( ORBVocabulary * pORBVoc)

Sets the ORB vocabulary for this keyframe.

Parameters
[in]pORBVocPointer to the ORB vocabulary.

◆ setPose()

void KeyFrame::setPose ( const Sophus::SE3< g_type > & Tcw)
finaloverridevirtual

Sets the camera pose (thread-safe).

Parameters
[in]TcwWorld-to-camera transform.

Reimplemented from Frame.

◆ UpdateMap()

void KeyFrame::UpdateMap ( Map * pMap)

Updates the map association for this keyframe.

Parameters
[in]pMapNew map pointer.

◆ weight()

uint04 KeyFrame::weight ( KeyFrame * pKF) const

Returns the covisibility weight with another keyframe.

Parameters
[in]pKFThe other keyframe.
Returns
The weight (shared map point count).

References KeyFrame(), and weight().

Referenced by addConnection(), and weight().


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