Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robust triangulation #1020

Merged
merged 10 commits into from
Jan 18, 2022
Prev Previous commit
Next Next commit
moved invDepth-related variables
  • Loading branch information
lcarlone committed Jan 9, 2022
commit c407609b8f8d2d6f7c110bc757325826f83e75e1
13 changes: 3 additions & 10 deletions gtsam/geometry/triangulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,27 +350,23 @@ struct GTSAM_EXPORT TriangulationParameters {

SharedNoiseModel noiseModel; ///< used in the nonlinear triangulation

bool invDepthLinearTriangulation; ///< if set to true, we use an inverse depth alternative to DL

/**
* Constructor
* @param rankTol tolerance used to check if point triangulation is degenerate
* @param enableEPI if true refine triangulation with embedded LM iterations
* @param landmarkDistanceThreshold flag as degenerate if point further than this
* @param dynamicOutlierRejectionThreshold or if average error larger than this
* @param invDepthLinearTriangulation use inverse depth approach to linear triangulation
* @param noiseModel noise model to use during nonlinear triangulation
*
*/
TriangulationParameters(const double _rankTolerance = 1.0,
const bool _enableEPI = false, double _landmarkDistanceThreshold = -1,
double _dynamicOutlierRejectionThreshold = -1,
const SharedNoiseModel& _noiseModel = nullptr,
const bool _invDepthLinearTriangulation = false) :
const SharedNoiseModel& _noiseModel = nullptr) :
rankTolerance(_rankTolerance), enableEPI(_enableEPI), //
landmarkDistanceThreshold(_landmarkDistanceThreshold), //
dynamicOutlierRejectionThreshold(_dynamicOutlierRejectionThreshold),
noiseModel(_noiseModel),
invDepthLinearTriangulation(_invDepthLinearTriangulation){
noiseModel(_noiseModel){
}

// stream to output
Expand All @@ -383,8 +379,6 @@ struct GTSAM_EXPORT TriangulationParameters {
os << "dynamicOutlierRejectionThreshold = "
<< p.dynamicOutlierRejectionThreshold << std::endl;
os << "noise model" << std::endl;
os << "invDepthLinearTriangulation = " << p.invDepthLinearTriangulation
<< std::endl;
return os;
}

Expand All @@ -398,7 +392,6 @@ struct GTSAM_EXPORT TriangulationParameters {
ar & BOOST_SERIALIZATION_NVP(enableEPI);
ar & BOOST_SERIALIZATION_NVP(landmarkDistanceThreshold);
ar & BOOST_SERIALIZATION_NVP(dynamicOutlierRejectionThreshold);
ar & BOOST_SERIALIZATION_NVP(invDepthLinearTriangulation);
}
};

Expand Down