Jafar
Classes | Namespaces | Typedefs | Functions
Module geom

Detailed Description

Version:
0.1
Author:
thomas.lemaire@laas.fr, ayman.zureiki@laas.fr, martial.sanfourche@laas.fr

The module geom contains 2D and 3D geometry tools.

History

Requirements

CGAL

./configure --with-cgal=/usr/local/CGAL-3.1 --with-cgallib=/usr/local/CGAL-3.1/lib/$CGAL_OS_COMPILER

T3D

Different T3D representations are available:

All the T3D representations share the same computation layer using homogeneous matrix.

A special attention is required for functions:

Consider $ P_A = T3D P_B $ with $ T3D = \left[ \begin{array} {cc} R & T \\ \end{array} \right] $ i.e.

\[ \left( \begin{array}{c} P_A\\ 1\\ \end{array} \right) = \left( \begin{array}{ccc} R & T \\ 0 & 1 \\ \end{array} \right) \left( \begin{array}{c} P_B\\ 1\\ \end{array} \right) \]

then $ P_A = R P_B + T $

so

\[ JPtB = \frac {dP_A}{dP_B} = R \]

and

\[ JT3D = \frac {dP_A}{dT3D} = \left( \begin{array}{cc} Id(3) & J \end{array} \right) \]

with $ J $ the Jacobian of $ P_A $ with respect to the rotation part of the vectorized T3D.

Consider $ P_B = T3D^{-1} P_A $ with $ T3D = \left[ \begin{array} {cc} R & T \\ \end{array} \right] $ i.e.

\[ \left( \begin{array}{c} P_B\\ 1\\ \end{array} \right) = \left( \begin{array}{ccc} R^T & -R^TT \\ 0 & 1 \\ \end{array} \right) \left( \begin{array}{c} P_A\\ 1\\ \end{array} \right) \]

then $ P_B = R^T P_A - R^TT = R^T(P_A - T)$

so

\[ JPtA = \frac {dP_B}{dP_A} = R^T \]

and

\[ JT3D = \frac {dP_B}{dT3D} = \left( \begin{array}{cc} -R^T & J\\ \end{array} \right) \]

with $ J $ the Jacobian of $ P_B $ with respect to the rotation part of the vectorized T3D.

Macro

Extra doc for macro can go here... (you can delete this section if not relevant)

Tcl interface (generated by swig)

The interface of the module is generated from the following files:

Classes

struct  jafar::geom::Box< T >
class  jafar::geom::OGSensorModel
class  jafar::geom::DenseOG
class  jafar::geom::SparseOG
class  jafar::geom::Atom< dimension >
 class Atom Atom is the base class of geometric objects. More...
class  jafar::geom::BoundingBox< dimension >
 A BoundingBox is the smallest box that contains an Atom . More...
class  jafar::geom::Facet< dimension >
class  jafar::geom::GeomException
 Base class for all exceptions defined in the module geom. More...
class  jafar::geom::HyperPlane< dimension >
 An HyperPlane is a space of dimension (n-1), this correspond to a Plan in dimension 3 and to a Line in dimension 2. More...
class  jafar::geom::InterestPoint
 This class represents an interest point. More...
class  jafar::geom::Line< dimension >
 This class defines a line (which is a space of dimension 1). More...
class  jafar::geom::OrientedPlan< dimension >
 This class represent an hyperplan associated to a repere. More...
class  jafar::geom::Point< dimension >
 class Point This class represents a point. More...
class  jafar::geom::Point< dimension >::Driver
 class Driver Base class for driver of a point More...
class  jafar::geom::Point< dimension >::EuclideanDriver
 class EuclideanDriver Euclidean Driver for a point that is defined by its absolute coordinates. More...
class  jafar::geom::Rectangle< _T_ >
 This class is used to represent a rectangle on an image. More...
class  jafar::geom::Repere< dimension >
 This class represent a Repere which can be used as a reference for other. More...
class  jafar::geom::Repere3D
 3D Reference More...
class  jafar::geom::Segment< dimension >
 This class defines a segment (which is a bounded space of dimension 1). More...
class  jafar::geom::T3D
 A generic 3D transformation, support for uncertain transformation. More...
class  jafar::geom::T3DEuler
 A 3D transformation, the rotation is represented with Euler angles. More...
class  jafar::geom::T3DQuaternion
 A 3D transformation where the rotation is represented with a quaternion. More...
class  jafar::geom::T3DRotationVector
 A 3D transformation the rotation is represented with a quaternion. More...
class  jafar::stereo::StereoOGSensorModel

Namespaces

namespace  jafar::geom::t3d
 

This namespace contains free functions related to T3D class.


Typedefs

typedef
boost::numeric::ublas::bounded_vector
< double, 3 > 
jafar::geom::VoxelCoord

Functions

template<int dimension>
void jafar::geom::cosAngleCov (const typename Atom< dimension >::HomogenousVecD &v1, const typename Atom< dimension >::HomogenousSymMatrixD &v1Cov, const typename Atom< dimension >::HomogenousVecD &v2, const typename Atom< dimension >::HomogenousSymMatrixD &v2Cov, double &angle, double &cov)
 Compute the cosinus of the angle between two vectors and the associated covariance.
