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::EquidistantDistortion Class Reference

Implements equidistant distortion. More...

#include <EquidistantDistortion.hpp>

Inheritance diagram for okvis::cameras::EquidistantDistortion:
okvis::cameras::DistortionBase

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW EquidistantDistortion ()
 The default constructor with all zero ki. More...
 
 EquidistantDistortion (double k1, double k2, double k3, double k4)
 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 EquidistantDistortion 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 k3_
 tangential parameter 1 More...
 
double k4_
 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...
 

Detailed Description

Implements equidistant distortion.

Constructor & Destructor Documentation

okvis::cameras::EquidistantDistortion::EquidistantDistortion ( )
inline

The default constructor with all zero ki.

okvis::cameras::EquidistantDistortion::EquidistantDistortion ( double  k1,
double  k2,
double  k3,
double  k4 
)
inline

Constructor initialising ki.

Parameters
[in]k1equidistant parameter 1
[in]k2equidistant parameter 2
[in]k3equidistant parameter 3
[in]k4equidistant parameter 4

Member Function Documentation

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

Unit test support – create a test distortion object.

bool okvis::cameras::EquidistantDistortion::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::EquidistantDistortion::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::EquidistantDistortion::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::EquidistantDistortion::getParameters ( Eigen::VectorXd &  parameters) const
inlinevirtual

Obtain the generic parameters.

Implements okvis::cameras::DistortionBase.

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

Number of distortion parameters.

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::EquidistantDistortion::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 EquidistantDistortion okvis::cameras::EquidistantDistortion::testObject ( )
inlinestatic

Unit test support – create a test distortion object.

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

The class type.

Implements okvis::cameras::DistortionBase.

bool okvis::cameras::EquidistantDistortion::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::EquidistantDistortion::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::EquidistantDistortion::k1_
protected

radial parameter 1

double okvis::cameras::EquidistantDistortion::k2_
protected

radial parameter 2

double okvis::cameras::EquidistantDistortion::k3_
protected

tangential parameter 1

double okvis::cameras::EquidistantDistortion::k4_
protected

tangential parameter 2

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

The Number of distortion parameters.

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

all distortion parameters


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