31 #include "rtabmap/core/rtabmap_core_export.h"
44 FeatureBA(
const cv::KeyPoint & kptIn,
const float & depthIn = 0.0f,
const cv::Mat & descriptorIn = cv::Mat(),
int cameraIndexIn = 0):
77 void getConnectedGraph(
79 const std::map<int, Transform> & posesIn,
80 const std::multimap<int, Link> & linksIn,
81 std::map<int, Transform> & posesOut,
82 std::multimap<int, Link> & linksOut)
const;
109 virtual void parseParameters(
const ParametersMap & parameters);
111 std::map<int, Transform> optimizeIncremental(
113 const std::map<int, Transform> & poses,
114 const std::multimap<int, Link> & constraints,
115 std::list<std::map<int, Transform> > * intermediateGraphes = 0,
116 double * finalError = 0,
117 int * iterationsDone = 0);
121 const std::map<int, Transform> & poses,
122 const std::multimap<int, Link> & constraints,
123 std::list<std::map<int, Transform> > * intermediateGraphes = 0,
124 double * finalError = 0,
125 int * iterationsDone = 0);
128 virtual std::map<int, Transform>
optimize(
130 const std::map<int, Transform> & poses,
131 const std::multimap<int, Link> & constraints,
132 cv::Mat & outputCovariance,
133 std::list<std::map<int, Transform> > * intermediateGraphes = 0,
134 double * finalError = 0,
135 int * iterationsDone = 0);
136 virtual std::map<int, Transform> optimizeBA(
138 const std::map<int, Transform> & poses,
139 const std::multimap<int, Link> & links,
140 const std::map<
int, std::vector<CameraModel> > & models,
141 std::map<int, cv::Point3f> & points3DMap,
142 const std::map<
int, std::map<int, FeatureBA> > & wordReferences,
143 std::set<int> * outliers = 0);
145 std::map<int, Transform> optimizeBA(
147 const std::map<int, Transform> & poses,
148 const std::multimap<int, Link> & links,
149 const std::map<int, Signature> & signatures,
150 std::map<int, cv::Point3f> & points3DMap,
151 std::map<
int, std::map<int, FeatureBA> > & wordReferences,
152 bool rematchFeatures =
false);
154 std::map<int, Transform> optimizeBA(
156 const std::map<int, Transform> & poses,
157 const std::multimap<int, Link> & links,
158 const std::map<int, Signature> & signatures,
159 bool rematchFeatures =
false);
164 std::map<int, cv::Point3f> & points3DMap,
165 const std::map<
int, std::map<int, FeatureBA> > & wordReferences,
166 std::set<int> * outliers = 0);
168 void computeBACorrespondences(
169 const std::map<int, Transform> & poses,
170 const std::multimap<int, Link> & links,
171 const std::map<int, Signature> & signatures,
172 std::map<int, cv::Point3f> & points3DMap,
173 std::map<
int, std::map<int, FeatureBA > > & wordReferences,
174 bool rematchFeatures =
false);
178 int iterations = Parameters::defaultOptimizerIterations(),
179 bool slam2d = Parameters::defaultRegForce3DoF(),
180 bool covarianceIgnored = Parameters::defaultOptimizerVarianceIgnored(),
181 double epsilon = Parameters::defaultOptimizerEpsilon(),
182 bool robust = Parameters::defaultOptimizerRobust(),
183 bool priorsIgnored = Parameters::defaultOptimizerPriorsIgnored(),
184 bool landmarksIgnored = Parameters::defaultOptimizerLandmarksIgnored(),
185 float gravitySigma = Parameters::defaultOptimizerGravitySigma());