template<int dimension>
bool jafar::geom::intersection (const Line< dimension > &l1, const HyperPlane< dimension > &hyp, typename Atom< dimension >::HomogenousVecD &vec)
 Compute the interesection between a line and an hyperplane.
template<int dimension>
bool jafar::geom::intersection (const Line< dimension > &l1, const Line< dimension > &l2, typename Atom< dimension >::HomogenousVecD &vec)
 Compute the interesection between two lines.
void jafar::geom::t3d::invJacEuler (const jblas::vec &v, jblas::mat &J)
 Compute jacobian of inverse fonction (Euler).
void jafar::geom::t3d::composeJacEuler (jblas::vec const &v1_, jblas::vec const &v2_, jblas::mat &J1, jblas::mat &J2)
 Compute jacobian of compose fonction (Euler).
template<class VecT , class VecPt , class MatJT , class MatJPt >
void jafar::geom::t3d::pointFromFrameJacEuler (VecT const &t, VecPt const &pt, MatJT &JT, MatJPt &JPt)
 Compute jacobian of t3d::pointFromFrame() (Euler).
template<class VecT , class VecPt , class MatJT , class MatJPt >
void jafar::geom::t3d::pointToFrameJacEuler (VecT const &t, VecPt const &pt, MatJT &JT, MatJPt &JPt)
 Compute jacobian of t3d::pointToFrame() (Euler).
template<class VecPtB , class VecPtA >
void jafar::geom::t3d::pointFromFrame (T3D const &aToB, VecPtB const &ptB, VecPtA &ptA)
 Apply transformation aToB to ptB in order to obtain coordinate of the vector in frame A vA.
template<class VecPtB , class MatJT3D , class MatJPtB >
void jafar::geom::t3d::pointFromFrameJac (T3D const &aToB, VecPtB const &ptB, MatJT3D &JT3D, MatJPtB &JPtB)
 Compute jacobian of pointFromFrame()
template<class VecPtB , class MatJT3D , class MatJPtB >
void jafar::geom::t3d::pointFromFrameJac (T3D const &aToB, VecPtB const &ptB, VecPtB &ptA, MatJT3D &JT3D, MatJPtB &JPtB)
 Compute pointFromFrame() and its jacobians.
template<class VecPtB , class VecPtA >
void jafar::geom::t3d::pointToFrame (T3D const &aToB, VecPtA const &ptA, VecPtB &ptB)
 Apply transformation aToB to ptA in order to obtain coordinate of the vector in frame B ptB.
template<class VecPtB , class MatJT3D , class MatJPtA >
void jafar::geom::t3d::pointToFrameJac (T3D const &aToB, VecPtB const &ptA, MatJT3D &JT3D, MatJPtA &JPtA)
 Compute jacobian of pointToFrame()
template<class VecPtB , class MatJT3D , class MatJPtA >
void jafar::geom::t3d::pointToFrameJac (T3D const &aToB, VecPtB const &ptA, VecPtB &ptB, MatJT3D &JT3D, MatJPtA &JPtA)
 Compute pointToFrame() and its jacobians.
template<class VecT , class VecPt , class MatJT , class MatJPt >
void jafar::geom::t3d::pointFromFrameJacQuaternion (VecT const &t, VecPt const &pt, MatJT &JT, MatJPt &JPt)
 Compute jacobian of pointFromFrame()
template<class VecT , class VecPt , class MatJT , class MatJPt >
void jafar::geom::t3d::pointToFrameJacQuaternion (VecT const &t, VecPt const &pt, MatJT &JT, MatJPt &JPt)
 Compute jacobian of pointToFrame()

Function Documentation

template<int dimension>
bool jafar::geom::intersection ( const Line< dimension > &  l1,
const HyperPlane< dimension > &  hyp,
typename Atom< dimension >::HomogenousVecD &  vec 
) [inline]

Compute the interesection between a line and an hyperplane.

The result, is undefined if l1 and hyp are parallel.

Returns:
false if the line are parallel

Definition at line 6 of file IntersectionImpl.hpp.

References jafar::geom::HyperPlane< dimension >::normal(), jafar::geom::HyperPlane< dimension >::origin(), jafar::geom::Line< dimension >::origin(), and jafar::geom::Line< dimension >::pointAt().

template<int dimension>
bool jafar::geom::intersection ( const Line< dimension > &  l1,
const Line< dimension > &  l2,
typename Atom< dimension >::HomogenousVecD &  vec 
) [inline]

Compute the interesection between two lines.

The result, is undefined if l1 and l2 are parallel lines.

Returns:
false if the line are parallel
template<class VecPtB , class MatJT3D , class MatJPtB >
void jafar::geom::t3d::pointFromFrameJac ( T3D const &  aToB,
VecPtB const &  ptB,
MatJT3D &  JT3D,
MatJPtB &  JPtB 
)

Compute jacobian of pointFromFrame()

Parameters:
JT3DJacobian matrix with respect to the T3D.
JPtBJacobian matrix with respect to the input point.

