90 QString odk0 =
"INS" +
toString(naifIkCode) +
"_DISTORTION_K0";
98 QString odk1 =
"INS" +
toString(naifIkCode) +
"_DISTORTION_K1";
100 QString odk2 =
"INS" +
toString(naifIkCode) +
"_DISTORTION_K2";
101 p_odk.push_back(
p_camera->Spice::getDouble(odk2) / (p2 * p2));
131 double r2 = (ux * ux) + (uy * uy);
173 double r2 = (dx * dx) + (dy * dy);
180 bool converged =
false;
182 int maximumIterations = 15;
184 double uxEstimate = dx;
185 double uyEstimate = dy;
188 double xDistortion = 0.0;
189 double yDistortion = 0.0;
193 xDistortion = uxEstimate * dr;
194 yDistortion = uyEstimate * dr;
195 uxEstimate = dx - xDistortion;
196 uyEstimate = dy - yDistortion;
198 if (fabs(uxEstimate - uxPrev) < tolerance &&
199 fabs(uyEstimate - uyPrev) < tolerance ) {
203 if (i > maximumIterations) {
208 r2 = (uxEstimate * uxEstimate) + (uyEstimate * uyEstimate);
double p_focalPlaneX
Distorted focal plane x.
virtual void SetDistortion(int naifIkCode)
Load distortion coefficients for JunoCam.
virtual ~JunoDistortionMap()
Destructor.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
virtual bool SetFocalPlane(double dx, double dy)
Compute undistorted focal plane x/y.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
Camera * p_camera
The camera to distort/undistort.
Distort/undistort focal plane coordinates.
double PixelPitch() const
Returns the pixel pitch.
const double E
Sets some basic constants for use in ISIS programming.
JunoDistortionMap(Camera *parent)
Juno JunoCam distortion map constructor.
double p_focalPlaneY
Distorted focal plane y.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
Namespace for ISIS/Bullet specific routines.
std::vector< double > p_odk
Vector of distortion coefficients.
virtual bool SetUndistortedFocalPlane(double ux, double uy)
Compute distorted focal plane x/y.