OKVIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
okvis::cameras::RadialTangentialDistortion Class Reference

#include <RadialTangentialDistortion.hpp>

Inheritance diagram for okvis::cameras::RadialTangentialDistortion:
okvis::cameras::DistortionBase

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW RadialTangentialDistortion ()
 The default constructor with all zero ki. More...
 
 RadialTangentialDistortion (double k1, double k2, double p1, double p2)
 Constructor initialising ki. More...
 
Distortion functions
bool distort (const Eigen::Vector2d &pointUndistorted, Eigen::Vector2d *pointDistorted) const
 Distortion only. More...
 
bool distort (const Eigen::Vector2d &pointUndistorted, Eigen::Vector2d *pointDistorted, Eigen::Matrix2d *pointJacobian, Eigen::Matrix2Xd *parameterJacobian=NULL) const
 Distortion and Jacobians. More...
 
bool distortWithExternalParameters (const Eigen::Vector2d &pointUndistorted, const Eigen::VectorXd &parameters, Eigen::Vector2d *pointDistorted, Eigen::Matrix2d *pointJacobian=NULL, Eigen::Matrix2Xd *parameterJacobian=NULL) const
 Distortion and Jacobians using external distortion intrinsics parameters. More...
 
Undistortion functions
bool undistort (const Eigen::Vector2d &pointDistorted, Eigen::Vector2d *pointUndistorted) const
 Undistortion only. More...
 
bool undistort (const Eigen::Vector2d &pointDistorted, Eigen::Vector2d *pointUndistorted, Eigen::Matrix2d *pointJacobian) const
 Undistortion only. More...
 
- Public Member Functions inherited from okvis::cameras::DistortionBase
virtual
EIGEN_MAKE_ALIGNED_OPERATOR_NEW 
~DistortionBase ()
 Destructor – not doing anything. More...
 

Static Public Member Functions

static std::shared_ptr
< DistortionBase
createTestObject ()
 Unit test support – create a test distortion object. More...
 
static RadialTangentialDistortion testObject ()
 Unit test support – create a test distortion object. More...
 

Protected Attributes

Eigen::Matrix< double,
NumDistortionIntrinsics, 1 > 
parameters_
 all distortion parameters More...
 
double k1_
 radial parameter 1 More...
 
double k2_
 radial parameter 2 More...
 
double p1_
 tangential parameter 1 More...
 
double p2_
 tangential parameter 2 More...
 

Methods related to generic parameters

static const int NumDistortionIntrinsics = 4
 
bool setParameters (const Eigen::VectorXd &parameters)
 set the generic parameters More...
 
bool getParameters (Eigen::VectorXd &parameters) const
 Obtain the generic parameters. More...
 
std::string type () const
 The class type. More...
 
int numDistortionIntrinsics () const
 Number of distortion parameters. More...
 

Constructor & Destructor Documentation

okvis::cameras::RadialTangentialDistortion::RadialTangentialDistortion ( )
inline

The default constructor with all zero ki.

okvis::cameras::RadialTangentialDistortion::RadialTangentialDistortion ( double  k1,
double  k2,
double  p1,
double  p2 
)
inline

Constructor initialising ki.

Parameters
[in]k1radial parameter 1
[in]k2radial parameter 2
[in]p1tangential parameter 1
[in]p2tangential parameter 2

Member Function Documentation

static std::shared_ptr<DistortionBase> okvis::cameras::RadialTangentialDistortion::createTestObject ( )
inlinestatic

Unit test support – create a test distortion object.

bool okvis::cameras::RadialTangentialDistortion::distort ( const Eigen::Vector2d &  pointUndistorted,
Eigen::Vector2d *  pointDistorted 
) const
inlinevirtual

Distortion only.

Parameters
[in]pointUndistortedThe undistorted normalised (!) image point.
[out]pointDistortedThe distorted normalised (!) image point.
Returns
True on success (no singularity)

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::RadialTangentialDistortion::distort ( const Eigen::Vector2d &  pointUndistorted,
Eigen::Vector2d *  pointDistorted,
Eigen::Matrix2d *  pointJacobian,
Eigen::Matrix2Xd *  parameterJacobian = NULL 
) const
inlinevirtual

