41 TaylorCameraDistortionMap::TaylorCameraDistortionMap(
Camera *parent,
double zDirection):
76 QString odtxkey =
"INS" +
toString(naifIkCode) +
"_OD_T_X";
77 QString odtykey =
"INS" +
toString(naifIkCode) +
"_OD_T_Y";
78 for(
int i = 0; i < 10; ++i) {
117 const double tol = 1.4E-5;
120 const int maxTries = 20;
137 for(
int count = 1; ((fabs(fx) + fabs(fy)) > tol) && (count < maxTries); count++) {
146 double determinant = Jxx * Jyy - Jxy * Jyx;
147 if(determinant < 1
E-6) {
155 x = x + (Jyy * fx - Jxy * fy) / determinant;
156 y = y + (Jxx * fy - Jyx * fx) / determinant;
159 if((fabs(fx) + fabs(fy)) <= tol) {
232 for(
int i = 0; i < 10; i++) {
233 *dx = *dx + f[i] *
p_odtx[i];
234 *dy = *dy + f[i] *
p_odty[i];
281 for(
int i = 0; i < 10; i++) {
282 *Jxx = *Jxx + d_dx[i] *
p_odtx[i];
283 *Jxy = *Jxy + d_dy[i] *
p_odtx[i];
284 *Jyx = *Jyx + d_dx[i] *
p_odty[i];
285 *Jyy = *Jyy + d_dy[i] *
p_odty[i];
double p_focalPlaneX
Distorted focal plane x.
bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
std::vector< double > p_odty
distortion y coefficients
Namespace for the standard library.
bool SetUndistortedFocalPlane(const double ux, const double uy)
Compute distorted focal plane x/y.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
void DistortionFunctionJacobian(double x, double y, double *Jxx, double *Jxy, double *Jyx, double *Jyy)
Jacobian of the distortion function.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
Camera * p_camera
The camera to distort/undistort.
std::vector< double > p_odtx
distortion x coefficients
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Distort/undistort focal plane coordinates.
const double E
Sets some basic constants for use in ISIS programming.
double p_focalPlaneY
Distorted focal plane y.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
Namespace for ISIS/Bullet specific routines.
void SetDistortion(const int naifIkCode)
Load distortion coefficients.
void DistortionFunction(double ux, double uy, double *dx, double *dy)
Compute distorted focal plane dx,dy given an undistorted focal plane ux,uy.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.