SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Attributes | Friends | List of all members
slip::DistortionCamera< Type > Class Template Reference

Define a DistortionCamera class. More...

#include <DistortionCamera.hpp>

Inheritance diagram for slip::DistortionCamera< Type >:
Inheritance graph

Public Member Functions

Constructors & Destructors
 DistortionCamera ()
 Default constructor of DistortionCamera. More...
 
 DistortionCamera (slip::DistStruct< Type > *dist_struct)
 Constructor of DistortionCamera. More...
 
 DistortionCamera (const self &rhs)
 Constructs a copy of the DistortionCamera rhs. More...
 
 ~DistortionCamera ()
 Destructor of the DistortionCamera. More...
 
input/output methods
void read (const std::string &file)
 Read a calibration matrix from an ASCII file. More...
 
void write (const std::string &file)
 Write a calibration matrix to an ASCII file. More...
 
Assignment operators and methods
selfoperator= (const self &rhs)
 Assign a DistortionCamera. More...
 
Projection methods
slip::Point2d< Type > projection (const slip::Point3d< Type > &p)
 Computes the projection of a 3d world point onto the image plane. More...
 
slip::Point3d< Type > backprojection (const slip::Point2d< Type > &p2, const Type &z)
 Computes the 3d world point corresponding to the backprojection of an image point. More...
 
Computation methods
void compute (const slip::Matrix< Type > &P)
 Computes the parameters of the distortion camera model. More...
 
void undistort (const slip::Matrix< Type > &P, slip::Matrix< Type > &Q)
 undistorts a vector list using the parameters of the distortion camera model More...
 
void distort (const slip::Point2d< Type > &p, slip::Point2d< Type > &pd)
 Distorts a image point using the parameters of the distortion camera model. More...
 

Public Attributes

slip::Matrix< Type > * calibration_matrix_
 
slip::DistStruct< Type > * calibration_distortions_
 
slip::Vector< Type > * calibration_vector_
 

Friends

class boost::serialization::access
 
i/o operators
std::ostream & operator<< (std::ostream &out, const self &c)
 Write the PinholeCamera to the ouput stream. More...
 

Detailed Description

template<typename Type>
class slip::DistortionCamera< Type >

Define a DistortionCamera class.

Author
Markus Jehle jehle.nosp@m._mar.nosp@m.kus@y.nosp@m.ahoo.nosp@m..de
Benoit Tremblais tremblais_AT_sic.univ-poitiers.fr
Guillaume Gomit guillaume.gomit_AT_univ-poitiers.fr
Version
0.0.1
Date
2013/02/13
Since
1.2.0
Parameters
TypeType of the coordinates of the DistortionCamera

Definition at line 147 of file DistortionCamera.hpp.

Constructor & Destructor Documentation

template<typename Type >
slip::DistortionCamera< Type >::DistortionCamera ( )
inline

Default constructor of DistortionCamera.

Definition at line 177 of file DistortionCamera.hpp.

template<typename Type >
slip::DistortionCamera< Type >::DistortionCamera ( slip::DistStruct< Type > *  dist_struct)
inline

Constructor of DistortionCamera.

Parameters
dist_structslip::DistStruct<Type> pointer

Definition at line 187 of file DistortionCamera.hpp.

template<typename Type >
slip::DistortionCamera< Type >::DistortionCamera ( const self rhs)
inline

Constructs a copy of the DistortionCamera rhs.

Parameters
rhsAn other DistorsionCamera.

Definition at line 197 of file DistortionCamera.hpp.

template<typename Type >
slip::DistortionCamera< Type >::~DistortionCamera ( )
inline

Destructor of the DistortionCamera.

Definition at line 207 of file DistortionCamera.hpp.

Member Function Documentation

template<typename Type >
slip::Point3d<Type> slip::DistortionCamera< Type >::backprojection ( const slip::Point2d< Type > &  p2,
const Type &  z 
)
inlinevirtual

Computes the 3d world point corresponding to the backprojection of an image point.

Parameters
pPoint2d.
zDepth coordinate.
Returns
Point3d

Implements slip::CameraModel< Type >.

Definition at line 343 of file DistortionCamera.hpp.

template<typename Type >
void slip::DistortionCamera< Type >::compute ( const slip::Matrix< Type > &  P)
inlinevirtual

