From 59e6a636f2f144672033a4cb8f948d9d26faa703 Mon Sep 17 00:00:00 2001 From: dellaert Date: Mon, 23 Feb 2015 12:41:33 +0100 Subject: [PATCH] Added Measurement type --- gtsam/geometry/CalibratedCamera.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gtsam/geometry/CalibratedCamera.h b/gtsam/geometry/CalibratedCamera.h index 0e6f83fdf..6d08f2160 100644 --- a/gtsam/geometry/CalibratedCamera.h +++ b/gtsam/geometry/CalibratedCamera.h @@ -42,6 +42,14 @@ public: */ class GTSAM_EXPORT PinholeBase { +public: + + /** + * Some classes template on either PinholeCamera or StereoCamera, + * and this typedef informs those classes what "project" returns. + */ + typedef Point2 Measurement; + private: Pose3 pose_; ///< 3D pose of camera @@ -263,8 +271,8 @@ public: } /* ************************************************************************* */ - Point2 project2(const Point3& point, OptionalJacobian<2, 6> Dpose, - OptionalJacobian<2, 3> Dpoint) const { + Point2 project2(const Point3& point, OptionalJacobian<2, 6> Dpose = boost::none, + OptionalJacobian<2, 3> Dpoint = boost::none) const { Matrix3 Rt; // calculated by transform_to if needed const Point3 q = pose().transform_to(point, boost::none, Dpoint ? &Rt : 0);