SRBA: Sparser Relative Bundle Adjustment
srba/impl/alloc_keyframe.h
00001 /* +---------------------------------------------------------------------------+
00002    |                     Mobile Robot Programming Toolkit (MRPT)               |
00003    |                          http://www.mrpt.org/                             |
00004    |                                                                           |
00005    | Copyright (c) 2005-2015, Individual contributors, see AUTHORS file        |
00006    | See: http://www.mrpt.org/Authors - All rights reserved.                   |
00007    | Released under BSD License. See details in http://www.mrpt.org/License    |
00008    +---------------------------------------------------------------------------+ */
00009 
00010 #pragma once
00011 
00012 namespace srba {
00013 
00018 template <class KF2KF_POSE_TYPE,class LM_TYPE,class OBS_TYPE,class RBA_OPTIONS>
00019 TKeyFrameID RbaEngine<KF2KF_POSE_TYPE,LM_TYPE,OBS_TYPE,RBA_OPTIONS>::alloc_keyframe()
00020 {
00021     // ==== Assign a free ID to the new KF   : O(1) ====
00022     const TKeyFrameID new_kf_id = rba_state.keyframes.size();
00023 
00024     // ==== Create new KF struct: insert at end of std::map<>  : O(1) ====
00025     rba_state.keyframes.push_back( keyframe_info() );
00026     //keyframe_info &kfi_new = rba_state.keyframes.back();
00027     return new_kf_id;
00028 }
00029 
00030 
00031 } // end NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends