Moved back to geometry module, fixed doxygen warnings

release/4.3a0
Frank Dellaert 2011-09-07 12:54:01 +00:00
parent 2caa56c0d5
commit 44e43f2393
1 changed files with 32 additions and 22 deletions

View File

@ -24,31 +24,36 @@
namespace gtsam { namespace gtsam {
/** /**
* 2D Point * 2D Point in homogeneous coordinates
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor1<3> Point2h; typedef tensors::Tensor1<3> Point2h;
Point2h point2h(double x, double y, double w); Point2h point2h(double x, double y, double w); ///< create Point2h
/** /**
* 2D Line * 2D Line in homogeneous coordinates
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor1<3> Line2h; typedef tensors::Tensor1<3> Line2h;
Line2h line2h(double a, double b, double c); Line2h line2h(double a, double b, double c); ///< create Line2h
/** /**
* 2D Point corrrespondence * 2D (homegeneous) Point correspondence
* @ingroup tensors * @ingroup geometry
*/ */
struct Correspondence { struct Correspondence {
Point2h first, second; Point2h first; ///< First point
Point2h second; ///< Second point
/// Create a correspondence pair
Correspondence(const Point2h &p1, const Point2h &p2) : Correspondence(const Point2h &p1, const Point2h &p2) :
first(p1), second(p2) { first(p1), second(p2) {
} }
/// Swap points
Correspondence swap() const { Correspondence swap() const {
return Correspondence(second, first); return Correspondence(second, first);
} }
/// print
void print() { void print() {
tensors::Index<3, 'i'> i; tensors::Index<3, 'i'> i;
tensors::print(first(i), "first :"); tensors::print(first(i), "first :");
@ -58,25 +63,30 @@ namespace gtsam {
/** /**
* 2D-2D Homography * 2D-2D Homography
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor2<3, 3> Homography2; typedef tensors::Tensor2<3, 3> Homography2;
/** /**
* Fundamental Matrix * Fundamental Matrix
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor2<3, 3> FundamentalMatrix; typedef tensors::Tensor2<3, 3> FundamentalMatrix;
/** /**
* Triplet of points * Triplet of (homogeneous) 2D points
* @ingroup tensors * @ingroup geometry
*/ */
struct Triplet { struct Triplet {
Point2h first, second, third; Point2h first; ///< First point
Point2h second; ///< Second point
Point2h third; ///< Third point
/// Create a Triplet correspondence
Triplet(const Point2h &p1, const Point2h &p2, const Point2h &p3) : Triplet(const Point2h &p1, const Point2h &p2, const Point2h &p3) :
first(p1), second(p2), third(p3) { first(p1), second(p2), third(p3) {
} }
/// print
void print() { void print() {
tensors::Index<3, 'i'> i; tensors::Index<3, 'i'> i;
tensors::print(first(i), "first :"); tensors::print(first(i), "first :");
@ -87,27 +97,27 @@ namespace gtsam {
/** /**
* Trifocal Tensor * Trifocal Tensor
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor3<3, 3, 3> TrifocalTensor; typedef tensors::Tensor3<3, 3, 3> TrifocalTensor;
/** /**
* 3D Point * 3D Point in homogeneous coordinates
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor1<4> Point3h; typedef tensors::Tensor1<4> Point3h;
Point3h point3h(double X, double Y, double Z, double W); Point3h point3h(double X, double Y, double Z, double W); ///< create Point3h
/** /**
* 3D Plane * 3D Plane in homogeneous coordinates
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor1<4> Plane3h; typedef tensors::Tensor1<4> Plane3h;
Plane3h plane3h(double a, double b, double c, double d); Plane3h plane3h(double a, double b, double c, double d); ///< create Plane3h
/** /**
* 3D to 2D projective camera * 3D to 2D projective camera
* @ingroup tensors * @ingroup geometry
*/ */
typedef tensors::Tensor2<3, 4> ProjectiveCamera; typedef tensors::Tensor2<3, 4> ProjectiveCamera;