├── README.md
├── include
├── Atlas.h
├── CameraModels
│ ├── GeometricCamera.h
│ ├── KannalaBrandt8.h
│ └── Pinhole.h
├── Converter.h
├── Frame.h
├── FrameDrawer.h
├── G2oTypes.h
├── ImuTypes.h
├── Initializer.h
├── KeyFrame.h
├── KeyFrameDatabase.h
├── LocalMapping.h
├── LoopClosing.h
├── MLPnPsolver.h
├── Map.h
├── MapDrawer.h
├── MapPoint.h
├── ORBVocabulary.h
├── ORBextractor.h
├── ORBmatcher.h
├── OptimizableTypes.h
├── Optimizer.h
├── PnPsolver.h
├── Sim3Solver.h
├── System.h
├── Tracking.h
├── TwoViewReconstruction.h
└── Viewer.h
└── src
├── Atlas.cc
├── CameraModels
├── KannalaBrandt8.cpp
└── Pinhole.cpp
├── Converter.cc
├── Frame.cc
├── FrameDrawer.cc
├── G2oTypes.cc
├── ImuTypes.cc
├── Initializer.cc
├── KeyFrame.cc
├── KeyFrameDatabase.cc
├── LocalMapping.cc
├── LoopClosing.cc
├── MLPnPsolver.cpp
├── Map.cc
├── MapDrawer.cc
├── MapPoint.cc
├── ORBextractor.cc
├── ORBmatcher.cc
├── OptimizableTypes.cpp
├── Optimizer.cc
├── PnPsolver.cc
├── Sim3Solver.cc
├── System.cc
├── Tracking.cc
├── TwoViewReconstruction.cc
└── Viewer.cc
/README.md:
--------------------------------------------------------------------------------
1 | # ORB-SLAM3-Note
2 | ORB-SLAM3源码注释,注释了大部分代码。
3 |
4 | 结合代码整理总结了视觉SLAM中的一些重要知识点,给出理论推导。如果有理解上的错误,请您指正。
5 |
6 | :) 如果对您有帮助,帮我点个star呦~
7 |
8 | ## 目录
9 | - [ORB-SLAM3知识点(一):词袋模型BoW](https://zhuanlan.zhihu.com/p/354616831)
10 | - [ORB-SLAM3知识点(二):ORB提取](https://zhuanlan.zhihu.com/p/355441452)
11 | - [ORB-SLAM3知识点(三):2d-2d匹配](https://zhuanlan.zhihu.com/p/355445588)
12 | - [ORB-SLAM3知识点(四):3d-2d匹配](https://zhuanlan.zhihu.com/p/355848913)
13 | - [ORB-SLAM3知识点(五):3d-3d匹配](https://zhuanlan.zhihu.com/p/356147588)
14 | - ORB-SLAM3知识点(六):BA优化、Jacobian
15 | - ORB-SLAM3知识点(七):...
16 |
17 | 可以到知乎上查看详细内容~
18 |
--------------------------------------------------------------------------------
/include/Atlas.h:
--------------------------------------------------------------------------------
1 | /**
2 | * This file is part of ORB-SLAM3
3 | *
4 | * Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez Rodríguez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
5 | * Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
6 | *
7 | * ORB-SLAM3 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
8 | * License as published by the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * ORB-SLAM3 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
12 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License along with ORB-SLAM3.
16 | * If not, see .
17 | */
18 |
19 | #ifndef ATLAS_H
20 | #define ATLAS_H
21 |
22 | #include "Map.h"
23 | #include "MapPoint.h"
24 | #include "KeyFrame.h"
25 | #include "GeometricCamera.h"
26 | #include "Pinhole.h"
27 | #include "KannalaBrandt8.h"
28 |
29 | #include
30 | #include
31 | #include
32 | #include
33 |
34 |
35 | namespace ORB_SLAM3
36 | {
37 | class Viewer;
38 | class Map;
39 | class MapPoint;
40 | class KeyFrame;
41 | class KeyFrameDatabase;
42 | class Frame;
43 | class KannalaBrandt8;
44 | class Pinhole;
45 |
46 | //BOOST_CLASS_EXPORT_GUID(Pinhole, "Pinhole")
47 | //BOOST_CLASS_EXPORT_GUID(KannalaBrandt8, "KannalaBrandt8")
48 |
49 | class Atlas
50 | {
51 | friend class boost::serialization::access;
52 |
53 | template
54 | void serialize(Archive &ar, const unsigned int version)
55 | {
56 | //ar.template register_type();
57 | //ar.template register_type();
58 |
59 | // Save/load the set of maps, the set is broken in libboost 1.58 for ubuntu 16.04
60 | //ar & mspMaps;
61 | ar & mvpBackupMaps;
62 | ar & mvpCameras;
63 | //ar & mvpBackupCamPin;
64 | //ar & mvpBackupCamKan;
65 | // Need to save/load the static Id from Frame, KeyFrame, MapPoint and Map
66 | ar & Map::nNextId;
67 | ar & Frame::nNextId;
68 | ar & KeyFrame::nNextId;
69 | ar & MapPoint::nNextId;
70 | ar & GeometricCamera::nNextId;
71 | ar & mnLastInitKFidMap;
72 | }
73 |
74 | public:
75 | Atlas();
76 | Atlas(int initKFid); // When its initialization the first map is created
77 | ~Atlas();
78 |
79 | void CreateNewMap();
80 | void ChangeMap(Map* pMap);
81 |
82 | unsigned long int GetLastInitKFid();
83 |
84 | void SetViewer(Viewer* pViewer);
85 |
86 | // Method for change components in the current map
87 | void AddKeyFrame(KeyFrame* pKF);
88 | void AddMapPoint(MapPoint* pMP);
89 | //void EraseMapPoint(MapPoint* pMP);
90 | //void EraseKeyFrame(KeyFrame* pKF);
91 |
92 | void AddCamera(GeometricCamera* pCam);
93 |
94 | /* All methods without Map pointer work on current map */
95 | void SetReferenceMapPoints(const std::vector &vpMPs);
96 | void InformNewBigChange();
97 | int GetLastBigChangeIdx();
98 |
99 | long unsigned int MapPointsInMap();
100 | long unsigned KeyFramesInMap();
101 |
102 | // Method for get data in current map
103 | std::vector GetAllKeyFrames();
104 | std::vector GetAllMapPoints();
105 | std::vector GetReferenceMapPoints();
106 |
107 | vector