From 51f79e0adf6d980394d50f6d7f1c15080f7879b4 Mon Sep 17 00:00:00 2001 From: Yong-Dian Jian Date: Sat, 24 Mar 2012 00:19:24 +0000 Subject: [PATCH] clean/remove redundant file --- gtsam/geometry/SimpleCamera.cpp | 72 ------------------------------- gtsam/geometry/SimpleCamera.h | 75 --------------------------------- 2 files changed, 147 deletions(-) delete mode 100644 gtsam/geometry/SimpleCamera.cpp diff --git a/gtsam/geometry/SimpleCamera.cpp b/gtsam/geometry/SimpleCamera.cpp deleted file mode 100644 index 31a18ab99..000000000 --- a/gtsam/geometry/SimpleCamera.cpp +++ /dev/null @@ -1,72 +0,0 @@ -///* ---------------------------------------------------------------------------- -// -// * GTSAM Copyright 2010, Georgia Tech Research Corporation, -// * Atlanta, Georgia 30332-0415 -// * All Rights Reserved -// * Authors: Frank Dellaert, et al. (see THANKS for the full author list) -// -// * See LICENSE for the license information -// -// * -------------------------------------------------------------------------- */ -// -///** -// * @file SimpleCamera.cpp -// * @date Aug 16, 2009 -// * @author dellaert -// */ -// -//#include -//#include -// -//using namespace std; -// -//namespace gtsam { -// -// /* ************************************************************************* */ -// -// SimpleCamera::SimpleCamera(const Cal3_S2& K, -// const CalibratedCamera& calibrated) : -// calibrated_(calibrated), K_(K) { -// } -// -// SimpleCamera::SimpleCamera(const Cal3_S2& K, const Pose3& pose) : -// calibrated_(pose), K_(K) { -// } -// -// SimpleCamera::~SimpleCamera() { -// } -// -// pair SimpleCamera::projectSafe(const Point3& P) const { -// Point3 cameraPoint = calibrated_.pose().transform_to(P); -// Point2 intrinsic = CalibratedCamera::project_to_camera(cameraPoint); -// Point2 projection = K_.uncalibrate(intrinsic); -// return pair(projection, cameraPoint.z() > 0); -// } -// -// Point2 SimpleCamera::project(const Point3& point, -// boost::optional H1, boost::optional H2) const { -// -// Point2 intrinsic = calibrated_.project(point, H1, H2); -// if (!H1 && !H2) -// return K_.uncalibrate(intrinsic); -// else { -// Matrix D_projection_intrinsic; -// Point2 projection = K_.uncalibrate(intrinsic, boost::none, D_projection_intrinsic); -// if (H1) *H1 = D_projection_intrinsic * (*H1); -// if (H2) *H2 = D_projection_intrinsic * (*H2); -// return projection; -// } -// } -// -// Point3 SimpleCamera::backproject(const Point2& projection, const double scale) const { -// Point2 intrinsic = K_.calibrate(projection); -// Point3 cameraPoint = CalibratedCamera::backproject_from_camera(intrinsic, scale); -// return calibrated_.pose().transform_from(cameraPoint); -// } -// -// SimpleCamera SimpleCamera::level(const Cal3_S2& K, const Pose2& pose2, double height) { -// return SimpleCamera(K, CalibratedCamera::level(pose2, height)); -// } -// -///* ************************************************************************* */ -//} diff --git a/gtsam/geometry/SimpleCamera.h b/gtsam/geometry/SimpleCamera.h index b6d060192..d3b0cdbdc 100644 --- a/gtsam/geometry/SimpleCamera.h +++ b/gtsam/geometry/SimpleCamera.h @@ -24,78 +24,3 @@ namespace gtsam { typedef PinholeCamera SimpleCamera; } - -//#include -//#include -// -//namespace gtsam { -// -// /** -// * A simple camera class with a Cal3_S2 calibration -// * Basically takes a Calibrated camera and adds calibration information -// * to produce measurements in pixels. -// * Not a sublass as a SimpleCamera *is not* a CalibratedCamera. -// */ -// class SimpleCamera { -// private: -// CalibratedCamera calibrated_; // Calibrated camera -// Cal3_S2 K_; // Calibration -// -// public: -// SimpleCamera(const Cal3_S2& K, const CalibratedCamera& calibrated); -// SimpleCamera(const Cal3_S2& K, const Pose3& pose); -// -// /** constructor for serialization */ -// SimpleCamera(){} -// -// virtual ~SimpleCamera(); -// -// const Pose3& pose() const { -// return calibrated_.pose(); -// } -// -// const Cal3_S2& calibration() const { -// return K_; -// } -// -// /** -// * project a 3d point to the camera and also check the depth -// */ -// std::pair projectSafe(const Point3& P) const; -// -// /** -// * backproject a 2d point from the camera up to a given scale -// */ -// Point3 backproject(const Point2& projection, const double scale) const; -// -// /** -// * Create a level camera at the given 2D pose and height -// * @param pose2 specifies the location and viewing direction -// * (theta 0 = looking in direction of positive X axis) -// */ -// static SimpleCamera level(const Cal3_S2& K, const Pose2& pose2, double height); -// -// /** -// * This function receives the camera pose and the landmark location and -// * returns the location the point is supposed to appear in the image -// */ -// Point2 project(const Point3& point, -// boost::optional H1 = boost::none, -// boost::optional H2 = boost::none) const; -// -// bool equals(const SimpleCamera& X, double tol=1e-9) const { -// return calibrated_.equals(X.calibrated_, tol) && K_.equals(X.K_, tol); -// } -// -// private: -// /** Serialization function */ -// friend class boost::serialization::access; -// template -// void serialize(ARCHIVE & ar, const unsigned int version) { -// ar & BOOST_SERIALIZATION_NVP(calibrated_); -// ar & BOOST_SERIALIZATION_NVP(K_); -// } -// -// }; -// -//}