|
Isis 3 Programmer Reference
|
11 #include "TaylorCameraDistortionMap.h"
29 TaylorCameraDistortionMap::TaylorCameraDistortionMap(
Camera *parent,
double zDirection):
64 QString odtxkey =
"INS" +
toString(naifIkCode) +
"_OD_T_X";
65 QString odtykey =
"INS" +
toString(naifIkCode) +
"_OD_T_Y";
66 for(
int i = 0; i < 10; ++i) {
105 const double tol = 1.4E-5;
108 const int maxTries = 20;
125 for(
int count = 1; ((fabs(fx) + fabs(fy)) > tol) && (count < maxTries); count++) {
134 double determinant = Jxx * Jyy - Jxy * Jyx;
135 if(determinant < 1
E-6) {
143 x = x + (Jyy * fx - Jxy * fy) / determinant;
144 y = y + (Jxx * fy - Jyx * fx) / determinant;
147 if((fabs(fx) + fabs(fy)) <= tol) {
220 for(
int i = 0; i < 10; i++) {
221 *dx = *dx + f[i] *
p_odtx[i];
222 *dy = *dy + f[i] *
p_odty[i];
269 for(
int i = 0; i < 10; i++) {
270 *Jxx = *Jxx + d_dx[i] *
p_odtx[i];
271 *Jxy = *Jxy + d_dy[i] *
p_odtx[i];
272 *Jyx = *Jyx + d_dx[i] *
p_odty[i];
273 *Jyy = *Jyy + d_dy[i] *
p_odty[i];
double p_focalPlaneX
Distorted focal plane x.
void SetDistortion(const int naifIkCode)
Load distortion coefficients.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
void DistortionFunctionJacobian(double x, double y, double *Jxx, double *Jxy, double *Jyx, double *Jyy)
Jacobian of the distortion function.
void DistortionFunction(double ux, double uy, double *dx, double *dy)
Compute distorted focal plane dx,dy given an undistorted focal plane ux,uy.
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.
std::vector< double > p_odtx
distortion x coefficients
Camera * p_camera
The camera to distort/undistort.
Distort/undistort focal plane coordinates.
Namespace for the standard library.
std::vector< double > p_odty
distortion y coefficients
const double E
Sets some basic constants for use in ISIS programming.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
double p_focalPlaneY
Distorted focal plane y.
This is free and unencumbered software released into the public domain.