Class NullDistortion

Inheritance Relationships

Base Type

Class Documentation

class aslam::NullDistortion : public aslam::Cloneable<Distortion, NullDistortion>

An implementation of the Null distortion model does nothing.

Constructors/destructors and operators

inline NullDistortion()

NullDistortion Ctor.

NullDistortion(const NullDistortion&) = default

Copy constructor for clone operation.

void operator=(const NullDistortion&) = delete
friend friend std::ostream & operator<< (std::ostream &out, const NullDistortion &distortion)

Convenience function to print the state using streams.

Distort methods: applies the distortion model to a point.

inline virtual void distortUsingExternalCoefficients(const Eigen::VectorXd*, Eigen::Vector2d*, Eigen::Matrix2d *out_jacobian) const

Apply distortion to a point in the normalized image plane using provided distortion coefficients.

External distortion coefficients can be specified using this function. (Ignores the internally stored parameters.

Parameters
  • dist_coeffs[in] Vector containing the coefficients for the distortion model. NOTE: If nullptr, use internal distortion parameters.

  • point[inout] The point in the normalized image plane. After the function, this point is distorted.

  • out_jacobian[out] The Jacobian of the distortion function with respect to small changes in the input point. If NULL is passed, the Jacobian calculation is skipped.

template<typename ScalarType, typename MDistortion>
inline void distortUsingExternalCoefficients(const Eigen::MatrixBase<MDistortion>&, const Eigen::Matrix<ScalarType, 2, 1> &point, Eigen::Matrix<ScalarType, 2, 1> *out_point) const

Template version of the distortExternalCoeffs function.

Parameters
  • dist_coeffs[in] Vector containing the coefficients for the distortion model.

  • point[in] The point in the normalized image plane. After the function, this point is distorted.

  • out_point[out] The distorted point.

inline virtual void distortParameterJacobian(const Eigen::VectorXd*, const Eigen::Vector2d&, Eigen::Matrix<double, 2, Eigen::Dynamic> *out_jacobian) const

Apply distortion to the point and provide the Jacobian of the distortion with respect to small changes in the distortion parameters.

Parameters
  • dist_coeffs[in] Vector containing the coefficients for the distortion model. NOTE: If nullptr, use internal distortion parameters.

  • point[in] The point in the normalized image plane.

  • out_jacobian[out] The Jacobian of the distortion with respect to small changes in the distortion parameters.

Undistort methods: Removes the modeled distortion effects from a

point.

inline virtual void undistortUsingExternalCoefficients(const Eigen::VectorXd&, Eigen::Vector2d*) const

Apply undistortion to recover a point in the normalized image plane using provided distortion coefficients.

External distortion coefficients can be specified using this function. Ignores the internally stored parameters.

Parameters
  • dist_coeffs[in] Vector containing the coefficients for the distortion model.

  • point[inout] The distorted point. After the function, this point is in the normalized image plane.

Methods to support unit testing.

static inline NullDistortion::UniquePtr createTestDistortion()

Create a test distortion object for unit testing.

Methods to set/get distortion parameters

inline virtual bool distortionParametersValid(const Eigen::VectorXd&) const

Check the validity of distortion parameters.

Parameters

dist_coeffs[in] Vector containing the coefficients. Parameters will NOT be stored.

Returns

If the distortion parameters are valid.

inline virtual int getParameterSize() const

Returns the number of parameters used in the distortion model.

NOTE: Use the constexpr function parameterCount if you know the exact distortion type.

inline virtual void printParameters(std::ostream &out, const std::string &text) const

Print the internal parameters of the distortion in a human-readable form Print to the ostream that is passed in.

The text is extra text used by the calling function to distinguish cameras.

static inline bool areParametersValid(const Eigen::VectorXd&)

Static function that checks whether the given intrinsic parameters are valid for this model.

static inline constexpr size_t parameterCount()

Returns the number of parameters used in this distortion model.

Public Types

enum [anonymous]

Number of parameters used for this distortion model.

Values:

enumerator kNumOfParams
enum [anonymous]

Values:

enumerator CLASS_SERIALIZATION_VERSION

Public Functions

ASLAM_POINTER_TYPEDEFS(NullDistortion)