Computes the parameters of the distortion camera model.

Parameters
PMatrix containing the input data. $(x,y)$ are the image coordinates, $(X,Y,Z)$ are the world coordinates.

\[ \begin{array}{ccccc} \cdots & \cdots & \cdots & \cdots & \cdots \\ x_{i} & y_{i} & X_{i} & Y_{i} & Z_{i} \\ \cdots & \cdots & \cdots & \cdots & \cdots\\ \end{array} \]

Implements slip::CameraModel< Type >.

Definition at line 382 of file DistortionCamera.hpp.

template<typename Type >
void slip::DistortionCamera< Type >::distort ( const slip::Point2d< Type > &  p,
slip::Point2d< Type > &  pd 
)
inline

Distorts a image point using the parameters of the distortion camera model.

Parameters
pinput point.
pdoutput distort point.

Definition at line 523 of file DistortionCamera.hpp.

template<typename Type >
self& slip::DistortionCamera< Type >::operator= ( const self rhs)
inline

Assign a DistortionCamera.

Assign elements of DistortionCamera in other

Parameters
otherDistortionCamera to get the values from.
Returns
self.

Definition at line 271 of file DistortionCamera.hpp.

template<typename Type >
slip::Point2d<Type> slip::DistortionCamera< Type >::projection ( const slip::Point3d< Type > &  p)
inlinevirtual

Computes the projection of a 3d world point onto the image plane.

Parameters
pPoint3d.
Returns
Point2d

Implements slip::CameraModel< Type >.

Definition at line 308 of file DistortionCamera.hpp.

template<typename Type >
void slip::DistortionCamera< Type >::read ( const std::string &  file)
inlinevirtual

Read a calibration matrix from an ASCII file.

Parameters
fileFile path name.
Remarks
File format: m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34 alpha_u alpha_v u0 v0 R1 R2 R3 d1 d2 p1 p2

Implements slip::CameraModel< Type >.

Definition at line 240 of file DistortionCamera.hpp.

template<typename Type >
void slip::DistortionCamera< Type >::undistort ( const slip::Matrix< Type > &  P,
slip::Matrix< Type > &  Q 
)
inline

undistorts a vector list using the parameters of the distortion camera model

Parameters
PMatrix containing the input data.
QMatrix containing the output data.
Remarks
Format: $(x,y)$ are the image coordinates, $(X,Y,Z)$ are the world coordinates.

\[ \begin{array}{ccccc} \cdots & \cdots & \cdots & \cdots & \cdots \\ x_i & y_i & X_i & Y_i & Z_i \\ \cdots & \cdots & \cdots & \cdots & \cdots \\ \end{array} \]

Precondition
P.rows()==Q.rows()
P.cols()==Q.cols()

Definition at line 498 of file DistortionCamera.hpp.

template<typename Type >
void slip::DistortionCamera< Type >::write ( const std::string &  file)
inlinevirtual

Write a calibration matrix to an ASCII file.

Parameters
fileFile path name.
Remarks
Format: m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34 alpha_u alpha_v u0 v0 R1 R2 R3 d1 d2 p1 p2

Implements slip::CameraModel< Type >.

Definition at line 252 of file DistortionCamera.hpp.

Friends And Related Function Documentation

template<typename Type >
friend class boost::serialization::access
friend

Definition at line 555 of file DistortionCamera.hpp.

template<typename Type >
std::ostream& operator<< ( std::ostream &  out,
const self c 
)
friend

Write the PinholeCamera to the ouput stream.

Parameters
outoutput stream.
cPinholeCamera to write to the output stream.

Definition at line 582 of file DistortionCamera.hpp.

Member Data Documentation

template<typename Type >
slip::DistStruct<Type>* slip::DistortionCamera< Type >::calibration_distortions_

Definition at line 551 of file DistortionCamera.hpp.

template<typename Type >
slip::Matrix<Type>* slip::DistortionCamera< Type >::calibration_matrix_

Definition at line 550 of file DistortionCamera.hpp.

template<typename Type >
slip::Vector<Type>* slip::DistortionCamera< Type >::calibration_vector_

Definition at line 552 of file DistortionCamera.hpp.


The documentation for this class was generated from the following file: