USGSCSM Distortion Class

Enums

enum DistortionType

Values:

enumerator RADIAL
enumerator TRANSVERSE
enumerator KAGUYALISM
enumerator DAWNFC
enumerator LROLROCNAC
enumerator CAHVOR
enumerator LUNARORBITER
enumerator RADTAN

Functions

void transverseDistortionJacobian(double x, double y, double *jacobian, std::vector<double> const &opticalDistCoeffs)

@description Calculates the Jacobian matrix of the distortion function at a specific point (x, y). The distortion model is based on the given optical distortion coefficients.

Parameters:
  • x – The x-coordinate of the point for which the Jacobian of the distortion is to be computed.

  • y – The y-coordinate of the point for which the Jacobian of the distortion is to be computed.

  • jacobian – A pointer to an array where the resulting Jacobian matrix will be stored. This matrix is represented as an array of doubles corresponding to the 2x2 Jacobian matrix flattened: [dxdx, dxdy, dydx, dydy].

  • opticalDistCoeffs – A vector of optical distortion coefficients.

Returns:

distortedJacobian The function does not return a value but instead fills the provided ‘jacobian’ array with the distorted Jacobian matrix elements.

void computeTransverseDistortion(double ux, double uy, double &dx, double &dy, std::vector<double> const &opticalDistCoeffs)

@description Compute distorted focal plane (dx,dy) coordinate given an undistorted focal plane (ux,uy) coordinate. This uses the third order Taylor approximation to the distortion model.

Parameters:
  • ux – Undistorted x

  • uy – Undistorted y

  • opticalDistCoeffs – For both X and Y coefficients

Returns:

distortedPoint Newly adjusted focal plane coordinates as an x, y tuple

void removeDistortion(double dx, double dy, double &ux, double &uy, std::vector<double> const &opticalDistCoeffs, double focalLength, DistortionType distortionType, const double tolerance = 1.0E-6)

@description Removes distortion based on Line Scanner/Camera Sensor Model in use

Parameters:
  • dx – Distorted x

  • dy – Distorted y

  • ux – Undistorted x

  • uy – Undistorted y

  • opticalDistCoeffs – For both X and Y coefficients

  • distortionType – The type of distortion being removed, based on the distortion model used

  • tolerance – Accepted tolerance to permit in calculations, set as 1.0E-6 by default

Returns:

undistortedPoint Re-adjusted focal plane coordinates as an x, y tuple

void applyDistortion(double ux, double uy, double &dx, double &dy, std::vector<double> const &opticalDistCoeffs, double focalLength, DistortionType distortionType, const double desiredPrecision = 1.0E-6, const double tolerance = 1.0E-6)

@description Applies distortion model based on Line Scanner/Camera Sensor Model in use

Parameters:
  • ux – Undistorted x

  • uy – Undistorted y

  • dx – Resulting distorted x

  • dy – Resulting distorted y

  • opticalDistCoeffs – For both X and Y coefficients

  • desiredPrecision – Amount of desired precision, set as 1.0E-6 by default

  • tolerance – Accepted tolerance to permit in calculations, set as 1.0E-6 by default

Returns:

distortedPoint Newly distorted focal plane coordinates as an x, y tuple