sfm
parent
1f833a0bc3
commit
51e60cc8e0
|
@ -43,13 +43,13 @@ struct Keypoints {
|
|||
|
||||
// Optional scale of the detections, of shape N.
|
||||
// Note: gtsam::Vector is typedef'd for Eigen::VectorXd.
|
||||
boost::optional<gtsam::Vector> scales;
|
||||
std::optional<gtsam::Vector> scales;
|
||||
|
||||
/// Optional confidences/responses for each detection, of shape N.
|
||||
boost::optional<gtsam::Vector> responses;
|
||||
std::optional<gtsam::Vector> responses;
|
||||
|
||||
Keypoints(const Eigen::MatrixX2d& coordinates)
|
||||
: coordinates(coordinates){}; // boost::none
|
||||
: coordinates(coordinates){}; // std::nullopt
|
||||
};
|
||||
|
||||
using KeypointsVector = std::vector<Keypoints>;
|
||||
|
|
|
@ -424,8 +424,8 @@ NonlinearFactorGraph SfmData::generalSfmFactors(
|
|||
|
||||
/* ************************************************************************** */
|
||||
NonlinearFactorGraph SfmData::sfmFactorGraph(
|
||||
const SharedNoiseModel &model, boost::optional<size_t> fixedCamera,
|
||||
boost::optional<size_t> fixedPoint) const {
|
||||
const SharedNoiseModel &model, std::optional<size_t> fixedCamera,
|
||||
std::optional<size_t> fixedPoint) const {
|
||||
NonlinearFactorGraph graph = generalSfmFactors(model);
|
||||
using noiseModel::Constrained;
|
||||
if (fixedCamera) {
|
||||
|
|
|
@ -102,14 +102,14 @@ struct GTSAM_EXPORT SfmData {
|
|||
* Note: pose keys are simply integer indices, points use Symbol('p', j).
|
||||
*
|
||||
* @param model a noise model for projection errors
|
||||
* @param fixedCamera which camera to fix, if any (use boost::none if none)
|
||||
* @param fixedPoint which point to fix, if any (use boost::none if none)
|
||||
* @param fixedCamera which camera to fix, if any (use std::nullopt if none)
|
||||
* @param fixedPoint which point to fix, if any (use std::nullopt if none)
|
||||
* @return NonlinearFactorGraph
|
||||
*/
|
||||
NonlinearFactorGraph sfmFactorGraph(
|
||||
const SharedNoiseModel& model = noiseModel::Isotropic::Sigma(2, 1.0),
|
||||
boost::optional<size_t> fixedCamera = 0,
|
||||
boost::optional<size_t> fixedPoint = 0) const;
|
||||
std::optional<size_t> fixedCamera = 0,
|
||||
std::optional<size_t> fixedPoint = 0) const;
|
||||
|
||||
/// @}
|
||||
/// @name Testable
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
* the Jacobian will be multiplied with 1/sigma = sqrt(gamma).
|
||||
*/
|
||||
ShonanGaugeFactor(Key key, size_t p, size_t d = 3,
|
||||
boost::optional<double> gamma = boost::none)
|
||||
std::optional<double> gamma = {})
|
||||
: NonlinearFactor(KeyVector{key}) {
|
||||
if (p < d) {
|
||||
throw std::invalid_argument("ShonanGaugeFactor must have p>=d.");
|
||||
|
@ -103,4 +103,4 @@ public:
|
|||
};
|
||||
// \ShonanGaugeFactor
|
||||
|
||||
} // namespace gtsam
|
||||
} // namespace gtsam
|
||||
|
|
Loading…
Reference in New Issue