|
Isis 3 Programmer Reference
|
10 #include "JunoDistortionMap.h"
76 QString odk0 =
"INS" +
toString(naifIkCode) +
"_DISTORTION_K0";
84 QString odk1 =
"INS" +
toString(naifIkCode) +
"_DISTORTION_K1";
86 QString odk2 =
"INS" +
toString(naifIkCode) +
"_DISTORTION_K2";
87 p_odk.push_back(
p_camera->Spice::getDouble(odk2) / (p2 * p2));
117 double r2 = (ux * ux) + (uy * uy);
159 double r2 = (dx * dx) + (dy * dy);
166 bool converged =
false;
168 int maximumIterations = 15;
170 double uxEstimate = dx;
171 double uyEstimate = dy;
174 double xDistortion = 0.0;
175 double yDistortion = 0.0;
179 xDistortion = uxEstimate * dr;
180 yDistortion = uyEstimate * dr;
181 uxEstimate = dx - xDistortion;
182 uyEstimate = dy - yDistortion;
184 if (fabs(uxEstimate - uxPrev) < tolerance &&
185 fabs(uyEstimate - uyPrev) < tolerance ) {
189 if (i > maximumIterations) {
194 r2 = (uxEstimate * uxEstimate) + (uyEstimate * uyEstimate);
virtual void SetDistortion(int naifIkCode)
Load distortion coefficients for JunoCam.
double p_focalPlaneX
Distorted focal plane x.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
virtual ~JunoDistortionMap()
Destructor.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
virtual bool SetFocalPlane(double dx, double dy)
Compute undistorted focal plane x/y.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
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.
std::vector< double > p_odk
Vector of distortion coefficients.
virtual bool SetUndistortedFocalPlane(double ux, double uy)
Compute distorted focal plane x/y.
double p_focalPlaneY
Distorted focal plane y.
This is free and unencumbered software released into the public domain.