Definition at line 47 of file t3dPointTools.hpp.

References jafar::geom::T3D::EULER, JFR_PRECOND, JFR_RUN_TIME, JFR_TRACE_END, jafar::geom::t3d::pointFromFrameJacEuler(), jafar::geom::t3d::pointFromFrameJacQuaternion(), jafar::geom::T3D::QUATERNION, and jafar::geom::T3D::type().

template<class VecPtB , class MatJT3D , class MatJPtB >
void jafar::geom::t3d::pointFromFrameJac ( T3D const &  aToB,
VecPtB const &  ptB,
VecPtB &  ptA,
MatJT3D &  JT3D,
MatJPtB &  JPtB 
)

Compute pointFromFrame() and its jacobians.

Parameters:
aToBinput T3D from frame A to frame B
ptBinput point expressed in frame B
ptAoutput point expressed in frame A
JT3Doutput Jacobian matrix with respect to the T3D.
JPtBoutput Jacobian matrix with respect to the input point.

Definition at line 82 of file t3dPointTools.hpp.

References jafar::geom::T3D::EULER, JFR_PRECOND, JFR_RUN_TIME, JFR_TRACE_END, jafar::geom::t3d::pointFromFrame(), jafar::geom::t3d::pointFromFrameJacEuler(), jafar::geom::t3d::pointFromFrameJacQuaternion(), jafar::geom::T3D::QUATERNION, and jafar::geom::T3D::type().

template<class VecT , class VecPt , class MatJT , class MatJPt >
void jafar::geom::t3d::pointFromFrameJacQuaternion ( VecT const &  t,
VecPt const &  pt,
MatJT &  JT,
MatJPt &  JPt 
)

Compute jacobian of pointFromFrame()

Parameters:
tvectorized T3DQuaternion must be of size 7.
pt3D point must be of size 3.
JTJacobian matrix with respect to the T3D must be 3x7.
JPtJacobian matrix with respect to the input point must be 3x3.

Definition at line 65 of file t3dQuaternion.hpp.

References JFR_PRECOND.

Referenced by jafar::geom::t3d::pointFromFrameJac().

template<class VecPtB , class VecPtA >
void jafar::geom::t3d::pointToFrame ( T3D const &  aToB,
VecPtA const &  ptA,
VecPtB &  ptB 
)

Apply transformation aToB to ptA in order to obtain coordinate of the vector in frame B ptB.

This operation requires the invertion of aToB.

Definition at line 118 of file t3dPointTools.hpp.

References JFR_PRECOND.

Referenced by jafar::geom::t3d::pointToFrameJac().

template<class VecPtB , class MatJT3D , class MatJPtA >
void jafar::geom::t3d::pointToFrameJac ( T3D const &  aToB,
VecPtB const &  ptA,
MatJT3D &  JT3D,
MatJPtA &  JPtA 
)

Compute jacobian of pointToFrame()

Parameters:
JT3DJacobian matrix with respect to the T3D.
JPtAJacobian matrix with respect to the input point.

Definition at line 168 of file t3dPointTools.hpp.

References jafar::geom::T3D::EULER, JFR_PRECOND, JFR_RUN_TIME, JFR_TRACE_END, jafar::geom::t3d::pointToFrameJacEuler(), jafar::geom::t3d::pointToFrameJacQuaternion(), jafar::geom::T3D::QUATERNION, and jafar::geom::T3D::type().

template<class VecPtB , class MatJT3D , class MatJPtA >
void jafar::geom::t3d::pointToFrameJac ( T3D const &  aToB,
VecPtB const &  ptA,
VecPtB &  ptB,
MatJT3D &  JT3D,
MatJPtA &  JPtA 
)

Compute pointToFrame() and its jacobians.

Parameters:
aToBinput T3D from frame A to frame B
ptAinput point expressed in frame A
ptBoutput point expressed in frame B
JT3Doutput Jacobian matrix with respect to the T3D.
JPtAoutput Jacobian matrix with respect to the input point.

Definition at line 203 of file t3dPointTools.hpp.

References jafar::geom::T3D::EULER, JFR_PRECOND, JFR_RUN_TIME, JFR_TRACE_END, jafar::geom::t3d::pointToFrame(), jafar::geom::t3d::pointToFrameJacEuler(), jafar::geom::t3d::pointToFrameJacQuaternion(), jafar::geom::T3D::QUATERNION, and jafar::geom::T3D::type().

template<class VecT , class VecPt , class MatJT , class MatJPt >
void jafar::geom::t3d::pointToFrameJacQuaternion ( VecT const &  t,
VecPt const &  pt,
MatJT &  JT,
MatJPt &  JPt 
)

Compute jacobian of pointToFrame()

Parameters:
tvectorized T3DQuaternion must be of size 7.
pt3D point must be of size 3.
JTJacobian matrix with respect to the T3D must be 3x7.
JPtJacobian matrix with respect to the input point must be 3x3.

Definition at line 120 of file t3dQuaternion.hpp.

References JFR_PRECOND.

Referenced by jafar::geom::t3d::pointToFrameJac().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:30 for Jafar by doxygen 1.7.6.1
LAAS-CNRS