This seems to work perfectly (compiles, at least)
parent
ec93e0a885
commit
a6b4823203
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <gtsam/base/DerivedValue.h>
|
||||
#include <gtsam/geometry/Point2.h>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
|
@ -57,6 +58,11 @@ public:
|
|||
empty_(true), map_(NULL) {
|
||||
}
|
||||
|
||||
/// Defdault constructo acts like boost::none
|
||||
FixedRef(boost::none_t none) :
|
||||
empty_(true), map_(NULL) {
|
||||
}
|
||||
|
||||
/// Constructor that will usurp data of a fixed size matrix
|
||||
FixedRef(Fixed& fixed) :
|
||||
empty_(false), map_(NULL) {
|
||||
|
|
|
@ -381,13 +381,7 @@ public:
|
|||
}
|
||||
return pi;
|
||||
} else
|
||||
if (Dcal) {
|
||||
JacobianK fixedDcal;
|
||||
const Point2 pi = K_.uncalibrate(pn, fixedDcal);
|
||||
*Dcal = fixedDcal;
|
||||
return pi;
|
||||
} else
|
||||
return K_.uncalibrate(pn);
|
||||
return K_.uncalibrate(pn, Dcal);
|
||||
}
|
||||
|
||||
/** project a point at infinity from world coordinate to the image
|
||||
|
@ -400,7 +394,7 @@ public:
|
|||
const Point3& pw, //
|
||||
boost::optional<Matrix&> Dpose = boost::none,
|
||||
boost::optional<Matrix&> Dpoint = boost::none,
|
||||
boost::optional<Matrix25&> Dcal = boost::none) const {
|
||||
boost::optional<Matrix&> Dcal = boost::none) const {
|
||||
|
||||
if (!Dpose && !Dpoint && !Dcal) {
|
||||
const Point3 pc = pose_.rotation().unrotate(pw); // get direction in camera frame (translation does not matter)
|
||||
|
|
Loading…
Reference in New Issue