Distortion and Jacobians.

Parameters
[in]pointUndistortedThe undistorted normalised (!) image point.
[out]pointDistortedThe distorted normalised (!) image point.
[out]pointJacobianThe Jacobian w.r.t. changes on the image point.
[out]parameterJacobianThe Jacobian w.r.t. changes on the intrinsics vector.
Returns
True on success (no singularity)

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::RadialTangentialDistortion::distortWithExternalParameters ( const Eigen::Vector2d &  pointUndistorted,
const Eigen::VectorXd &  parameters,
Eigen::Vector2d *  pointDistorted,
Eigen::Matrix2d *  pointJacobian = NULL,
Eigen::Matrix2Xd *  parameterJacobian = NULL 
) const
inlinevirtual

Distortion and Jacobians using external distortion intrinsics parameters.

Parameters
[in]pointUndistortedThe undistorted normalised (!) image point.
[in]parametersThe distortion intrinsics vector.
[out]pointDistortedThe distorted normalised (!) image point.
[out]pointJacobianThe Jacobian w.r.t. changes on the image point.
[out]parameterJacobianThe Jacobian w.r.t. changes on the intrinsics vector.
Returns
True on success (no singularity)

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::RadialTangentialDistortion::getParameters ( Eigen::VectorXd &  parameters) const
inlinevirtual

Obtain the generic parameters.

Implements okvis::cameras::DistortionBase.

int okvis::cameras::RadialTangentialDistortion::numDistortionIntrinsics ( ) const
inlinevirtual

Number of distortion parameters.

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::RadialTangentialDistortion::setParameters ( const Eigen::VectorXd &  parameters)
inlinevirtual

set the generic parameters

Parameters
[in]parametersParameter vector – length must correspond numDistortionIntrinsics().
Returns
True if the requirements were followed.

Implements okvis::cameras::DistortionBase.

static RadialTangentialDistortion okvis::cameras::RadialTangentialDistortion::testObject ( )
inlinestatic

Unit test support – create a test distortion object.

std::string okvis::cameras::RadialTangentialDistortion::type ( ) const
inlinevirtual

The class type.

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::RadialTangentialDistortion::undistort ( const Eigen::Vector2d &  pointDistorted,
Eigen::Vector2d *  pointUndistorted 
) const
inlinevirtual

Undistortion only.

Parameters
[in]pointDistortedThe distorted normalised (!) image point.
[out]pointUndistortedThe undistorted normalised (!) image point.
Returns
True on success (no singularity)

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::RadialTangentialDistortion::undistort ( const Eigen::Vector2d &  pointDistorted,
Eigen::Vector2d *  pointUndistorted,
Eigen::Matrix2d *  pointJacobian 
) const
inlinevirtual

Undistortion only.

Parameters
[in]pointDistortedThe distorted normalised (!) image point.
[out]pointUndistortedThe undistorted normalised (!) image point.
[out]pointJacobianThe Jacobian w.r.t. changes on the image point.
Returns
True on success (no singularity)

Implements okvis::cameras::DistortionBase.

Member Data Documentation

double okvis::cameras::RadialTangentialDistortion::k1_
protected

radial parameter 1

double okvis::cameras::RadialTangentialDistortion::k2_
protected

radial parameter 2

const int okvis::cameras::RadialTangentialDistortion::NumDistortionIntrinsics = 4
static

The Number of distortion parameters.

double okvis::cameras::RadialTangentialDistortion::p1_
protected

tangential parameter 1

double okvis::cameras::RadialTangentialDistortion::p2_
protected

tangential parameter 2

Eigen::Matrix<double, NumDistortionIntrinsics, 1> okvis::cameras::RadialTangentialDistortion::parameters_
protected

all distortion parameters


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